This commit is contained in:
parent
9f8e010534
commit
553ee9c7ae
|
|
@ -61,7 +61,8 @@
|
||||||
import { computed, unref, ref, watch, nextTick } from 'vue';
|
import { computed, unref, ref, watch, nextTick } from 'vue';
|
||||||
import { SearchOutlined } from '@ant-design/icons-vue';
|
import { SearchOutlined } from '@ant-design/icons-vue';
|
||||||
import AppSearchFooter from './AppSearchFooter.vue';
|
import AppSearchFooter from './AppSearchFooter.vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
|
// @ts-ignore
|
||||||
import vClickOutside from '/@/directives/clickOutside';
|
import vClickOutside from '/@/directives/clickOutside';
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
import { useRefs } from '@vben/hooks';
|
import { useRefs } from '@vben/hooks';
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
import { onClickOutside } from '@vueuse/core';
|
import { onClickOutside } from '@vueuse/core';
|
||||||
|
|
||||||
const emit = defineEmits(['mounted', 'clickOutside']);
|
const emit = defineEmits(['mounted', 'clickOutside']);
|
||||||
const wrap = ref<ElRef>(null);
|
const wrap = ref(null);
|
||||||
|
|
||||||
onClickOutside(wrap, () => {
|
onClickOutside(wrap, () => {
|
||||||
emit('clickOutside');
|
emit('clickOutside');
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import type { ContextMenuItem, ItemContentProps, Axis } from './typing';
|
import type { ContextMenuItem, ItemContentProps, Axis } from './typing';
|
||||||
import type { FunctionalComponent, CSSProperties, PropType } from 'vue';
|
import type { FunctionalComponent, CSSProperties, PropType } from 'vue';
|
||||||
import { defineComponent, nextTick, onMounted, computed, ref, unref, onUnmounted } from 'vue';
|
import { defineComponent, nextTick, onMounted, computed, ref, unref, onUnmounted } from 'vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
import { Menu, Divider } from 'ant-design-vue';
|
import { Menu, Divider } from 'ant-design-vue';
|
||||||
|
|
||||||
const prefixCls = 'context-menu';
|
const prefixCls = 'context-menu';
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import type { ButtonProps } from '/@/components/Button';
|
import type { ButtonProps } from '/@/components/Button';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
|
|
||||||
const props = {
|
const props = {
|
||||||
width: { type: [String, Number], default: '200px' },
|
width: { type: [String, Number], default: '200px' },
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
</a-cascader>
|
</a-cascader>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { type Recordable } from '@vben/types';
|
||||||
import { defineComponent, PropType, ref, unref, watch, watchEffect } from 'vue';
|
import { defineComponent, PropType, ref, unref, watch, watchEffect } from 'vue';
|
||||||
import { Cascader } from 'ant-design-vue';
|
import { Cascader } from 'ant-design-vue';
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
|
|
@ -46,7 +47,7 @@
|
||||||
type: Array,
|
type: Array,
|
||||||
},
|
},
|
||||||
api: {
|
api: {
|
||||||
type: Function as PropType<(arg?: Recordable) => Promise<Option[]>>,
|
type: Function as PropType<(arg?: Recordable<any>) => Promise<Option[]>>,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
numberToString: propTypes.bool,
|
numberToString: propTypes.bool,
|
||||||
|
|
@ -58,12 +59,12 @@
|
||||||
immediate: propTypes.bool.def(true),
|
immediate: propTypes.bool.def(true),
|
||||||
// init fetch params
|
// init fetch params
|
||||||
initFetchParams: {
|
initFetchParams: {
|
||||||
type: Object as PropType<Recordable>,
|
type: Object as PropType<Recordable<any>>,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
// 是否有下级,默认是
|
// 是否有下级,默认是
|
||||||
isLeaf: {
|
isLeaf: {
|
||||||
type: Function as PropType<(arg: Recordable) => boolean>,
|
type: Function as PropType<(arg: Recordable<any>) => boolean>,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
displayRenderArray: {
|
displayRenderArray: {
|
||||||
|
|
@ -92,7 +93,7 @@
|
||||||
|
|
||||||
function generatorOptions(options: any[]): Option[] {
|
function generatorOptions(options: any[]): Option[] {
|
||||||
const { labelField, valueField, numberToString, childrenField, isLeaf } = props;
|
const { labelField, valueField, numberToString, childrenField, isLeaf } = props;
|
||||||
return options.reduce((prev, next: Recordable) => {
|
return options.reduce((prev, next: Recordable<any>) => {
|
||||||
if (next) {
|
if (next) {
|
||||||
const value = next[valueField];
|
const value = next[valueField];
|
||||||
const item = {
|
const item = {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, watch, ref, onMounted, unref } from 'vue';
|
import { type Recordable, type AnyFunction } from '@vben/types';
|
||||||
|
import { type PropType, computed, defineComponent, watch, ref, onMounted, unref } from 'vue';
|
||||||
import { Tree } from 'ant-design-vue';
|
import { Tree } from 'ant-design-vue';
|
||||||
import { isArray, isFunction } from '/@/utils/is';
|
import { isArray, isFunction } from '/@/utils/is';
|
||||||
import { get } from 'lodash-es';
|
import { get } from 'lodash-es';
|
||||||
|
|
@ -21,15 +22,15 @@
|
||||||
name: 'ApiTree',
|
name: 'ApiTree',
|
||||||
components: { ATree: Tree, LoadingOutlined },
|
components: { ATree: Tree, LoadingOutlined },
|
||||||
props: {
|
props: {
|
||||||
api: { type: Function as PropType<(arg?: Recordable) => Promise<Recordable>> },
|
api: { type: Function as PropType<(arg?: Recordable<any>) => Promise<Recordable<any>>> },
|
||||||
params: { type: Object },
|
params: { type: Object },
|
||||||
immediate: { type: Boolean, default: true },
|
immediate: { type: Boolean, default: true },
|
||||||
resultField: propTypes.string.def(''),
|
resultField: propTypes.string.def(''),
|
||||||
afterFetch: { type: Function as PropType<Fn> },
|
afterFetch: { type: Function as PropType<AnyFunction> },
|
||||||
},
|
},
|
||||||
emits: ['options-change', 'change'],
|
emits: ['options-change', 'change'],
|
||||||
setup(props, { attrs, emit }) {
|
setup(props, { attrs, emit }) {
|
||||||
const treeData = ref<Recordable[]>([]);
|
const treeData = ref<Recordable<any>[]>([]);
|
||||||
const isFirstLoaded = ref<Boolean>(false);
|
const isFirstLoaded = ref<Boolean>(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const getAttrs = computed(() => {
|
const getAttrs = computed(() => {
|
||||||
|
|
@ -81,7 +82,7 @@
|
||||||
if (!isArray(result)) {
|
if (!isArray(result)) {
|
||||||
result = get(result, props.resultField);
|
result = get(result, props.resultField);
|
||||||
}
|
}
|
||||||
treeData.value = (result as Recordable[]) || [];
|
treeData.value = (result as Recordable<any>[]) || [];
|
||||||
isFirstLoaded.value = true;
|
isFirstLoaded.value = true;
|
||||||
emit('options-change', treeData.value);
|
emit('options-change', treeData.value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent, watch, ref, onMounted, unref } from 'vue';
|
import { type Recordable } from '@vben/types';
|
||||||
|
import { type PropType, computed, defineComponent, watch, ref, onMounted, unref } from 'vue';
|
||||||
import { TreeSelect } from 'ant-design-vue';
|
import { TreeSelect } from 'ant-design-vue';
|
||||||
import { isArray, isFunction } from '/@/utils/is';
|
import { isArray, isFunction } from '/@/utils/is';
|
||||||
import { get } from 'lodash-es';
|
import { get } from 'lodash-es';
|
||||||
|
|
@ -21,14 +22,14 @@
|
||||||
name: 'ApiTreeSelect',
|
name: 'ApiTreeSelect',
|
||||||
components: { ATreeSelect: TreeSelect, LoadingOutlined },
|
components: { ATreeSelect: TreeSelect, LoadingOutlined },
|
||||||
props: {
|
props: {
|
||||||
api: { type: Function as PropType<(arg?: Recordable) => Promise<Recordable>> },
|
api: { type: Function as PropType<(arg?: Recordable<any>) => Promise<Recordable<any>>> },
|
||||||
params: { type: Object },
|
params: { type: Object },
|
||||||
immediate: { type: Boolean, default: true },
|
immediate: { type: Boolean, default: true },
|
||||||
resultField: propTypes.string.def(''),
|
resultField: propTypes.string.def(''),
|
||||||
},
|
},
|
||||||
emits: ['options-change', 'change'],
|
emits: ['options-change', 'change'],
|
||||||
setup(props, { attrs, emit }) {
|
setup(props, { attrs, emit }) {
|
||||||
const treeData = ref<Recordable[]>([]);
|
const treeData = ref<Recordable<any>[]>([]);
|
||||||
const isFirstLoaded = ref<Boolean>(false);
|
const isFirstLoaded = ref<Boolean>(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const getAttrs = computed(() => {
|
const getAttrs = computed(() => {
|
||||||
|
|
@ -77,7 +78,7 @@
|
||||||
if (!isArray(result)) {
|
if (!isArray(result)) {
|
||||||
result = get(result, props.resultField);
|
result = get(result, props.resultField);
|
||||||
}
|
}
|
||||||
treeData.value = (result as Recordable[]) || [];
|
treeData.value = (result as Recordable<any>[]) || [];
|
||||||
isFirstLoaded.value = true;
|
isFirstLoaded.value = true;
|
||||||
emit('options-change', treeData.value);
|
emit('options-change', treeData.value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
<script lang="tsx">
|
<script lang="tsx">
|
||||||
|
import { type Recordable, type Nullable } from '@vben/types';
|
||||||
import type { PropType, Ref } from 'vue';
|
import type { PropType, Ref } from 'vue';
|
||||||
import { computed, defineComponent, toRefs, unref } from 'vue';
|
import { computed, defineComponent, toRefs, unref } from 'vue';
|
||||||
import type { FormActionType, FormProps, FormSchema } from '../types/form';
|
import type { FormActionType, FormProps, FormSchema } from '../types/form';
|
||||||
import type { Rule } from 'ant-design-vue/lib/form';
|
import type { ValidationRule } from 'ant-design-vue/lib/form/Form';
|
||||||
import type { TableActionType } from '/@/components/Table';
|
import type { TableActionType } from '/@/components/Table';
|
||||||
import { Col, Divider, Form } from 'ant-design-vue';
|
import { Col, Divider, Form } from 'ant-design-vue';
|
||||||
import { componentMap } from '../componentMap';
|
import { componentMap } from '../componentMap';
|
||||||
|
|
@ -31,11 +32,11 @@
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
allDefaultValues: {
|
allDefaultValues: {
|
||||||
type: Object as PropType<Recordable>,
|
type: Object as PropType<Recordable<any>>,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
formModel: {
|
formModel: {
|
||||||
type: Object as PropType<Recordable>,
|
type: Object as PropType<Recordable<any>>,
|
||||||
default: () => ({}),
|
default: () => ({}),
|
||||||
},
|
},
|
||||||
setFormModel: {
|
setFormModel: {
|
||||||
|
|
@ -72,7 +73,7 @@
|
||||||
...mergeDynamicData,
|
...mergeDynamicData,
|
||||||
...allDefaultValues,
|
...allDefaultValues,
|
||||||
...formModel,
|
...formModel,
|
||||||
} as Recordable,
|
} as Recordable<any>,
|
||||||
schema: schema,
|
schema: schema,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
@ -93,7 +94,7 @@
|
||||||
componentProps,
|
componentProps,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return componentProps as Recordable;
|
return componentProps as Recordable<any>;
|
||||||
});
|
});
|
||||||
|
|
||||||
const getDisable = computed(() => {
|
const getDisable = computed(() => {
|
||||||
|
|
@ -138,7 +139,7 @@
|
||||||
return { isShow, isIfShow };
|
return { isShow, isIfShow };
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleRules(): Rule[] {
|
function handleRules(): ValidationRule[] {
|
||||||
const {
|
const {
|
||||||
rules: defRules = [],
|
rules: defRules = [],
|
||||||
component,
|
component,
|
||||||
|
|
@ -149,10 +150,10 @@
|
||||||
} = props.schema;
|
} = props.schema;
|
||||||
|
|
||||||
if (isFunction(dynamicRules)) {
|
if (isFunction(dynamicRules)) {
|
||||||
return dynamicRules(unref(getValues)) as Rule[];
|
return dynamicRules(unref(getValues)) as ValidationRule[];
|
||||||
}
|
}
|
||||||
|
|
||||||
let rules: Rule[] = cloneDeep(defRules) as Rule[];
|
let rules: ValidationRule[] = cloneDeep(defRules) as ValidationRule[];
|
||||||
const { rulesMessageJoinLabel: globalRulesMessageJoinLabel } = props.formProps;
|
const { rulesMessageJoinLabel: globalRulesMessageJoinLabel } = props.formProps;
|
||||||
|
|
||||||
const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel')
|
const joinLabel = Reflect.has(props.schema, 'rulesMessageJoinLabel')
|
||||||
|
|
@ -235,7 +236,7 @@
|
||||||
if (characterInx !== -1 && !rules[characterInx].validator) {
|
if (characterInx !== -1 && !rules[characterInx].validator) {
|
||||||
rules[characterInx].message =
|
rules[characterInx].message =
|
||||||
rules[characterInx].message ||
|
rules[characterInx].message ||
|
||||||
t('component.form.maxTip', [rules[characterInx].max] as Recordable);
|
t('component.form.maxTip', [rules[characterInx].max] as Recordable<any>);
|
||||||
}
|
}
|
||||||
return rules;
|
return rules;
|
||||||
}
|
}
|
||||||
|
|
@ -254,7 +255,7 @@
|
||||||
const eventKey = `on${upperFirst(changeEvent)}`;
|
const eventKey = `on${upperFirst(changeEvent)}`;
|
||||||
|
|
||||||
const on = {
|
const on = {
|
||||||
[eventKey]: (...args: Nullable<Recordable>[]) => {
|
[eventKey]: (...args: Nullable<Recordable<any>>[]) => {
|
||||||
const [e] = args;
|
const [e] = args;
|
||||||
if (propsData[eventKey]) {
|
if (propsData[eventKey]) {
|
||||||
propsData[eventKey](...args);
|
propsData[eventKey](...args);
|
||||||
|
|
@ -267,7 +268,7 @@
|
||||||
const Comp = componentMap.get(component) as ReturnType<typeof defineComponent>;
|
const Comp = componentMap.get(component) as ReturnType<typeof defineComponent>;
|
||||||
|
|
||||||
const { autoSetPlaceHolder, size } = props.formProps;
|
const { autoSetPlaceHolder, size } = props.formProps;
|
||||||
const propsData: Recordable = {
|
const propsData: Recordable<any> = {
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
getPopupContainer: (trigger: Element) => trigger.parentNode,
|
getPopupContainer: (trigger: Element) => trigger.parentNode,
|
||||||
size,
|
size,
|
||||||
|
|
@ -284,11 +285,11 @@
|
||||||
propsData.codeField = field;
|
propsData.codeField = field;
|
||||||
propsData.formValues = unref(getValues);
|
propsData.formValues = unref(getValues);
|
||||||
|
|
||||||
const bindValue: Recordable = {
|
const bindValue: Recordable<any> = {
|
||||||
[valueField || (isCheck ? 'checked' : 'value')]: props.formModel[field],
|
[valueField || (isCheck ? 'checked' : 'value')]: props.formModel[field],
|
||||||
};
|
};
|
||||||
|
|
||||||
const compAttr: Recordable = {
|
const compAttr: Recordable<any> = {
|
||||||
...propsData,
|
...propsData,
|
||||||
...on,
|
...on,
|
||||||
...bindValue,
|
...bindValue,
|
||||||
|
|
@ -365,7 +366,7 @@
|
||||||
name={field}
|
name={field}
|
||||||
colon={colon}
|
colon={colon}
|
||||||
class={{ 'suffix-item': showSuffix }}
|
class={{ 'suffix-item': showSuffix }}
|
||||||
{...(itemProps as Recordable)}
|
{...(itemProps as Recordable<any>)}
|
||||||
label={renderLabelHelpMessage()}
|
label={renderLabelHelpMessage()}
|
||||||
rules={handleRules()}
|
rules={handleRules()}
|
||||||
labelCol={labelCol}
|
labelCol={labelCol}
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,4 @@ import IconPicker from './src/IconPicker.vue';
|
||||||
|
|
||||||
export { Icon, IconPicker, SvgIcon };
|
export { Icon, IconPicker, SvgIcon };
|
||||||
|
|
||||||
// export default Icon;
|
export default Icon;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, defineComponent } from 'vue';
|
import { computed, defineComponent } from 'vue';
|
||||||
|
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
import { contentProps } from '../props';
|
import { contentProps } from '../props';
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
|
|
||||||
import { basicProps } from '../props';
|
import { basicProps } from '../props';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
||||||
|
|
@ -33,9 +33,17 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { CSSProperties, PropType, provide } from 'vue';
|
import {
|
||||||
|
CSSProperties,
|
||||||
|
PropType,
|
||||||
|
provide,
|
||||||
|
defineComponent,
|
||||||
|
computed,
|
||||||
|
watch,
|
||||||
|
ref,
|
||||||
|
unref,
|
||||||
|
} from 'vue';
|
||||||
|
|
||||||
import { defineComponent, computed, watch, ref, unref } from 'vue';
|
|
||||||
import PageFooter from './PageFooter.vue';
|
import PageFooter from './PageFooter.vue';
|
||||||
|
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
import { defineComponent, computed } from 'vue';
|
import { defineComponent, computed } from 'vue';
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
|
|
||||||
import MenuItem from './components/MenuItem.vue';
|
import MenuItem from './components/MenuItem.vue';
|
||||||
import SubMenu from './components/SubMenuItem.vue';
|
import SubMenu from './components/SubMenuItem.vue';
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { PropType } from 'vue';
|
import { PropType, defineComponent, ref, computed, unref, getCurrentInstance, watch } from 'vue';
|
||||||
import { defineComponent, ref, computed, unref, getCurrentInstance, watch } from 'vue';
|
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
import { useMenuItem } from './useMenu';
|
import { useMenuItem } from './useMenu';
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
import { useMenuItem } from './useMenu';
|
import { useMenuItem } from './useMenu';
|
||||||
import { useSimpleRootMenuContext } from './useSimpleMenuContext';
|
import { useSimpleRootMenuContext } from './useSimpleMenuContext';
|
||||||
import { CollapseTransition } from '/@/components/Transition';
|
import { CollapseTransition } from '/@/components/Transition';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
import { Popover } from 'ant-design-vue';
|
import { Popover } from 'ant-design-vue';
|
||||||
import { isBoolean, isObject } from '/@/utils/is';
|
import { isBoolean, isObject } from '/@/utils/is';
|
||||||
import { mitt } from '/@/utils/mitt';
|
import { mitt } from '/@/utils/mitt';
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
import { defineComponent, PropType, computed, toRaw, unref } from 'vue';
|
import { defineComponent, PropType, computed, toRaw, unref } from 'vue';
|
||||||
import { MoreOutlined } from '@ant-design/icons-vue';
|
import { MoreOutlined } from '@ant-design/icons-vue';
|
||||||
import { Divider, Tooltip, TooltipProps } from 'ant-design-vue';
|
import { Divider, Tooltip, TooltipProps } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { ActionItem, TableActionType } from '/@/components/Table';
|
import { ActionItem, TableActionType } from '/@/components/Table';
|
||||||
import { PopConfirmButton } from '/@/components/Button';
|
import { PopConfirmButton } from '/@/components/Button';
|
||||||
import { Dropdown } from '/@/components/Dropdown';
|
import { Dropdown } from '/@/components/Dropdown';
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
import { defineComponent, ref, watchEffect } from 'vue';
|
import { defineComponent, ref, watchEffect } from 'vue';
|
||||||
|
|
||||||
import { Breadcrumb } from 'ant-design-vue';
|
import { Breadcrumb } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
|
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
|
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, computed } from 'vue';
|
import { defineComponent, computed } from 'vue';
|
||||||
import { Tooltip, Badge } from 'ant-design-vue';
|
import { Tooltip, Badge } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
|
|
||||||
import { useI18n } from '/@/hooks/web/useI18n';
|
import { useI18n } from '/@/hooks/web/useI18n';
|
||||||
import { useErrorLogStore } from '/@/store/modules/errorLog';
|
import { useErrorLogStore } from '/@/store/modules/errorLog';
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
import { computed, defineComponent, getCurrentInstance } from 'vue';
|
import { computed, defineComponent, getCurrentInstance } from 'vue';
|
||||||
|
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import SettingDrawer from './SettingDrawer';
|
import SettingDrawer from './SettingDrawer';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
|
|
||||||
import { useDrawer } from '/@/components/Drawer';
|
import { useDrawer } from '/@/components/Drawer';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { List, Card, Row, Col } from 'ant-design-vue';
|
import { List, Card, Row, Col } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { applicationList } from './data';
|
import { applicationList } from './data';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { List, Tag } from 'ant-design-vue';
|
import { List, Tag } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { actions, articleList } from './data';
|
import { actions, articleList } from './data';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
import { Tag, Tabs, Row, Col } from 'ant-design-vue';
|
import { Tag, Tabs, Row, Col } from 'ant-design-vue';
|
||||||
import { defineComponent, computed } from 'vue';
|
import { defineComponent, computed } from 'vue';
|
||||||
import { CollapseContainer } from '/@/components/Container/index';
|
import { CollapseContainer } from '/@/components/Container/index';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import Article from './Article.vue';
|
import Article from './Article.vue';
|
||||||
import Application from './Application.vue';
|
import Application from './Application.vue';
|
||||||
import Project from './Project.vue';
|
import Project from './Project.vue';
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
import { List } from 'ant-design-vue';
|
import { List } from 'ant-design-vue';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { CollapseContainer } from '/@/components/Container/index';
|
import { CollapseContainer } from '/@/components/Container/index';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
|
|
||||||
import { accountBindList } from './data';
|
import { accountBindList } from './data';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,12 +51,11 @@
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Progress, Row, Col } from 'ant-design-vue';
|
import { Progress, Row, Col, List } from 'ant-design-vue';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { cardList } from './data';
|
import { cardList } from './data';
|
||||||
import { PageWrapper } from '/@/components/Page';
|
import { PageWrapper } from '/@/components/Page';
|
||||||
import { List } from 'ant-design-vue';
|
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { cardList } from './data';
|
import { cardList } from './data';
|
||||||
import { PageWrapper } from '/@/components/Page';
|
import { PageWrapper } from '/@/components/Page';
|
||||||
import { Card, Row, Col, List } from 'ant-design-vue';
|
import { Card, Row, Col, List } from 'ant-design-vue';
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Tag, List } from 'ant-design-vue';
|
import { Tag, List } from 'ant-design-vue';
|
||||||
import { defineComponent } from 'vue';
|
import { defineComponent } from 'vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
import { BasicForm } from '/@/components/Form/index';
|
import { BasicForm } from '/@/components/Form/index';
|
||||||
import { actions, searchList, schemas } from './data';
|
import { actions, searchList, schemas } from './data';
|
||||||
import { PageWrapper } from '/@/components/Page';
|
import { PageWrapper } from '/@/components/Page';
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
import { IVFormComponent } from '../../../typings/v-form-component';
|
import { IVFormComponent } from '../../../typings/v-form-component';
|
||||||
import { remove } from '../../../utils';
|
import { remove } from '../../../utils';
|
||||||
import { useFormDesignState } from '../../../hooks/useFormDesignState';
|
import { useFormDesignState } from '../../../hooks/useFormDesignState';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'FormNodeOperate',
|
name: 'FormNodeOperate',
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
import { remove } from '../../../utils';
|
import { remove } from '../../../utils';
|
||||||
import message from '../../../utils/message';
|
import message from '../../../utils/message';
|
||||||
import { Input } from 'ant-design-vue';
|
import { Input } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'FormOptions',
|
name: 'FormOptions',
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
import { useFormDesignState } from '../../../hooks/useFormDesignState';
|
import { useFormDesignState } from '../../../hooks/useFormDesignState';
|
||||||
import { isArray } from 'lodash-es';
|
import { isArray } from 'lodash-es';
|
||||||
import { Form, FormItem, AutoComplete, Input } from 'ant-design-vue';
|
import { Form, FormItem, AutoComplete, Input } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'RuleProps',
|
name: 'RuleProps',
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
import { UseRefHistoryReturn } from '@vueuse/core';
|
import { UseRefHistoryReturn } from '@vueuse/core';
|
||||||
import { IFormConfig } from '../../../typings/v-form-component';
|
import { IFormConfig } from '../../../typings/v-form-component';
|
||||||
import { Tooltip, Divider } from 'ant-design-vue';
|
import { Tooltip, Divider } from 'ant-design-vue';
|
||||||
import { Icon } from '/@/components/Icon';
|
import Icon from '/@/components/Icon/index';
|
||||||
|
|
||||||
interface IToolbarsConfig {
|
interface IToolbarsConfig {
|
||||||
type: string;
|
type: string;
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,8 @@
|
||||||
import { asyncComputed } from '@vueuse/core';
|
import { asyncComputed } from '@vueuse/core';
|
||||||
import { handleAsyncOptions } from '../../utils';
|
import { handleAsyncOptions } from '../../utils';
|
||||||
import { omit } from 'lodash-es';
|
import { omit } from 'lodash-es';
|
||||||
|
import { type Recordable } from '@vben/types';
|
||||||
import { Tooltip, FormItem, Divider, Col } from 'ant-design-vue';
|
import { Tooltip, FormItem, Divider, Col } from 'ant-design-vue';
|
||||||
// import FormItem from '/@/components/Form/src/components/FormItem.vue';
|
|
||||||
import { Icon } from '/@/components/Icon';
|
import { Icon } from '/@/components/Icon';
|
||||||
import { useFormModelState } from '../../hooks/useFormDesignState';
|
import { useFormModelState } from '../../hooks/useFormDesignState';
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@
|
||||||
newConfig.rules = rules;
|
newConfig.rules = rules;
|
||||||
}
|
}
|
||||||
return newConfig;
|
return newConfig;
|
||||||
}) as Recordable;
|
}) as Recordable<any>;
|
||||||
|
|
||||||
const componentItem = computed(() => componentMap.get(props.schema.component as string));
|
const componentItem = computed(() => componentMap.get(props.schema.component as string));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue