自定义内容修改

v1.2.0
于肖磊 2025-01-03 10:56:47 +08:00
parent 482e52291d
commit 822233d626
8 changed files with 11 additions and 9 deletions

View File

@ -105,7 +105,7 @@ const is_show = computed(() => {
//
const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom);
// true
if (!isEmpty(condition.field) && !props.isDisplayPanel) {
if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) {
return custom_condition_judg(field_value, condition.type, condition.value);
} else {
return true;

View File

@ -53,7 +53,7 @@ const is_show = computed(() => {
//
const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom);
// true
if (!isEmpty(condition.field) && !isEmpty(condition.type) && !props.isDisplayPanel) {
if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) {
return custom_condition_judg(field_value, condition.type, condition.value);
} else {
return true;

View File

@ -53,8 +53,6 @@ const is_show = computed(() => {
const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom);
// true
if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) {
console.log(condition, !props.isDisplayPanel);
console.log(custom_condition_judg(field_value, condition.type, condition.value));
return custom_condition_judg(field_value, condition.type, condition.value);
} else {
return true;

View File

@ -46,7 +46,7 @@ const is_show = computed(() => {
//
const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom);
// true
if (!isEmpty(condition.field) && !props.isDisplayPanel) {
if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) {
return custom_condition_judg(field_value, condition.type, condition.value);
} else {
return true;

View File

@ -48,7 +48,7 @@ const is_show = computed(() => {
//
const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom);
// true
if (!isEmpty(condition.field) && !props.isDisplayPanel) {
if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) {
return custom_condition_judg(field_value, condition.type, condition.value);
} else {
return true;

View File

@ -64,7 +64,7 @@ const is_show = computed(() => {
//
const field_value = custom_condition_data(condition?.field || '', option[0] || {}, props.sourceList, props.isCustom);
// true
if (!isEmpty(condition.field) && !props.isDisplayPanel) {
if (!isEmpty(condition.field) && !isEmpty(condition.type) && props.isDisplayPanel) {
return custom_condition_judg(field_value, condition.type, condition.value);
} else {
return true;
@ -72,7 +72,7 @@ const is_show = computed(() => {
});
const text_title = computed(() => {
return getTextTitle(form.value, props);
return (form.value?.text_captions || '') + getTextTitle(form.value, props);
});
/**
* 根据表单值和属性获取文本标题

View File

@ -5,6 +5,9 @@
<div class="bg-f5 divider-line" />
<card-container>
<div class="mb-12">文本设置</div>
<el-form-item label="文本标题">
<el-input v-model="form.text_captions" placeholder="请输入文本内容" type="input" clearable></el-input>
</el-form-item>
<el-form-item label="文本内容">
<el-input v-model="form.text_title" placeholder="请输入文本内容" type="textarea" clearable :rows="3" @input="text_change('1')"></el-input>
</el-form-item>
@ -155,7 +158,7 @@ const text_change = (key: string) => {
if (key == '2') {
form.value.text_title = '';
if (form.value.data_source_field.id.length > 0) {
form.value.data_source_field.option = props.options.filter((item) => item.type == 'text' && form.value.data_source_field.id.includes(item.field))
form.value.data_source_field.option = props.options.filter((item) => item.type == 'text' && form.value.data_source_field.id.includes(item.field));
} else {
form.value.data_source_field = {
id: [],

View File

@ -4,6 +4,7 @@ const text_com_data = {
com_width: 150,
com_height: 17,
staging_height: 17,
text_captions: '',
text_title: '文本',
data_source_field: {
id: [],