Commit 9edc281322772f6b5ec8093c40fdf90408d85da7
1 parent
b77b7c9d
chore: format code by eslint #222
Showing
149 changed files
with
574 additions
and
421 deletions
.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
src/components/Application/src/search/AppSearch.vue
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
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
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
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
src/components/Excel/src/ImportExcel.vue
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
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
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
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
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
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
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
src/layouts/default/sider/LayoutSider.vue
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
src/layouts/page/index.vue
src/views/dashboard/analysis/components/AnalysisBar.vue
src/views/dashboard/analysis/components/AnalysisLine.vue
src/views/dashboard/analysis/components/AnalysisPie.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
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 }} </span>申请迭代 |
16 | 18 | <span class="news-list__item-light"> {{ item.title }} </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
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
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
src/views/demo/echarts/Map.vue
src/views/demo/echarts/Pie.vue
src/views/demo/echarts/apex/Area.vue
src/views/demo/echarts/apex/Bar.vue
src/views/demo/echarts/apex/Line.vue
src/views/demo/echarts/apex/Mixed.vue
src/views/demo/editor/markdown/Editor.vue
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
src/views/demo/excel/ArrayExport.vue
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <PageWrapper title="导出示例" content="根据数组格式的数据进行导出"> |
3 | 3 | <BasicTable title="基础表格" :columns="columns" :dataSource="data"> |
4 | 4 | <template #toolbar> |
5 | - <a-button @click="aoaToExcel">导出</a-button> | |
5 | + <a-button @click="aoaToExcel"> 导出 </a-button> | |
6 | 6 | </template> |
7 | 7 | </BasicTable> |
8 | 8 | </PageWrapper> | ... | ... |
src/views/demo/excel/CustomExport.vue
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <PageWrapper title="导出示例" content="可以选择导出格式"> |
3 | 3 | <BasicTable title="基础表格" :columns="columns" :dataSource="data"> |
4 | 4 | <template #toolbar> |
5 | - <a-button @click="openModal">导出</a-button> | |
5 | + <a-button @click="openModal"> 导出 </a-button> | |
6 | 6 | </template> |
7 | 7 | </BasicTable> |
8 | 8 | <ExpExcelModel @register="register" @success="defaultHeader" /> | ... | ... |
src/views/demo/excel/ImportExcel.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="excel数据导入示例"> |
3 | 3 | <ImpExcel @success="loadDataSuccess"> |
4 | - <a-button class="m-3">导入Excel</a-button> | |
4 | + <a-button class="m-3"> 导入Excel </a-button> | |
5 | 5 | </ImpExcel> |
6 | 6 | <BasicTable |
7 | 7 | v-for="(table, index) in tableListRef" |
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | :title="table.title" |
10 | 10 | :columns="table.columns" |
11 | 11 | :dataSource="table.dataSource" |
12 | - ></BasicTable> | |
12 | + /> | |
13 | 13 | </PageWrapper> |
14 | 14 | </template> |
15 | 15 | <script lang="ts"> | ... | ... |
src/views/demo/excel/JsonExport.vue
... | ... | @@ -2,8 +2,8 @@ |
2 | 2 | <PageWrapper title="导出示例" content="根据JSON格式的数据进行导出"> |
3 | 3 | <BasicTable title="基础表格" :columns="columns" :dataSource="data"> |
4 | 4 | <template #toolbar> |
5 | - <a-button @click="defaultHeader">导出:默认头部</a-button> | |
6 | - <a-button @click="customHeader">导出:自定义头部</a-button> | |
5 | + <a-button @click="defaultHeader"> 导出:默认头部 </a-button> | |
6 | + <a-button @click="customHeader"> 导出:自定义头部 </a-button> | |
7 | 7 | </template> |
8 | 8 | </BasicTable> |
9 | 9 | </PageWrapper> | ... | ... |
src/views/demo/feat/breadcrumb/ChildrenList.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="层级面包屑示例" content="子级页面面包屑会添加到当前层级后面"> |
3 | - <router-link to="/feat/breadcrumb/children/childrenDetail">进入子级详情页</router-link> | |
3 | + <router-link to="/feat/breadcrumb/children/childrenDetail"> 进入子级详情页 </router-link> | |
4 | 4 | </PageWrapper> |
5 | 5 | </template> |
6 | 6 | <script lang="ts"> | ... | ... |
src/views/demo/feat/breadcrumb/FlatList.vue
src/views/demo/feat/context-menu/index.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="右键菜单示例"> |
3 | 3 | <CollapseContainer title="Simple"> |
4 | - <a-button type="primary" @contextmenu="handleContext">Right Click on me</a-button> | |
4 | + <a-button type="primary" @contextmenu="handleContext"> Right Click on me </a-button> | |
5 | 5 | </CollapseContainer> |
6 | 6 | |
7 | 7 | <CollapseContainer title="Multiple" class="mt-4"> |
8 | - <a-button type="primary" @contextmenu="handleMultipleContext">Right Click on me</a-button> | |
8 | + <a-button type="primary" @contextmenu="handleMultipleContext"> Right Click on me </a-button> | |
9 | 9 | </CollapseContainer> |
10 | 10 | </PageWrapper> |
11 | 11 | </template> | ... | ... |
src/views/demo/feat/copy/index.vue
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md" title="Copy Example"> |
4 | 4 | <div class="flex justify-center"> |
5 | 5 | <a-input placeholder="请输入" v-model:value="value" /> |
6 | - <a-button type="primary" @click="handleCopy">Copy</a-button> | |
6 | + <a-button type="primary" @click="handleCopy"> Copy </a-button> | |
7 | 7 | </div> |
8 | 8 | </CollapseContainer> |
9 | 9 | </PageWrapper> | ... | ... |
src/views/demo/feat/icon/index.vue
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | message="推荐使用Iconify组件" |
27 | 27 | description="Icon组件基本包含所有的图标,在下面网址内你可以查询到你想要的任何图标。并且打包只会打包所用到的图标。唯一不足的可能就是需要连接外网进行使用。" |
28 | 28 | /> |
29 | - <a-button type="link" @click="toIconify">Iconify 图标大全</a-button> | |
29 | + <a-button type="link" @click="toIconify"> Iconify 图标大全 </a-button> | |
30 | 30 | </PageWrapper> |
31 | 31 | </template> |
32 | 32 | <script lang="ts"> | ... | ... |
src/views/demo/feat/msg/index.vue
... | ... | @@ -13,24 +13,24 @@ |
13 | 13 | </CollapseContainer> |
14 | 14 | |
15 | 15 | <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Comfirm"> |
16 | - <a-button @click="handleConfirm('info')" class="mr-2">Info</a-button> | |
17 | - <a-button @click="handleConfirm('warning')" color="warning" class="mr-2">Warning</a-button> | |
18 | - <a-button @click="handleConfirm('success')" color="success" class="mr-2">Success</a-button> | |
19 | - <a-button @click="handleConfirm('error')" color="error" class="mr-2">Error</a-button> | |
16 | + <a-button @click="handleConfirm('info')" class="mr-2"> Info </a-button> | |
17 | + <a-button @click="handleConfirm('warning')" color="warning" class="mr-2"> Warning </a-button> | |
18 | + <a-button @click="handleConfirm('success')" color="success" class="mr-2"> Success </a-button> | |
19 | + <a-button @click="handleConfirm('error')" color="error" class="mr-2"> Error </a-button> | |
20 | 20 | </CollapseContainer> |
21 | 21 | |
22 | 22 | <CollapseContainer class="px-20 bg-white w-full h-32 rounded-md mt-5" title="Modal"> |
23 | - <a-button @click="handleInfoModal" class="mr-2">Info</a-button> | |
24 | - <a-button @click="handleSuccessModal" color="success" class="mr-2">Success</a-button> | |
25 | - <a-button @click="handleErrorModal" color="error" class="mr-2">Error</a-button> | |
26 | - <a-button @click="handleWarningModal" color="warning" class="mr-2">Warning</a-button> | |
23 | + <a-button @click="handleInfoModal" class="mr-2"> Info </a-button> | |
24 | + <a-button @click="handleSuccessModal" color="success" class="mr-2"> Success </a-button> | |
25 | + <a-button @click="handleErrorModal" color="error" class="mr-2"> Error </a-button> | |
26 | + <a-button @click="handleWarningModal" color="warning" class="mr-2"> Warning </a-button> | |
27 | 27 | </CollapseContainer> |
28 | 28 | |
29 | 29 | <CollapseContainer |
30 | 30 | class="px-20 bg-white w-full h-32 rounded-md mt-5" |
31 | 31 | title="Notification 用法与上面一致" |
32 | 32 | > |
33 | - <a-button @click="handleNotify" color="success" class="mr-2">Success</a-button> | |
33 | + <a-button @click="handleNotify" color="success" class="mr-2"> Success </a-button> | |
34 | 34 | </CollapseContainer> |
35 | 35 | </PageWrapper> |
36 | 36 | </template> | ... | ... |
src/views/demo/feat/ripple/index.vue
src/views/demo/feat/tabs/index.vue
... | ... | @@ -5,12 +5,12 @@ |
5 | 5 | </CollapseContainer> |
6 | 6 | |
7 | 7 | <CollapseContainer class="mt-4" title="标签页操作"> |
8 | - <a-button class="mr-2" @click="closeAll">关闭所有</a-button> | |
9 | - <a-button class="mr-2" @click="closeLeft">关闭左侧</a-button> | |
10 | - <a-button class="mr-2" @click="closeRight">关闭右侧</a-button> | |
11 | - <a-button class="mr-2" @click="closeOther">关闭其他</a-button> | |
12 | - <a-button class="mr-2" @click="closeCurrent">关闭当前</a-button> | |
13 | - <a-button class="mr-2" @click="refreshPage">刷新当前</a-button> | |
8 | + <a-button class="mr-2" @click="closeAll"> 关闭所有 </a-button> | |
9 | + <a-button class="mr-2" @click="closeLeft"> 关闭左侧 </a-button> | |
10 | + <a-button class="mr-2" @click="closeRight"> 关闭右侧 </a-button> | |
11 | + <a-button class="mr-2" @click="closeOther"> 关闭其他 </a-button> | |
12 | + <a-button class="mr-2" @click="closeCurrent"> 关闭当前 </a-button> | |
13 | + <a-button class="mr-2" @click="refreshPage"> 刷新当前 </a-button> | |
14 | 14 | </CollapseContainer> |
15 | 15 | </PageWrapper> |
16 | 16 | </template> | ... | ... |
src/views/demo/feat/watermark/index.vue
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <a-button type="primary" class="mr-2" @click="setWatermark('WaterMark Info')"> |
5 | 5 | Create |
6 | 6 | </a-button> |
7 | - <a-button color="error" class="mr-2" @click="clear">Clear</a-button> | |
7 | + <a-button color="error" class="mr-2" @click="clear"> Clear </a-button> | |
8 | 8 | <a-button color="warning" class="mr-2" @click="setWatermark('WaterMark Info New')"> |
9 | 9 | Reset |
10 | 10 | </a-button> | ... | ... |
src/views/demo/form/DynamicForm.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="动态表单示例"> |
3 | 3 | <div class="mb-4"> |
4 | - <a-button @click="changeLabel3" class="mr-2">更改字段3label</a-button> | |
5 | - <a-button @click="changeLabel34" class="mr-2">同时更改字段3,4label</a-button> | |
6 | - <a-button @click="appendField" class="mr-2">往字段3后面插入字段10</a-button> | |
7 | - <a-button @click="deleteField" class="mr-2">删除字段11</a-button> | |
4 | + <a-button @click="changeLabel3" class="mr-2"> 更改字段3label </a-button> | |
5 | + <a-button @click="changeLabel34" class="mr-2"> 同时更改字段3,4label </a-button> | |
6 | + <a-button @click="appendField" class="mr-2"> 往字段3后面插入字段10 </a-button> | |
7 | + <a-button @click="deleteField" class="mr-2"> 删除字段11 </a-button> | |
8 | 8 | </div> |
9 | 9 | <CollapseContainer title="动态表单示例,动态根据表单内其他值改变"> |
10 | 10 | <BasicForm @register="register" /> |
... | ... | @@ -163,7 +163,7 @@ |
163 | 163 | }, |
164 | 164 | labelWidth: 200, |
165 | 165 | // @ts-ignore |
166 | - componentProps: ({ formActionType, tableAction }) => { | |
166 | + componentProps: ({ formActionType }) => { | |
167 | 167 | return { |
168 | 168 | placeholder: '值改变时执行查询,查看控制台', |
169 | 169 | onChange: async () => { | ... | ... |
src/views/demo/form/RefForm.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="Ref操作示例"> |
3 | 3 | <div class="mb-4"> |
4 | - <a-button @click="setProps({ labelWidth: 150 })" class="mr-2">更改labelWidth</a-button> | |
5 | - <a-button @click="setProps({ labelWidth: 120 })" class="mr-2">还原labelWidth</a-button> | |
6 | - <a-button @click="setProps({ size: 'large' })" class="mr-2">更改Size</a-button> | |
7 | - <a-button @click="setProps({ size: 'default' })" class="mr-2">还原Size</a-button> | |
8 | - <a-button @click="setProps({ disabled: true })" class="mr-2">禁用表单</a-button> | |
9 | - <a-button @click="setProps({ disabled: false })" class="mr-2">解除禁用</a-button> | |
10 | - <a-button @click="setProps({ compact: true })" class="mr-2">紧凑表单</a-button> | |
11 | - <a-button @click="setProps({ compact: false })" class="mr-2">还原正常间距</a-button> | |
4 | + <a-button @click="setProps({ labelWidth: 150 })" class="mr-2"> 更改labelWidth </a-button> | |
5 | + <a-button @click="setProps({ labelWidth: 120 })" class="mr-2"> 还原labelWidth </a-button> | |
6 | + <a-button @click="setProps({ size: 'large' })" class="mr-2"> 更改Size </a-button> | |
7 | + <a-button @click="setProps({ size: 'default' })" class="mr-2"> 还原Size </a-button> | |
8 | + <a-button @click="setProps({ disabled: true })" class="mr-2"> 禁用表单 </a-button> | |
9 | + <a-button @click="setProps({ disabled: false })" class="mr-2"> 解除禁用 </a-button> | |
10 | + <a-button @click="setProps({ compact: true })" class="mr-2"> 紧凑表单 </a-button> | |
11 | + <a-button @click="setProps({ compact: false })" class="mr-2"> 还原正常间距 </a-button> | |
12 | 12 | <a-button @click="setProps({ actionColOptions: { span: 8 } })" class="mr-2"> |
13 | 13 | 操作按钮位置 |
14 | 14 | </a-button> | ... | ... |
src/views/demo/form/RuleForm.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="表单校验示例"> |
3 | 3 | <div class="mb-4"> |
4 | - <a-button @click="validateForm" class="mr-2">手动校验表单</a-button> | |
5 | - <a-button @click="resetValidate" class="mr-2">清空校验信息</a-button> | |
6 | - <a-button @click="getFormValues" class="mr-2">获取表单值</a-button> | |
7 | - <a-button @click="setFormValues" class="mr-2">设置表单值</a-button> | |
4 | + <a-button @click="validateForm" class="mr-2"> 手动校验表单 </a-button> | |
5 | + <a-button @click="resetValidate" class="mr-2"> 清空校验信息 </a-button> | |
6 | + <a-button @click="getFormValues" class="mr-2"> 获取表单值 </a-button> | |
7 | + <a-button @click="setFormValues" class="mr-2"> 设置表单值 </a-button> | |
8 | 8 | </div> |
9 | 9 | <CollapseContainer title="表单校验"> |
10 | 10 | <BasicForm @register="register" @submit="handleSubmit" /> |
... | ... | @@ -87,9 +87,11 @@ |
87 | 87 | // @ts-ignore |
88 | 88 | validator: async (rule, value) => { |
89 | 89 | if (!value) { |
90 | + /* eslint-disable-next-line */ | |
90 | 91 | return Promise.reject('值不能为空'); |
91 | 92 | } |
92 | 93 | if (value === '1') { |
94 | + /* eslint-disable-next-line */ | |
93 | 95 | return Promise.reject('值不能为1'); |
94 | 96 | } |
95 | 97 | return Promise.resolve(); | ... | ... |
src/views/demo/form/UseForm.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="UseForm操作示例"> |
3 | 3 | <div class="mb-4"> |
4 | - <a-button @click="setProps({ labelWidth: 150 })" class="mr-2">更改labelWidth</a-button> | |
5 | - <a-button @click="setProps({ labelWidth: 120 })" class="mr-2">还原labelWidth</a-button> | |
6 | - <a-button @click="setProps({ size: 'large' })" class="mr-2">更改Size</a-button> | |
7 | - <a-button @click="setProps({ size: 'default' })" class="mr-2">还原Size</a-button> | |
8 | - <a-button @click="setProps({ disabled: true })" class="mr-2">禁用表单</a-button> | |
9 | - <a-button @click="setProps({ disabled: false })" class="mr-2">解除禁用</a-button> | |
10 | - <a-button @click="setProps({ compact: true })" class="mr-2">紧凑表单</a-button> | |
11 | - <a-button @click="setProps({ compact: false })" class="mr-2">还原正常间距</a-button> | |
4 | + <a-button @click="setProps({ labelWidth: 150 })" class="mr-2"> 更改labelWidth </a-button> | |
5 | + <a-button @click="setProps({ labelWidth: 120 })" class="mr-2"> 还原labelWidth </a-button> | |
6 | + <a-button @click="setProps({ size: 'large' })" class="mr-2"> 更改Size </a-button> | |
7 | + <a-button @click="setProps({ size: 'default' })" class="mr-2"> 还原Size </a-button> | |
8 | + <a-button @click="setProps({ disabled: true })" class="mr-2"> 禁用表单 </a-button> | |
9 | + <a-button @click="setProps({ disabled: false })" class="mr-2"> 解除禁用 </a-button> | |
10 | + <a-button @click="setProps({ compact: true })" class="mr-2"> 紧凑表单 </a-button> | |
11 | + <a-button @click="setProps({ compact: false })" class="mr-2"> 还原正常间距 </a-button> | |
12 | 12 | <a-button @click="setProps({ actionColOptions: { span: 8 } })" class="mr-2"> |
13 | 13 | 操作按钮位置 |
14 | 14 | </a-button> | ... | ... |
src/views/demo/page/account/center/Article.vue
... | ... | @@ -4,19 +4,25 @@ |
4 | 4 | <ListItem> |
5 | 5 | <ListItemMeta> |
6 | 6 | <template #description> |
7 | - <div :class="`${prefixCls}__content`">{{ item.content }}</div> | |
7 | + <div :class="`${prefixCls}__content`"> | |
8 | + {{ item.content }} | |
9 | + </div> | |
8 | 10 | </template> |
9 | 11 | <template #title> |
10 | - <p :class="`${prefixCls}__title`"> {{ item.title }}</p> | |
12 | + <p :class="`${prefixCls}__title`"> | |
13 | + {{ item.title }} | |
14 | + </p> | |
11 | 15 | <div> |
12 | - <template v-for="(tag, index) in item.description" :key="index"> | |
13 | - <Tag class="mb-2">{{ tag }}</Tag> | |
16 | + <template v-for="(tag, ti) in item.description" :key="ti"> | |
17 | + <Tag class="mb-2"> | |
18 | + {{ tag }} | |
19 | + </Tag> | |
14 | 20 | </template> |
15 | 21 | </div> |
16 | 22 | </template> |
17 | 23 | </ListItemMeta> |
18 | 24 | <div> |
19 | - <template v-for="(action, index) in actions" :key="index"> | |
25 | + <template v-for="(action, ai) in actions" :key="ai"> | |
20 | 26 | <div :class="`${prefixCls}__action`"> |
21 | 27 | <Icon |
22 | 28 | v-if="action.icon" | ... | ... |
src/views/demo/page/account/center/Project.vue
... | ... | @@ -9,7 +9,9 @@ |
9 | 9 | <div :class="`${prefixCls}__card-title`"> |
10 | 10 | {{ item.title }} |
11 | 11 | </div> |
12 | - <div :class="`${prefixCls}__card-content`"> {{ item.content }}</div> | |
12 | + <div :class="`${prefixCls}__card-content`"> | |
13 | + {{ item.content }} | |
14 | + </div> | |
13 | 15 | </Card> |
14 | 16 | </ListItem> |
15 | 17 | </a-col> | ... | ... |
src/views/demo/page/account/center/index.vue
... | ... | @@ -25,7 +25,9 @@ |
25 | 25 | <a-col :span="7" :class="`${prefixCls}-col`"> |
26 | 26 | <CollapseContainer title="标签" :canExpan="false"> |
27 | 27 | <template v-for="(tag, index) in tags" :key="index"> |
28 | - <Tag class="mb-2">{{ tag }}</Tag> | |
28 | + <Tag class="mb-2"> | |
29 | + {{ tag }} | |
30 | + </Tag> | |
29 | 31 | </template> |
30 | 32 | </CollapseContainer> |
31 | 33 | </a-col> | ... | ... |
src/views/demo/page/account/setting/BaseSetting.vue
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | </a-col> |
7 | 7 | <a-col :span="10"> |
8 | 8 | <div class="change-avatar"> |
9 | - <div class="mb-2">头像</div> | |
9 | + <div class="mb-2"> 头像 </div> | |
10 | 10 | <img width="140" :src="headerImg" /> |
11 | 11 | <Upload :showUploadList="false"> |
12 | 12 | <Button type="ghost" class="ml-5"> <Icon icon="feather:upload" />更换头像 </Button> |
... | ... | @@ -14,7 +14,7 @@ |
14 | 14 | </div> |
15 | 15 | </a-col> |
16 | 16 | </a-row> |
17 | - <Button type="primary" @click="handleSubmit">更新基本信息</Button> | |
17 | + <Button type="primary" @click="handleSubmit"> 更新基本信息 </Button> | |
18 | 18 | </CollapseContainer> |
19 | 19 | </template> |
20 | 20 | <script lang="ts"> | ... | ... |
src/views/demo/page/account/setting/SecureSetting.vue
... | ... | @@ -6,7 +6,9 @@ |
6 | 6 | <ListItemMeta> |
7 | 7 | <template #title> |
8 | 8 | {{ item.title }} |
9 | - <div class="extra" v-if="item.extra"> {{ item.extra }} </div> | |
9 | + <div class="extra" v-if="item.extra"> | |
10 | + {{ item.extra }} | |
11 | + </div> | |
10 | 12 | </template> |
11 | 13 | <template #description> |
12 | 14 | <div>{{ item.description }} </div> | ... | ... |
src/views/demo/page/desc/high/index.vue
... | ... | @@ -13,12 +13,14 @@ |
13 | 13 | </a-tabs> |
14 | 14 | </template> |
15 | 15 | |
16 | - <div class="m-4 pt-4 desc-wrap"> | |
16 | + <div class="pt-4 m-4 desc-wrap"> | |
17 | 17 | <a-descriptions size="small" :column="2"> |
18 | 18 | <a-descriptions-item label="创建人"> 曲丽丽 </a-descriptions-item> |
19 | 19 | <a-descriptions-item label="订购产品"> XX 服务 </a-descriptions-item> |
20 | 20 | <a-descriptions-item label="创建时间"> 2017-01-10 </a-descriptions-item> |
21 | - <a-descriptions-item label="关联单据"> <a>12421</a> </a-descriptions-item> | |
21 | + <a-descriptions-item label="关联单据"> | |
22 | + <a>12421</a> | |
23 | + </a-descriptions-item> | |
22 | 24 | <a-descriptions-item label="生效日期"> 2017-07-07 ~ 2017-08-08 </a-descriptions-item> |
23 | 25 | <a-descriptions-item label="备注"> 请于两个工作日内确认 </a-descriptions-item> |
24 | 26 | </a-descriptions> |
... | ... | @@ -28,7 +30,9 @@ |
28 | 30 | <template #description> <div>Vben</div> <p>2016-12-12 12:32</p> </template> |
29 | 31 | </a-step> |
30 | 32 | <a-step title="部门初审"> |
31 | - <template #description> <p>Chad</p> </template> | |
33 | + <template #description> | |
34 | + <p>Chad</p> | |
35 | + </template> | |
32 | 36 | </a-step> |
33 | 37 | <a-step title="财务复核" /> |
34 | 38 | <a-step title="完成" /> |
... | ... | @@ -87,7 +91,6 @@ |
87 | 91 | </template> |
88 | 92 | <script lang="ts"> |
89 | 93 | import { defineComponent } from 'vue'; |
90 | - import { Description } from '/@/components/Description/index'; | |
91 | 94 | import { BasicTable, useTable } from '/@/components/Table'; |
92 | 95 | import { PageWrapper } from '/@/components/Page'; |
93 | 96 | import { Divider, Card, Empty, Descriptions, Steps, Tabs } from 'ant-design-vue'; |
... | ... | @@ -95,7 +98,6 @@ |
95 | 98 | import { refundTimeTableSchema, refundTimeTableData } from './data'; |
96 | 99 | export default defineComponent({ |
97 | 100 | components: { |
98 | - Description, | |
99 | 101 | BasicTable, |
100 | 102 | PageWrapper, |
101 | 103 | [Divider.name]: Divider, | ... | ... |
src/views/demo/page/form/high/PersonTable.vue
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <TableAction :actions="createActions(record, column)" /> |
6 | 6 | </template> |
7 | 7 | </BasicTable> |
8 | - <a-button block class="mt-5" type="dashed" @click="handleAdd">新增成员</a-button> | |
8 | + <a-button block class="mt-5" type="dashed" @click="handleAdd"> 新增成员 </a-button> | |
9 | 9 | </div> |
10 | 10 | </template> |
11 | 11 | <script lang="ts"> |
... | ... | @@ -16,7 +16,6 @@ |
16 | 16 | TableAction, |
17 | 17 | BasicColumn, |
18 | 18 | ActionItem, |
19 | - EditTableHeaderIcon, | |
20 | 19 | EditRecordRow, |
21 | 20 | } from '/@/components/Table'; |
22 | 21 | |
... | ... | @@ -59,7 +58,7 @@ |
59 | 58 | }, |
60 | 59 | ]; |
61 | 60 | export default defineComponent({ |
62 | - components: { BasicTable, EditTableHeaderIcon, TableAction }, | |
61 | + components: { BasicTable, TableAction }, | |
63 | 62 | setup() { |
64 | 63 | const [registerTable, { getDataSource }] = useTable({ |
65 | 64 | columns: columns, | ... | ... |
src/views/demo/page/form/high/index.vue
src/views/demo/page/form/step/Step3.vue
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <div class="step3"> |
3 | 3 | <a-result status="success" title="操作成功" sub-title="预计两小时内到账"> |
4 | 4 | <template #extra> |
5 | - <a-button type="primary" @click="redo">再转一笔 </a-button> | |
5 | + <a-button type="primary" @click="redo"> 再转一笔 </a-button> | |
6 | 6 | <a-button> 查看账单 </a-button> |
7 | 7 | </template> |
8 | 8 | </a-result> | ... | ... |
src/views/demo/page/form/step/index.vue
... | ... | @@ -7,9 +7,9 @@ |
7 | 7 | > |
8 | 8 | <div class="step-form-form"> |
9 | 9 | <a-steps :current="current"> |
10 | - <a-step title="填写转账信息"> </a-step> | |
11 | - <a-step title="确认转账信息"> </a-step> | |
12 | - <a-step title="完成"> </a-step> | |
10 | + <a-step title="填写转账信息" /> | |
11 | + <a-step title="确认转账信息" /> | |
12 | + <a-step title="完成" /> | |
13 | 13 | </a-steps> |
14 | 14 | </div> |
15 | 15 | <div class="mt-5"> | ... | ... |
src/views/demo/page/list/basic/index.vue
... | ... | @@ -32,7 +32,9 @@ |
32 | 32 | </div> |
33 | 33 | </template> |
34 | 34 | <template #description> |
35 | - <div class="description">{{ item.description }}</div> | |
35 | + <div class="description"> | |
36 | + {{ item.description }} | |
37 | + </div> | |
36 | 38 | <div class="info"> |
37 | 39 | <div><span>Owner</span>{{ item.author }}</div> |
38 | 40 | <div><span>开始时间</span>{{ item.datetime }}</div> | ... | ... |
src/views/demo/page/list/search/index.vue
... | ... | @@ -15,7 +15,9 @@ |
15 | 15 | <a-list-item> |
16 | 16 | <a-list-item-meta> |
17 | 17 | <template #description> |
18 | - <div :class="`${prefixCls}__content`">{{ item.content }}</div> | |
18 | + <div :class="`${prefixCls}__content`"> | |
19 | + {{ item.content }} | |
20 | + </div> | |
19 | 21 | <div :class="`${prefixCls}__action`"> |
20 | 22 | <template v-for="(action, index) in actions" :key="index"> |
21 | 23 | <div :class="`${prefixCls}__action-item`"> |
... | ... | @@ -32,10 +34,14 @@ |
32 | 34 | </div> |
33 | 35 | </template> |
34 | 36 | <template #title> |
35 | - <p :class="`${prefixCls}__title`"> {{ item.title }}</p> | |
37 | + <p :class="`${prefixCls}__title`"> | |
38 | + {{ item.title }} | |
39 | + </p> | |
36 | 40 | <div> |
37 | 41 | <template v-for="(tag, index) in item.description" :key="index"> |
38 | - <Tag class="mb-2">{{ tag }}</Tag> | |
42 | + <Tag class="mb-2"> | |
43 | + {{ tag }} | |
44 | + </Tag> | |
39 | 45 | </template> |
40 | 46 | </div> |
41 | 47 | </template> | ... | ... |
src/views/demo/page/result/fail/index.vue
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | </template> |
7 | 7 | </Result> |
8 | 8 | <div class="result-error__content"> |
9 | - <div class="result-error__content-title">您提交的内容有如下错误:</div> | |
9 | + <div class="result-error__content-title"> 您提交的内容有如下错误: </div> | |
10 | 10 | <div class="mb-4"> |
11 | 11 | <CloseCircleOutlined class="mr-2 result-error__content-icon" /> |
12 | 12 | 您的账户已被冻结 | ... | ... |
src/views/demo/page/result/success/index.vue
... | ... | @@ -22,7 +22,9 @@ |
22 | 22 | <template #description> <div>Vben</div> <p>2016-12-12 12:32</p> </template> |
23 | 23 | </Step> |
24 | 24 | <Step title="部门初审"> |
25 | - <template #description> <p>Chad</p> </template> | |
25 | + <template #description> | |
26 | + <p>Chad</p> | |
27 | + </template> | |
26 | 28 | </Step> |
27 | 29 | <Step title="财务复核" /> |
28 | 30 | <Step title="完成" /> | ... | ... |
src/views/demo/permission/back/Btn.vue
... | ... | @@ -19,15 +19,15 @@ |
19 | 19 | |
20 | 20 | <Divider>组件方式判断权限</Divider> |
21 | 21 | <Authority :value="'1000'"> |
22 | - <a-button type="primary" class="mx-4">拥有code ['1000']权限可见</a-button> | |
22 | + <a-button type="primary" class="mx-4"> 拥有code ['1000']权限可见 </a-button> | |
23 | 23 | </Authority> |
24 | 24 | |
25 | 25 | <Authority :value="'2000'"> |
26 | - <a-button color="success" class="mx-4">拥有code ['2000']权限可见</a-button> | |
26 | + <a-button color="success" class="mx-4"> 拥有code ['2000']权限可见 </a-button> | |
27 | 27 | </Authority> |
28 | 28 | |
29 | 29 | <Authority :value="['1000', '2000']"> |
30 | - <a-button color="error" class="mx-4">拥有code ['1000','2000']角色权限可见</a-button> | |
30 | + <a-button color="error" class="mx-4"> 拥有code ['1000','2000']角色权限可见 </a-button> | |
31 | 31 | </Authority> |
32 | 32 | |
33 | 33 | <Divider>函数方式方式判断权限</Divider> | ... | ... |
src/views/demo/permission/front/Btn.vue
... | ... | @@ -25,15 +25,15 @@ |
25 | 25 | </div> |
26 | 26 | <Divider>组件方式判断权限(有需要可以自行全局注册)</Divider> |
27 | 27 | <Authority :value="RoleEnum.SUPER"> |
28 | - <a-button type="primary" class="mx-4">拥有super角色权限可见</a-button> | |
28 | + <a-button type="primary" class="mx-4"> 拥有super角色权限可见 </a-button> | |
29 | 29 | </Authority> |
30 | 30 | |
31 | 31 | <Authority :value="RoleEnum.TEST"> |
32 | - <a-button color="success" class="mx-4">拥有test角色权限可见</a-button> | |
32 | + <a-button color="success" class="mx-4"> 拥有test角色权限可见 </a-button> | |
33 | 33 | </Authority> |
34 | 34 | |
35 | 35 | <Authority :value="[RoleEnum.TEST, RoleEnum.SUPER]"> |
36 | - <a-button color="error" class="mx-4">拥有[test,super]角色权限可见</a-button> | |
36 | + <a-button color="error" class="mx-4"> 拥有[test,super]角色权限可见 </a-button> | |
37 | 37 | </Authority> |
38 | 38 | |
39 | 39 | <Divider>函数方式方式判断权限(适用于函数内部过滤)</Divider> | ... | ... |
src/views/demo/table/Basic.vue
... | ... | @@ -31,10 +31,9 @@ |
31 | 31 | import { defineComponent, ref } from 'vue'; |
32 | 32 | import { BasicTable } from '/@/components/Table'; |
33 | 33 | import { getBasicColumns, getBasicData } from './tableData'; |
34 | - import { PageWrapper } from '/@/components/Page'; | |
35 | 34 | |
36 | 35 | export default defineComponent({ |
37 | - components: { BasicTable, PageWrapper }, | |
36 | + components: { BasicTable }, | |
38 | 37 | setup() { |
39 | 38 | const canResize = ref(false); |
40 | 39 | const loading = ref(false); | ... | ... |
src/views/demo/table/CustomerCell.vue
... | ... | @@ -2,8 +2,10 @@ |
2 | 2 | <div class="p-4"> |
3 | 3 | <BasicTable @register="registerTable"> |
4 | 4 | <template #id="{ record }"> ID: {{ record.id }} </template> |
5 | - <template #no="{ record }" | |
6 | - ><Tag color="green">{{ record.no }}</Tag> | |
5 | + <template #no="{ record }"> | |
6 | + <Tag color="green"> | |
7 | + {{ record.no }} | |
8 | + </Tag> | |
7 | 9 | </template> |
8 | 10 | <template #img> |
9 | 11 | <TableImg | ... | ... |
src/views/demo/table/EditCellTable.vue
1 | 1 | <template> |
2 | 2 | <div class="p-4"> |
3 | - <BasicTable @register="registerTable" @edit-end="handleEditEnd" @edit-cancel="handleEditCancel"> | |
4 | - </BasicTable> | |
3 | + <BasicTable | |
4 | + @register="registerTable" | |
5 | + @edit-end="handleEditEnd" | |
6 | + @edit-cancel="handleEditCancel" | |
7 | + /> | |
5 | 8 | </div> |
6 | 9 | </template> |
7 | 10 | <script lang="ts"> |
8 | 11 | import { defineComponent } from 'vue'; |
9 | - import { BasicTable, useTable, BasicColumn, EditTableHeaderIcon } from '/@/components/Table'; | |
12 | + import { BasicTable, useTable, BasicColumn } from '/@/components/Table'; | |
10 | 13 | import { optionsListApi } from '/@/api/demo/select'; |
11 | 14 | |
12 | 15 | import { demoListApi } from '/@/api/demo/table'; |
... | ... | @@ -106,7 +109,7 @@ |
106 | 109 | }, |
107 | 110 | ]; |
108 | 111 | export default defineComponent({ |
109 | - components: { BasicTable, EditTableHeaderIcon }, | |
112 | + components: { BasicTable }, | |
110 | 113 | setup() { |
111 | 114 | const [registerTable] = useTable({ |
112 | 115 | title: '可编辑单元格示例', | ... | ... |
src/views/demo/table/EditRowTable.vue
... | ... | @@ -15,7 +15,6 @@ |
15 | 15 | TableAction, |
16 | 16 | BasicColumn, |
17 | 17 | ActionItem, |
18 | - EditTableHeaderIcon, | |
19 | 18 | EditRecordRow, |
20 | 19 | } from '/@/components/Table'; |
21 | 20 | import { optionsListApi } from '/@/api/demo/select'; |
... | ... | @@ -117,7 +116,7 @@ |
117 | 116 | }, |
118 | 117 | ]; |
119 | 118 | export default defineComponent({ |
120 | - components: { BasicTable, EditTableHeaderIcon, TableAction }, | |
119 | + components: { BasicTable, TableAction }, | |
121 | 120 | setup() { |
122 | 121 | const currentEditKeyRef = ref(''); |
123 | 122 | ... | ... |
src/views/demo/table/FormTable.vue
src/views/demo/table/RefTable.vue
1 | 1 | <template> |
2 | 2 | <div class="p-4"> |
3 | 3 | <div class="mb-4"> |
4 | - <a-button class="mr-2" @click="reloadTable">还原</a-button> | |
5 | - <a-button class="mr-2" @click="changeLoading">开启loading</a-button> | |
6 | - <a-button class="mr-2" @click="changeColumns">更改Columns</a-button> | |
7 | - <a-button class="mr-2" @click="getColumn">获取Columns</a-button> | |
8 | - <a-button class="mr-2" @click="getTableData">获取表格数据</a-button> | |
9 | - <a-button class="mr-2" @click="setPaginationInfo">跳转到第2页</a-button> | |
4 | + <a-button class="mr-2" @click="reloadTable"> 还原 </a-button> | |
5 | + <a-button class="mr-2" @click="changeLoading"> 开启loading </a-button> | |
6 | + <a-button class="mr-2" @click="changeColumns"> 更改Columns </a-button> | |
7 | + <a-button class="mr-2" @click="getColumn"> 获取Columns </a-button> | |
8 | + <a-button class="mr-2" @click="getTableData"> 获取表格数据 </a-button> | |
9 | + <a-button class="mr-2" @click="setPaginationInfo"> 跳转到第2页 </a-button> | |
10 | 10 | </div> |
11 | 11 | <div class="mb-4"> |
12 | - <a-button class="mr-2" @click="getSelectRowList">获取选中行</a-button> | |
13 | - <a-button class="mr-2" @click="getSelectRowKeyList">获取选中行Key</a-button> | |
14 | - <a-button class="mr-2" @click="setSelectedRowKeyList">设置选中行</a-button> | |
15 | - <a-button class="mr-2" @click="clearSelect">清空选中行</a-button> | |
16 | - <a-button class="mr-2" @click="getPagination">获取分页信息</a-button> | |
12 | + <a-button class="mr-2" @click="getSelectRowList"> 获取选中行 </a-button> | |
13 | + <a-button class="mr-2" @click="getSelectRowKeyList"> 获取选中行Key </a-button> | |
14 | + <a-button class="mr-2" @click="setSelectedRowKeyList"> 设置选中行 </a-button> | |
15 | + <a-button class="mr-2" @click="clearSelect"> 清空选中行 </a-button> | |
16 | + <a-button class="mr-2" @click="getPagination"> 获取分页信息 </a-button> | |
17 | 17 | </div> |
18 | 18 | <BasicTable |
19 | 19 | :canResize="false" | ... | ... |
src/views/demo/table/UseTable.vue
1 | 1 | <template> |
2 | 2 | <div class="p-4"> |
3 | 3 | <div class="mb-4"> |
4 | - <a-button class="mr-2" @click="reloadTable">还原</a-button> | |
5 | - <a-button class="mr-2" @click="changeLoading">开启loading</a-button> | |
6 | - <a-button class="mr-2" @click="changeColumns">更改Columns</a-button> | |
7 | - <a-button class="mr-2" @click="getColumn">获取Columns</a-button> | |
8 | - <a-button class="mr-2" @click="getTableData">获取表格数据</a-button> | |
9 | - <a-button class="mr-2" @click="setPaginationInfo">跳转到第2页</a-button> | |
4 | + <a-button class="mr-2" @click="reloadTable"> 还原 </a-button> | |
5 | + <a-button class="mr-2" @click="changeLoading"> 开启loading </a-button> | |
6 | + <a-button class="mr-2" @click="changeColumns"> 更改Columns </a-button> | |
7 | + <a-button class="mr-2" @click="getColumn"> 获取Columns </a-button> | |
8 | + <a-button class="mr-2" @click="getTableData"> 获取表格数据 </a-button> | |
9 | + <a-button class="mr-2" @click="setPaginationInfo"> 跳转到第2页 </a-button> | |
10 | 10 | </div> |
11 | 11 | <div class="mb-4"> |
12 | - <a-button class="mr-2" @click="getSelectRowList">获取选中行</a-button> | |
13 | - <a-button class="mr-2" @click="getSelectRowKeyList">获取选中行Key</a-button> | |
14 | - <a-button class="mr-2" @click="setSelectedRowKeyList">设置选中行</a-button> | |
15 | - <a-button class="mr-2" @click="clearSelect">清空选中行</a-button> | |
16 | - <a-button class="mr-2" @click="getPagination">获取分页信息</a-button> | |
12 | + <a-button class="mr-2" @click="getSelectRowList"> 获取选中行 </a-button> | |
13 | + <a-button class="mr-2" @click="getSelectRowKeyList"> 获取选中行Key </a-button> | |
14 | + <a-button class="mr-2" @click="setSelectedRowKeyList"> 设置选中行 </a-button> | |
15 | + <a-button class="mr-2" @click="clearSelect"> 清空选中行 </a-button> | |
16 | + <a-button class="mr-2" @click="getPagination"> 获取分页信息 </a-button> | |
17 | 17 | </div> |
18 | 18 | <BasicTable @register="registerTable" /> |
19 | 19 | </div> | ... | ... |
src/views/demo/tree/ActionTree.vue
1 | 1 | <template> |
2 | 2 | <PageWrapper title="Tree函数操作示例" contentBackground contentClass="p-4"> |
3 | 3 | <div class="mb-4"> |
4 | - <a-button @click="handleLevel(2)" class="mr-2">显示到第2级</a-button> | |
5 | - <a-button @click="handleLevel(1)" class="mr-2">显示到第1级</a-button> | |
6 | - <a-button @click="handleSetCheckData" class="mr-2">设置勾选数据</a-button> | |
7 | - <a-button @click="handleGetCheckData" class="mr-2">获取勾选数据</a-button> | |
8 | - <a-button @click="handleSetSelectData" class="mr-2">设置选中数据</a-button> | |
9 | - <a-button @click="handleGetSelectData" class="mr-2">获取选中数据</a-button> | |
4 | + <a-button @click="handleLevel(2)" class="mr-2"> 显示到第2级 </a-button> | |
5 | + <a-button @click="handleLevel(1)" class="mr-2"> 显示到第1级 </a-button> | |
6 | + <a-button @click="handleSetCheckData" class="mr-2"> 设置勾选数据 </a-button> | |
7 | + <a-button @click="handleGetCheckData" class="mr-2"> 获取勾选数据 </a-button> | |
8 | + <a-button @click="handleSetSelectData" class="mr-2"> 设置选中数据 </a-button> | |
9 | + <a-button @click="handleGetSelectData" class="mr-2"> 获取选中数据 </a-button> | |
10 | 10 | |
11 | - <a-button @click="handleSetExpandData" class="mr-2">设置展开数据</a-button> | |
12 | - <a-button @click="handleGetExpandData" class="mr-2">获取展开数据</a-button> | |
11 | + <a-button @click="handleSetExpandData" class="mr-2"> 设置展开数据 </a-button> | |
12 | + <a-button @click="handleGetExpandData" class="mr-2"> 获取展开数据 </a-button> | |
13 | 13 | </div> |
14 | 14 | <div class="mb-4"> |
15 | - <a-button @click="appendNodeByKey(null)" class="mr-2">添加根节点</a-button> | |
16 | - <a-button @click="appendNodeByKey('2-2')" class="mr-2">添加在parent3内添加节点</a-button> | |
17 | - <a-button @click="deleteNodeByKey('2-2')" class="mr-2">删除parent3节点</a-button> | |
18 | - <a-button @click="updateNodeByKey('1-1')" class="mr-2">更新parent2节点</a-button> | |
15 | + <a-button @click="appendNodeByKey(null)" class="mr-2"> 添加根节点 </a-button> | |
16 | + <a-button @click="appendNodeByKey('2-2')" class="mr-2"> 添加在parent3内添加节点 </a-button> | |
17 | + <a-button @click="deleteNodeByKey('2-2')" class="mr-2"> 删除parent3节点 </a-button> | |
18 | + <a-button @click="updateNodeByKey('1-1')" class="mr-2"> 更新parent2节点 </a-button> | |
19 | 19 | </div> |
20 | 20 | <CollapseContainer title="函数操作" class="mr-4" :canExpan="false" :style="{ width: '33%' }"> |
21 | 21 | <BasicTree :treeData="treeData" ref="treeRef" :checkable="true" /> | ... | ... |
src/views/sys/exception/Exception.tsx
src/views/sys/iframe/FrameBlank.vue
src/views/sys/iframe/index.vue
1 | 1 | <template> |
2 | 2 | <div class="iframe-page" :style="getWrapStyle"> |
3 | 3 | <Spin :spinning="loading" size="large" :style="getWrapStyle"> |
4 | - <iframe :src="frameSrc" class="iframe-page__main" ref="frameRef" /> | |
4 | + <iframe :src="frameSrc" class="iframe-page__main" ref="frameRef"></iframe> | |
5 | 5 | </Spin> |
6 | 6 | </div> |
7 | 7 | </template> |
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 | props: { |
19 | 19 | frameSrc: { |
20 | 20 | type: String as PropType<string>, |
21 | + default: '', | |
21 | 22 | }, |
22 | 23 | }, |
23 | 24 | setup() { | ... | ... |
src/views/sys/lock/LockPage.vue
... | ... | @@ -10,14 +10,18 @@ |
10 | 10 | {{ hour }} |
11 | 11 | <span class="meridiem" v-show="showDate">{{ meridiem }}</span> |
12 | 12 | </div> |
13 | - <div :class="`${prefixCls}__minute`">{{ minute }} </div> | |
13 | + <div :class="`${prefixCls}__minute`"> | |
14 | + {{ minute }} | |
15 | + </div> | |
14 | 16 | </div> |
15 | 17 | <transition name="fade-slide"> |
16 | 18 | <div :class="`${prefixCls}-entry`" v-show="!showDate"> |
17 | 19 | <div :class="`${prefixCls}-entry-content`"> |
18 | 20 | <div :class="`${prefixCls}-entry__header`"> |
19 | 21 | <img :src="headerImg" :class="`${prefixCls}-entry__header-img`" /> |
20 | - <p :class="`${prefixCls}-entry__header-name`">{{ realName }}</p> | |
22 | + <p :class="`${prefixCls}-entry__header-name`"> | |
23 | + {{ realName }} | |
24 | + </p> | |
21 | 25 | </div> |
22 | 26 | <InputPassword :placeholder="t('sys.lock.placeholder')" v-model:value="password" /> |
23 | 27 | <span :class="`${prefixCls}-entry__err-msg`" v-if="errMsgRef"> |
... | ... | @@ -60,7 +64,7 @@ |
60 | 64 | </template> |
61 | 65 | <script lang="ts"> |
62 | 66 | import { defineComponent, ref, computed } from 'vue'; |
63 | - import { Alert, Input } from 'ant-design-vue'; | |
67 | + import { Input } from 'ant-design-vue'; | |
64 | 68 | |
65 | 69 | import { userStore } from '/@/store/modules/user'; |
66 | 70 | import { lockStore } from '/@/store/modules/lock'; |
... | ... | @@ -74,7 +78,7 @@ |
74 | 78 | |
75 | 79 | export default defineComponent({ |
76 | 80 | name: 'LockPage', |
77 | - components: { Alert, LockOutlined, InputPassword: Input.Password }, | |
81 | + components: { LockOutlined, InputPassword: Input.Password }, | |
78 | 82 | |
79 | 83 | setup() { |
80 | 84 | const passwordRef = ref(''); |
... | ... | @@ -84,7 +88,7 @@ |
84 | 88 | |
85 | 89 | const { prefixCls } = useDesign('lock-page'); |
86 | 90 | |
87 | - const { start, stop, ...state } = useNow(true); | |
91 | + const { ...state } = useNow(true); | |
88 | 92 | |
89 | 93 | const { t } = useI18n(); |
90 | 94 | ... | ... |
src/views/sys/login/Login.vue
1 | 1 | <template> |
2 | 2 | <div class="login"> |
3 | - <div class="login-mask" /> | |
3 | + <div class="login-mask"></div> | |
4 | 4 | <div class="login-form-wrap"> |
5 | - <div class="login-form mx-6"> | |
5 | + <div class="mx-6 login-form"> | |
6 | 6 | <AppLocalePicker v-if="showLocale" class="login-form__locale" /> |
7 | - <div class="login-form__content px-2 py-10"> | |
7 | + <div class="px-2 py-10 login-form__content"> | |
8 | 8 | <header> |
9 | 9 | <img :src="logo" class="mr-4" /> |
10 | 10 | <h1>{{ title }}</h1> |
... | ... | @@ -35,7 +35,9 @@ |
35 | 35 | <a-col :span="12"> |
36 | 36 | <a-form-item :style="{ 'text-align': 'right' }"> |
37 | 37 | <!-- No logic, you need to deal with it yourself --> |
38 | - <a-button type="link" size="small">{{ t('sys.login.forgetPassword') }}</a-button> | |
38 | + <a-button type="link" size="small"> | |
39 | + {{ t('sys.login.forgetPassword') }} | |
40 | + </a-button> | |
39 | 41 | </a-form-item> |
40 | 42 | </a-col> |
41 | 43 | </a-row> |
... | ... | @@ -47,8 +49,9 @@ |
47 | 49 | :block="true" |
48 | 50 | @click="login" |
49 | 51 | :loading="formState.loading" |
50 | - >{{ t('sys.login.loginButton') }}</a-button | |
51 | 52 | > |
53 | + {{ t('sys.login.loginButton') }} | |
54 | + </a-button> | |
52 | 55 | </a-form-item> |
53 | 56 | </a-form> |
54 | 57 | </div> | ... | ... |
src/views/sys/redirect/index.vue
vite.config.ts
... | ... | @@ -31,9 +31,12 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { |
31 | 31 | return { |
32 | 32 | base: VITE_PUBLIC_PATH, |
33 | 33 | root, |
34 | - alias: { | |
35 | - '/@/': `${pathResolve('src')}/`, | |
36 | - }, | |
34 | + alias: [ | |
35 | + { | |
36 | + find: /^\/@\//, | |
37 | + replacement: pathResolve('src') + '/', | |
38 | + }, | |
39 | + ], | |
37 | 40 | server: { |
38 | 41 | port: VITE_PORT, |
39 | 42 | proxy: createProxy(VITE_PROXY), |
... | ... | @@ -75,19 +78,11 @@ export default ({ command, mode }: ConfigEnv): UserConfig => { |
75 | 78 | vue(), |
76 | 79 | vueJsx(), |
77 | 80 | ...(VITE_LEGACY && isBuild ? [legacy()] : []), |
78 | - ...createVitePlugins(viteEnv, isBuild, mode), | |
81 | + ...createVitePlugins(viteEnv, isBuild), | |
79 | 82 | ], |
80 | 83 | |
81 | 84 | optimizeDeps: { |
82 | - include: [ | |
83 | - 'moment', | |
84 | - '@ant-design/icons-vue', | |
85 | - 'echarts/map/js/china', | |
86 | - 'ant-design-vue/es/locale/zh_CN', | |
87 | - 'moment/dist/locale/zh-cn', | |
88 | - 'ant-design-vue/es/locale/en_US', | |
89 | - 'resize-observer-polyfill', | |
90 | - ], | |
85 | + include: ['@iconify/iconify'], | |
91 | 86 | }, |
92 | 87 | }; |
93 | 88 | }; | ... | ... |
yarn.lock
... | ... | @@ -1747,7 +1747,7 @@ |
1747 | 1747 | "@typescript-eslint/types" "4.14.1" |
1748 | 1748 | eslint-visitor-keys "^2.0.0" |
1749 | 1749 | |
1750 | -"@vitejs/plugin-legacy@^1.2.1": | |
1750 | +"@vitejs/plugin-legacy@^1.2.2": | |
1751 | 1751 | version "1.2.2" |
1752 | 1752 | resolved "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.2.2.tgz#65039ca35be1542b5ad612b54641da5a89d7687f" |
1753 | 1753 | integrity sha512-ec3hvD4OrQusH42ERrTtjOmeBoGmVWtwg7mVMvvlWkR7wUwZSnr8J6HYYynmGUaBcC95+3xm6bRks7sh2DKq+w== |
... | ... | @@ -7743,10 +7743,10 @@ vite-plugin-style-import@^0.4.6: |
7743 | 7743 | "@rollup/pluginutils" "^4.1.0" |
7744 | 7744 | change-case "^4.1.2" |
7745 | 7745 | |
7746 | -vite@2.0.0-beta.50: | |
7747 | - version "2.0.0-beta.50" | |
7748 | - resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.50.tgz#04e66d009470ca90ab8a4a43687e899b670a0f25" | |
7749 | - integrity sha512-zzMgrWJK92/aQ1rxvc+0QKeOCdOP4m2EPGwK2HKhlifQVnSdpYQzQkWLzaGh1GQAp61W+Su8cu6cWINpFgNrfQ== | |
7746 | +vite@2.0.0-beta.52: | |
7747 | + version "2.0.0-beta.52" | |
7748 | + resolved "https://registry.npmjs.org/vite/-/vite-2.0.0-beta.52.tgz#a06275d8b7c789358586dca51b8c01caf8599b08" | |
7749 | + integrity sha512-goc3hwnL7ot9NnzRv7jWz4pDMgBpoL272+WuKc3D/gjYtVLd9KG46Z68IlU3OSN5ng334WEI1pmAlawb4iGJ8g== | |
7750 | 7750 | dependencies: |
7751 | 7751 | esbuild "^0.8.34" |
7752 | 7752 | postcss "^8.2.1" | ... | ... |