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.
50 lines
1.0 KiB
50 lines
1.0 KiB
<!--
|
|
@ 作者: 秦东
|
|
@ 时间: 2024-12-03 14:29:45
|
|
@ 备注: 树型组件
|
|
-->
|
|
<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-tree-select
|
|
v-model="value"
|
|
:data="props.data"
|
|
clearable
|
|
:render-after-expand="false"
|
|
/>
|
|
</template>
|
|
<style lang="scss" scoped></style>
|
|
|