diff --git a/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue b/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue index a8b044646b..45f183f3f8 100644 --- a/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue +++ b/core/frontend/src/views/panel/filter/filterMain/FilterHead.vue @@ -55,6 +55,26 @@ >{{ $t('commons.required') }} + + 当前组件的展示风格为平铺,如果设为非必填,那么组件的展示风格将切换为下拉展示。 +
+ + {{ $t('commons.cancel') }} + {{ $t('commons.confirm') }} + +
+
@@ -77,18 +97,22 @@ export default { }, data() { return { - targets: [] + dialogVisible: false } - }, - computed: { - - }, - - created() { - }, methods: { + sureRequired() { + this.element.options.attrs.required = false + this.dialogVisible = false + }, requiredChange(val) { + if (val === false && (this.element.style.showMode && this.element.style.showMode === 'radio' && !this.element.options.attrs.multiple)) { + this.dialogVisible = true + this.$nextTick(() => { + this.element.options.attrs.required = true + }) + return + } this.$emit('required-change', val) }, getTableName(tableId) {