Commit 9edc281322772f6b5ec8093c40fdf90408d85da7

Authored by vben
1 parent b77b7c9d

chore: format code by eslint #222

Showing 100 changed files with 376 additions and 256 deletions

Too many changes to show.

To preserve performance only 100 of 149 files are displayed.

.eslintrc.js
@@ -57,5 +57,27 @@ module.exports = { @@ -57,5 +57,27 @@ module.exports = {
57 }, 57 },
58 ], 58 ],
59 'space-before-function-paren': 'off', 59 'space-before-function-paren': 'off',
  60 +
  61 + 'vue/attributes-order': 'off',
  62 + 'vue/one-component-per-file': 'off',
  63 + 'vue/html-closing-bracket-newline': 'off',
  64 + 'vue/max-attributes-per-line': 'off',
  65 + 'vue/multiline-html-element-content-newline': 'off',
  66 + 'vue/singleline-html-element-content-newline': 'off',
  67 + 'vue/attribute-hyphenation': 'off',
  68 + // 'vue/html-self-closing': 'off',
  69 + 'vue/require-default-prop': 'off',
  70 + 'vue/html-self-closing': [
  71 + 'error',
  72 + {
  73 + html: {
  74 + void: 'always',
  75 + normal: 'never',
  76 + component: 'always',
  77 + },
  78 + svg: 'always',
  79 + math: 'always',
  80 + },
  81 + ],
60 }, 82 },
61 }; 83 };
.yarnclean 0 → 100644
  1 +# test directories
  2 +__tests__
  3 +test
  4 +tests
  5 +powered-test
  6 +
  7 +# asset directories
  8 +docs
  9 +doc
  10 +website
  11 +images
  12 +assets
  13 +
  14 +# examples
  15 +example
  16 +examples
  17 +
  18 +# code coverage directories
  19 +coverage
  20 +.nyc_output
  21 +
  22 +# build scripts
  23 +Makefile
  24 +Gulpfile.js
  25 +Gruntfile.js
  26 +
  27 +# configs
  28 +appveyor.yml
  29 +circle.yml
  30 +codeship-services.yml
  31 +codeship-steps.yml
  32 +wercker.yml
  33 +.tern-project
  34 +.gitattributes
  35 +.editorconfig
  36 +.*ignore
  37 +.eslintrc
  38 +.jshintrc
  39 +.flowconfig
  40 +.documentup.json
  41 +.yarn-metadata.json
  42 +.travis.yml
  43 +
  44 +# misc
  45 +*.md
  46 +
  47 +!istanbul-reports/lib/html/assets
  48 +!istanbul-api/node_modules/istanbul-reports/lib/html/assets
