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