修改自定义数据处理
parent
3824350444
commit
36ac7b8fa0
|
|
@ -135,22 +135,10 @@ onBeforeMount(() => {
|
|||
});
|
||||
// 处理显示的图片和传递到下去的数据结构
|
||||
const model_data_source = ref<data_list[]>([]);
|
||||
const is_show_more = ref(false);
|
||||
const processing_data = (key: string) => {
|
||||
const list = options.value.filter((item) => item.type == key);
|
||||
if (list.length > 0) {
|
||||
model_data_source.value = list[0].data;
|
||||
if (!isEmpty(list[0].appoint_data)) {
|
||||
is_show_more.value = false;
|
||||
} else {
|
||||
is_show_more.value = true;
|
||||
// 从中取出包含图片的内容
|
||||
const field_list = list[0].data.filter((item) => item.type == 'images');
|
||||
// 取出图片的key
|
||||
if (field_list.length > 0) {
|
||||
form.img_key = field_list[0].field;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
model_data_source.value = [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ interface content {
|
|||
}interface defaultSearch {
|
||||
content: {
|
||||
height: number;
|
||||
img_key: string;
|
||||
data_source: string;
|
||||
data_source_content: content;
|
||||
custom_list: string[];
|
||||
|
|
@ -19,8 +18,6 @@ const defaultSearch: defaultSearch = {
|
|||
content: {
|
||||
// 自定义内容高度
|
||||
height: 390,
|
||||
// 图片key
|
||||
img_key: '',
|
||||
// 数据源内容
|
||||
data_source_content: {
|
||||
// 存放手动输入的id
|
||||
|
|
|
|||
Loading…
Reference in New Issue