Merge pull request #8459 from dataease/pr@dev_empty_data
feat(过滤组件): 文本下拉组件的选项新增空数据选项
This commit is contained in:
commit
b6c1774942
@ -17,7 +17,7 @@
|
||||
:key-word="keyWord"
|
||||
popper-class="coustom-de-select"
|
||||
:class="{'disabled-close': !inDraw && selectFirst && element.options.attrs.multiple, 'show-required-tips': showRequiredTips}"
|
||||
:list="data"
|
||||
:list="(element.options.attrs.showEmpty ? [{ text: '空数据', id: '_empty_$'}, ...data] : data)"
|
||||
:flag="flag"
|
||||
:is-config="isConfig"
|
||||
:custom-style="customStyle"
|
||||
@ -555,7 +555,7 @@ export default {
|
||||
if (this.isCustomSortWidget && this.element.options.attrs?.sort?.sort === 'custom') {
|
||||
tempData = mergeCustomSortOption(this.element.options.attrs.sort.list, tempData)
|
||||
}
|
||||
this.filterInvalidValue(tempData)
|
||||
this.filterInvalidValue(this.element.options.attrs.showEmpty ? [...tempData, '_empty_$'] : tempData)
|
||||
return tempData.map(item => {
|
||||
return {
|
||||
id: item,
|
||||
|
||||
@ -2282,6 +2282,7 @@ export default {
|
||||
data_list: 'Data list',
|
||||
component_list: 'Component list',
|
||||
custom_scope: 'Target',
|
||||
show_empty: 'Option contains empty data',
|
||||
multiple_choice: 'Multiple choice',
|
||||
show_time: 'Show time',
|
||||
single_choice: 'Single choice',
|
||||
|
||||
@ -2273,6 +2273,7 @@ export default {
|
||||
data_list: '數據列表',
|
||||
component_list: '組件列表',
|
||||
custom_scope: '控製範圍',
|
||||
show_empty: '選項包含空數據',
|
||||
binding_parameters: '參數',
|
||||
multiple_choice: '多選',
|
||||
show_time: '顯示時間',
|
||||
|
||||
@ -2276,6 +2276,7 @@ export default {
|
||||
data_list: '数据列表',
|
||||
component_list: '组件列表',
|
||||
custom_scope: '控制范围',
|
||||
show_empty: '选项包含空数据',
|
||||
binding_parameters: '参数',
|
||||
multiple_choice: '多选',
|
||||
show_time: '显示时间',
|
||||
|
||||
@ -70,6 +70,13 @@
|
||||
<el-col :span="16">
|
||||
<div class="filter-options-right">
|
||||
<span style="padding-right: 10px;">
|
||||
<el-checkbox
|
||||
v-model="attrs.showEmpty"
|
||||
>{{ $t('panel.show_empty') }}
|
||||
</el-checkbox>
|
||||
</span>
|
||||
<span style="padding-right: 10px;">
|
||||
|
||||
<el-checkbox
|
||||
v-model="attrs.showTitle"
|
||||
@change="showTitleChange"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user