mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 06:02:38 +08:00
调整结构,添加 /$
This commit is contained in:
parent
d2b249f9ea
commit
3862f9d382
6
.vscode/crud.code-snippets
vendored
6
.vscode/crud.code-snippets
vendored
@ -18,7 +18,7 @@
|
|||||||
"",
|
"",
|
||||||
" <el-row>",
|
" <el-row>",
|
||||||
" <!-- 数据表格 -->",
|
" <!-- 数据表格 -->",
|
||||||
" <cl-table :ref=\"setRefs('table')\" v-bind=\"table\"></cl-table>",
|
" <cl-table :ref=\"setRefs('table')\" v-bind=\"table\" />",
|
||||||
" </el-row>",
|
" </el-row>",
|
||||||
"",
|
"",
|
||||||
" <el-row type=\"flex\">",
|
" <el-row type=\"flex\">",
|
||||||
@ -28,13 +28,13 @@
|
|||||||
" </el-row>",
|
" </el-row>",
|
||||||
"",
|
"",
|
||||||
" <!-- 新增、编辑 -->",
|
" <!-- 新增、编辑 -->",
|
||||||
" <cl-upsert :ref=\"setRefs('upsert')\" v-bind=\"upsert\"></cl-upsert>",
|
" <cl-upsert :ref=\"setRefs('upsert')\" v-bind=\"upsert\" />",
|
||||||
" </cl-crud>",
|
" </cl-crud>",
|
||||||
"</template>",
|
"</template>",
|
||||||
"",
|
"",
|
||||||
"<script lang=\"ts\">",
|
"<script lang=\"ts\">",
|
||||||
"import { defineComponent, inject, reactive } from \"vue\";",
|
"import { defineComponent, inject, reactive } from \"vue\";",
|
||||||
"import { CrudLoad, Upsert, Table } from \"/@/crud/types\";",
|
"import { CrudLoad, Upsert, Table } from \"/$/crud/types\";",
|
||||||
"import { useRefs } from \"/@/core\";",
|
"import { useRefs } from \"/@/core\";",
|
||||||
"",
|
"",
|
||||||
"export default defineComponent({",
|
"export default defineComponent({",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front-next",
|
"name": "front-next",
|
||||||
"version": "0.2.0",
|
"version": "0.2.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit --skipLibCheck && vite build",
|
"build": "vue-tsc --noEmit --skipLibCheck && vite build",
|
||||||
@ -42,6 +42,7 @@
|
|||||||
"@vitejs/plugin-vue": "^1.1.5",
|
"@vitejs/plugin-vue": "^1.1.5",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.1.3",
|
"@vitejs/plugin-vue-jsx": "^1.1.3",
|
||||||
"@vue/compiler-sfc": "^3.0.5",
|
"@vue/compiler-sfc": "^3.0.5",
|
||||||
|
"@vue/composition-api": "^1.0.0-rc.6",
|
||||||
"eslint": "^7.23.0",
|
"eslint": "^7.23.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-plugin-prettier": "^3.3.1",
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import store from "store";
|
import store from "store";
|
||||||
import { getUrlParam } from "/@/core/utils";
|
import { getUrlParam } from "/@/core/utils";
|
||||||
import { MenuItem } from "/@/cool/modules/base/types";
|
import { MenuItem } from "/$/base/types";
|
||||||
|
|
||||||
// 路由模式
|
// 路由模式
|
||||||
const routerMode = "history";
|
const routerMode = "history";
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, inject, onMounted, ref } from "vue";
|
import { defineComponent, inject, onMounted, ref } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { ContextMenu } from "/@/cool/modules/crud";
|
import { ContextMenu } from "/$/crud";
|
||||||
import { useRefs } from "/@/core";
|
import { useRefs } from "/@/core";
|
||||||
import { deepTree, isArray, revDeepTree, isPc } from "/@/core/utils";
|
import { deepTree, isArray, revDeepTree, isPc } from "/@/core/utils";
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, ref, watch } from "vue";
|
import { defineComponent, ref, watch } from "vue";
|
||||||
import { iconList } from "/@/cool/modules/base";
|
import { iconList } from "/$/base";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-menu-icons",
|
name: "cl-menu-icons",
|
||||||
|
@ -36,7 +36,7 @@ import { useStore } from "vuex";
|
|||||||
import { useRoute, useRouter } from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import { last } from "/@/core/utils";
|
import { last } from "/@/core/utils";
|
||||||
import { useRefs } from "/@/core";
|
import { useRefs } from "/@/core";
|
||||||
import { ContextMenu } from "/@/cool/modules/crud";
|
import { ContextMenu } from "/$/crud";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "cl-process",
|
name: "cl-process",
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
import { defineComponent, inject, reactive, ref } from "vue";
|
import { defineComponent, inject, reactive, ref } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { useRefs } from "/@/core";
|
import { useRefs } from "/@/core";
|
||||||
import { CrudLoad, Table } from "/@/cool/modules/crud/types";
|
import { CrudLoad, Table } from "/$/crud/types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "sys-log",
|
name: "sys-log",
|
||||||
|
@ -81,7 +81,7 @@ import { useRefs } from "/@/core";
|
|||||||
import { deepTree } from "/@/core/utils";
|
import { deepTree } from "/@/core/utils";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { defineComponent, inject, reactive } from "vue";
|
import { defineComponent, inject, reactive } from "vue";
|
||||||
import { CrudLoad, Table, Upsert, RefreshOp } from "/@/cool/modules/crud/types";
|
import { CrudLoad, Table, Upsert, RefreshOp } from "/$/crud/types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "sys-menu",
|
name: "sys-menu",
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
import { ElMessageBox } from "element-plus";
|
import { ElMessageBox } from "element-plus";
|
||||||
import { defineComponent, inject, nextTick, reactive } from "vue";
|
import { defineComponent, inject, nextTick, reactive } from "vue";
|
||||||
import { useRefs } from "/@/core";
|
import { useRefs } from "/@/core";
|
||||||
import { CrudLoad, Table, Upsert } from "/@/cool/modules/crud/types";
|
import { CrudLoad, Table, Upsert } from "/$/crud/types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "sys-param",
|
name: "sys-param",
|
||||||
|
@ -49,9 +49,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { defineComponent, inject, reactive } from "vue";
|
import { defineComponent, inject, reactive } from "vue";
|
||||||
import { checkPerm } from "/@/cool/modules/base";
|
import { checkPerm } from "/$/base";
|
||||||
import { useRefs } from "/@/core";
|
import { useRefs } from "/@/core";
|
||||||
import { CrudLoad, RefreshOp, Table } from "/@/cool/modules/crud/types";
|
import { CrudLoad, RefreshOp, Table } from "/$/crud/types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "plugin",
|
name: "plugin",
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { CrudLoad, Table, Upsert } from "/@/cool/modules/crud/types";
|
import { CrudLoad, Table, Upsert } from "/$/crud/types";
|
||||||
import { defineComponent, inject, reactive } from "vue";
|
import { defineComponent, inject, reactive } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
import { computed, defineComponent, inject, reactive, ref, watch } from "vue";
|
import { computed, defineComponent, inject, reactive, ref, watch } from "vue";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { useRefs } from "/@/core";
|
import { useRefs } from "/@/core";
|
||||||
import { Table, Upsert } from "/@/cool/modules/crud/types";
|
import { Table, Upsert } from "/$/crud/types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "sys-user",
|
name: "sys-user",
|
||||||
|
@ -57,7 +57,7 @@ import { computed, defineComponent, inject, onUnmounted, reactive, ref } from "v
|
|||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { isEmpty } from "/@/core/utils";
|
import { isEmpty } from "/@/core/utils";
|
||||||
import { ContextMenu } from "/@/cool/modules/crud";
|
import { ContextMenu } from "/$/crud";
|
||||||
import { parseContent } from "../utils";
|
import { parseContent } from "../utils";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, inject } from "vue";
|
import { defineComponent, inject } from "vue";
|
||||||
import { Crud } from "/@/cool/modules/crud/types";
|
import { Crud } from "../types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-add-btn",
|
name: "cl-add-btn",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, inject } from "vue";
|
import { defineComponent, inject } from "vue";
|
||||||
import { Crud } from "/@/cool/modules/crud/types";
|
import { Crud } from "../types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-adv-btn",
|
name: "cl-adv-btn",
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
import { defineComponent, inject, reactive, ref } from "vue";
|
||||||
|
import { useAction } from "./form/helper";
|
||||||
import { useForm, useRefs } from "../hooks/core";
|
import { useForm, useRefs } from "../hooks/core";
|
||||||
import { cloneDeep, deepMerge } from "../utils";
|
import { cloneDeep, deepMerge } from "../utils";
|
||||||
import Parse from "../utils/parse";
|
import Parse from "../utils/parse";
|
||||||
import { renderNode } from "../utils/vnode";
|
import { renderNode } from "../utils/vnode";
|
||||||
import { Browser, Crud, Mitt } from "/@/cool/modules/crud/types";
|
import { Browser, Crud, Mitt } from "../types";
|
||||||
import { defineComponent, inject, reactive, ref } from "vue";
|
|
||||||
import { useAction } from "./form/helper";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-adv-search",
|
name: "cl-adv-search",
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { nextTick, onMounted, reactive, ref } from "vue";
|
import { defineComponent, nextTick, onMounted, reactive, ref } from "vue";
|
||||||
import { useRefs } from "../../hooks/core";
|
import { useRefs } from "../../hooks/core";
|
||||||
import { contains } from "../../utils";
|
import { contains } from "../../utils";
|
||||||
import { ContextMenuItem, ContextMenuOptions } from "/@/cool/modules/crud/types";
|
import { ContextMenuItem, ContextMenuOptions } from "../../types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "cl-context-menu",
|
name: "cl-context-menu",
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
visible: Boolean
|
visible: Boolean
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(props: any) {
|
setup(props) {
|
||||||
const { refs, setRefs }: any = useRefs();
|
const { refs, setRefs }: any = useRefs();
|
||||||
|
|
||||||
// 菜单是否可见
|
// 菜单是否可见
|
||||||
@ -204,4 +204,4 @@ export default {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
import { isArray, isObject, isString } from "../../utils";
|
import { isArray, isObject, isString } from "../../utils";
|
||||||
import { ServiceName } from "/@/cool/modules/crud/types";
|
import { ServiceName } from "../../types";
|
||||||
|
|
||||||
export function useRequest({ mitt, props, crud }: any) {
|
export function useRequest({ mitt, props, crud }: any) {
|
||||||
// 刷新随机值,避免脏数据
|
// 刷新随机值,避免脏数据
|
||||||
|
@ -7,10 +7,10 @@ import {
|
|||||||
reactive,
|
reactive,
|
||||||
ref
|
ref
|
||||||
} from "vue";
|
} from "vue";
|
||||||
import Mitt from "../../utils/mitt";
|
|
||||||
import { useMitt, useRequest } from "./helper";
|
import { useMitt, useRequest } from "./helper";
|
||||||
import { bootstap } from "./app";
|
import { bootstap } from "./app";
|
||||||
import { deepMerge } from "/@/core/utils";
|
import Mitt from "../../utils/mitt";
|
||||||
|
import { deepMerge } from "../../utils";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-crud",
|
name: "cl-crud",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { defineComponent, h, inject, onMounted, ref, watch, computed } from "vue";
|
import { defineComponent, h, inject, onMounted, ref, watch, computed } from "vue";
|
||||||
import { Browser } from "/@/cool/modules/crud/types";
|
|
||||||
import { useDialog } from "./helper";
|
import { useDialog } from "./helper";
|
||||||
|
import { Browser } from "../../types";
|
||||||
import { isArray, isBoolean } from "../../utils";
|
import { isArray, isBoolean } from "../../utils";
|
||||||
import { renderNode } from "../../utils/vnode";
|
import { renderNode } from "../../utils/vnode";
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { defineComponent, inject } from "vue";
|
import { defineComponent, inject } from "vue";
|
||||||
import { Crud } from "/@/cool/modules/crud/types";
|
import { Crud } from "../types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-multi-delete-btn",
|
name: "cl-multi-delete-btn",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { h, inject, ref, watch } from "vue";
|
import { defineComponent, h, inject, ref, watch } from "vue";
|
||||||
import { Crud, Mitt } from "/@/cool/modules/crud/types";
|
import { Crud, Mitt } from "../types";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "cl-pagination",
|
name: "cl-pagination",
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -13,7 +13,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(props: any) {
|
setup(props) {
|
||||||
const crud = inject("crud") as Crud;
|
const crud = inject("crud") as Crud;
|
||||||
const mitt = inject("mitt") as Mitt;
|
const mitt = inject("mitt") as Mitt;
|
||||||
|
|
||||||
@ -81,4 +81,4 @@ export default {
|
|||||||
"page-size": ctx.pageSize
|
"page-size": ctx.pageSize
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { inject, ref, watch } from "vue";
|
import { defineComponent, inject, ref, watch } from "vue";
|
||||||
import { Crud } from "/@/cool/modules/crud/types";
|
import { Crud } from "../types";
|
||||||
import { isArray } from "../utils";
|
import { isArray } from "../utils";
|
||||||
|
|
||||||
export default {
|
export default defineComponent({
|
||||||
name: "cl-query",
|
name: "cl-query",
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -21,7 +21,7 @@ export default {
|
|||||||
|
|
||||||
emits: ["update:modelValue", "change"],
|
emits: ["update:modelValue", "change"],
|
||||||
|
|
||||||
setup(props: any, { emit }: any) {
|
setup(props, { emit }) {
|
||||||
const crud = inject("crud") as Crud;
|
const crud = inject("crud") as Crud;
|
||||||
|
|
||||||
const list = ref<Array<any>>([]);
|
const list = ref<Array<any>>([]);
|
||||||
@ -115,4 +115,4 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import { Crud } from "/@/cool/modules/crud/types";
|
|
||||||
import { defineComponent, inject } from "vue";
|
import { defineComponent, inject } from "vue";
|
||||||
|
import { Crud } from "../types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-refresh-btn",
|
name: "cl-refresh-btn",
|
||||||
|
|
||||||
setup(props: any, { slots }: any) {
|
setup(props, { slots }) {
|
||||||
const crud = inject("crud") as Crud;
|
const crud = inject("crud") as Crud;
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Crud } from "/@/cool/modules/crud/types";
|
|
||||||
import { defineComponent, inject, ref } from "vue";
|
import { defineComponent, inject, ref } from "vue";
|
||||||
|
import { Crud } from "../types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-search-key",
|
name: "cl-search-key",
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { defineComponent, h, inject, nextTick, onMounted, ref } from "vue";
|
import { defineComponent, h, inject, nextTick, onMounted, ref } from "vue";
|
||||||
import { Crud, Mitt } from "/@/cool/modules/crud/types";
|
|
||||||
import { useRefs } from "../../hooks/core";
|
|
||||||
import { cloneDeep, isArray, isEmpty, isFunction, isNull } from "../../utils";
|
|
||||||
import { renderNode } from "../../utils/vnode";
|
|
||||||
import ContextMenu from "../context-menu/index";
|
import ContextMenu from "../context-menu/index";
|
||||||
import { useElTableApi } from "./helper";
|
import { useElTableApi } from "./helper";
|
||||||
import { Browser } from "/@/cool/modules/crud/types";
|
import { cloneDeep, isArray, isEmpty, isFunction, isNull } from "../../utils";
|
||||||
|
import { renderNode } from "../../utils/vnode";
|
||||||
|
import { useRefs } from "../../hooks/core";
|
||||||
|
import { Crud, Mitt, Browser } from "../../types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-table",
|
name: "cl-table",
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { defineComponent, h, inject, ref } from "vue";
|
import { defineComponent, h, inject, ref } from "vue";
|
||||||
import { Crud } from "/@/cool/modules/crud/types";
|
|
||||||
import { useFormApi } from "./helper";
|
import { useFormApi } from "./helper";
|
||||||
import { useForm, useRefs } from "../../hooks/core";
|
import { useForm, useRefs } from "../../hooks/core";
|
||||||
|
import { Crud } from "../../types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-upsert",
|
name: "cl-upsert",
|
||||||
|
@ -2,8 +2,7 @@ import { reactive } from "vue";
|
|||||||
import * as components from "./components";
|
import * as components from "./components";
|
||||||
import ContextMenu from "./components/context-menu/index";
|
import ContextMenu from "./components/context-menu/index";
|
||||||
|
|
||||||
import "./common";
|
import "./static/index.scss";
|
||||||
import "./assets/index.scss";
|
|
||||||
|
|
||||||
const CRUD = {
|
const CRUD = {
|
||||||
install(app: any, options: any = {}) {
|
install(app: any, options: any = {}) {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { AdvSearchItem } from "/@/cool/modules/crud/types";
|
import { AdvSearchItem } from "/$/crud/types";
|
||||||
import { defineComponent, ref } from "vue";
|
import { defineComponent, ref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ContextMenu } from "/@/cool/modules/crud";
|
import { ContextMenu } from "/$/crud";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
import { defineComponent, ref, resolveComponent, h } from "vue";
|
import { defineComponent, ref, resolveComponent, h } from "vue";
|
||||||
import Test from "./test.vue";
|
import Test from "./test.vue";
|
||||||
import { TestService } from "../../utils/service";
|
import { TestService } from "../../utils/service";
|
||||||
import { CrudLoad, FormItem, FormRef } from "/@/cool/modules/crud/types";
|
import { CrudLoad, FormItem, FormRef } from "/$/crud/types";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
setup() {
|
setup() {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { QueryList } from "/@/cool/modules/crud/types";
|
import { QueryList } from "/$/crud/types";
|
||||||
import { defineComponent, ref } from "vue";
|
import { defineComponent, ref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { TableColumn } from "/@/cool/modules/crud/types";
|
import { TableColumn } from "/$/crud/types";
|
||||||
import { defineComponent, ref } from "vue";
|
import { defineComponent, ref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { UpsertItem, UpsertRef } from "/@/cool/modules/crud/types";
|
import { UpsertItem, UpsertRef } from "/$/crud/types";
|
||||||
import { defineComponent, ref } from "vue";
|
import { defineComponent, ref } from "vue";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent } from "vue";
|
||||||
import { CrudLoad } from "/@/cool/modules/crud/types";
|
import { CrudLoad } from "/$/crud/types";
|
||||||
import { TestService } from "../utils/service";
|
import { TestService } from "../utils/service";
|
||||||
import Dialog from "../components/crud/dialog.vue";
|
import Dialog from "../components/crud/dialog.vue";
|
||||||
import ContextMenu from "../components/crud/context-menu.vue";
|
import ContextMenu from "../components/crud/context-menu.vue";
|
||||||
|
@ -217,8 +217,8 @@
|
|||||||
import { computed, defineComponent, inject, onMounted, reactive } from "vue";
|
import { computed, defineComponent, inject, onMounted, reactive } from "vue";
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import Draggable from "vuedraggable";
|
import Draggable from "vuedraggable";
|
||||||
import { checkPerm } from "/@/cool/modules/base";
|
import { checkPerm } from "/$/base";
|
||||||
import { ContextMenu } from "/@/cool/modules/crud";
|
import { ContextMenu } from "/$/crud";
|
||||||
import Cron from "../components/cron";
|
import Cron from "../components/cron";
|
||||||
import { useRefs } from "/@/core";
|
import { useRefs } from "/@/core";
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ import { ElMessage, ElMessageBox } from "element-plus";
|
|||||||
import { computed, defineComponent, inject, ref, watch } from "vue";
|
import { computed, defineComponent, inject, ref, watch } from "vue";
|
||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
import { isEmpty } from "/@/core/utils";
|
import { isEmpty } from "/@/core/utils";
|
||||||
import { ContextMenu } from "/@/cool/modules/crud";
|
import { ContextMenu } from "/$/crud";
|
||||||
import { useRefs } from "/@/cool/modules/crud/hooks/core";
|
import { useRefs } from "/$/crud/hooks/core";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-upload-space-category",
|
name: "cl-upload-space-category",
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, inject } from "vue";
|
import { computed, defineComponent, inject } from "vue";
|
||||||
import { ContextMenu } from "/@/cool/modules/crud";
|
import { ContextMenu } from "/$/crud";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "cl-upload-space-item",
|
name: "cl-upload-space-item",
|
||||||
|
@ -27,7 +27,7 @@ export default function () {
|
|||||||
) {
|
) {
|
||||||
d.meta.iframeUrl = url;
|
d.meta.iframeUrl = url;
|
||||||
d.component = () =>
|
d.component = () =>
|
||||||
import(`/@/cool/modules/base/pages/iframe/index.vue`);
|
import(`/$/base/pages/iframe/index.vue`);
|
||||||
} else {
|
} else {
|
||||||
d.component = () => import(/* @vite-ignore */ `/@/${url}`);
|
d.component = () => import(/* @vite-ignore */ `/@/${url}`);
|
||||||
}
|
}
|
||||||
|
@ -1,130 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="view-home scroller1">
|
<cl-crud :ref="setRefs('crud')" @load="onLoad">
|
||||||
<el-row :gutter="15">
|
<el-row type="flex" align="middle">
|
||||||
<el-col :lg="6" :md="12" :xs="24">
|
<!-- 刷新按钮 -->
|
||||||
<div class="card">
|
<cl-refresh-btn />
|
||||||
<count-sales />
|
<!-- 新增按钮 -->
|
||||||
</div>
|
<cl-add-btn />
|
||||||
</el-col>
|
<!-- 删除按钮 -->
|
||||||
<el-col :lg="6" :md="12" :xs="24">
|
<cl-multi-delete-btn />
|
||||||
<div class="card">
|
<cl-flex1 />
|
||||||
<count-views />
|
<!-- 关键字搜索 -->
|
||||||
</div>
|
<cl-search-key />
|
||||||
</el-col>
|
|
||||||
<el-col :lg="6" :md="12" :xs="24">
|
|
||||||
<div class="card">
|
|
||||||
<count-paid />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :lg="6" :md="12" :xs="24">
|
|
||||||
<div class="card">
|
|
||||||
<count-effect />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="15">
|
<el-row>
|
||||||
<el-col :lg="14" :xs="24">
|
<!-- 数据表格 -->
|
||||||
<div class="card">
|
<cl-table :ref="setRefs('table')" v-bind="table" />
|
||||||
<tab-chart />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :lg="10" :xs="24">
|
|
||||||
<div class="card">
|
|
||||||
<sales-rank />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="15">
|
<el-row type="flex">
|
||||||
<el-col :lg="14" :sm="24">
|
<cl-flex1 />
|
||||||
<div class="card card--last">
|
<!-- 分页控件 -->
|
||||||
<hot-search />
|
<cl-pagination />
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :lg="10" :sm="24">
|
|
||||||
<div class="card card--last">
|
|
||||||
<category-ratio />
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
|
||||||
|
<!-- 新增、编辑 -->
|
||||||
|
<cl-upsert :ref="setRefs('upsert')" v-bind="upsert" />
|
||||||
|
</cl-crud>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent, inject, reactive } from "vue";
|
||||||
import CategoryRatio from "./components/category-ratio.vue";
|
import { CrudLoad, Upsert, Table } from "/$/crud/types";
|
||||||
import CountSales from "./components/count-sales.vue";
|
import { useRefs } from "/@/core";
|
||||||
import CountViews from "./components/count-views.vue";
|
|
||||||
import CountPaid from "./components/count-paid.vue";
|
|
||||||
import CountEffect from "./components/count-effect.vue";
|
|
||||||
import TabChart from "./components/tab-chart.vue";
|
|
||||||
import SalesRank from "./components/sales-rank.vue";
|
|
||||||
import HotSearch from "./components/hot-search.vue";
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
setup() {
|
||||||
CategoryRatio,
|
const service = inject<any>("service");
|
||||||
CountSales,
|
const { refs, setRefs } = useRefs();
|
||||||
CountViews,
|
|
||||||
CountPaid,
|
// 新增、编辑配置
|
||||||
CountEffect,
|
const upsert = reactive<Upsert>({
|
||||||
TabChart,
|
items: []
|
||||||
SalesRank,
|
});
|
||||||
HotSearch
|
|
||||||
|
// 表格配置
|
||||||
|
const table = reactive<Table>({
|
||||||
|
columns: []
|
||||||
|
});
|
||||||
|
|
||||||
|
// crud 加载
|
||||||
|
function onLoad({ ctx, app }: CrudLoad) {
|
||||||
|
// 绑定 service
|
||||||
|
ctx.service(service.xx).done();
|
||||||
|
app.refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
refs,
|
||||||
|
setRefs,
|
||||||
|
upsert,
|
||||||
|
table,
|
||||||
|
onLoad
|
||||||
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.view-home {
|
|
||||||
.card {
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
margin-bottom: 15px;
|
|
||||||
font-size: 12px;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
|
|
||||||
&__header {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 50px;
|
|
||||||
padding: 0 20px;
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-size: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
font-size: 18px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&__container {
|
|
||||||
padding: 0 20px;
|
|
||||||
height: 50px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__footer {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 50px;
|
|
||||||
border-top: 1px solid #f7f7f7;
|
|
||||||
font-size: 12px;
|
|
||||||
margin: 0 5px;
|
|
||||||
padding: 0 15px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
|
|
||||||
.label {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
"lib": ["esnext", "dom"],
|
"lib": ["esnext", "dom"],
|
||||||
"types": ["vite/client", "vite-svg-loader"],
|
"types": ["vite/client", "vite-svg-loader"],
|
||||||
"paths": {
|
"paths": {
|
||||||
|
"/$/*": ["./src/cool/modules/*"],
|
||||||
"/@/*": ["./src/*"],
|
"/@/*": ["./src/*"],
|
||||||
"/#/*": ["./types/*"]
|
"/#/*": ["./types/*"]
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,8 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
"/@": resolve("src"),
|
"/@": resolve("src"),
|
||||||
"/#": resolve("types")
|
"/#": resolve("types"),
|
||||||
|
"/$": resolve("src/cool/modules")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
css: {
|
css: {
|
||||||
@ -48,7 +49,7 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
|
|||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
polyfillDynamicImport: false
|
polyfillDynamicImport: false // 必须为false
|
||||||
},
|
},
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
exclude: ["vue-demi"]
|
exclude: ["vue-demi"]
|
||||||
|
@ -491,6 +491,13 @@
|
|||||||
"@vue/compiler-dom" "3.0.9"
|
"@vue/compiler-dom" "3.0.9"
|
||||||
"@vue/shared" "3.0.9"
|
"@vue/shared" "3.0.9"
|
||||||
|
|
||||||
|
"@vue/composition-api@^1.0.0-rc.6":
|
||||||
|
version "1.0.0-rc.6"
|
||||||
|
resolved "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.0.0-rc.6.tgz#21ce2c169dd4ff17a5bf60c6e98863dff1a36540"
|
||||||
|
integrity sha512-M3jsyDBozQFqAPYdM4GCoVZEljIHsTVdcq5fZx9axpKz9ChIlQngxNf1ziLVaJvWX7T+MO1rVTEx6Xjgg/gUcQ==
|
||||||
|
dependencies:
|
||||||
|
tslib "^2.1.0"
|
||||||
|
|
||||||
"@vue/reactivity@3.0.11":
|
"@vue/reactivity@3.0.11":
|
||||||
version "3.0.11"
|
version "3.0.11"
|
||||||
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.11.tgz#07b588349fd05626b17f3500cbef7d4bdb4dbd0b"
|
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.11.tgz#07b588349fd05626b17f3500cbef7d4bdb4dbd0b"
|
||||||
@ -3470,7 +3477,7 @@ tslib@^1.8.1:
|
|||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||||
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
|
||||||
|
|
||||||
tslib@^2.0.3:
|
tslib@^2.0.3, tslib@^2.1.0:
|
||||||
version "2.1.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
|
||||||
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
|
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
|
||||||
|
Loading…
Reference in New Issue
Block a user