package.json
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite", 14 "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
15 "clean:lib": "npx rimraf node_modules", 15 "clean:lib": "npx rimraf node_modules",
16 "typecheck": "vuedx-typecheck .", 16 "typecheck": "vuedx-typecheck .",
17 - "lint:eslint": "eslint --fix --ext \"src/**/*.{vue,less,css,scss}\"", 17 + "lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
18 "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", 18 "lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
19 "lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", 19 "lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
20 "reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run bootstrap" 20 "reinstall": "rimraf yarn.lock && rimraf package.lock.json && rimraf node_modules && npm run bootstrap"
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 "@types/zxcvbn": "^4.4.0", 63 "@types/zxcvbn": "^4.4.0",
64 "@typescript-eslint/eslint-plugin": "^4.14.1", 64 "@typescript-eslint/eslint-plugin": "^4.14.1",
65 "@typescript-eslint/parser": "^4.14.1", 65 "@typescript-eslint/parser": "^4.14.1",
66 - "@vitejs/plugin-legacy": "^1.2.1", 66 + "@vitejs/plugin-legacy": "^1.2.2",
67 "@vitejs/plugin-vue": "^1.1.2", 67 "@vitejs/plugin-vue": "^1.1.2",
68 "@vitejs/plugin-vue-jsx": "^1.0.2", 68 "@vitejs/plugin-vue-jsx": "^1.0.2",
69 "@vue/compiler-sfc": "^3.0.5", 69 "@vue/compiler-sfc": "^3.0.5",
@@ -93,7 +93,7 @@ @@ -93,7 +93,7 @@
93 "stylelint-order": "^4.1.0", 93 "stylelint-order": "^4.1.0",
94 "ts-node": "^9.1.1", 94 "ts-node": "^9.1.1",
95 "typescript": "^4.1.3", 95 "typescript": "^4.1.3",
96 - "vite": "2.0.0-beta.50", 96 + "vite": "2.0.0-beta.52",
97 "vite-plugin-html": "^2.0.0-beta.6", 97 "vite-plugin-html": "^2.0.0-beta.6",
98 "vite-plugin-mock": "^2.0.0-rc.2", 98 "vite-plugin-mock": "^2.0.0-rc.2",
99 "vite-plugin-purge-icons": "^0.6.0", 99 "vite-plugin-purge-icons": "^0.6.0",
src/components/Application/src/AppLocalePicker.vue
@@ -20,7 +20,6 @@ @@ -20,7 +20,6 @@
20 import { defineComponent, ref, watchEffect, unref, computed } from 'vue'; 20 import { defineComponent, ref, watchEffect, unref, computed } from 'vue';
21 21
22 import { Dropdown, DropMenu } from '/@/components/Dropdown'; 22 import { Dropdown, DropMenu } from '/@/components/Dropdown';
23 - import { GlobalOutlined } from '@ant-design/icons-vue';  
24 23
25 import { useLocale } from '/@/locales/useLocale'; 24 import { useLocale } from '/@/locales/useLocale';
26 import { useLocaleSetting } from '/@/hooks/setting/useLocaleSetting'; 25 import { useLocaleSetting } from '/@/hooks/setting/useLocaleSetting';
@@ -33,7 +32,7 @@ @@ -33,7 +32,7 @@
33 import Icon from '/@/components/Icon'; 32 import Icon from '/@/components/Icon';
34 export default defineComponent({ 33 export default defineComponent({
35 name: 'AppLocalPicker', 34 name: 'AppLocalPicker',
36 - components: { GlobalOutlined, Dropdown, Icon }, 35 + components: { Dropdown, Icon },
37 props: { 36 props: {
38 // Whether to display text 37 // Whether to display text
39 showText: propTypes.bool.def(true), 38 showText: propTypes.bool.def(true),
src/components/Application/src/AppProvider.vue
1 <template> 1 <template>
2 - <slot /> 2 + <slot></slot>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import type { PropType } from 'vue'; 5 import type { PropType } from 'vue';
src/components/Application/src/search/AppSearch.vue
1 <template> 1 <template>
2 <div :class="prefixCls" v-if="getShowSearch" @click.stop="handleSearch"> 2 <div :class="prefixCls" v-if="getShowSearch" @click.stop="handleSearch">
3 <Tooltip> 3 <Tooltip>
4 - <template #title> {{ t('common.searchText') }} </template> 4 + <template #title>
  5 + {{ t('common.searchText') }}
  6 + </template>
5 <SearchOutlined /> 7 <SearchOutlined />
6 </Tooltip> 8 </Tooltip>
7 9
src/components/Application/src/search/AppSearchModal.vue
@@ -40,7 +40,9 @@ @@ -40,7 +40,9 @@
40 <div :class="`${prefixCls}-list__item-icon`"> 40 <div :class="`${prefixCls}-list__item-icon`">
41 <g-icon :icon="item.icon || 'mdi:form-select'" :size="20" /> 41 <g-icon :icon="item.icon || 'mdi:form-select'" :size="20" />
42 </div> 42 </div>
43 - <div :class="`${prefixCls}-list__item-text`">{{ item.name }}</div> 43 + <div :class="`${prefixCls}-list__item-text`">
  44 + {{ item.name }}
  45 + </div>
44 <div :class="`${prefixCls}-list__item-enter`"> 46 <div :class="`${prefixCls}-list__item-enter`">
45 <g-icon icon="ant-design:enter-outlined" :size="20" /> 47 <g-icon icon="ant-design:enter-outlined" :size="20" />
46 </div> 48 </div>
@@ -68,14 +70,14 @@ @@ -68,14 +70,14 @@
68 export default defineComponent({ 70 export default defineComponent({
69 name: 'AppSearchModal', 71 name: 'AppSearchModal',
70 components: { SearchOutlined, AppSearchFooter, [Input.name]: Input }, 72 components: { SearchOutlined, AppSearchFooter, [Input.name]: Input },
71 - emits: ['close'], 73 + directives: {
  74 + clickOutside,
  75 + },
72 76
73 props: { 77 props: {
74 visible: Boolean, 78 visible: Boolean,
75 }, 79 },
76 - directives: {  
77 - clickOutside,  
78 - }, 80 + emits: ['close'],
79 setup(_, { emit }) { 81 setup(_, { emit }) {
80 const scrollWrap = ref<ElRef>(null); 82 const scrollWrap = ref<ElRef>(null);
81 const { prefixCls } = useDesign('app-search-modal'); 83 const { prefixCls } = useDesign('app-search-modal');
src/components/Basic/src/BasicTitle.vue
1 <template> 1 <template>
2 <span :class="[prefixCls, { 'show-span': span && $slots.default }]"> 2 <span :class="[prefixCls, { 'show-span': span && $slots.default }]">
3 - <slot /> 3 + <slot></slot>
4 <BasicHelp :class="`${prefixCls}__help`" v-if="helpMessage" :text="helpMessage" /> 4 <BasicHelp :class="`${prefixCls}__help`" v-if="helpMessage" :text="helpMessage" />
5 </span> 5 </span>
6 </template> 6 </template>
src/components/Button/src/BasicButton.vue
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <Button v-bind="getBindValue" :class="[getColor, $attrs.class]"> 2 <Button v-bind="getBindValue" :class="[getColor, $attrs.class]">
3 <template #default="data"> 3 <template #default="data">
4 <Icon :icon="preIcon" v-if="preIcon" :size="14" /> 4 <Icon :icon="preIcon" v-if="preIcon" :size="14" />
5 - <slot v-bind="data" /> 5 + <slot v-bind="data"></slot>
6 <Icon :icon="postIcon" v-if="postIcon" :size="14" /> 6 <Icon :icon="postIcon" v-if="postIcon" :size="14" />
7 </template> 7 </template>
8 </Button> 8 </Button>
@@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
16 16
17 export default defineComponent({ 17 export default defineComponent({
18 name: 'AButton', 18 name: 'AButton',
19 - inheritAttrs: false,  
20 components: { Button, Icon }, 19 components: { Button, Icon },
  20 + inheritAttrs: false,
21 props: { 21 props: {
22 type: propTypes.oneOf(['primary', 'default', 'danger', 'dashed', 'link']).def('default'), 22 type: propTypes.oneOf(['primary', 'default', 'danger', 'dashed', 'link']).def('default'),
23 color: propTypes.oneOf(['error', 'warning', 'success', '']), 23 color: propTypes.oneOf(['error', 'warning', 'success', '']),
src/components/Button/src/PopConfirmButton.vue
@@ -10,8 +10,8 @@ @@ -10,8 +10,8 @@
10 10
11 export default defineComponent({ 11 export default defineComponent({
12 name: 'PopButton', 12 name: 'PopButton',
13 - inheritAttrs: false,  
14 components: { Popconfirm, BasicButton }, 13 components: { Popconfirm, BasicButton },
  14 + inheritAttrs: false,
15 props: { 15 props: {
16 size: propTypes.oneOf(['large', 'default', 'small']).def(), 16 size: propTypes.oneOf(['large', 'default', 'small']).def(),
17 enable: propTypes.bool.def(true), 17 enable: propTypes.bool.def(true),
src/components/ClickOutSide/src/index.vue
1 <template> 1 <template>
2 - <div ref="wrap"><slot /></div> 2 + <div ref="wrap">
  3 + <slot></slot>
  4 + </div>
3 </template> 5 </template>
4 <script lang="ts"> 6 <script lang="ts">
5 import type { Ref } from 'vue'; 7 import type { Ref } from 'vue';
src/components/Container/src/LazyContainer.vue
@@ -8,10 +8,10 @@ @@ -8,10 +8,10 @@
8 mode="out-in" 8 mode="out-in"
9 > 9 >
10 <div key="component" v-if="isInit"> 10 <div key="component" v-if="isInit">
11 - <slot :loading="loading" /> 11 + <slot :loading="loading"></slot>
12 </div> 12 </div>
13 <div key="skeleton" v-else name="lazy-skeleton"> 13 <div key="skeleton" v-else name="lazy-skeleton">
14 - <slot name="skeleton" v-if="$slots.skeleton" /> 14 + <slot name="skeleton" v-if="$slots.skeleton"></slot>
15 <Skeleton v-else /> 15 <Skeleton v-else />
16 </div> 16 </div>
17 </transition-group> 17 </transition-group>
@@ -35,8 +35,8 @@ @@ -35,8 +35,8 @@
35 35
36 export default defineComponent({ 36 export default defineComponent({
37 name: 'LazyContainer', 37 name: 'LazyContainer',
38 - inheritAttrs: false,  
39 components: { Skeleton }, 38 components: { Skeleton },
  39 + inheritAttrs: false,
40 props: { 40 props: {
41 // Waiting time, if the time is specified, whether visible or not, it will be automatically loaded after the specified time 41 // Waiting time, if the time is specified, whether visible or not, it will be automatically loaded after the specified time
42 timeout: propTypes.number, 42 timeout: propTypes.number,
@@ -102,7 +102,7 @@ @@ -102,7 +102,7 @@
102 const { timeout, direction, threshold } = props; 102 const { timeout, direction, threshold } = props;
103 if (timeout) return; 103 if (timeout) return;
104 // According to the scrolling direction to construct the viewport margin, used to load in advance 104 // According to the scrolling direction to construct the viewport margin, used to load in advance
105 - let rootMargin: string = '0px'; 105 + let rootMargin = '0px';
106 switch (direction) { 106 switch (direction) {
107 case 'vertical': 107 case 'vertical':
108 rootMargin = `${threshold} 0px`; 108 rootMargin = `${threshold} 0px`;
src/components/Container/src/ScrollContainer.vue
1 <template> 1 <template>
2 <Scrollbar ref="scrollbarRef" class="scroll-container" v-bind="$attrs"> 2 <Scrollbar ref="scrollbarRef" class="scroll-container" v-bind="$attrs">
3 - <slot /> 3 + <slot></slot>
4 </Scrollbar> 4 </Scrollbar>
5 </template> 5 </template>
6 6
src/components/Container/src/collapse/CollapseContainer.vue
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 <div :class="['p-2', prefixCls]"> 2 <div :class="['p-2', prefixCls]">
3 <CollapseHeader v-bind="$props" :prefixCls="prefixCls" :show="show" @expand="handleExpand"> 3 <CollapseHeader v-bind="$props" :prefixCls="prefixCls" :show="show" @expand="handleExpand">
4 <template #title> 4 <template #title>
5 - <slot name="title" /> 5 + <slot name="title"></slot>
6 </template> 6 </template>
7 </CollapseHeader> 7 </CollapseHeader>
8 8
@@ -10,12 +10,12 @@ @@ -10,12 +10,12 @@
10 <Skeleton v-if="loading" /> 10 <Skeleton v-if="loading" />
11 <div :class="`${prefixCls}__body`" v-else v-show="show"> 11 <div :class="`${prefixCls}__body`" v-else v-show="show">
12 <LazyContainer :timeout="lazyTime" v-if="lazy"> 12 <LazyContainer :timeout="lazyTime" v-if="lazy">
13 - <slot /> 13 + <slot></slot>
14 <template #skeleton> 14 <template #skeleton>
15 - <slot name="lazySkeleton" /> 15 + <slot name="lazySkeleton"></slot>
16 </template> 16 </template>
17 </LazyContainer> 17 </LazyContainer>
18 - <slot v-else /> 18 + <slot v-else></slot>
19 </div> 19 </div>
20 </CollapseTransition> 20 </CollapseTransition>
21 </div> 21 </div>
src/components/Container/src/collapse/CollapseHeader.vue
@@ -5,12 +5,12 @@ @@ -5,12 +5,12 @@
5 {{ $attrs.title }} 5 {{ $attrs.title }}
6 </template> 6 </template>
7 <template v-else> 7 <template v-else>
8 - <slot name="title" /> 8 + <slot name="title"></slot>
9 </template> 9 </template>
10 </BasicTitle> 10 </BasicTitle>
11 11
12 <div :class="`${prefixCls}__action`"> 12 <div :class="`${prefixCls}__action`">
13 - <slot name="action" /> 13 + <slot name="action"></slot>
14 <BasicArrow v-if="$attrs.canExpan" top :expand="$attrs.show" @click="$emit('expand')" /> 14 <BasicArrow v-if="$attrs.canExpan" top :expand="$attrs.show" @click="$emit('expand')" />
15 </div> 15 </div>
16 </div> 16 </div>
@@ -19,10 +19,11 @@ @@ -19,10 +19,11 @@
19 import { defineComponent } from 'vue'; 19 import { defineComponent } from 'vue';
20 import { BasicArrow, BasicTitle } from '/@/components/Basic'; 20 import { BasicArrow, BasicTitle } from '/@/components/Basic';
21 export default defineComponent({ 21 export default defineComponent({
22 - inheritAttrs: false,  
23 components: { BasicArrow, BasicTitle }, 22 components: { BasicArrow, BasicTitle },
  23 + inheritAttrs: false,
24 props: { 24 props: {
25 prefixCls: String, 25 prefixCls: String,
26 }, 26 },
  27 + emits: ['expand'],
27 }); 28 });
28 </script> 29 </script>
src/components/Drawer/src/BasicDrawer.vue
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 @close="onClose" 8 @close="onClose"
9 > 9 >
10 <template #titleToolbar> 10 <template #titleToolbar>
11 - <slot name="titleToolbar" /> 11 + <slot name="titleToolbar"></slot>
12 </template> 12 </template>
13 </DrawerHeader> 13 </DrawerHeader>
14 </template> 14 </template>
@@ -18,11 +18,11 @@ @@ -18,11 +18,11 @@
18 v-loading="getLoading" 18 v-loading="getLoading"
19 :loading-tip="loadingText || t('common.loadingText')" 19 :loading-tip="loadingText || t('common.loadingText')"
20 > 20 >
21 - <slot /> 21 + <slot></slot>
22 </ScrollContainer> 22 </ScrollContainer>
23 <DrawerFooter v-bind="getProps" @close="onClose" @ok="handleOk" :height="getFooterHeight"> 23 <DrawerFooter v-bind="getProps" @close="onClose" @ok="handleOk" :height="getFooterHeight">
24 <template #[item]="data" v-for="item in Object.keys($slots)"> 24 <template #[item]="data" v-for="item in Object.keys($slots)">
25 - <slot :name="item" v-bind="data" /> 25 + <slot :name="item" v-bind="data"></slot>
26 </template> 26 </template>
27 </DrawerFooter> 27 </DrawerFooter>
28 </Drawer> 28 </Drawer>
@@ -57,8 +57,8 @@ @@ -57,8 +57,8 @@
57 import { useAttrs } from '/@/hooks/core/useAttrs'; 57 import { useAttrs } from '/@/hooks/core/useAttrs';
58 58
59 export default defineComponent({ 59 export default defineComponent({
60 - inheritAttrs: false,  
61 components: { Drawer, ScrollContainer, DrawerFooter, DrawerHeader }, 60 components: { Drawer, ScrollContainer, DrawerFooter, DrawerHeader },
  61 + inheritAttrs: false,
62 props: basicProps, 62 props: basicProps,
63 emits: ['visible-change', 'ok', 'close', 'register'], 63 emits: ['visible-change', 'ok', 'close', 'register'],
64 setup(props, { emit }) { 64 setup(props, { emit }) {
src/components/Drawer/src/components/DrawerFooter.vue
1 <template> 1 <template>
2 <div :class="prefixCls" :style="getStyle" v-if="showFooter || $slots.footer"> 2 <div :class="prefixCls" :style="getStyle" v-if="showFooter || $slots.footer">
3 <template v-if="!$slots.footer"> 3 <template v-if="!$slots.footer">
4 - <slot name="insertFooter" /> 4 + <slot name="insertFooter"></slot>
5 <a-button v-bind="cancelButtonProps" @click="handleClose" class="mr-2" v-if="showCancelBtn"> 5 <a-button v-bind="cancelButtonProps" @click="handleClose" class="mr-2" v-if="showCancelBtn">
6 {{ cancelText }} 6 {{ cancelText }}
7 </a-button> 7 </a-button>
8 - <slot name="centerFooter" /> 8 + <slot name="centerFooter"></slot>
9 <a-button 9 <a-button
10 :type="okType" 10 :type="okType"
11 @click="handleOk" 11 @click="handleOk"
@@ -16,11 +16,11 @@ @@ -16,11 +16,11 @@
16 > 16 >
17 {{ okText }} 17 {{ okText }}
18 </a-button> 18 </a-button>
19 - <slot name="appendFooter" /> 19 + <slot name="appendFooter"></slot>
20 </template> 20 </template>
21 21
22 <template v-else> 22 <template v-else>
23 - <slot name="footer" /> 23 + <slot name="footer"></slot>
24 </template> 24 </template>
25 </div> 25 </div>
26 </template> 26 </template>
src/components/Drawer/src/components/DrawerHeader.vue
1 <template> 1 <template>
2 <BasicTitle v-if="!isDetail" :class="prefixCls"> 2 <BasicTitle v-if="!isDetail" :class="prefixCls">
3 - <slot name="title" /> 3 + <slot name="title"></slot>
4 {{ !$slots.title ? title : '' }} 4 {{ !$slots.title ? title : '' }}
5 </BasicTitle> 5 </BasicTitle>
6 6
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 </span> 13 </span>
14 14
15 <span :class="`${prefixCls}__toolbar`"> 15 <span :class="`${prefixCls}__toolbar`">
16 - <slot name="titleToolbar" /> 16 + <slot name="titleToolbar"></slot>
17 </span> 17 </span>
18 </div> 18 </div>
19 </template> 19 </template>
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
33 showDetailBack: propTypes.bool, 33 showDetailBack: propTypes.bool,
34 title: propTypes.string, 34 title: propTypes.string,
35 }, 35 },
  36 + emits: ['close'],
36 setup(_, { emit }) { 37 setup(_, { emit }) {
37 const { prefixCls } = useDesign('basic-drawer-header'); 38 const { prefixCls } = useDesign('basic-drawer-header');
38 39
src/components/Dropdown/src/Dropdown.vue
1 <template> 1 <template>
2 <a-dropdown :trigger="trigger" v-bind="$attrs"> 2 <a-dropdown :trigger="trigger" v-bind="$attrs">
3 <span> 3 <span>
4 - <slot /> 4 + <slot></slot>
5 </span> 5 </span>
6 <template #overlay> 6 <template #overlay>
7 <a-menu :selectedKeys="selectedKeys"> 7 <a-menu :selectedKeys="selectedKeys">
src/components/Excel/src/ImportExcel.vue
@@ -7,7 +7,9 @@ @@ -7,7 +7,9 @@
7 accept=".xlsx, .xls" 7 accept=".xlsx, .xls"
8 @change="handleInputClick" 8 @change="handleInputClick"
9 /> 9 />
10 - <div @click="handleUpload"><slot /></div> 10 + <div @click="handleUpload">
  11 + <slot></slot>
  12 + </div>
11 </div> 13 </div>
12 </template> 14 </template>
13 <script lang="ts"> 15 <script lang="ts">
src/components/Form/src/BasicForm.vue
1 <template> 1 <template>
2 <Form v-bind="{ ...$attrs, ...$props }" :class="getFormClass" ref="formElRef" :model="formModel"> 2 <Form v-bind="{ ...$attrs, ...$props }" :class="getFormClass" ref="formElRef" :model="formModel">
3 <Row :style="getRowWrapStyle"> 3 <Row :style="getRowWrapStyle">
4 - <slot name="formHeader" /> 4 + <slot name="formHeader"></slot>
5 <template v-for="schema in getSchema" :key="schema.field"> 5 <template v-for="schema in getSchema" :key="schema.field">
6 <FormItem 6 <FormItem
7 :tableAction="tableAction" 7 :tableAction="tableAction"
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 :setFormModel="setFormModel" 13 :setFormModel="setFormModel"
14 > 14 >
15 <template #[item]="data" v-for="item in Object.keys($slots)"> 15 <template #[item]="data" v-for="item in Object.keys($slots)">
16 - <slot :name="item" v-bind="data" /> 16 + <slot :name="item" v-bind="data"></slot>
17 </template> 17 </template>
18 </FormItem> 18 </FormItem>
19 </template> 19 </template>
@@ -23,10 +23,10 @@ @@ -23,10 +23,10 @@
23 #[item]="data" 23 #[item]="data"
24 v-for="item in ['resetBefore', 'submitBefore', 'advanceBefore', 'advanceAfter']" 24 v-for="item in ['resetBefore', 'submitBefore', 'advanceBefore', 'advanceAfter']"
25 > 25 >
26 - <slot :name="item" v-bind="data" /> 26 + <slot :name="item" v-bind="data"></slot>
27 </template> 27 </template>
28 </FormAction> 28 </FormAction>
29 - <slot name="formFooter" /> 29 + <slot name="formFooter"></slot>
30 </Row> 30 </Row>
31 </Form> 31 </Form>
32 </template> 32 </template>
src/components/Form/src/components/ApiSelect.vue
1 <template> 1 <template>
2 <Select v-bind="attrs" :options="getOptions" v-model:value="state"> 2 <Select v-bind="attrs" :options="getOptions" v-model:value="state">
3 <template #[item]="data" v-for="item in Object.keys($slots)"> 3 <template #[item]="data" v-for="item in Object.keys($slots)">
4 - <slot :name="item" v-bind="data" /> 4 + <slot :name="item" v-bind="data"></slot>
5 </template> 5 </template>
6 <template #suffixIcon v-if="loading"> 6 <template #suffixIcon v-if="loading">
7 <LoadingOutlined spin /> 7 <LoadingOutlined spin />
src/components/Form/src/components/FormAction.vue
1 <template> 1 <template>
2 <a-col v-bind="actionColOpt" :style="{ textAlign: 'right' }" v-if="showActionButtonGroup"> 2 <a-col v-bind="actionColOpt" :style="{ textAlign: 'right' }" v-if="showActionButtonGroup">
3 <FormItem> 3 <FormItem>
4 - <slot name="resetBefore" /> 4 + <slot name="resetBefore"></slot>
5 <Button 5 <Button
6 type="default" 6 type="default"
7 class="mr-2" 7 class="mr-2"
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 > 11 >
12 {{ getResetBtnOptions.text }} 12 {{ getResetBtnOptions.text }}
13 </Button> 13 </Button>
14 - <slot name="submitBefore" /> 14 + <slot name="submitBefore"></slot>
15 15
16 <Button 16 <Button
17 type="primary" 17 type="primary"
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 {{ getSubmitBtnOptions.text }} 23 {{ getSubmitBtnOptions.text }}
24 </Button> 24 </Button>
25 25
26 - <slot name="advanceBefore" /> 26 + <slot name="advanceBefore"></slot>
27 <Button 27 <Button
28 type="link" 28 type="link"
29 size="small" 29 size="small"
@@ -33,7 +33,7 @@ @@ -33,7 +33,7 @@
33 {{ isAdvanced ? t('component.form.putAway') : t('component.form.unfold') }} 33 {{ isAdvanced ? t('component.form.putAway') : t('component.form.unfold') }}
34 <BasicArrow class="ml-1" :expand="!isAdvanced" top /> 34 <BasicArrow class="ml-1" :expand="!isAdvanced" top />
35 </Button> 35 </Button>
36 - <slot name="advanceAfter" /> 36 + <slot name="advanceAfter"></slot>
37 </FormItem> 37 </FormItem>
38 </a-col> 38 </a-col>
39 </template> 39 </template>
@@ -81,6 +81,7 @@ @@ -81,6 +81,7 @@
81 isAdvanced: propTypes.bool, 81 isAdvanced: propTypes.bool,
82 hideAdvanceBtn: propTypes.bool, 82 hideAdvanceBtn: propTypes.bool,
83 }, 83 },
  84 + emits: ['toggle-advanced'],
84 setup(props, { emit }) { 85 setup(props, { emit }) {
85 const { t } = useI18n(); 86 const { t } = useI18n();
86 87
src/components/Form/src/components/RadioButtonGroup.vue
@@ -5,7 +5,9 @@ @@ -5,7 +5,9 @@
5 <template> 5 <template>
6 <RadioGroup v-bind="attrs" v-model:value="state" button-style="solid"> 6 <RadioGroup v-bind="attrs" v-model:value="state" button-style="solid">
7 <template v-for="item in getOptions" :key="`${item.value}`"> 7 <template v-for="item in getOptions" :key="`${item.value}`">
8 - <RadioButton :value="item.value"> {{ item.label }} </RadioButton> 8 + <RadioButton :value="item.value">
  9 + {{ item.label }}
  10 + </RadioButton>
9 </template> 11 </template>
10 </RadioGroup> 12 </RadioGroup>
11 </template> 13 </template>
src/components/Form/src/types/form.ts
@@ -36,7 +36,7 @@ export interface FormActionType { @@ -36,7 +36,7 @@ export interface FormActionType {
36 appendSchemaByField: ( 36 appendSchemaByField: (
37 schema: FormSchema, 37 schema: FormSchema,
38 prefixField: string | undefined, 38 prefixField: string | undefined,
39 - first: boolean | undefined 39 + first?: boolean | undefined
40 ) => Promise<void>; 40 ) => Promise<void>;
41 validateFields: (nameList?: NamePath[]) => Promise<any>; 41 validateFields: (nameList?: NamePath[]) => Promise<any>;
42 validate: (nameList?: NamePath[]) => Promise<any>; 42 validate: (nameList?: NamePath[]) => Promise<any>;
src/components/Icon/src/index.vue
1 <template> 1 <template>
2 - <span ref="elRef" :class="[$attrs.class, 'app-iconify anticon']" :style="getWrapStyle" /> 2 + <span ref="elRef" :class="[$attrs.class, 'app-iconify anticon']" :style="getWrapStyle"></span>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import type { PropType } from 'vue'; 5 import type { PropType } from 'vue';
src/components/Markdown/src/index.vue
1 <template> 1 <template>
2 - <div ref="wrapRef" /> 2 + <div ref="wrapRef"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 - import { defineComponent, ref, onMounted, unref, onUnmounted, nextTick, computed } from 'vue'; 5 + import {
  6 + defineComponent,
  7 + ref,
  8 + onMounted,
  9 + unref,
  10 + onUnmounted,
  11 + nextTick,
  12 + computed,
  13 + watchEffect,
  14 + } from 'vue';
6 import Vditor from 'vditor'; 15 import Vditor from 'vditor';
7 import 'vditor/dist/index.css'; 16 import 'vditor/dist/index.css';
8 17
@@ -25,25 +34,26 @@ @@ -25,25 +34,26 @@
25 34
26 const modalFn = useModalContext(); 35 const modalFn = useModalContext();
27 36
28 - const lang = ref<Lang>();  
29 -  
30 const { getLang } = useLocale(); 37 const { getLang } = useLocale();
31 38
  39 + watchEffect(() => {});
  40 +
32 const getCurrentLang = computed((): 'zh_CN' | 'en_US' | 'ja_JP' | 'ko_KR' => { 41 const getCurrentLang = computed((): 'zh_CN' | 'en_US' | 'ja_JP' | 'ko_KR' => {
  42 + let lang: Lang;
33 switch (unref(getLang)) { 43 switch (unref(getLang)) {
34 case 'en': 44 case 'en':
35 - lang.value = 'en_US'; 45 + lang = 'en_US';
36 break; 46 break;
37 case 'ja': 47 case 'ja':
38 - lang.value = 'ja_JP'; 48 + lang = 'ja_JP';
39 break; 49 break;
40 case 'ko': 50 case 'ko':
41 - lang.value = 'ko_KR'; 51 + lang = 'ko_KR';
42 break; 52 break;
43 default: 53 default:
44 - lang.value = 'zh_CN'; 54 + lang = 'zh_CN';
45 } 55 }
46 - return lang.value; 56 + return lang;
47 }); 57 });
48 function init() { 58 function init() {
49 const wrapEl = unref(wrapRef); 59 const wrapEl = unref(wrapRef);
src/components/Menu/src/components/BasicSubMenuItem.vue
@@ -30,7 +30,6 @@ @@ -30,7 +30,6 @@
30 components: { 30 components: {
31 BasicMenuItem, 31 BasicMenuItem,
32 SubMenu: Menu.SubMenu, 32 SubMenu: Menu.SubMenu,
33 - MenuItem: Menu.Item,  
34 MenuItemContent, 33 MenuItemContent,
35 }, 34 },
36 props: itemProps, 35 props: itemProps,
src/components/Modal/src/BasicModal.vue
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <template #footer v-if="!$slots.footer"> 16 <template #footer v-if="!$slots.footer">
17 <ModalFooter v-bind="getProps" @ok="handleOk" @cancel="handleCancel"> 17 <ModalFooter v-bind="getProps" @ok="handleOk" @cancel="handleCancel">
18 <template #[item]="data" v-for="item in Object.keys($slots)"> 18 <template #[item]="data" v-for="item in Object.keys($slots)">
19 - <slot :name="item" v-bind="data" /> 19 + <slot :name="item" v-bind="data"></slot>
20 </template> 20 </template>
21 </ModalFooter> 21 </ModalFooter>
22 </template> 22 </template>
@@ -35,11 +35,11 @@ @@ -35,11 +35,11 @@
35 @ext-height="handleExtHeight" 35 @ext-height="handleExtHeight"
36 @height-change="handleHeightChange" 36 @height-change="handleHeightChange"
37 > 37 >
38 - <slot /> 38 + <slot></slot>
39 </ModalWrapper> 39 </ModalWrapper>
40 40
41 <template #[item]="data" v-for="item in Object.keys(omit($slots, 'default'))"> 41 <template #[item]="data" v-for="item in Object.keys(omit($slots, 'default'))">
42 - <slot :name="item" v-bind="data" /> 42 + <slot :name="item" v-bind="data"></slot>
43 </template> 43 </template>
44 </Modal> 44 </Modal>
45 </template> 45 </template>
@@ -71,8 +71,8 @@ @@ -71,8 +71,8 @@
71 import { omit } from 'lodash-es'; 71 import { omit } from 'lodash-es';
72 export default defineComponent({ 72 export default defineComponent({
73 name: 'BasicModal', 73 name: 'BasicModal',
74 - inheritAttrs: false,  
75 components: { Modal, ModalWrapper, ModalClose, ModalFooter, ModalHeader }, 74 components: { Modal, ModalWrapper, ModalClose, ModalFooter, ModalHeader },
  75 + inheritAttrs: false,
76 props: basicProps, 76 props: basicProps,
77 emits: ['visible-change', 'height-change', 'cancel', 'ok', 'register'], 77 emits: ['visible-change', 'height-change', 'cancel', 'ok', 'register'],
78 setup(props, { emit, attrs }) { 78 setup(props, { emit, attrs }) {
src/components/Modal/src/components/ModalFooter.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - <slot name="insertFooter" /> 3 + <slot name="insertFooter"></slot>
4 <a-button v-bind="cancelButtonProps" @click="handleCancel" v-if="showCancelBtn"> 4 <a-button v-bind="cancelButtonProps" @click="handleCancel" v-if="showCancelBtn">
5 {{ cancelText }} 5 {{ cancelText }}
6 </a-button> 6 </a-button>
7 - <slot name="centerFooter" /> 7 + <slot name="centerFooter"></slot>
8 <a-button 8 <a-button
9 :type="okType" 9 :type="okType"
10 @click="handleOk" 10 @click="handleOk"
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 > 14 >
15 {{ okText }} 15 {{ okText }}
16 </a-button> 16 </a-button>
17 - <slot name="appendFooter" /> 17 + <slot name="appendFooter"></slot>
18 </div> 18 </div>
19 </template> 19 </template>
20 <script lang="ts"> 20 <script lang="ts">
src/components/Modal/src/components/ModalWrapper.vue
1 <template> 1 <template>
2 <ScrollContainer ref="wrapperRef"> 2 <ScrollContainer ref="wrapperRef">
3 <div ref="spinRef" :style="spinStyle" v-loading="loading" :loading-tip="loadingTip"> 3 <div ref="spinRef" :style="spinStyle" v-loading="loading" :loading-tip="loadingTip">
4 - <slot /> 4 + <slot></slot>
5 </div> 5 </div>
6 </ScrollContainer> 6 </ScrollContainer>
7 </template> 7 </template>
@@ -20,7 +20,6 @@ @@ -20,7 +20,6 @@
20 nextTick, 20 nextTick,
21 onUnmounted, 21 onUnmounted,
22 } from 'vue'; 22 } from 'vue';
23 - import { Spin } from 'ant-design-vue';  
24 23
25 import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn'; 24 import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn';
26 import { ScrollContainer } from '/@/components/Container'; 25 import { ScrollContainer } from '/@/components/Container';
@@ -31,8 +30,8 @@ @@ -31,8 +30,8 @@
31 30
32 export default defineComponent({ 31 export default defineComponent({
33 name: 'ModalWrapper', 32 name: 'ModalWrapper',
  33 + components: { ScrollContainer },
34 inheritAttrs: false, 34 inheritAttrs: false,
35 - components: { Spin, ScrollContainer },  
36 props: { 35 props: {
37 loading: propTypes.bool, 36 loading: propTypes.bool,
38 useWrapper: propTypes.bool.def(true), 37 useWrapper: propTypes.bool.def(true),
src/components/Page/src/PageFooter.vue
1 <template> 1 <template>
2 <div :class="prefixCls" :style="{ width: getCalcContentWidth }"> 2 <div :class="prefixCls" :style="{ width: getCalcContentWidth }">
3 <div :class="`${prefixCls}__left`"> 3 <div :class="`${prefixCls}__left`">
4 - <slot name="left" /> 4 + <slot name="left"></slot>
5 </div> 5 </div>
6 - <slot /> 6 + <slot></slot>
7 <div :class="`${prefixCls}__right`"> 7 <div :class="`${prefixCls}__right`">
8 - <slot name="right" /> 8 + <slot name="right"></slot>
9 </div> 9 </div>
10 </div> 10 </div>
11 </template> 11 </template>
src/components/Page/src/PageWrapper.vue
@@ -5,21 +5,21 @@ @@ -5,21 +5,21 @@
5 <template v-if="content"> 5 <template v-if="content">
6 {{ content }} 6 {{ content }}
7 </template> 7 </template>
8 - <slot name="headerContent" v-else /> 8 + <slot name="headerContent" v-else></slot>
9 </template> 9 </template>
10 <template #[item]="data" v-for="item in getHeaderSlots"> 10 <template #[item]="data" v-for="item in getHeaderSlots">
11 - <slot :name="item" v-bind="data" /> 11 + <slot :name="item" v-bind="data"></slot>
12 </template> 12 </template>
13 </PageHeader> 13 </PageHeader>
14 <div :class="[`${prefixCls}-content`, $attrs.contentClass]" :style="getContentStyle"> 14 <div :class="[`${prefixCls}-content`, $attrs.contentClass]" :style="getContentStyle">
15 - <slot /> 15 + <slot></slot>
16 </div> 16 </div>
17 <PageFooter v-if="getShowFooter" ref="footerRef"> 17 <PageFooter v-if="getShowFooter" ref="footerRef">
18 <template #left> 18 <template #left>
19 - <slot name="leftFooter" /> 19 + <slot name="leftFooter"></slot>
20 </template> 20 </template>
21 <template #right> 21 <template #right>
22 - <slot name="rightFooter" /> 22 + <slot name="rightFooter"></slot>
23 </template> 23 </template>
24 </PageFooter> 24 </PageFooter>
25 </div> 25 </div>
src/components/Preview/src/index.vue
1 <template> 1 <template>
2 <div :class="prefixCls"> 2 <div :class="prefixCls">
3 <PreviewGroup> 3 <PreviewGroup>
4 - <slot v-if="!imageList || $slots.default" /> 4 + <slot v-if="!imageList || $slots.default"></slot>
5 <template v-else> 5 <template v-else>
6 <template v-for="item in getImageList" :key="item.src"> 6 <template v-for="item in getImageList" :key="item.src">
7 <Image v-bind="item"> 7 <Image v-bind="item">
src/components/Qrcode/src/index.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 - <component :is="tag" ref="wrapRef"></component> 3 + <component :is="tag" ref="wrapRef" />
4 </div> 4 </div>
5 </template> 5 </template>
6 <script lang="ts"> 6 <script lang="ts">
@@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
11 11
12 export default defineComponent({ 12 export default defineComponent({
13 name: 'QrCode', 13 name: 'QrCode',
14 - emits: { done: (url: string) => !!url, error: (error: any) => !!error },  
15 props: { 14 props: {
16 value: { 15 value: {
17 type: [String, Array] as PropType<string | any[]>, 16 type: [String, Array] as PropType<string | any[]>,
@@ -39,6 +38,7 @@ @@ -39,6 +38,7 @@
39 validator: (v: string) => ['canvas', 'img'].includes(v), 38 validator: (v: string) => ['canvas', 'img'].includes(v),
40 }, 39 },
41 }, 40 },
  41 + emits: { done: (url: string) => !!url, error: (error: any) => !!error },
42 setup(props, { emit }) { 42 setup(props, { emit }) {
43 const wrapRef = ref<HTMLCanvasElement | HTMLImageElement | null>(null); 43 const wrapRef = ref<HTMLCanvasElement | HTMLImageElement | null>(null);
44 const urlRef = ref<string>(''); 44 const urlRef = ref<string>('');
src/components/SimpleMenu/src/SimpleMenu.vue
@@ -36,11 +36,11 @@ @@ -36,11 +36,11 @@
36 import { useOpenKeys } from './useOpenKeys'; 36 import { useOpenKeys } from './useOpenKeys';
37 export default defineComponent({ 37 export default defineComponent({
38 name: 'SimpleMenu', 38 name: 'SimpleMenu',
39 - inheritAttrs: false,  
40 components: { 39 components: {
41 Menu, 40 Menu,
42 SimpleSubMenu, 41 SimpleSubMenu,
43 }, 42 },
  43 + inheritAttrs: false,
44 props: { 44 props: {
45 items: { 45 items: {
46 type: Array as PropType<MenuType[]>, 46 type: Array as PropType<MenuType[]>,
@@ -55,6 +55,7 @@ @@ -55,6 +55,7 @@
55 type: Function as PropType<(key: string) => Promise<boolean>>, 55 type: Function as PropType<(key: string) => Promise<boolean>>,
56 }, 56 },
57 }, 57 },
  58 + emits: ['menuClick'],
58 setup(props, { attrs, emit }) { 59 setup(props, { attrs, emit }) {
59 const currentActiveMenu = ref(''); 60 const currentActiveMenu = ref('');
60 const isClickGo = ref(false); 61 const isClickGo = ref(false);
src/components/SimpleMenu/src/components/MenuItem.vue
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <slot name="title"></slot> 5 <slot name="title"></slot>
6 </template> 6 </template>
7 <div :class="`${prefixCls}-tooltip`"> 7 <div :class="`${prefixCls}-tooltip`">
8 - <slot /> 8 + <slot></slot>
9 </div> 9 </div>
10 </Tooltip> 10 </Tooltip>
11 11
src/components/SimpleMenu/src/components/SubMenuItem.vue
@@ -287,7 +287,9 @@ @@ -287,7 +287,9 @@
287 ); 287 );
288 288
289 rootMenuEmitter.on('on-update-active-name:submenu', (data: number[]) => { 289 rootMenuEmitter.on('on-update-active-name:submenu', (data: number[]) => {
290 - state.active = data.includes(instance?.uid!); 290 + if (instance?.uid) {
  291 + state.active = data.includes(instance?.uid);
  292 + }
291 }); 293 });
292 }); 294 });
293 295
src/components/StrengthMeter/src/index.vue
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 :disabled="disabled" 9 :disabled="disabled"
10 > 10 >
11 <template #[item]="data" v-for="item in Object.keys($slots)"> 11 <template #[item]="data" v-for="item in Object.keys($slots)">
12 - <slot :name="item" v-bind="data" /> 12 + <slot :name="item" v-bind="data"></slot>
13 </template> 13 </template>
14 </InputPassword> 14 </InputPassword>
15 <div :class="`${prefixCls}-bar`"> 15 <div :class="`${prefixCls}-bar`">
src/components/Table/src/BasicTable.vue
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 @advanced-change="redoHeight" 20 @advanced-change="redoHeight"
21 > 21 >
22 <template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys"> 22 <template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys">
23 - <slot :name="item" v-bind="data" /> 23 + <slot :name="item" v-bind="data"></slot>
24 </template> 24 </template>
25 </BasicForm> 25 </BasicForm>
26 26
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 @change="handleTableChange" 32 @change="handleTableChange"
33 > 33 >
34 <template #[item]="data" v-for="item in Object.keys($slots)"> 34 <template #[item]="data" v-for="item in Object.keys($slots)">
35 - <slot :name="item" v-bind="data" /> 35 + <slot :name="item" v-bind="data"></slot>
36 </template> 36 </template>
37 <template #[`header-${column.dataIndex}`] v-for="column in columns" :key="column.dataIndex"> 37 <template #[`header-${column.dataIndex}`] v-for="column in columns" :key="column.dataIndex">
38 <HeaderCell :column="column" /> 38 <HeaderCell :column="column" />
@@ -69,12 +69,12 @@ @@ -69,12 +69,12 @@
69 69
70 import './style/index.less'; 70 import './style/index.less';
71 export default defineComponent({ 71 export default defineComponent({
72 - props: basicProps,  
73 components: { 72 components: {
74 Table, 73 Table,
75 BasicForm, 74 BasicForm,
76 HeaderCell: createAsyncComponent(() => import('./components/HeaderCell.vue')), 75 HeaderCell: createAsyncComponent(() => import('./components/HeaderCell.vue')),
77 }, 76 },
  77 + props: basicProps,
78 emits: [ 78 emits: [
79 'fetch-success', 79 'fetch-success',
80 'fetch-error', 80 'fetch-error',
src/components/Table/src/components/EditTableHeaderIcon.vue
1 <template> 1 <template>
2 <span> 2 <span>
3 - <slot /> 3 + <slot></slot>
4 {{ title }} 4 {{ title }}
5 <FormOutlined /> 5 <FormOutlined />
6 </span> 6 </span>
src/components/Table/src/components/TableAction.vue
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 /> 11 />
12 </template> 12 </template>
13 <Dropdown :trigger="['hover']" :dropMenuList="getDropList" v-if="dropDownActions"> 13 <Dropdown :trigger="['hover']" :dropMenuList="getDropList" v-if="dropDownActions">
14 - <slot name="more" /> 14 + <slot name="more"></slot>
15 <a-button type="link" size="small" v-if="!$slots.more"> 15 <a-button type="link" size="small" v-if="!$slots.more">
16 <MoreOutlined class="icon-more" /> 16 <MoreOutlined class="icon-more" />
17 </a-button> 17 </a-button>
src/components/Table/src/components/TableHeader.vue
1 <template> 1 <template>
2 - <slot name="tableTitle" v-if="$slots.tableTitle" /> 2 + <slot name="tableTitle" v-if="$slots.tableTitle"></slot>
3 <TableTitle :helpMessage="titleHelpMessage" :title="title" v-if="!$slots.tableTitle && title" /> 3 <TableTitle :helpMessage="titleHelpMessage" :title="title" v-if="!$slots.tableTitle && title" />
4 4
5 <div :class="`${prefixCls}__toolbar`"> 5 <div :class="`${prefixCls}__toolbar`">
6 - <slot name="toolbar" /> 6 + <slot name="toolbar"></slot>
7 <Divider type="vertical" v-if="$slots.toolbar" /> 7 <Divider type="vertical" v-if="$slots.toolbar" />
8 <TableSetting :setting="tableSetting" v-if="showTableSetting" /> 8 <TableSetting :setting="tableSetting" v-if="showTableSetting" />
9 </div> 9 </div>
src/components/Table/src/components/editable/EditableCell.vue
@@ -18,8 +18,7 @@ @@ -18,8 +18,7 @@
18 @change="handleChange" 18 @change="handleChange"
19 @options-change="handleOptionsChange" 19 @options-change="handleOptionsChange"
20 @pressEnter="handleSubmit" 20 @pressEnter="handleSubmit"
21 - >  
22 - </CellComponent> 21 + />
23 <div :class="`${prefixCls}__action`" v-if="!getRowEditable"> 22 <div :class="`${prefixCls}__action`" v-if="!getRowEditable">
24 <CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmit" /> 23 <CheckOutlined :class="[`${prefixCls}__icon`, 'mx-2']" @click="handleSubmit" />
25 <CloseOutlined :class="`${prefixCls}__icon `" @click="handleCancel" /> 24 <CloseOutlined :class="`${prefixCls}__icon `" @click="handleCancel" />
@@ -48,6 +47,9 @@ @@ -48,6 +47,9 @@
48 export default defineComponent({ 47 export default defineComponent({
49 name: 'EditableCell', 48 name: 'EditableCell',
50 components: { FormOutlined, CloseOutlined, CheckOutlined, CellComponent }, 49 components: { FormOutlined, CloseOutlined, CheckOutlined, CellComponent },
  50 + directives: {
  51 + clickOutside,
  52 + },
51 props: { 53 props: {
52 value: { 54 value: {
53 type: [String, Number, Boolean, Object] as PropType<string | number | boolean | Recordable>, 55 type: [String, Number, Boolean, Object] as PropType<string | number | boolean | Recordable>,
@@ -62,10 +64,6 @@ @@ -62,10 +64,6 @@
62 }, 64 },
63 index: propTypes.number, 65 index: propTypes.number,
64 }, 66 },
65 - directives: {  
66 - clickOutside,  
67 - },  
68 -  
69 setup(props) { 67 setup(props) {
70 const table = useTableContext(); 68 const table = useTableContext();
71 const isEdit = ref(false); 69 const isEdit = ref(false);
@@ -232,7 +230,7 @@ @@ -232,7 +230,7 @@
232 const dataKey = (dataIndex || key) as string; 230 const dataKey = (dataIndex || key) as string;
233 231
234 const record = await table.updateTableData(index, dataKey, value); 232 const record = await table.updateTableData(index, dataKey, value);
235 - needEmit && table.emit?.('edit-end', { record, index, key, value}); 233 + needEmit && table.emit?.('edit-end', { record, index, key, value });
236 isEdit.value = false; 234 isEdit.value = false;
237 } 235 }
238 236
src/components/Table/src/components/settings/ColumnSetting.vue
@@ -44,10 +44,14 @@ @@ -44,10 +44,14 @@
44 <template v-for="item in plainOptions" :key="item.value"> 44 <template v-for="item in plainOptions" :key="item.value">
45 <div :class="`${prefixCls}__check-item`"> 45 <div :class="`${prefixCls}__check-item`">
46 <DragOutlined class="table-coulmn-drag-icon" /> 46 <DragOutlined class="table-coulmn-drag-icon" />
47 - <Checkbox :value="item.value"> {{ item.label }} </Checkbox> 47 + <Checkbox :value="item.value">
  48 + {{ item.label }}
  49 + </Checkbox>
48 50
49 <Tooltip placement="bottomLeft" :mouseLeaveDelay="0.4"> 51 <Tooltip placement="bottomLeft" :mouseLeaveDelay="0.4">
50 - <template #title> {{ t('component.table.settingFixedLeft') }}</template> 52 + <template #title>
  53 + {{ t('component.table.settingFixedLeft') }}
  54 + </template>
51 <Icon 55 <Icon
52 icon="line-md:arrow-align-left" 56 icon="line-md:arrow-align-left"
53 :class="[ 57 :class="[
@@ -62,7 +66,9 @@ @@ -62,7 +66,9 @@
62 </Tooltip> 66 </Tooltip>
63 <Divider type="vertical" /> 67 <Divider type="vertical" />
64 <Tooltip placement="bottomLeft" :mouseLeaveDelay="0.4"> 68 <Tooltip placement="bottomLeft" :mouseLeaveDelay="0.4">
65 - <template #title> {{ t('component.table.settingFixedRight') }}</template> 69 + <template #title>
  70 + {{ t('component.table.settingFixedRight') }}
  71 + </template>
66 <Icon 72 <Icon
67 icon="line-md:arrow-align-left" 73 icon="line-md:arrow-align-left"
68 :class="[ 74 :class="[
src/components/Tinymce/src/Editor.vue
@@ -39,9 +39,9 @@ @@ -39,9 +39,9 @@
39 39
40 export default defineComponent({ 40 export default defineComponent({
41 name: 'Tinymce', 41 name: 'Tinymce',
  42 + components: { ImgUpload },
42 inheritAttrs: false, 43 inheritAttrs: false,
43 props: basicProps, 44 props: basicProps,
44 - components: { ImgUpload },  
45 emits: ['change', 'update:modelValue'], 45 emits: ['change', 'update:modelValue'],
46 setup(props, { emit, attrs }) { 46 setup(props, { emit, attrs }) {
47 const editorRef = ref<any>(null); 47 const editorRef = ref<any>(null);
src/components/Tinymce/src/ImgUpload.vue
@@ -8,7 +8,9 @@ @@ -8,7 +8,9 @@
8 :showUploadList="false" 8 :showUploadList="false"
9 accept=".jpg,.jpeg,.gif,.png,.webp" 9 accept=".jpg,.jpeg,.gif,.png,.webp"
10 > 10 >
11 - <a-button type="primary">{{ t('component.upload.imgUpload') }}</a-button> 11 + <a-button type="primary">
  12 + {{ t('component.upload.imgUpload') }}
  13 + </a-button>
12 </Upload> 14 </Upload>
13 </div> 15 </div>
14 </template> 16 </template>
@@ -16,14 +18,13 @@ @@ -16,14 +18,13 @@
16 import { defineComponent } from 'vue'; 18 import { defineComponent } from 'vue';
17 19
18 import { Upload } from 'ant-design-vue'; 20 import { Upload } from 'ant-design-vue';
19 - import { InboxOutlined } from '@ant-design/icons-vue';  
20 import { useDesign } from '/@/hooks/web/useDesign'; 21 import { useDesign } from '/@/hooks/web/useDesign';
21 import { useGlobSetting } from '/@/hooks/setting'; 22 import { useGlobSetting } from '/@/hooks/setting';
22 import { useI18n } from '/@/hooks/web/useI18n'; 23 import { useI18n } from '/@/hooks/web/useI18n';
23 24
24 export default defineComponent({ 25 export default defineComponent({
25 name: 'TinymceImageUpload', 26 name: 'TinymceImageUpload',
26 - components: { Upload, InboxOutlined }, 27 + components: { Upload },
27 emits: ['uploading', 'done', 'error'], 28 emits: ['uploading', 'done', 'error'],
28 setup(_, { emit }) { 29 setup(_, { emit }) {
29 let uploading = false; 30 let uploading = false;
src/components/Upload/src/BasicUpload.vue
@@ -7,7 +7,9 @@ @@ -7,7 +7,9 @@
7 <Tooltip placement="bottom" v-if="showPreview"> 7 <Tooltip placement="bottom" v-if="showPreview">
8 <template #title> 8 <template #title>
9 {{ t('component.upload.uploaded') }} 9 {{ t('component.upload.uploaded') }}
10 - <template v-if="fileListRef.length">{{ fileListRef.length }}</template> 10 + <template v-if="fileListRef.length">
  11 + {{ fileListRef.length }}
  12 + </template>
11 </template> 13 </template>
12 <a-button @click="openPreviewModal"> 14 <a-button @click="openPreviewModal">
13 <Icon icon="bi:eye" /> 15 <Icon icon="bi:eye" />
@@ -45,6 +47,8 @@ @@ -45,6 +47,8 @@
45 name: 'BasicUpload', 47 name: 'BasicUpload',
46 components: { UploadModal, UploadPreviewModal, Icon, Tooltip }, 48 components: { UploadModal, UploadPreviewModal, Icon, Tooltip },
47 props: uploadContainerProps, 49 props: uploadContainerProps,
  50 + emits: ['change'],
  51 +
48 setup(props, { emit, attrs }) { 52 setup(props, { emit, attrs }) {
49 const { t } = useI18n(); 53 const { t } = useI18n();
50 // 上传modal 54 // 上传modal
src/components/Upload/src/UploadModal.vue
@@ -33,7 +33,9 @@ @@ -33,7 +33,9 @@
33 :before-upload="beforeUpload" 33 :before-upload="beforeUpload"
34 class="upload-modal-toolbar__btn" 34 class="upload-modal-toolbar__btn"
35 > 35 >
36 - <a-button type="primary"> {{ t('component.upload.choose') }} </a-button> 36 + <a-button type="primary">
  37 + {{ t('component.upload.choose') }}
  38 + </a-button>
37 </Upload> 39 </Upload>
38 </div> 40 </div>
39 <FileList :dataSource="fileListRef" :columns="columns" :actionColumn="actionColumn" /> 41 <FileList :dataSource="fileListRef" :columns="columns" :actionColumn="actionColumn" />
@@ -62,6 +64,7 @@ @@ -62,6 +64,7 @@
62 export default defineComponent({ 64 export default defineComponent({
63 components: { BasicModal, Upload, Alert, FileList }, 65 components: { BasicModal, Upload, Alert, FileList },
64 props: basicProps, 66 props: basicProps,
  67 + emits: ['change'],
65 setup(props, { emit }) { 68 setup(props, { emit }) {
66 const { t } = useI18n(); 69 const { t } = useI18n();
67 70
src/components/Upload/src/UploadPreviewModal.vue
@@ -27,6 +27,7 @@ @@ -27,6 +27,7 @@
27 export default defineComponent({ 27 export default defineComponent({
28 components: { BasicModal, FileList }, 28 components: { BasicModal, FileList },
29 props: previewProps, 29 props: previewProps,
  30 + emits: ['list-change'],
30 setup(props, { emit }) { 31 setup(props, { emit }) {
31 const [register, { closeModal }] = useModalInner(); 32 const [register, { closeModal }] = useModalInner();
32 const { t } = useI18n(); 33 const { t } = useI18n();
src/layouts/default/header/MultipleHeader.vue
1 <template> 1 <template>
2 - <div :style="getPlaceholderDomStyle" v-if="getIsShowPlaceholderDom" /> 2 + <div :style="getPlaceholderDomStyle" v-if="getIsShowPlaceholderDom"></div>
3 <div :style="getWrapStyle" :class="getClass"> 3 <div :style="getWrapStyle" :class="getClass">
4 <LayoutHeader v-if="getShowInsetHeaderRef" /> 4 <LayoutHeader v-if="getShowInsetHeaderRef" />
5 <MultipleTabs v-if="getShowTabs" /> 5 <MultipleTabs v-if="getShowTabs" />
src/layouts/default/header/components/Breadcrumb.vue
@@ -25,7 +25,6 @@ @@ -25,7 +25,6 @@
25 import { REDIRECT_NAME } from '/@/router/constant'; 25 import { REDIRECT_NAME } from '/@/router/constant';
26 import Icon from '/@/components/Icon'; 26 import Icon from '/@/components/Icon';
27 27
28 - import { HomeOutlined } from '@ant-design/icons-vue';  
29 import { PageEnum } from '/@/enums/pageEnum'; 28 import { PageEnum } from '/@/enums/pageEnum';
30 29
31 import { useDesign } from '/@/hooks/web/useDesign'; 30 import { useDesign } from '/@/hooks/web/useDesign';
@@ -37,7 +36,7 @@ @@ -37,7 +36,7 @@
37 36
38 export default defineComponent({ 37 export default defineComponent({
39 name: 'LayoutBreadcrumb', 38 name: 'LayoutBreadcrumb',
40 - components: { HomeOutlined, Icon, [Breadcrumb.name]: Breadcrumb }, 39 + components: { Icon, [Breadcrumb.name]: Breadcrumb },
41 props: { 40 props: {
42 theme: propTypes.oneOf(['dark', 'light']), 41 theme: propTypes.oneOf(['dark', 'light']),
43 }, 42 },
src/layouts/default/header/components/lock/LockModal.vue
@@ -9,7 +9,9 @@ @@ -9,7 +9,9 @@
9 <div :class="`${prefixCls}__entry`"> 9 <div :class="`${prefixCls}__entry`">
10 <div :class="`${prefixCls}__header`"> 10 <div :class="`${prefixCls}__header`">
11 <img :src="headerImg" :class="`${prefixCls}__header-img`" /> 11 <img :src="headerImg" :class="`${prefixCls}__header-img`" />
12 - <p :class="`${prefixCls}__header-name`">{{ getRealName }}</p> 12 + <p :class="`${prefixCls}__header-name`">
  13 + {{ getRealName }}
  14 + </p>
13 </div> 15 </div>
14 16
15 <BasicForm @register="registerForm" /> 17 <BasicForm @register="registerForm" />
src/layouts/default/header/components/notify/NoticeList.vue
@@ -21,8 +21,12 @@ @@ -21,8 +21,12 @@
21 21
22 <template #description> 22 <template #description>
23 <div> 23 <div>
24 - <div class="description">{{ item.description }}</div>  
25 - <div class="datetime">{{ item.datetime }}</div> 24 + <div class="description">
  25 + {{ item.description }}
  26 + </div>
  27 + <div class="datetime">
  28 + {{ item.datetime }}
  29 + </div>
26 </div> 30 </div>
27 </template> 31 </template>
28 </a-list-item-meta> 32 </a-list-item-meta>
src/layouts/default/header/components/user-dropdown/index.vue
@@ -33,8 +33,6 @@ @@ -33,8 +33,6 @@
33 33
34 // res 34 // res
35 35
36 - import Icon from '/@/components/Icon/index';  
37 -  
38 import { userStore } from '/@/store/modules/user'; 36 import { userStore } from '/@/store/modules/user';
39 37
40 import { DOC_URL } from '/@/settings/siteSetting'; 38 import { DOC_URL } from '/@/settings/siteSetting';
@@ -58,7 +56,6 @@ @@ -58,7 +56,6 @@
58 Menu, 56 Menu,
59 MenuItem: createAsyncComponent(() => import('./DropMenuItem.vue')), 57 MenuItem: createAsyncComponent(() => import('./DropMenuItem.vue')),
60 MenuDivider: Menu.Divider, 58 MenuDivider: Menu.Divider,
61 - Icon,  
62 }, 59 },
63 props: { 60 props: {
64 theme: propTypes.oneOf(['dark', 'light']), 61 theme: propTypes.oneOf(['dark', 'light']),
src/layouts/default/setting/components/TypePicker.vue
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 }, 12 },
13 ]" 13 ]"
14 > 14 >
15 - <div class="mix-sidebar" /> 15 + <div class="mix-sidebar"></div>
16 </div> 16 </div>
17 </Tooltip> 17 </Tooltip>
18 </template> 18 </template>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 props: { 31 props: {
32 menuTypeList: { 32 menuTypeList: {
33 type: Array as PropType<typeof menuTypeList>, 33 type: Array as PropType<typeof menuTypeList>,
34 - defualt: [], 34 + defualt: () => [],
35 }, 35 },
36 handler: { 36 handler: {
37 type: Function as PropType<Fn>, 37 type: Function as PropType<Fn>,
@@ -39,6 +39,7 @@ @@ -39,6 +39,7 @@
39 }, 39 },
40 def: { 40 def: {
41 type: String, 41 type: String,
  42 + default: '',
42 }, 43 },
43 }, 44 },
44 setup() { 45 setup() {
src/layouts/default/sider/DragBar.vue
1 <template> 1 <template>
2 - <div :class="getClass" :style="getDragBarStyle" /> 2 + <div :class="getClass" :style="getDragBarStyle"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, computed, unref } from 'vue'; 5 import { defineComponent, computed, unref } from 'vue';
src/layouts/default/sider/LayoutSider.vue
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 v-if="getMenuFixed && !getIsMobile" 3 v-if="getMenuFixed && !getIsMobile"
4 :style="getHiddenDomStyle" 4 :style="getHiddenDomStyle"
5 :class="{ hidden: !showClassSideBarRef }" 5 :class="{ hidden: !showClassSideBarRef }"
6 - /> 6 + ></div>
7 <Sider 7 <Sider
8 ref="sideRef" 8 ref="sideRef"
9 breakpoint="lg" 9 breakpoint="lg"
src/layouts/default/sider/MixSider.vue
1 <template> 1 <template>
2 - <div :class="`${prefixCls}-dom`" :style="getDomStyle" /> 2 + <div :class="`${prefixCls}-dom`" :style="getDomStyle"></div>
3 3
4 <div 4 <div
5 v-click-outside="handleClickOutside" 5 v-click-outside="handleClickOutside"
@@ -37,7 +37,9 @@ @@ -37,7 +37,9 @@
37 :size="getCollapsed ? 16 : 20" 37 :size="getCollapsed ? 16 : 20"
38 :icon="item.meta && item.meta.icon" 38 :icon="item.meta && item.meta.icon"
39 /> 39 />
40 - <p :class="`${prefixCls}-module__name`">{{ t(item.name) }}</p> 40 + <p :class="`${prefixCls}-module__name`">
  41 + {{ t(item.name) }}
  42 + </p>
41 </li> 43 </li>
42 </ul> 44 </ul>
43 </ScrollContainer> 45 </ScrollContainer>
@@ -156,9 +158,11 @@ @@ -156,9 +158,11 @@
156 ); 158 );
157 159
158 const getIsFixed = computed(() => { 160 const getIsFixed = computed(() => {
  161 + /* eslint-disable-next-line */
159 mixSideHasChildren.value = unref(chilrenMenus).length > 0; 162 mixSideHasChildren.value = unref(chilrenMenus).length > 0;
160 const isFixed = unref(getMixSideFixed) && unref(mixSideHasChildren); 163 const isFixed = unref(getMixSideFixed) && unref(mixSideHasChildren);
161 if (isFixed) { 164 if (isFixed) {
  165 + /* eslint-disable-next-line */
162 openMenu.value = true; 166 openMenu.value = true;
163 } 167 }
164 return isFixed; 168 return isFixed;
src/layouts/default/tabs/components/FoldButton.vue
@@ -5,9 +5,7 @@ @@ -5,9 +5,7 @@
5 </template> 5 </template>
6 <script lang="ts"> 6 <script lang="ts">
7 import { defineComponent, unref, computed } from 'vue'; 7 import { defineComponent, unref, computed } from 'vue';
8 - import { RedoOutlined } from '@ant-design/icons-vue';  
9 import { useDesign } from '/@/hooks/web/useDesign'; 8 import { useDesign } from '/@/hooks/web/useDesign';
10 - import { Tooltip } from 'ant-design-vue';  
11 import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting'; 9 import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
12 import { useMenuSetting } from '/@/hooks/setting/useMenuSetting'; 10 import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
13 11
@@ -15,7 +13,7 @@ @@ -15,7 +13,7 @@
15 13
16 export default defineComponent({ 14 export default defineComponent({
17 name: 'FoldButton', 15 name: 'FoldButton',
18 - components: { RedoOutlined, Tooltip, Icon }, 16 + components: { Icon },
19 17
20 setup() { 18 setup() {
21 const { prefixCls } = useDesign('multiple-tabs-content'); 19 const { prefixCls } = useDesign('multiple-tabs-content');
src/layouts/page/ParentView.vue
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <template> 4 <template>
5 <div> 5 <div>
6 <router-view> 6 <router-view>
7 - <template v-slot="{ Component, route }"> 7 + <template #default="{ Component, route }">
8 <transition 8 <transition
9 :name=" 9 :name="
10 getTransitionName({ 10 getTransitionName({
src/layouts/page/index.vue
1 <template> 1 <template>
2 <div> 2 <div>
3 <router-view> 3 <router-view>
4 - <template v-slot="{ Component, route }"> 4 + <template #default="{ Component, route }">
5 <transition 5 <transition
6 :name=" 6 :name="
7 getTransitionName({ 7 getTransitionName({
src/views/dashboard/analysis/components/AnalysisBar.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ height, width }" /> 2 + <div ref="chartRef" :style="{ height, width }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, onMounted, ref, Ref } from 'vue'; 5 import { defineComponent, onMounted, ref, Ref } from 'vue';
src/views/dashboard/analysis/components/AnalysisLine.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ height, width }" /> 2 + <div ref="chartRef" :style="{ height, width }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, onMounted, ref, Ref } from 'vue'; 5 import { defineComponent, onMounted, ref, Ref } from 'vue';
src/views/dashboard/analysis/components/AnalysisPie.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ height, width }" /> 2 + <div ref="chartRef" :style="{ height, width }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, onMounted, ref, Ref } from 'vue'; 5 import { defineComponent, onMounted, ref, Ref } from 'vue';
src/views/dashboard/analysis/components/GrowCard.vue
@@ -2,14 +2,18 @@ @@ -2,14 +2,18 @@
2 <div class="grow-card"> 2 <div class="grow-card">
3 <div class="grow-card-header"> 3 <div class="grow-card-header">
4 <div class="grow-card__info"> 4 <div class="grow-card__info">
5 - <p class="grow-card__title">{{ info.title }}</p> 5 + <p class="grow-card__title">
  6 + {{ info.title }}
  7 + </p>
6 <CountTo prefix="$" :startVal="1" :endVal="info.price" /> 8 <CountTo prefix="$" :startVal="1" :endVal="info.price" />
7 </div> 9 </div>
8 <img :src="info.icon" /> 10 <img :src="info.icon" />
9 </div> 11 </div>
10 <div class="grow-card-footer" :class="{ 'is-up': info.up }"> 12 <div class="grow-card-footer" :class="{ 'is-up': info.up }">
11 <Statistic :value="info.percent"> 13 <Statistic :value="info.percent">
12 - <template #prefix> <img :src="info.up ? riseSvg : downSvg" /> </template> 14 + <template #prefix>
  15 + <img :src="info.up ? riseSvg : downSvg" />
  16 + </template>
13 </Statistic> 17 </Statistic>
14 <span class="grow-card__mom">{{ info.mom }}</span> 18 <span class="grow-card__mom">{{ info.mom }}</span>
15 </div> 19 </div>
src/views/dashboard/analysis/components/TrendLine.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ height, width }" /> 2 + <div ref="chartRef" :style="{ height, width }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, onMounted, ref, Ref } from 'vue'; 5 import { defineComponent, onMounted, ref, Ref } from 'vue';
src/views/dashboard/analysis/index.vue
1 <template> 1 <template>
2 - <div class="analysis p-4"> 2 + <div class="p-4 analysis">
3 <a-row class="pl-2"> 3 <a-row class="pl-2">
4 <template v-for="item in growCardList" :key="item.title"> 4 <template v-for="item in growCardList" :key="item.title">
5 - <ACol :sm="24" :md="12" :lg="6"> 5 + <a-col :sm="24" :md="12" :lg="6">
6 <GrowCard :info="item" /> 6 <GrowCard :info="item" />
7 - </ACol> 7 + </a-col>
8 </template> 8 </template>
9 </a-row> 9 </a-row>
10 10
@@ -42,7 +42,6 @@ @@ -42,7 +42,6 @@
42 <script lang="ts"> 42 <script lang="ts">
43 import { defineComponent } from 'vue'; 43 import { defineComponent } from 'vue';
44 import GrowCard from './components/GrowCard.vue'; 44 import GrowCard from './components/GrowCard.vue';
45 - import TrendLine from './components/TrendLine.vue';  
46 import AnalysisLine from './components/AnalysisLine.vue'; 45 import AnalysisLine from './components/AnalysisLine.vue';
47 import AnalysisPie from './components/AnalysisPie.vue'; 46 import AnalysisPie from './components/AnalysisPie.vue';
48 import AnalysisBar from './components/AnalysisBar.vue'; 47 import AnalysisBar from './components/AnalysisBar.vue';
@@ -55,7 +54,6 @@ @@ -55,7 +54,6 @@
55 components: { 54 components: {
56 GrowCard, 55 GrowCard,
57 CollapseContainer, 56 CollapseContainer,
58 - TrendLine,  
59 AnalysisLine, 57 AnalysisLine,
60 AnalysisPie, 58 AnalysisPie,
61 AnalysisBar, 59 AnalysisBar,
src/views/dashboard/house/index.vue
@@ -15,26 +15,26 @@ @@ -15,26 +15,26 @@
15 <div class="circle"></div> 15 <div class="circle"></div>
16 <div class="plastic"> 16 <div class="plastic">
17 <div class="plastic__g"> 17 <div class="plastic__g">
18 - <div class="plastic__item" />  
19 - <div class="plastic__item" />  
20 - <div class="plastic__item" />  
21 - <div class="plastic__item" />  
22 - <div class="plastic__item" />  
23 - <div class="plastic__item" />  
24 - <div class="plastic__item" />  
25 - <div class="plastic__item" /> 18 + <div class="plastic__item"></div>
  19 + <div class="plastic__item"></div>
  20 + <div class="plastic__item"></div>
  21 + <div class="plastic__item"></div>
  22 + <div class="plastic__item"></div>
  23 + <div class="plastic__item"></div>
  24 + <div class="plastic__item"></div>
  25 + <div class="plastic__item"></div>
26 </div> 26 </div>
27 </div> 27 </div>
28 <div class="line"> 28 <div class="line">
29 - <div class="line__item" />  
30 - <div class="line__item" />  
31 - <div class="line__item" />  
32 - <div class="line__item" />  
33 - <div class="line__item" />  
34 - <div class="line__item" />  
35 - <div class="line__item" />  
36 - <div class="line__item" />  
37 - <div class="line__item" /> 29 + <div class="line__item"></div>
  30 + <div class="line__item"></div>
  31 + <div class="line__item"></div>
  32 + <div class="line__item"></div>
  33 + <div class="line__item"></div>
  34 + <div class="line__item"></div>
  35 + <div class="line__item"></div>
  36 + <div class="line__item"></div>
  37 + <div class="line__item"></div>
38 </div> 38 </div>
39 </div> 39 </div>
40 <div class="clouds"> 40 <div class="clouds">
@@ -43,29 +43,29 @@ @@ -43,29 +43,29 @@
43 <div class="cloud__item"></div> 43 <div class="cloud__item"></div>
44 </div> 44 </div>
45 <div class="cloud"> 45 <div class="cloud">
46 - <div class="cloud__item" />  
47 - <div class="cloud__item" /> 46 + <div class="cloud__item"></div>
  47 + <div class="cloud__item"></div>
48 </div> 48 </div>
49 <div class="cloud"> 49 <div class="cloud">
50 - <div class="cloud__item" />  
51 - <div class="cloud__item" /> 50 + <div class="cloud__item"></div>
  51 + <div class="cloud__item"></div>
52 </div> 52 </div>
53 - <div class="bird" /> 53 + <div class="bird"></div>
54 </div> 54 </div>
55 <div class="birds"> 55 <div class="birds">
56 - <div class="bird" />  
57 - <div class="bird" /> 56 + <div class="bird"></div>
  57 + <div class="bird"></div>
58 </div> 58 </div>
59 <div class="tree"> 59 <div class="tree">
60 - <div class="tree__item" />  
61 - <div class="tree__item" />  
62 - <div class="tree__item" /> 60 + <div class="tree__item"></div>
  61 + <div class="tree__item"></div>
  62 + <div class="tree__item"></div>
63 </div> 63 </div>
64 <div class="bush"> 64 <div class="bush">
65 - <div class="bush__item" />  
66 - <div class="bush__item" /> 65 + <div class="bush__item"></div>
  66 + <div class="bush__item"></div>
67 </div> 67 </div>
68 - <div class="dot" /> 68 + <div class="dot"></div>
69 </div> 69 </div>
70 </template> 70 </template>
71 <script lang="ts"> 71 <script lang="ts">
src/views/dashboard/workbench/components/NewsList.vue
@@ -10,7 +10,9 @@ @@ -10,7 +10,9 @@
10 </template> 10 </template>
11 <template #description> 11 <template #description>
12 <div class="news-list__item-desc"> 12 <div class="news-list__item-desc">
13 - <div class="news-list__item-time mb-1"> {{ item.sendTime }}</div> 13 + <div class="news-list__item-time mb-1">
  14 + {{ item.sendTime }}
  15 + </div>
14 <div class="news-list__item-title mb-1"> 16 <div class="news-list__item-title mb-1">
15 <span class="news-list__item-light">{{ item.sender }}&nbsp;</span>申请迭代 17 <span class="news-list__item-light">{{ item.sender }}&nbsp;</span>申请迭代
16 <span class="news-list__item-light">&nbsp;{{ item.title }}&nbsp;</span>发布 18 <span class="news-list__item-light">&nbsp;{{ item.title }}&nbsp;</span>发布
src/views/dashboard/workbench/components/ProdTotal.vue
1 <template> 1 <template>
2 - <Row class="prod-total"> 2 + <a-row class="prod-total">
3 <template v-for="(item, index) in wokbProd" :key="item.type"> 3 <template v-for="(item, index) in wokbProd" :key="item.type">
4 - <Col :xs="12" :sm="6" class="prod-total__item" :class="`prod-total__item-${index}`">  
5 - <div class="img" :class="`prod-total__item-${index}-img`" /> 4 + <a-col :xs="12" :sm="6" class="prod-total__item" :class="`prod-total__item-${index}`">
  5 + <div class="img" :class="`prod-total__item-${index}-img`"></div>
6 <div>{{ item.amount }}</div> 6 <div>{{ item.amount }}</div>
7 <span>{{ item.type }}</span> 7 <span>{{ item.type }}</span>
8 - </Col> 8 + </a-col>
9 </template> 9 </template>
10 - </Row> 10 + </a-row>
11 </template> 11 </template>
12 <script lang="ts"> 12 <script lang="ts">
13 import { defineComponent } from 'vue'; 13 import { defineComponent } from 'vue';
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 import { wokbProd } from '../data'; 16 import { wokbProd } from '../data';
17 // import {ProdTypeEnum} from '@/api/dashboard/model/wokbModel' 17 // import {ProdTypeEnum} from '@/api/dashboard/model/wokbModel'
18 export default defineComponent({ 18 export default defineComponent({
19 - components: { Row, Col }, 19 + components: { [Row.name]: Row, [Col.name]: Col },
20 setup() { 20 setup() {
21 return { wokbProd }; 21 return { wokbProd };
22 }, 22 },
src/views/dashboard/workbench/components/ShortCuts.vue
@@ -3,23 +3,23 @@ @@ -3,23 +3,23 @@
3 <template #action> 3 <template #action>
4 <a-button size="small" type="link"> 新建 </a-button> 4 <a-button size="small" type="link"> 新建 </a-button>
5 </template> 5 </template>
6 - <Row> 6 + <a-row>
7 <template v-for="item in shortCuts" :key="item.img"> 7 <template v-for="item in shortCuts" :key="item.img">
8 - <Col :span="8" class="shortcuts__item p-3">  
9 - <img :src="item.img" class="shortcuts__item-img mb-2" /> 8 + <a-col :span="8" class="p-3 shortcuts__item">
  9 + <img :src="item.img" class="mb-2 shortcuts__item-img" />
10 <br /> 10 <br />
11 <span>{{ item.name }}</span> 11 <span>{{ item.name }}</span>
12 - </Col> 12 + </a-col>
13 </template> 13 </template>
14 14
15 - <Col :span="8" class="shortcuts__item p-3">  
16 - <span class="shortcuts__item-all mb-2"> 15 + <a-col :span="8" class="p-3 shortcuts__item">
  16 + <span class="mb-2 shortcuts__item-all">
17 <RightOutlined /> 17 <RightOutlined />
18 </span> 18 </span>
19 <br /> 19 <br />
20 <span>查看全部</span> 20 <span>查看全部</span>
21 - </Col>  
22 - </Row> 21 + </a-col>
  22 + </a-row>
23 </CollapseContainer> 23 </CollapseContainer>
24 </template> 24 </template>
25 <script lang="ts"> 25 <script lang="ts">
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 }, 71 },
72 ]; 72 ];
73 export default defineComponent({ 73 export default defineComponent({
74 - components: { Row, Col, CollapseContainer, RightOutlined }, 74 + components: { [Row.name]: Row, [Col.name]: Col, CollapseContainer, RightOutlined },
75 setup() { 75 setup() {
76 return { shortCuts }; 76 return { shortCuts };
77 }, 77 },
src/views/dashboard/workbench/components/TodoList.vue
@@ -23,14 +23,14 @@ @@ -23,14 +23,14 @@
23 </template> 23 </template>
24 </ListItemMeta> 24 </ListItemMeta>
25 <a-button type="link"> 25 <a-button type="link">
26 - <Tag color="blue">待审批</Tag> 26 + <Tag color="blue"> 待审批 </Tag>
27 </a-button> 27 </a-button>
28 </ListItem> 28 </ListItem>
29 </template> 29 </template>
30 </List> 30 </List>
31 <div class="todo-list__all"> 31 <div class="todo-list__all">
32 <Tooltip placement="topRight"> 32 <Tooltip placement="topRight">
33 - <template #title>查看更多</template> 33 + <template #title> 查看更多 </template>
34 <EllipsisOutlined /> 34 <EllipsisOutlined />
35 </Tooltip> 35 </Tooltip>
36 </div> 36 </div>
src/views/dashboard/workbench/components/Week.vue
1 <template> 1 <template>
2 <CollapseContainer title="销售统计" :canExpan="false"> 2 <CollapseContainer title="销售统计" :canExpan="false">
3 - <div ref="chartRef" :style="{ width: '100%' }" /> 3 + <div ref="chartRef" :style="{ width: '100%' }"></div>
4 </CollapseContainer> 4 </CollapseContainer>
5 </template> 5 </template>
6 <script lang="ts"> 6 <script lang="ts">
src/views/demo/comp/button/index.vue
@@ -5,12 +5,12 @@ @@ -5,12 +5,12 @@
5 content=" 基础组件依赖于ant-design-vue,组件库已有的基础组件,项目中不会再次进行demo展示(二次封装组件除外)" 5 content=" 基础组件依赖于ant-design-vue,组件库已有的基础组件,项目中不会再次进行demo展示(二次封装组件除外)"
6 > 6 >
7 <template #rightFooter> 7 <template #rightFooter>
8 - <a-button type="primary">确认</a-button> 8 + <a-button type="primary"> 确认 </a-button>
9 </template> 9 </template>
10 10
11 <div class="my-2"> 11 <div class="my-2">
12 <h3>success</h3> 12 <h3>success</h3>
13 - <a-button color="success">成功</a-button> 13 + <a-button color="success"> 成功 </a-button>
14 <a-button color="success" class="ml-2" disabled> 禁用 </a-button> 14 <a-button color="success" class="ml-2" disabled> 禁用 </a-button>
15 <a-button color="success" class="ml-2" loading> loading </a-button> 15 <a-button color="success" class="ml-2" loading> loading </a-button>
16 <a-button color="success" type="link" class="ml-2"> link </a-button> 16 <a-button color="success" type="link" class="ml-2"> link </a-button>
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 20
21 <div class="my-2"> 21 <div class="my-2">
22 <h3>warning</h3> 22 <h3>warning</h3>
23 - <a-button color="warning">警告</a-button> 23 + <a-button color="warning"> 警告 </a-button>
24 <a-button color="warning" class="ml-2" disabled> 禁用 </a-button> 24 <a-button color="warning" class="ml-2" disabled> 禁用 </a-button>
25 <a-button color="warning" class="ml-2" loading> loading </a-button> 25 <a-button color="warning" class="ml-2" loading> loading </a-button>
26 <a-button color="warning" type="link" class="ml-2"> link </a-button> 26 <a-button color="warning" type="link" class="ml-2"> link </a-button>
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 30
31 <div class="my-2"> 31 <div class="my-2">
32 <h3>error</h3> 32 <h3>error</h3>
33 - <a-button color="error">错误</a-button> 33 + <a-button color="error"> 错误 </a-button>
34 <a-button color="error" class="ml-2" disabled> 禁用 </a-button> 34 <a-button color="error" class="ml-2" disabled> 禁用 </a-button>
35 <a-button color="error" class="ml-2" loading> loading </a-button> 35 <a-button color="error" class="ml-2" loading> loading </a-button>
36 <a-button color="error" type="link" class="ml-2"> link </a-button> 36 <a-button color="error" type="link" class="ml-2"> link </a-button>
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 40
41 <div class="my-2"> 41 <div class="my-2">
42 <h3>ghost</h3> 42 <h3>ghost</h3>
43 - <a-button ghost>幽灵</a-button> 43 + <a-button ghost> 幽灵 </a-button>
44 <a-button ghost class="ml-2" disabled> 禁用 </a-button> 44 <a-button ghost class="ml-2" disabled> 禁用 </a-button>
45 <a-button ghost class="ml-2" loading> loading </a-button> 45 <a-button ghost class="ml-2" loading> loading </a-button>
46 <a-button ghost type="link" class="ml-2"> link </a-button> 46 <a-button ghost type="link" class="ml-2"> link </a-button>
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 50
51 <div class="my-2"> 51 <div class="my-2">
52 <h3>primary</h3> 52 <h3>primary</h3>
53 - <a-button type="primary" preIcon="mdi:page-next-outline">主按钮</a-button> 53 + <a-button type="primary" preIcon="mdi:page-next-outline"> 主按钮 </a-button>
54 <a-button type="primary" class="ml-2" disabled> 禁用 </a-button> 54 <a-button type="primary" class="ml-2" disabled> 禁用 </a-button>
55 <a-button type="primary" class="ml-2" loading> loading </a-button> 55 <a-button type="primary" class="ml-2" loading> loading </a-button>
56 <a-button type="link" class="ml-2"> link </a-button> 56 <a-button type="link" class="ml-2"> link </a-button>
@@ -60,7 +60,7 @@ @@ -60,7 +60,7 @@
60 60
61 <div class="my-2"> 61 <div class="my-2">
62 <h3>default</h3> 62 <h3>default</h3>
63 - <a-button type="default">默认</a-button> 63 + <a-button type="default"> 默认 </a-button>
64 <a-button type="default" class="ml-2" disabled> 禁用 </a-button> 64 <a-button type="default" class="ml-2" disabled> 禁用 </a-button>
65 <a-button type="default" class="ml-2" loading> loading </a-button> 65 <a-button type="default" class="ml-2" loading> loading </a-button>
66 <a-button type="link" class="ml-2"> link </a-button> 66 <a-button type="link" class="ml-2"> link </a-button>
@@ -70,7 +70,7 @@ @@ -70,7 +70,7 @@
70 70
71 <div class="my-2"> 71 <div class="my-2">
72 <h3>dashed</h3> 72 <h3>dashed</h3>
73 - <a-button type="dashed">dashed</a-button> 73 + <a-button type="dashed"> dashed </a-button>
74 <a-button type="dashed" class="ml-2" disabled> 禁用 </a-button> 74 <a-button type="dashed" class="ml-2" disabled> 禁用 </a-button>
75 <a-button type="dashed" class="ml-2" loading> loading </a-button> 75 <a-button type="dashed" class="ml-2" loading> loading </a-button>
76 </div> 76 </div>
src/views/demo/comp/drawer/Drawer2.vue
1 <template> 1 <template>
2 <BasicDrawer v-bind="$attrs" @register="register" title="Drawer Title" width="50%"> 2 <BasicDrawer v-bind="$attrs" @register="register" title="Drawer Title" width="50%">
3 Drawer Info. 3 Drawer Info.
4 - <a-button type="primary" @click="closeDrawer">内部关闭drawer</a-button> 4 + <a-button type="primary" @click="closeDrawer"> 内部关闭drawer </a-button>
5 </BasicDrawer> 5 </BasicDrawer>
6 </template> 6 </template>
7 <script lang="ts"> 7 <script lang="ts">
src/views/demo/comp/drawer/Drawer3.vue
1 <template> 1 <template>
2 <BasicDrawer v-bind="$attrs" title="Modal Title" width="50%" showFooter @ok="handleOk"> 2 <BasicDrawer v-bind="$attrs" title="Modal Title" width="50%" showFooter @ok="handleOk">
3 - <p class="h-20" v-for="index in 40" :key="index">根据屏幕高度自适应</p> 3 + <p class="h-20" v-for="index in 40" :key="index"> 根据屏幕高度自适应 </p>
4 <template #insertFooter> 4 <template #insertFooter>
5 <a-button> btn</a-button> 5 <a-button> btn</a-button>
6 </template> 6 </template>
src/views/demo/comp/drawer/Drawer5.vue
1 <template> 1 <template>
2 <BasicDrawer v-bind="$attrs" :isDetail="true" title="Drawer Title5"> 2 <BasicDrawer v-bind="$attrs" :isDetail="true" title="Drawer Title5">
3 - <p class="h-20">Content Message</p> 3 + <p class="h-20"> Content Message </p>
4 <template #titleToolbar> toolbar </template> 4 <template #titleToolbar> toolbar </template>
5 </BasicDrawer> 5 </BasicDrawer>
6 </template> 6 </template>
src/views/demo/comp/drawer/index.vue
1 <template> 1 <template>
2 <PageWrapper title="抽屉组件使用示例"> 2 <PageWrapper title="抽屉组件使用示例">
3 <Alert message="使用 useDrawer 进行抽屉操作" show-icon /> 3 <Alert message="使用 useDrawer 进行抽屉操作" show-icon />
4 - <a-button type="primary" class="my-4" @click="openDrawerLoading">打开Drawer</a-button> 4 + <a-button type="primary" class="my-4" @click="openDrawerLoading"> 打开Drawer </a-button>
5 5
6 <Alert message="内外同时控制显示隐藏" show-icon /> 6 <Alert message="内外同时控制显示隐藏" show-icon />
7 - <a-button type="primary" class="my-4" @click="openDrawer2(true)">打开Drawer</a-button> 7 + <a-button type="primary" class="my-4" @click="openDrawer2(true)"> 打开Drawer </a-button>
8 <Alert message="自适应高度/显示footer" show-icon /> 8 <Alert message="自适应高度/显示footer" show-icon />
9 - <a-button type="primary" class="my-4" @click="openDrawer3(true)">打开Drawer</a-button> 9 + <a-button type="primary" class="my-4" @click="openDrawer3(true)"> 打开Drawer </a-button>
10 10
11 <Alert 11 <Alert
12 message="内外数据交互,外部通过 transferModalData 发送,内部通过 receiveDrawerDataRef 接收。该数据具有响应式" 12 message="内外数据交互,外部通过 transferModalData 发送,内部通过 receiveDrawerDataRef 接收。该数据具有响应式"
13 show-icon 13 show-icon
14 /> 14 />
15 - <a-button type="primary" class="my-4" @click="send">打开Drawer并传递数据</a-button> 15 + <a-button type="primary" class="my-4" @click="send"> 打开Drawer并传递数据 </a-button>
16 <Alert message="详情页模式" show-icon /> 16 <Alert message="详情页模式" show-icon />
17 - <a-button type="primary" class="my-4" @click="openDrawer5(true)">打开详情Drawer</a-button> 17 + <a-button type="primary" class="my-4" @click="openDrawer5(true)"> 打开详情Drawer </a-button>
18 <Drawer1 @register="register1" /> 18 <Drawer1 @register="register1" />
19 <Drawer2 @register="register2" /> 19 <Drawer2 @register="register2" />
20 <Drawer3 @register="register3" /> 20 <Drawer3 @register="register3" />
src/views/demo/comp/lazy/Transition.vue
@@ -13,13 +13,12 @@ @@ -13,13 +13,12 @@
13 </template> 13 </template>
14 <script lang="ts"> 14 <script lang="ts">
15 import { defineComponent } from 'vue'; 15 import { defineComponent } from 'vue';
16 - import { Skeleton } from 'ant-design-vue';  
17 import TargetContent from './TargetContent.vue'; 16 import TargetContent from './TargetContent.vue';
18 import { LazyContainer } from '/@/components/Container/index'; 17 import { LazyContainer } from '/@/components/Container/index';
19 import { PageWrapper } from '/@/components/Page'; 18 import { PageWrapper } from '/@/components/Page';
20 19
21 export default defineComponent({ 20 export default defineComponent({
22 - components: { LazyContainer, TargetContent, Skeleton, PageWrapper }, 21 + components: { LazyContainer, TargetContent, PageWrapper },
23 }); 22 });
24 </script> 23 </script>
25 <style lang="less"> 24 <style lang="less">
src/views/demo/comp/loading/index.vue
1 <template> 1 <template>
2 <PageWrapper v-loading="loadingRef" loading-tip="加载中..." title="Loading组件示例"> 2 <PageWrapper v-loading="loadingRef" loading-tip="加载中..." title="Loading组件示例">
3 <a-alert message="组件方式" /> 3 <a-alert message="组件方式" />
4 - <a-button class="my-4 mr-4" type="primary" @click="openCompFullLoading">全屏 Loading</a-button>  
5 - <a-button class="my-4" type="primary" @click="openCompAbsolute">容器内 Loading</a-button> 4 + <a-button class="my-4 mr-4" type="primary" @click="openCompFullLoading">
  5 + 全屏 Loading
  6 + </a-button>
  7 + <a-button class="my-4" type="primary" @click="openCompAbsolute"> 容器内 Loading </a-button>
6 <Loading :loading="loading" :absolute="absolute" :tip="tip" /> 8 <Loading :loading="loading" :absolute="absolute" :tip="tip" />
7 9
8 <a-alert message="函数方式" /> 10 <a-alert message="函数方式" />
9 11
10 - <a-button class="my-4 mr-4" type="primary" @click="openFnFullLoading">全屏 Loading</a-button>  
11 - <a-button class="my-4" type="primary" @click="openFnWrapLoading">容器内 Loading</a-button> 12 + <a-button class="my-4 mr-4" type="primary" @click="openFnFullLoading"> 全屏 Loading </a-button>
  13 + <a-button class="my-4" type="primary" @click="openFnWrapLoading"> 容器内 Loading </a-button>
12 14
13 <a-alert message="指令方式" /> 15 <a-alert message="指令方式" />
14 <a-button class="my-4 mr-4" type="primary" @click="openDirectiveLoading"> 16 <a-button class="my-4 mr-4" type="primary" @click="openDirectiveLoading">
src/views/demo/comp/modal/Modal2.vue
@@ -5,9 +5,9 @@ @@ -5,9 +5,9 @@
5 title="Modal Title" 5 title="Modal Title"
6 :helpMessage="['提示1', '提示2']" 6 :helpMessage="['提示1', '提示2']"
7 > 7 >
8 - <a-button type="primary" @click="closeModal" class="mr-2">从内部关闭弹窗</a-button> 8 + <a-button type="primary" @click="closeModal" class="mr-2"> 从内部关闭弹窗 </a-button>
9 9
10 - <a-button type="primary" @click="setModalProps">从内部修改title</a-button> 10 + <a-button type="primary" @click="setModalProps"> 从内部修改title </a-button>
11 </BasicModal> 11 </BasicModal>
12 </template> 12 </template>
13 <script lang="ts"> 13 <script lang="ts">
src/views/demo/comp/modal/Modal3.vue
1 <template> 1 <template>
2 <BasicModal v-bind="$attrs" title="Modal Title" :helpMessage="['提示1', '提示2']" width="700px"> 2 <BasicModal v-bind="$attrs" title="Modal Title" :helpMessage="['提示1', '提示2']" width="700px">
3 - <p class="h-20" v-for="index in 20" :key="index">根据屏幕高度自适应</p> 3 + <p class="h-20" v-for="index in 20" :key="index"> 根据屏幕高度自适应 </p>
4 </BasicModal> 4 </BasicModal>
5 </template> 5 </template>
6 <script lang="ts"> 6 <script lang="ts">
src/views/demo/comp/modal/index.vue
@@ -5,20 +5,20 @@ @@ -5,20 +5,20 @@
5 参数进行控制是否可以拖动/全屏" 5 参数进行控制是否可以拖动/全屏"
6 show-icon 6 show-icon
7 /> 7 />
8 - <a-button type="primary" class="my-4" @click="openModalLoading"  
9 - >打开弹窗 默认可以拖动/全屏</a-button  
10 - > 8 + <a-button type="primary" class="my-4" @click="openModalLoading">
  9 + 打开弹窗 默认可以拖动/全屏
  10 + </a-button>
11 11
12 <Alert message="内外同时同时显示隐藏" show-icon /> 12 <Alert message="内外同时同时显示隐藏" show-icon />
13 - <a-button type="primary" class="my-4" @click="openModal2">打开弹窗</a-button> 13 + <a-button type="primary" class="my-4" @click="openModal2"> 打开弹窗 </a-button>
14 <Alert message="自适应高度" show-icon /> 14 <Alert message="自适应高度" show-icon />
15 - <a-button type="primary" class="my-4" @click="openModal3">打开弹窗</a-button> 15 + <a-button type="primary" class="my-4" @click="openModal3"> 打开弹窗 </a-button>
16 16
17 <Alert 17 <Alert
18 message="内外数据交互,外部通过 transferModalData 发送,内部通过 receiveDrawerDataRef 接收。该数据具有响应式" 18 message="内外数据交互,外部通过 transferModalData 发送,内部通过 receiveDrawerDataRef 接收。该数据具有响应式"
19 show-icon 19 show-icon
20 /> 20 />
21 - <a-button type="primary" class="my-4" @click="send">打开弹窗并传递数据</a-button> 21 + <a-button type="primary" class="my-4" @click="send"> 打开弹窗并传递数据 </a-button>
22 22
23 <Modal1 @register="register1" /> 23 <Modal1 @register="register1" />
24 <Modal2 @register="register2" /> 24 <Modal2 @register="register2" />
src/views/demo/comp/qrcode/index.vue
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 <CollapseContainer title="下载示例" class="text-center qrcode-demo-item"> 52 <CollapseContainer title="下载示例" class="text-center qrcode-demo-item">
53 <QrCode :value="qrCodeUrl" ref="qrRef" :logo="LogoImg" /> 53 <QrCode :value="qrCodeUrl" ref="qrRef" :logo="LogoImg" />
54 <a-button class="mb-2" type="primary" @click="download"> 下载 </a-button> 54 <a-button class="mb-2" type="primary" @click="download"> 下载 </a-button>
55 - <div class="msg">(在线logo会导致图片跨域,需要下载图片需要自行解决跨域问题)</div> 55 + <div class="msg"> (在线logo会导致图片跨域,需要下载图片需要自行解决跨域问题) </div>
56 </CollapseContainer> 56 </CollapseContainer>
57 57
58 <CollapseContainer title="配置大小示例" class="text-center qrcode-demo-item"> 58 <CollapseContainer title="配置大小示例" class="text-center qrcode-demo-item">
src/views/demo/comp/scroll/Action.vue
1 <template> 1 <template>
2 <PageWrapper title="滚动组件函数示例" content="基于el-scrollbar"> 2 <PageWrapper title="滚动组件函数示例" content="基于el-scrollbar">
3 <div class="my-4"> 3 <div class="my-4">
4 - <a-button @click="scrollTo(100)" class="mr-2">滚动到100px位置</a-button>  
5 - <a-button @click="scrollTo(800)" class="mr-2">滚动到800px位置</a-button>  
6 - <a-button @click="scrollTo(0)" class="mr-2">滚动到顶部</a-button>  
7 - <a-button @click="scrollBottom()" class="mr-2">滚动到底部</a-button> 4 + <a-button @click="scrollTo(100)" class="mr-2"> 滚动到100px位置 </a-button>
  5 + <a-button @click="scrollTo(800)" class="mr-2"> 滚动到800px位置 </a-button>
  6 + <a-button @click="scrollTo(0)" class="mr-2"> 滚动到顶部 </a-button>
  7 + <a-button @click="scrollBottom()" class="mr-2"> 滚动到底部 </a-button>
8 </div> 8 </div>
9 <div class="scroll-wrap"> 9 <div class="scroll-wrap">
10 <ScrollContainer class="mt-4" ref="scrollRef"> 10 <ScrollContainer class="mt-4" ref="scrollRef">
11 <ul class="p-3"> 11 <ul class="p-3">
12 <template v-for="index in 100" :key="index"> 12 <template v-for="index in 100" :key="index">
13 - <li class="p-2" :style="{ border: '1px solid #eee' }">{{ index }}</li> 13 + <li class="p-2" :style="{ border: '1px solid #eee' }">
  14 + {{ index }}
  15 + </li>
14 </template> 16 </template>
15 </ul> 17 </ul>
16 </ScrollContainer> 18 </ScrollContainer>
@@ -19,12 +21,11 @@ @@ -19,12 +21,11 @@
19 </template> 21 </template>
20 <script lang="ts"> 22 <script lang="ts">
21 import { defineComponent, ref, unref } from 'vue'; 23 import { defineComponent, ref, unref } from 'vue';
22 - import { CollapseContainer } from '/@/components/Container/index';  
23 import { ScrollContainer, ScrollActionType } from '/@/components/Container/index'; 24 import { ScrollContainer, ScrollActionType } from '/@/components/Container/index';
24 import { PageWrapper } from '/@/components/Page'; 25 import { PageWrapper } from '/@/components/Page';
25 26
26 export default defineComponent({ 27 export default defineComponent({
27 - components: { CollapseContainer, ScrollContainer, PageWrapper }, 28 + components: { ScrollContainer, PageWrapper },
28 setup() { 29 setup() {
29 const scrollRef = ref<Nullable<ScrollActionType>>(null); 30 const scrollRef = ref<Nullable<ScrollActionType>>(null);
30 const getScroll = () => { 31 const getScroll = () => {
src/views/demo/comp/scroll/VirtualScroll.vue
@@ -3,8 +3,10 @@ @@ -3,8 +3,10 @@
3 <Divider>基础滚动示例</Divider> 3 <Divider>基础滚动示例</Divider>
4 <div class="virtual-scroll-demo-wrap"> 4 <div class="virtual-scroll-demo-wrap">
5 <VScroll :itemHeight="41" :items="data" :height="300" :width="300"> 5 <VScroll :itemHeight="41" :items="data" :height="300" :width="300">
6 - <template v-slot="{ item }">  
7 - <div class="virtual-scroll-demo__item">{{ item.title }}</div> 6 + <template #default="{ item }">
  7 + <div class="virtual-scroll-demo__item">
  8 + {{ item.title }}
  9 + </div>
8 </template> 10 </template>
9 </VScroll> 11 </VScroll>
10 </div> 12 </div>
@@ -12,8 +14,10 @@ @@ -12,8 +14,10 @@
12 <Divider>即使不可见,也预先加载50条数据,防止空白</Divider> 14 <Divider>即使不可见,也预先加载50条数据,防止空白</Divider>
13 <div class="virtual-scroll-demo-wrap"> 15 <div class="virtual-scroll-demo-wrap">
14 <VScroll :itemHeight="41" :items="data" :height="300" :width="300" :bench="50"> 16 <VScroll :itemHeight="41" :items="data" :height="300" :width="300" :bench="50">
15 - <template v-slot="{ item }">  
16 - <div class="virtual-scroll-demo__item">{{ item.title }}</div> 17 + <template #default="{ item }">
  18 + <div class="virtual-scroll-demo__item">
  19 + {{ item.title }}
  20 + </div>
17 </template> 21 </template>
18 </VScroll> 22 </VScroll>
19 </div> 23 </div>
src/views/demo/comp/scroll/index.vue
@@ -4,7 +4,9 @@ @@ -4,7 +4,9 @@
4 <ScrollContainer class="mt-4"> 4 <ScrollContainer class="mt-4">
5 <ul class="p-3"> 5 <ul class="p-3">
6 <template v-for="index in 100" :key="index"> 6 <template v-for="index in 100" :key="index">
7 - <li class="p-2" :style="{ border: '1px solid #eee' }">{{ index }}</li> 7 + <li class="p-2" :style="{ border: '1px solid #eee' }">
  8 + {{ index }}
  9 + </li>
8 </template> 10 </template>
9 </ul> 11 </ul>
10 </ScrollContainer> 12 </ScrollContainer>
@@ -13,12 +15,11 @@ @@ -13,12 +15,11 @@
13 </template> 15 </template>
14 <script lang="ts"> 16 <script lang="ts">
15 import { defineComponent } from 'vue'; 17 import { defineComponent } from 'vue';
16 - import { CollapseContainer } from '/@/components/Container/index';  
17 import { ScrollContainer } from '/@/components/Container/index'; 18 import { ScrollContainer } from '/@/components/Container/index';
18 import { PageWrapper } from '/@/components/Page'; 19 import { PageWrapper } from '/@/components/Page';
19 20
20 export default defineComponent({ 21 export default defineComponent({
21 - components: { CollapseContainer, ScrollContainer, PageWrapper }, 22 + components: { ScrollContainer, PageWrapper },
22 }); 23 });
23 </script> 24 </script>
24 <style lang="less" scoped> 25 <style lang="less" scoped>
src/views/demo/comp/upload/index.vue
1 <template> 1 <template>
2 <PageWrapper title="上传组件示例"> 2 <PageWrapper title="上传组件示例">
3 - <a-alert message="基础示例" class="my-5"></a-alert> 3 + <a-alert message="基础示例" class="my-5" />
4 <BasicUpload :maxSize="20" :maxNumber="10" @change="handleChange" :api="uploadApi" /> 4 <BasicUpload :maxSize="20" :maxNumber="10" @change="handleChange" :api="uploadApi" />
5 5
6 - <a-alert message="嵌入表单,加入表单校验" class="my-5"></a-alert> 6 + <a-alert message="嵌入表单,加入表单校验" class="my-5" />
7 7
8 <BasicForm @register="register" /> 8 <BasicForm @register="register" />
9 </PageWrapper> 9 </PageWrapper>
src/views/demo/comp/verify/index.vue
@@ -2,12 +2,12 @@ @@ -2,12 +2,12 @@
2 <PageWrapper title="拖动校验示例"> 2 <PageWrapper title="拖动校验示例">
3 <div class="flex justify-center p-4 items-center bg-gray-700"> 3 <div class="flex justify-center p-4 items-center bg-gray-700">
4 <BasicDragVerify ref="el1" @success="handleSuccess" /> 4 <BasicDragVerify ref="el1" @success="handleSuccess" />
5 - <a-button type="primary" class="ml-2" @click="handleBtnClick(el1)">还原</a-button> 5 + <a-button type="primary" class="ml-2" @click="handleBtnClick(el1)"> 还原 </a-button>
6 </div> 6 </div>
7 7
8 <div class="flex justify-center p-4 items-center bg-gray-700"> 8 <div class="flex justify-center p-4 items-center bg-gray-700">
9 <BasicDragVerify ref="el2" @success="handleSuccess" circle /> 9 <BasicDragVerify ref="el2" @success="handleSuccess" circle />
10 - <a-button type="primary" class="ml-2" @click="handleBtnClick(el2)">还原</a-button> 10 + <a-button type="primary" class="ml-2" @click="handleBtnClick(el2)"> 还原 </a-button>
11 </div> 11 </div>
12 12
13 <div class="flex justify-center p-4 items-center bg-gray-700"> 13 <div class="flex justify-center p-4 items-center bg-gray-700">
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 background: '#018ffb', 20 background: '#018ffb',
21 }" 21 }"
22 /> 22 />
23 - <a-button type="primary" class="ml-2" @click="handleBtnClick(el3)">还原</a-button> 23 + <a-button type="primary" class="ml-2" @click="handleBtnClick(el3)"> 还原 </a-button>
24 </div> 24 </div>
25 25
26 <div class="flex justify-center p-4 items-center bg-gray-700"> 26 <div class="flex justify-center p-4 items-center bg-gray-700">
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 <RightOutlined v-else /> 30 <RightOutlined v-else />
31 </template> 31 </template>
32 </BasicDragVerify> 32 </BasicDragVerify>
33 - <a-button type="primary" class="ml-2" @click="handleBtnClick(el4)">还原</a-button> 33 + <a-button type="primary" class="ml-2" @click="handleBtnClick(el4)"> 还原 </a-button>
34 </div> 34 </div>
35 35
36 <div class="flex justify-center p-4 items-center bg-gray-700"> 36 <div class="flex justify-center p-4 items-center bg-gray-700">
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 </div> 46 </div>
47 </template> 47 </template>
48 </BasicDragVerify> 48 </BasicDragVerify>
49 - <a-button type="primary" class="ml-2" @click="handleBtnClick(el5)">还原</a-button> 49 + <a-button type="primary" class="ml-2" @click="handleBtnClick(el5)"> 还原 </a-button>
50 </div> 50 </div>
51 </PageWrapper> 51 </PageWrapper>
52 </template> 52 </template>
src/views/demo/echarts/Line.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ height, width }" /> 2 + <div ref="chartRef" :style="{ height, width }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, PropType, ref, Ref, onMounted } from 'vue'; 5 import { defineComponent, PropType, ref, Ref, onMounted } from 'vue';
src/views/demo/echarts/Map.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ height, width }" /> 2 + <div ref="chartRef" :style="{ height, width }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, PropType, ref, Ref, onMounted } from 'vue'; 5 import { defineComponent, PropType, ref, Ref, onMounted } from 'vue';
src/views/demo/echarts/Pie.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ height, width }" /> 2 + <div ref="chartRef" :style="{ height, width }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, PropType, ref, Ref, onMounted } from 'vue'; 5 import { defineComponent, PropType, ref, Ref, onMounted } from 'vue';
src/views/demo/echarts/apex/Area.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ width: '100%' }" /> 2 + <div ref="chartRef" :style="{ width: '100%' }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, ref, Ref, onMounted } from 'vue'; 5 import { defineComponent, ref, Ref, onMounted } from 'vue';
src/views/demo/echarts/apex/Bar.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ width: '100%' }" /> 2 + <div ref="chartRef" :style="{ width: '100%' }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, ref, Ref, onMounted } from 'vue'; 5 import { defineComponent, ref, Ref, onMounted } from 'vue';
src/views/demo/echarts/apex/Line.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ width: '100%' }" /> 2 + <div ref="chartRef" :style="{ width: '100%' }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, ref, Ref, onMounted } from 'vue'; 5 import { defineComponent, ref, Ref, onMounted } from 'vue';
src/views/demo/echarts/apex/Mixed.vue
1 <template> 1 <template>
2 - <div ref="chartRef" :style="{ width: '100%' }" /> 2 + <div ref="chartRef" :style="{ width: '100%' }"></div>
3 </template> 3 </template>
4 <script lang="ts"> 4 <script lang="ts">
5 import { defineComponent, ref, Ref, onMounted } from 'vue'; 5 import { defineComponent, ref, Ref, onMounted } from 'vue';
src/views/demo/editor/markdown/Editor.vue
@@ -6,8 +6,7 @@ @@ -6,8 +6,7 @@
6 :schemas="schemas" 6 :schemas="schemas"
7 :actionColOptions="{ span: 24 }" 7 :actionColOptions="{ span: 24 }"
8 @submit="handleSubmit" 8 @submit="handleSubmit"
9 - >  
10 - </BasicForm> 9 + />
11 </CollapseContainer> 10 </CollapseContainer>
12 </PageWrapper> 11 </PageWrapper>
13 </template> 12 </template>
src/views/demo/editor/markdown/index.vue
1 <template> 1 <template>
2 <PageWrapper title="MarkDown组件示例"> 2 <PageWrapper title="MarkDown组件示例">
3 - <a-button @click="toggleTheme" class="mb-2" type="primary">黑暗主题</a-button> 3 + <a-button @click="toggleTheme" class="mb-2" type="primary"> 黑暗主题 </a-button>
4 <MarkDown :value="value" @change="handleChange" ref="markDownRef" /> 4 <MarkDown :value="value" @change="handleChange" ref="markDownRef" />
5 </PageWrapper> 5 </PageWrapper>
6 </template> 6 </template>
src/views/demo/editor/tinymce/Editor.vue
@@ -6,8 +6,7 @@ @@ -6,8 +6,7 @@
6 :schemas="schemas" 6 :schemas="schemas"
7 :actionColOptions="{ span: 24 }" 7 :actionColOptions="{ span: 24 }"
8 @submit="handleSubmit" 8 @submit="handleSubmit"
9 - >  
10 - </BasicForm> 9 + />
11 </CollapseContainer> 10 </CollapseContainer>
12 </PageWrapper> 11 </PageWrapper>
13 </template> 12 </template>