You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
<!--
|
|
@ 作者: 秦东
|
|
@ 时间: 2024-09-29 13:46:55
|
|
@ 备注: 级联器
|
|
-->
|
|
<script lang="ts" setup>
|
|
import { stringToObj } from "@/utils/DesignForm/form";
|
|
const props = withDefaults(
|
|
defineProps<{
|
|
modelValue?: string;
|
|
disabled?: boolean;
|
|
action?: string;
|
|
name?: string;
|
|
fileList?: Object;
|
|
control?: Object;
|
|
config?: Object;
|
|
data?: Object;
|
|
options?: Object;
|
|
}>(),
|
|
{}
|
|
);
|
|
const emits = defineEmits<{
|
|
(e: "update:modelValue", value: string): void;
|
|
}>();
|
|
const value = computed({
|
|
get: () => {
|
|
console.log("图片上传处理-112->", props.modelValue, stringToObj(props.modelValue));
|
|
return stringToObj(props.modelValue);
|
|
},
|
|
set: (newVal: any) => {
|
|
emits("update:modelValue", newVal);
|
|
return newVal;
|
|
},
|
|
});
|
|
const handleChange = () => {};
|
|
const cascaderProps = {
|
|
label: "label",
|
|
value: "value",
|
|
children: "children",
|
|
};
|
|
</script>
|
|
<template>
|
|
<el-cascader
|
|
v-model="value"
|
|
:options="props.options"
|
|
clearable
|
|
:props="cascaderProps"
|
|
@change="handleChange"
|
|
/>
|
|
</template>
|
|
<style lang="scss" scoped></style>
|
|
|