Commit 553ee9c7aed3c679c4d00d1c1c6278b8578020d5
1 parent
9f8e0105
chore: revert fix(Icon): Cannot access Icon before initialization #2680 (#2683)
Showing
32 changed files
with
71 additions
and
59 deletions
src/components/Application/src/search/AppSearchModal.vue
@@ -61,7 +61,8 @@ | @@ -61,7 +61,8 @@ | ||
61 | import { computed, unref, ref, watch, nextTick } from 'vue'; | 61 | import { computed, unref, ref, watch, nextTick } from 'vue'; |
62 | import { SearchOutlined } from '@ant-design/icons-vue'; | 62 | import { SearchOutlined } from '@ant-design/icons-vue'; |
63 | import AppSearchFooter from './AppSearchFooter.vue'; | 63 | import AppSearchFooter from './AppSearchFooter.vue'; |
64 | - import { Icon } from '/@/components/Icon'; | 64 | + import Icon from '/@/components/Icon'; |
65 | + // @ts-ignore | ||
65 | import vClickOutside from '/@/directives/clickOutside'; | 66 | import vClickOutside from '/@/directives/clickOutside'; |
66 | import { useDesign } from '/@/hooks/web/useDesign'; | 67 | import { useDesign } from '/@/hooks/web/useDesign'; |
67 | import { useRefs } from '@vben/hooks'; | 68 | import { useRefs } from '@vben/hooks'; |
src/components/ClickOutSide/src/ClickOutSide.vue
@@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
8 | import { onClickOutside } from '@vueuse/core'; | 8 | import { onClickOutside } from '@vueuse/core'; |
9 | 9 | ||
10 | const emit = defineEmits(['mounted', 'clickOutside']); | 10 | const emit = defineEmits(['mounted', 'clickOutside']); |
11 | - const wrap = ref<ElRef>(null); | 11 | + const wrap = ref(null); |
12 | 12 | ||
13 | onClickOutside(wrap, () => { | 13 | onClickOutside(wrap, () => { |
14 | emit('clickOutside'); | 14 | emit('clickOutside'); |
src/components/ContextMenu/src/ContextMenu.vue
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | import type { ContextMenuItem, ItemContentProps, Axis } from './typing'; | 2 | import type { ContextMenuItem, ItemContentProps, Axis } from './typing'; |
3 | import type { FunctionalComponent, CSSProperties, PropType } from 'vue'; | 3 | import type { FunctionalComponent, CSSProperties, PropType } from 'vue'; |
4 | import { defineComponent, nextTick, onMounted, computed, ref, unref, onUnmounted } from 'vue'; | 4 | import { defineComponent, nextTick, onMounted, computed, ref, unref, onUnmounted } from 'vue'; |
5 | - import { Icon } from '/@/components/Icon'; | 5 | + import Icon from '/@/components/Icon'; |
6 | import { Menu, Divider } from 'ant-design-vue'; | 6 | import { Menu, Divider } from 'ant-design-vue'; |
7 | 7 | ||
8 | const prefixCls = 'context-menu'; | 8 | const prefixCls = 'context-menu'; |
src/components/Cropper/src/CropperAvatar.vue
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | import { useMessage } from '/@/hooks/web/useMessage'; | 45 | import { useMessage } from '/@/hooks/web/useMessage'; |
46 | import { useI18n } from '/@/hooks/web/useI18n'; | 46 | import { useI18n } from '/@/hooks/web/useI18n'; |
47 | import type { ButtonProps } from '/@/components/Button'; | 47 | import type { ButtonProps } from '/@/components/Button'; |
48 | - import { Icon } from '/@/components/Icon'; | 48 | + import Icon from '/@/components/Icon'; |
49 | 49 | ||
50 | const props = { | 50 | const props = { |
51 | width: { type: [String, Number], default: '200px' }, | 51 | width: { type: [String, Number], default: '200px' }, |
src/components/Form/src/components/ApiCascader.vue
@@ -19,6 +19,7 @@ | @@ -19,6 +19,7 @@ | ||
19 | </a-cascader> | 19 | </a-cascader> |
20 | </template> | 20 | </template> |
21 | <script lang="ts"> | 21 | <script lang="ts"> |
22 | + import { type Recordable } from '@vben/types'; | ||
22 | import { defineComponent, PropType, ref, unref, watch, watchEffect } from 'vue'; | 23 | import { defineComponent, PropType, ref, unref, watch, watchEffect } from 'vue'; |
23 | import { Cascader } from 'ant-design-vue'; | 24 | import { Cascader } from 'ant-design-vue'; |
24 | import { propTypes } from '/@/utils/propTypes'; | 25 | import { propTypes } from '/@/utils/propTypes'; |
@@ -46,7 +47,7 @@ | @@ -46,7 +47,7 @@ | ||
46 | type: Array, | 47 | type: Array, |
47 | }, | 48 | }, |
48 | api: { | 49 | api: { |
49 | - type: Function as PropType<(arg?: Recordable) => Promise<Option[]>>, | 50 | + type: Function as PropType<(arg?: Recordable<any>) => Promise<Option[]>>, |
50 | default: null, | 51 | default: null, |
51 | }, | 52 | }, |
52 | numberToString: propTypes.bool, | 53 | numberToString: propTypes.bool, |
@@ -58,12 +59,12 @@ | @@ -58,12 +59,12 @@ | ||
58 | immediate: propTypes.bool.def(true), | 59 | immediate: propTypes.bool.def(true), |
59 | // init fetch params | 60 | // init fetch params |
60 | initFetchParams: { | 61 | initFetchParams: { |
61 | - type: Object as PropType<Recordable>, | 62 | + type: Object as PropType<Recordable<any>>, |
62 | default: () => ({}), | 63 | default: () => ({}), |
63 | }, | 64 | }, |
64 | // 是否有下级,默认是 | 65 | // 是否有下级,默认是 |
65 | isLeaf: { | 66 | isLeaf: { |
66 | - type: Function as PropType<(arg: Recordable) => boolean>, | 67 | + type: Function as PropType<(arg: Recordable<any>) => boolean>, |
67 | default: null, | 68 | default: null, |
68 | }, | 69 | }, |
69 | displayRenderArray: { | 70 | displayRenderArray: { |
@@ -92,7 +93,7 @@ | @@ -92,7 +93,7 @@ | ||
92 | 93 | ||
93 | function generatorOptions(options: any[]): Option[] { | 94 | function generatorOptions(options: any[]): Option[] { |
94 | const { labelField, valueField, numberToString, childrenField, isLeaf } = props; | 95 | const { labelField, valueField, numberToString, childrenField, isLeaf } = props; |
95 | - return options.reduce((prev, next: Recordable) => { | 96 | + return options.reduce((prev, next: Recordable<any>) => { |
96 | if (next) { | 97 | if (next) { |
97 | const value = next[valueField]; | 98 | const value = next[valueField]; |
98 | const item = { | 99 | const item = { |
src/components/Form/src/components/ApiTree.vue
@@ -10,7 +10,8 @@ | @@ -10,7 +10,8 @@ | ||
10 | </template> | 10 | </template> |
11 | 11 | ||
12 | <script lang="ts"> | 12 | <script lang="ts"> |
13 | - import { computed, defineComponent, watch, ref, onMounted, unref } from 'vue'; | 13 | + import { type Recordable, type AnyFunction } from '@vben/types'; |
14 | + import { type PropType, computed, defineComponent, watch, ref, onMounted, unref } from 'vue'; | ||
14 | import { Tree } from 'ant-design-vue'; | 15 | import { Tree } from 'ant-design-vue'; |
15 | import { isArray, isFunction } from '/@/utils/is'; | 16 | import { isArray, isFunction } from '/@/utils/is'; |
16 | import { get } from 'lodash-es'; | 17 | import { get } from 'lodash-es'; |
@@ -21,15 +22,15 @@ | @@ -21,15 +22,15 @@ | ||
21 | name: 'ApiTree', | 22 | name: 'ApiTree', |
22 | components: { ATree: Tree, LoadingOutlined }, | 23 | components: { ATree: Tree, LoadingOutlined }, |
23 | props: { | 24 | props: { |
24 | - api: { type: Function as PropType<(arg?: Recordable) => Promise<Recordable>> }, | 25 | + api: { type: Function as PropType<(arg?: Recordable<any>) => Promise<Recordable<any>>> }, |
25 | params: { type: Object }, | 26 | params: { type: Object }, |
26 | immediate: { type: Boolean, default: true }, | 27 | immediate: { type: Boolean, default: true }, |
27 | resultField: propTypes.string.def(''), | 28 | resultField: propTypes.string.def(''), |
28 | - afterFetch: { type: Function as PropType<Fn> }, | 29 | + afterFetch: { type: Function as PropType<AnyFunction> }, |
29 | }, | 30 | }, |
30 | emits: ['options-change', 'change'], | 31 | emits: ['options-change', 'change'], |
31 | setup(props, { attrs, emit }) { | 32 | setup(props, { attrs, emit }) { |
32 | - const treeData = ref<Recordable[]>([]); | 33 | + const treeData = ref<Recordable<any>[]>([]); |
33 | const isFirstLoaded = ref<Boolean>(false); | 34 | const isFirstLoaded = ref<Boolean>(false); |
34 | const loading = ref(false); | 35 | const loading = ref(false); |
35 | const getAttrs = computed(() => { | 36 | const getAttrs = computed(() => { |
@@ -81,7 +82,7 @@ | @@ -81,7 +82,7 @@ | ||
81 | if (!isArray(result)) { | 82 | if (!isArray(result)) { |
82 | result = get(result, props.resultField); | 83 | result = get(result, props.resultField); |
83 | } | 84 | } |
84 | - treeData.value = (result as Recordable[]) || []; | 85 | + treeData.value = (result as Recordable<any>[]) || []; |
85 | isFirstLoaded.value = true; | 86 | isFirstLoaded.value = true; |
86 | emit('options-change', treeData.value); | 87 | emit('options-change', treeData.value); |
87 | } | 88 | } |
src/components/Form/src/components/ApiTreeSelect.vue
@@ -10,7 +10,8 @@ | @@ -10,7 +10,8 @@ | ||
10 | </template> | 10 | </template> |
11 | 11 | ||
12 | <script lang="ts"> | 12 | <script lang="ts"> |
13 | - import { computed, defineComponent, watch, ref, onMounted, unref } from 'vue'; | 13 | + import { type Recordable } from '@vben/types'; |
14 | + import { type PropType, computed, defineComponent, watch, ref, onMounted, unref } from 'vue'; | ||
14 | import { TreeSelect } from 'ant-design-vue'; | 15 | import { TreeSelect } from 'ant-design-vue'; |
15 | import { isArray, isFunction } from '/@/utils/is'; | 16 | import { isArray, isFunction } from '/@/utils/is'; |
16 | import { get } from 'lodash-es'; | 17 | import { get } from 'lodash-es'; |
@@ -21,14 +22,14 @@ | @@ -21,14 +22,14 @@ | ||
21 | name: 'ApiTreeSelect', | 22 | name: 'ApiTreeSelect', |
22 | components: { ATreeSelect: TreeSelect, LoadingOutlined }, | 23 | components: { ATreeSelect: TreeSelect, LoadingOutlined }, |
23 | props: { | 24 | props: { |
24 | - api: { type: Function as PropType<(arg?: Recordable) => Promise<Recordable>> }, | 25 | + api: { type: Function as PropType<(arg?: Recordable<any>) => Promise<Recordable<any>>> }, |
25 | params: { type: Object }, | 26 | params: { type: Object }, |
26 | immediate: { type: Boolean, default: true }, | 27 | immediate: { type: Boolean, default: true }, |
27 | resultField: propTypes.string.def(''), | 28 | resultField: propTypes.string.def(''), |
28 | }, | 29 | }, |
29 | emits: ['options-change', 'change'], | 30 | emits: ['options-change', 'change'], |
30 | setup(props, { attrs, emit }) { | 31 | setup(props, { attrs, emit }) { |
31 | - const treeData = ref<Recordable[]>([]); | 32 | + const treeData = ref<Recordable<any>[]>([]); |
32 | const isFirstLoaded = ref<Boolean>(false); | 33 | const isFirstLoaded = ref<Boolean>(false); |
33 | const loading = ref(false); | 34 | const loading = ref(false); |
34 | const getAttrs = computed(() => { | 35 | const getAttrs = computed(() => { |
@@ -77,7 +78,7 @@ | @@ -77,7 +78,7 @@ | ||
77 | if (!isArray(result)) { | 78 | if (!isArray(result)) { |
78 | result = get(result, props.resultField); | 79 | result = get(result, props.resultField); |
79 | } | 80 | } |
80 | - treeData.value = (result as Recordable[]) || []; | 81 | + treeData.value = (result as Recordable<any>[]) || []; |
81 | isFirstLoaded.value = true; | 82 | isFirstLoaded.value = true; |
82 | emit('options-change', treeData.value); | 83 | emit('options-change', treeData.value); |
83 | } | 84 | } |
src/components/Form/src/components/FormItem.vue
1 | <script lang="tsx"> | 1 | <script lang="tsx"> |
2 | + import { type Recordable, type Nullable } from '@vben/types'; | ||
2 | import type { PropType, Ref } from 'vue'; | 3 | import type { PropType, Ref } from 'vue'; |
3 | import { computed, defineComponent, toRefs, unref } from 'vue'; | 4 | import { computed, defineComponent, toRefs, unref } from 'vue'; |
4 | import type { FormActionType, FormProps, FormSchema } from '../types/form'; | 5 | import type { FormActionType, FormProps, FormSchema } from '../types/form'; |
5 | - import type { Rule } from 'ant-design-vue/lib/form'; | 6 | + import type { ValidationRule } from 'ant-design-vue/lib/form/Form'; |
6 | import type { TableActionType } from '/@/components/Table'; | 7 | import type { TableActionType } from '/@/components/Table'; |
7 | import { Col, Divider, Form } from 'ant-design-vue'; | 8 | import { Col, Divider, Form } from 'ant-design-vue'; |
8 | import { componentMap } from '../componentMap'; | 9 | import { componentMap } from '../componentMap'; |
@@ -31,11 +32,11 @@ | @@ -31,11 +32,11 @@ | ||
31 | default: () => ({}), | 32 | default: () => ({}), |
32 | }, | 33 | }, |
33 | allDefaultValues: { | 34 | allDefaultValues: { |
34 | - type: Object as PropType<Recordable>, | 35 | + type: Object as PropType<Recordable<any>>, |
35 | default: () => ({}), | 36 | default: () => ({}), |
36 | }, | 37 | }, |
37 | formModel: { | 38 | formModel: { |
38 | - type: Object as PropType<Recordable>, | 39 | + type: Object as PropType<Recordable<any>>, |
39 | default: () => ({}), | 40 | default: () => ({}), |
40 | }, | 41 | }, |
41 | setFormModel: { | 42 | setFormModel: { |
@@ -72,7 +73,7 @@ | @@ -72,7 +73,7 @@ | ||
72 | ...mergeDynamicData, | 73 | ...mergeDynamicData, |
73 | ...allDefaultValues, | 74 | ...allDefaultValues, |
74 | ...formModel, | 75 | ...formModel, |
75 | - } as Recordable, | 76 | + } as Recordable<any>, |
76 | schema: schema, | 77 | schema: schema, |
77 | }; | 78 | }; |
78 | }); | 79 | }); |
@@ -93,7 +94,7 @@ | @@ -93,7 +94,7 @@ | ||
93 | componentProps, | 94 | componentProps, |
94 | ); | 95 | ); |
95 | } | 96 | } |
96 | - return componentProps as Recordable; | 97 | + return componentProps as Recordable<any>; |
97 | }); | 98 | }); |
98 | 99 | ||
99 | const getDisable = computed(() => { | 100 | const getDisable = computed(() => { |
@@ -138,7 +139,7 @@ | @@ -138,7 +139,7 @@ | ||
138 | return { isShow, isIfShow }; | 139 | return { isShow, isIfShow }; |
139 | } | 140 | } |
140 | 141 | ||
141 | - function handleRules(): Rule[] { | 142 | + function handleRules(): ValidationRule[] { |
142 | const { | 143 | const { |
143 | rules: defRules = [], | 144 | rules: defRules = [], |
144 | component, | 145 | component, |
@@ -149,10 +150,10 @@ | @@ -149,10 +150,10 @@ | ||
149 | } = props.schema; | 150 | } = props.schema; |
150 | 151 | ||
151 | if (isFunction(dynamicRules)) { | 152 | if (isFunction(dynamicRules)) { |
152 | - return dynamicRules(unref(getValues)) as Rule[]; | 153 | + return dynamicRules(unref(getValues)) as ValidationRule[]; |
153 | } | 154 | } |
154 | 155 | ||
155 | - let rules: Rule[] = cloneDeep(defRules) as Rule[]; | 156 | + let rules: ValidationRule[] = cloneDeep(defRules) as ValidationRule[]; |
156 | const { rulesMessageJoinLabel: globalRulesMessageJoinLabel } = props.formProps; | 157 | const { rulesMessageJoinLabel: globalRulesMessageJoinLabel } = props.formProps; |
157 | 158 | ||
158 | const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel') | 159 | const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel') |
@@ -235,7 +236,7 @@ | @@ -235,7 +236,7 @@ | ||
235 | if (characterInx !== -1 && !rules[characterInx].validator) { | 236 | if (characterInx !== -1 && !rules[characterInx].validator) { |
236 | rules[characterInx].message = | 237 | rules[characterInx].message = |
237 | rules[characterInx].message || | 238 | rules[characterInx].message || |
238 | - t('component.form.maxTip', [rules[characterInx].max] as Recordable); | 239 | + t('component.form.maxTip', [rules[characterInx].max] as Recordable<any>); |
239 | } | 240 | } |
240 | return rules; | 241 | return rules; |
241 | } | 242 | } |
@@ -254,7 +255,7 @@ | @@ -254,7 +255,7 @@ | ||
254 | const eventKey = `on${upperFirst(changeEvent)}`; | 255 | const eventKey = `on${upperFirst(changeEvent)}`; |
255 | 256 | ||
256 | const on = { | 257 | const on = { |
257 | - [eventKey]: (...args: Nullable<Recordable>[]) => { | 258 | + [eventKey]: (...args: Nullable<Recordable<any>>[]) => { |
258 | const [e] = args; | 259 | const [e] = args; |
259 | if (propsData[eventKey]) { | 260 | if (propsData[eventKey]) { |
260 | propsData[eventKey](...args); | 261 | propsData[eventKey](...args); |
@@ -267,7 +268,7 @@ | @@ -267,7 +268,7 @@ | ||
267 | const Comp = componentMap.get(component) as ReturnType<typeof defineComponent>; | 268 | const Comp = componentMap.get(component) as ReturnType<typeof defineComponent>; |
268 | 269 | ||
269 | const { autoSetPlaceHolder, size } = props.formProps; | 270 | const { autoSetPlaceHolder, size } = props.formProps; |
270 | - const propsData: Recordable = { | 271 | + const propsData: Recordable<any> = { |
271 | allowClear: true, | 272 | allowClear: true, |
272 | getPopupContainer: (trigger: Element) => trigger.parentNode, | 273 | getPopupContainer: (trigger: Element) => trigger.parentNode, |
273 | size, | 274 | size, |
@@ -284,11 +285,11 @@ | @@ -284,11 +285,11 @@ | ||
284 | propsData.codeField = field; | 285 | propsData.codeField = field; |
285 | propsData.formValues = unref(getValues); | 286 | propsData.formValues = unref(getValues); |
286 | 287 | ||
287 | - const bindValue: Recordable = { | 288 | + const bindValue: Recordable<any> = { |
288 | [valueField || (isCheck ? 'checked' : 'value')]: props.formModel[field], | 289 | [valueField || (isCheck ? 'checked' : 'value')]: props.formModel[field], |
289 | }; | 290 | }; |
290 | 291 | ||
291 | - const compAttr: Recordable = { | 292 | + const compAttr: Recordable<any> = { |
292 | ...propsData, | 293 | ...propsData, |
293 | ...on, | 294 | ...on, |
294 | ...bindValue, | 295 | ...bindValue, |
@@ -365,7 +366,7 @@ | @@ -365,7 +366,7 @@ | ||
365 | name={field} | 366 | name={field} |
366 | colon={colon} | 367 | colon={colon} |
367 | class={{ 'suffix-item': showSuffix }} | 368 | class={{ 'suffix-item': showSuffix }} |
368 | - {...(itemProps as Recordable)} | 369 | + {...(itemProps as Recordable<any>)} |
369 | label={renderLabelHelpMessage()} | 370 | label={renderLabelHelpMessage()} |
370 | rules={handleRules()} | 371 | rules={handleRules()} |
371 | labelCol={labelCol} | 372 | labelCol={labelCol} |
src/components/Icon/index.ts
src/components/Menu/src/components/MenuItemContent.vue
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <script lang="ts"> | 7 | <script lang="ts"> |
8 | import { computed, defineComponent } from 'vue'; | 8 | import { computed, defineComponent } from 'vue'; |
9 | 9 | ||
10 | - import { Icon } from '/@/components/Icon'; | 10 | + import Icon from '/@/components/Icon/index'; |
11 | import { useI18n } from '/@/hooks/web/useI18n'; | 11 | import { useI18n } from '/@/hooks/web/useI18n'; |
12 | import { useDesign } from '/@/hooks/web/useDesign'; | 12 | import { useDesign } from '/@/hooks/web/useDesign'; |
13 | import { contentProps } from '../props'; | 13 | import { contentProps } from '../props'; |
src/components/Modal/src/components/ModalFooter.vue
@@ -19,6 +19,7 @@ | @@ -19,6 +19,7 @@ | ||
19 | </template> | 19 | </template> |
20 | <script lang="ts"> | 20 | <script lang="ts"> |
21 | import { defineComponent } from 'vue'; | 21 | import { defineComponent } from 'vue'; |
22 | + | ||
22 | import { basicProps } from '../props'; | 23 | import { basicProps } from '../props'; |
23 | 24 | ||
24 | export default defineComponent({ | 25 | export default defineComponent({ |
src/components/Page/src/PageWrapper.vue
@@ -33,9 +33,17 @@ | @@ -33,9 +33,17 @@ | ||
33 | </div> | 33 | </div> |
34 | </template> | 34 | </template> |
35 | <script lang="ts"> | 35 | <script lang="ts"> |
36 | - import type { CSSProperties, PropType, provide } from 'vue'; | 36 | + import { |
37 | + CSSProperties, | ||
38 | + PropType, | ||
39 | + provide, | ||
40 | + defineComponent, | ||
41 | + computed, | ||
42 | + watch, | ||
43 | + ref, | ||
44 | + unref, | ||
45 | + } from 'vue'; | ||
37 | 46 | ||
38 | - import { defineComponent, computed, watch, ref, unref } from 'vue'; | ||
39 | import PageFooter from './PageFooter.vue'; | 47 | import PageFooter from './PageFooter.vue'; |
40 | 48 | ||
41 | import { useDesign } from '/@/hooks/web/useDesign'; | 49 | import { useDesign } from '/@/hooks/web/useDesign'; |
src/components/SimpleMenu/src/SimpleSubMenu.vue
@@ -48,7 +48,7 @@ | @@ -48,7 +48,7 @@ | ||
48 | 48 | ||
49 | import { defineComponent, computed } from 'vue'; | 49 | import { defineComponent, computed } from 'vue'; |
50 | import { useDesign } from '/@/hooks/web/useDesign'; | 50 | import { useDesign } from '/@/hooks/web/useDesign'; |
51 | - import { Icon } from '/@/components/Icon'; | 51 | + import Icon from '/@/components/Icon/index'; |
52 | 52 | ||
53 | import MenuItem from './components/MenuItem.vue'; | 53 | import MenuItem from './components/MenuItem.vue'; |
54 | import SubMenu from './components/SubMenuItem.vue'; | 54 | import SubMenu from './components/SubMenuItem.vue'; |
src/components/SimpleMenu/src/components/MenuItem.vue
@@ -17,8 +17,7 @@ | @@ -17,8 +17,7 @@ | ||
17 | </template> | 17 | </template> |
18 | 18 | ||
19 | <script lang="ts"> | 19 | <script lang="ts"> |
20 | - import type { PropType } from 'vue'; | ||
21 | - import { defineComponent, ref, computed, unref, getCurrentInstance, watch } from 'vue'; | 20 | + import { PropType, defineComponent, ref, computed, unref, getCurrentInstance, watch } from 'vue'; |
22 | import { useDesign } from '/@/hooks/web/useDesign'; | 21 | import { useDesign } from '/@/hooks/web/useDesign'; |
23 | import { propTypes } from '/@/utils/propTypes'; | 22 | import { propTypes } from '/@/utils/propTypes'; |
24 | import { useMenuItem } from './useMenu'; | 23 | import { useMenuItem } from './useMenu'; |
src/components/SimpleMenu/src/components/SubMenuItem.vue
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | import { useMenuItem } from './useMenu'; | 75 | import { useMenuItem } from './useMenu'; |
76 | import { useSimpleRootMenuContext } from './useSimpleMenuContext'; | 76 | import { useSimpleRootMenuContext } from './useSimpleMenuContext'; |
77 | import { CollapseTransition } from '/@/components/Transition'; | 77 | import { CollapseTransition } from '/@/components/Transition'; |
78 | - import { Icon } from '/@/components/Icon'; | 78 | + import Icon from '/@/components/Icon'; |
79 | import { Popover } from 'ant-design-vue'; | 79 | import { Popover } from 'ant-design-vue'; |
80 | import { isBoolean, isObject } from '/@/utils/is'; | 80 | import { isBoolean, isObject } from '/@/utils/is'; |
81 | import { mitt } from '/@/utils/mitt'; | 81 | import { mitt } from '/@/utils/mitt'; |
src/components/Table/src/components/TableAction.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | import { defineComponent, PropType, computed, toRaw, unref } from 'vue'; | 34 | import { defineComponent, PropType, computed, toRaw, unref } from 'vue'; |
35 | import { MoreOutlined } from '@ant-design/icons-vue'; | 35 | import { MoreOutlined } from '@ant-design/icons-vue'; |
36 | import { Divider, Tooltip, TooltipProps } from 'ant-design-vue'; | 36 | import { Divider, Tooltip, TooltipProps } from 'ant-design-vue'; |
37 | - import { Icon } from '/@/components/Icon'; | 37 | + import Icon from '/@/components/Icon/index'; |
38 | import { ActionItem, TableActionType } from '/@/components/Table'; | 38 | import { ActionItem, TableActionType } from '/@/components/Table'; |
39 | import { PopConfirmButton } from '/@/components/Button'; | 39 | import { PopConfirmButton } from '/@/components/Button'; |
40 | import { Dropdown } from '/@/components/Dropdown'; | 40 | import { Dropdown } from '/@/components/Dropdown'; |
src/layouts/default/header/components/Breadcrumb.vue
@@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
21 | import { defineComponent, ref, watchEffect } from 'vue'; | 21 | import { defineComponent, ref, watchEffect } from 'vue'; |
22 | 22 | ||
23 | import { Breadcrumb } from 'ant-design-vue'; | 23 | import { Breadcrumb } from 'ant-design-vue'; |
24 | - import { Icon } from '/@/components/Icon'; | 24 | + import Icon from '/@/components/Icon'; |
25 | 25 | ||
26 | import { useDesign } from '/@/hooks/web/useDesign'; | 26 | import { useDesign } from '/@/hooks/web/useDesign'; |
27 | import { useRootSetting } from '/@/hooks/setting/useRootSetting'; | 27 | import { useRootSetting } from '/@/hooks/setting/useRootSetting'; |
src/layouts/default/header/components/ErrorAction.vue
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <script lang="ts"> | 13 | <script lang="ts"> |
14 | import { defineComponent, computed } from 'vue'; | 14 | import { defineComponent, computed } from 'vue'; |
15 | import { Tooltip, Badge } from 'ant-design-vue'; | 15 | import { Tooltip, Badge } from 'ant-design-vue'; |
16 | - import { Icon } from '/@/components/Icon'; | 16 | + import Icon from '/@/components/Icon'; |
17 | 17 | ||
18 | import { useI18n } from '/@/hooks/web/useI18n'; | 18 | import { useI18n } from '/@/hooks/web/useI18n'; |
19 | import { useErrorLogStore } from '/@/store/modules/errorLog'; | 19 | import { useErrorLogStore } from '/@/store/modules/errorLog'; |
src/layouts/default/header/components/user-dropdown/DropMenuItem.vue
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | 11 | ||
12 | import { computed, defineComponent, getCurrentInstance } from 'vue'; | 12 | import { computed, defineComponent, getCurrentInstance } from 'vue'; |
13 | 13 | ||
14 | - import { Icon } from '/@/components/Icon'; | 14 | + import Icon from '/@/components/Icon/index'; |
15 | import { propTypes } from '/@/utils/propTypes'; | 15 | import { propTypes } from '/@/utils/propTypes'; |
16 | 16 | ||
17 | export default defineComponent({ | 17 | export default defineComponent({ |
src/layouts/default/setting/index.vue
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <script lang="ts"> | 7 | <script lang="ts"> |
8 | import { defineComponent } from 'vue'; | 8 | import { defineComponent } from 'vue'; |
9 | import SettingDrawer from './SettingDrawer'; | 9 | import SettingDrawer from './SettingDrawer'; |
10 | - import { Icon } from '/@/components/Icon'; | 10 | + import Icon from '/@/components/Icon'; |
11 | 11 | ||
12 | import { useDrawer } from '/@/components/Drawer'; | 12 | import { useDrawer } from '/@/components/Drawer'; |
13 | 13 |
src/views/demo/page/account/center/Application.vue
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | <script lang="ts"> | 30 | <script lang="ts"> |
31 | import { defineComponent } from 'vue'; | 31 | import { defineComponent } from 'vue'; |
32 | import { List, Card, Row, Col } from 'ant-design-vue'; | 32 | import { List, Card, Row, Col } from 'ant-design-vue'; |
33 | - import { Icon } from '/@/components/Icon'; | 33 | + import Icon from '/@/components/Icon/index'; |
34 | import { applicationList } from './data'; | 34 | import { applicationList } from './data'; |
35 | 35 | ||
36 | export default defineComponent({ | 36 | export default defineComponent({ |
src/views/demo/page/account/center/Article.vue
@@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
42 | <script lang="ts"> | 42 | <script lang="ts"> |
43 | import { defineComponent } from 'vue'; | 43 | import { defineComponent } from 'vue'; |
44 | import { List, Tag } from 'ant-design-vue'; | 44 | import { List, Tag } from 'ant-design-vue'; |
45 | - import { Icon } from '/@/components/Icon'; | 45 | + import Icon from '/@/components/Icon/index'; |
46 | import { actions, articleList } from './data'; | 46 | import { actions, articleList } from './data'; |
47 | 47 | ||
48 | export default defineComponent({ | 48 | export default defineComponent({ |
src/views/demo/page/account/center/index.vue
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | import { Tag, Tabs, Row, Col } from 'ant-design-vue'; | 56 | import { Tag, Tabs, Row, Col } from 'ant-design-vue'; |
57 | import { defineComponent, computed } from 'vue'; | 57 | import { defineComponent, computed } from 'vue'; |
58 | import { CollapseContainer } from '/@/components/Container/index'; | 58 | import { CollapseContainer } from '/@/components/Container/index'; |
59 | - import { Icon } from '/@/components/Icon'; | 59 | + import Icon from '/@/components/Icon/index'; |
60 | import Article from './Article.vue'; | 60 | import Article from './Article.vue'; |
61 | import Application from './Application.vue'; | 61 | import Application from './Application.vue'; |
62 | import Project from './Project.vue'; | 62 | import Project from './Project.vue'; |
src/views/demo/page/account/setting/AccountBind.vue
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | import { List } from 'ant-design-vue'; | 26 | import { List } from 'ant-design-vue'; |
27 | import { defineComponent } from 'vue'; | 27 | import { defineComponent } from 'vue'; |
28 | import { CollapseContainer } from '/@/components/Container/index'; | 28 | import { CollapseContainer } from '/@/components/Container/index'; |
29 | - import { Icon } from '/@/components/Icon'; | 29 | + import Icon from '/@/components/Icon/index'; |
30 | 30 | ||
31 | import { accountBindList } from './data'; | 31 | import { accountBindList } from './data'; |
32 | 32 |
src/views/demo/page/list/basic/index.vue
@@ -51,12 +51,11 @@ | @@ -51,12 +51,11 @@ | ||
51 | </PageWrapper> | 51 | </PageWrapper> |
52 | </template> | 52 | </template> |
53 | <script lang="ts"> | 53 | <script lang="ts"> |
54 | - import { Progress, Row, Col } from 'ant-design-vue'; | 54 | + import { Progress, Row, Col, List } from 'ant-design-vue'; |
55 | import { defineComponent } from 'vue'; | 55 | import { defineComponent } from 'vue'; |
56 | - import { Icon } from '/@/components/Icon'; | 56 | + import Icon from '/@/components/Icon/index'; |
57 | import { cardList } from './data'; | 57 | import { cardList } from './data'; |
58 | import { PageWrapper } from '/@/components/Page'; | 58 | import { PageWrapper } from '/@/components/Page'; |
59 | - import { List } from 'ant-design-vue'; | ||
60 | 59 | ||
61 | export default defineComponent({ | 60 | export default defineComponent({ |
62 | components: { | 61 | components: { |
src/views/demo/page/list/card/index.vue
@@ -34,7 +34,7 @@ | @@ -34,7 +34,7 @@ | ||
34 | </template> | 34 | </template> |
35 | <script lang="ts"> | 35 | <script lang="ts"> |
36 | import { defineComponent } from 'vue'; | 36 | import { defineComponent } from 'vue'; |
37 | - import { Icon } from '/@/components/Icon'; | 37 | + import Icon from '/@/components/Icon/index'; |
38 | import { cardList } from './data'; | 38 | import { cardList } from './data'; |
39 | import { PageWrapper } from '/@/components/Page'; | 39 | import { PageWrapper } from '/@/components/Page'; |
40 | import { Card, Row, Col, List } from 'ant-design-vue'; | 40 | import { Card, Row, Col, List } from 'ant-design-vue'; |
src/views/demo/page/list/search/index.vue
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | <script lang="ts"> | 55 | <script lang="ts"> |
56 | import { Tag, List } from 'ant-design-vue'; | 56 | import { Tag, List } from 'ant-design-vue'; |
57 | import { defineComponent } from 'vue'; | 57 | import { defineComponent } from 'vue'; |
58 | - import { Icon } from '/@/components/Icon'; | 58 | + import Icon from '/@/components/Icon/index'; |
59 | import { BasicForm } from '/@/components/Form/index'; | 59 | import { BasicForm } from '/@/components/Form/index'; |
60 | import { actions, searchList, schemas } from './data'; | 60 | import { actions, searchList, schemas } from './data'; |
61 | import { PageWrapper } from '/@/components/Page'; | 61 | import { PageWrapper } from '/@/components/Page'; |
src/views/form-design/components/VFormDesign/components/FormNodeOperate.vue
@@ -17,7 +17,7 @@ | @@ -17,7 +17,7 @@ | ||
17 | import { IVFormComponent } from '../../../typings/v-form-component'; | 17 | import { IVFormComponent } from '../../../typings/v-form-component'; |
18 | import { remove } from '../../../utils'; | 18 | import { remove } from '../../../utils'; |
19 | import { useFormDesignState } from '../../../hooks/useFormDesignState'; | 19 | import { useFormDesignState } from '../../../hooks/useFormDesignState'; |
20 | - import { Icon } from '/@/components/Icon'; | 20 | + import Icon from '/@/components/Icon/index'; |
21 | 21 | ||
22 | export default defineComponent({ | 22 | export default defineComponent({ |
23 | name: 'FormNodeOperate', | 23 | name: 'FormNodeOperate', |
src/views/form-design/components/VFormDesign/components/FormOptions.vue
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | import { remove } from '../../../utils'; | 38 | import { remove } from '../../../utils'; |
39 | import message from '../../../utils/message'; | 39 | import message from '../../../utils/message'; |
40 | import { Input } from 'ant-design-vue'; | 40 | import { Input } from 'ant-design-vue'; |
41 | - import { Icon } from '/@/components/Icon'; | 41 | + import Icon from '/@/components/Icon/index'; |
42 | 42 | ||
43 | export default defineComponent({ | 43 | export default defineComponent({ |
44 | name: 'FormOptions', | 44 | name: 'FormOptions', |
src/views/form-design/components/VFormDesign/components/RuleProps.vue
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | import { useFormDesignState } from '../../../hooks/useFormDesignState'; | 38 | import { useFormDesignState } from '../../../hooks/useFormDesignState'; |
39 | import { isArray } from 'lodash-es'; | 39 | import { isArray } from 'lodash-es'; |
40 | import { Form, FormItem, AutoComplete, Input } from 'ant-design-vue'; | 40 | import { Form, FormItem, AutoComplete, Input } from 'ant-design-vue'; |
41 | - import { Icon } from '/@/components/Icon'; | 41 | + import Icon from '/@/components/Icon'; |
42 | 42 | ||
43 | export default defineComponent({ | 43 | export default defineComponent({ |
44 | name: 'RuleProps', | 44 | name: 'RuleProps', |
src/views/form-design/components/VFormDesign/modules/Toolbar.vue
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | import { UseRefHistoryReturn } from '@vueuse/core'; | 31 | import { UseRefHistoryReturn } from '@vueuse/core'; |
32 | import { IFormConfig } from '../../../typings/v-form-component'; | 32 | import { IFormConfig } from '../../../typings/v-form-component'; |
33 | import { Tooltip, Divider } from 'ant-design-vue'; | 33 | import { Tooltip, Divider } from 'ant-design-vue'; |
34 | - import { Icon } from '/@/components/Icon'; | 34 | + import Icon from '/@/components/Icon/index'; |
35 | 35 | ||
36 | interface IToolbarsConfig { | 36 | interface IToolbarsConfig { |
37 | type: string; | 37 | type: string; |
src/views/form-design/components/VFormItem/index.vue
@@ -46,8 +46,8 @@ | @@ -46,8 +46,8 @@ | ||
46 | import { asyncComputed } from '@vueuse/core'; | 46 | import { asyncComputed } from '@vueuse/core'; |
47 | import { handleAsyncOptions } from '../../utils'; | 47 | import { handleAsyncOptions } from '../../utils'; |
48 | import { omit } from 'lodash-es'; | 48 | import { omit } from 'lodash-es'; |
49 | + import { type Recordable } from '@vben/types'; | ||
49 | import { Tooltip, FormItem, Divider, Col } from 'ant-design-vue'; | 50 | import { Tooltip, FormItem, Divider, Col } from 'ant-design-vue'; |
50 | - // import FormItem from '/@/components/Form/src/components/FormItem.vue'; | ||
51 | import { Icon } from '/@/components/Icon'; | 51 | import { Icon } from '/@/components/Icon'; |
52 | import { useFormModelState } from '../../hooks/useFormDesignState'; | 52 | import { useFormModelState } from '../../hooks/useFormDesignState'; |
53 | 53 | ||
@@ -142,7 +142,7 @@ | @@ -142,7 +142,7 @@ | ||
142 | newConfig.rules = rules; | 142 | newConfig.rules = rules; |
143 | } | 143 | } |
144 | return newConfig; | 144 | return newConfig; |
145 | - }) as Recordable; | 145 | + }) as Recordable<any>; |
146 | 146 | ||
147 | const componentItem = computed(() => componentMap.get(props.schema.component as string)); | 147 | const componentItem = computed(() => componentMap.get(props.schema.component as string)); |
148 | 148 |