fix: 组件bug修复

This commit is contained in:
JiangQiming 2023-01-04 16:09:13 +08:00
parent ebb0f58be5
commit cb8f393a17
1 changed files with 12 additions and 11 deletions

View File

@ -86,16 +86,10 @@ import GeoComponent from '@/components/GeoComponent/index.vue';
import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable'; import { BASE_API_PATH, TOKEN_KEY } from '@/utils/variable';
import { LocalStore } from '@/utils/comm'; import { LocalStore } from '@/utils/comm';
type valueType = string | number | boolean | undefined; type Emits = {
(e: 'update:modelValue', data: string | number | boolean): void;
interface Prop { };
itemData?: any; const emit = defineEmits<Emits>();
modelValue?: valueType;
}
interface EmitProps {
(e: 'update:modelValue', data: valueType): void;
}
const props = defineProps({ const props = defineProps({
itemData: { itemData: {
@ -107,7 +101,14 @@ const props = defineProps({
default: '', default: '',
}, },
}); });
const emit = defineEmits<EmitProps>(); // type Props = {
// itemData?: Object;
// modelValue?: string | number | boolean;
// };
// const props = withDefaults(defineProps<Props>(), {
// itemData: () => ({ type: 'object' }),
// modelValue: '',
// });
const componentsType = computed(() => { const componentsType = computed(() => {
switch (props.itemData.type) { switch (props.itemData.type) {