fix: 组件bug修复
This commit is contained in:
parent
ebb0f58be5
commit
cb8f393a17
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue