diff --git a/core/core-frontend/src/custom-component/v-query/Component.vue b/core/core-frontend/src/custom-component/v-query/Component.vue
index c95240831a..ad74d6b265 100644
--- a/core/core-frontend/src/custom-component/v-query/Component.vue
+++ b/core/core-frontend/src/custom-component/v-query/Component.vue
@@ -63,6 +63,8 @@ const canEdit = ref(false)
const queryConfig = ref()
const defaultStyle = {
border: '',
+ placeholder: '请选择',
+ placeholderShow: true,
background: '',
text: '',
layout: 'horizontal',
@@ -151,7 +153,6 @@ const setCustomStyle = val => {
layout,
titleShow,
titleColor,
- textColorShow,
title,
fontSize,
fontWeight,
@@ -164,12 +165,16 @@ const setCustomStyle = val => {
queryConditionSpacing,
labelColorBtn,
btnColor,
+ placeholder,
+ placeholderShow,
labelShow
} = val
customStyle.background = bgColorShow ? bgColor || '' : ''
customStyle.border = borderShow ? borderColor || '' : ''
customStyle.btnList = [...btnList]
customStyle.layout = layout
+ customStyle.placeholderShow = placeholderShow ?? true
+ customStyle.placeholder = placeholder ?? '请选择'
customStyle.titleShow = titleShow
customStyle.titleColor = titleColor
customStyle.labelColor = labelShow ? labelColor || '' : ''
@@ -177,7 +182,7 @@ const setCustomStyle = val => {
customStyle.fontWeight = labelShow ? fontWeight || '' : ''
customStyle.fontStyle = labelShow ? fontStyle || '' : ''
customStyle.title = title
- customStyle.text = textColorShow ? text || '' : ''
+ customStyle.text = customStyle.placeholderShow ? text || '' : ''
customStyle.titleLayout = titleLayout
customStyle.fontSizeBtn = fontSizeBtn || '14'
customStyle.fontWeightBtn = fontWeightBtn
@@ -292,6 +297,13 @@ const getCascadeList = () => {
return props.element.cascade
}
+const getPlaceholder = computed(() => {
+ return {
+ placeholder: customStyle.placeholder,
+ placeholderShow: customStyle.placeholderShow
+ }
+})
+
const isConfirmSearch = id => {
if (componentWithSure.value) return
queryDataForId(id)
@@ -303,6 +315,7 @@ provide('release-unmount-select', releaseSelect)
provide('query-data-for-id', queryDataForId)
provide('com-width', getQueryConditionWidth)
provide('cascade-list', getCascadeList)
+provide('placeholder', getPlaceholder)
onBeforeUnmount(() => {
emitter.off(`addQueryCriteria${element.value.id}`)
diff --git a/core/core-frontend/src/custom-component/v-query/Select.vue b/core/core-frontend/src/custom-component/v-query/Select.vue
index b031cdb7c6..f4bd4a34e5 100644
--- a/core/core-frontend/src/custom-component/v-query/Select.vue
+++ b/core/core-frontend/src/custom-component/v-query/Select.vue
@@ -73,6 +73,7 @@ const loading = ref(false)
const multiple = ref(false)
const options = shallowRef([])
const unMountSelect: Ref = inject('unmount-select')
+const placeholder: Ref = inject('placeholder')
const releaseSelect = inject('release-unmount-select', Function, true)
const queryDataForId = inject('query-data-for-id', Function, true)
const isConfirmSearch = inject('is-confirm-search', Function, true)
@@ -80,6 +81,12 @@ const queryConditionWidth = inject('com-width', Function, true)
const cascadeList = inject('cascade-list', Function, true)
const setCascadeDefault = inject('set-cascade-default', Function, true)
+const placeholderText = computed(() => {
+ if (placeholder.value.placeholderShow) {
+ return placeholder.value.placeholder
+ }
+ return ' '
+})
const cascade = computed(() => {
return cascadeList() || []
})
@@ -583,6 +590,7 @@ defineExpose({
key="multiple"
ref="mult"
v-model="selectValue"
+ :placeholder="placeholderText"
v-loading="loading"
filterable
@change="handleValueChange"
@@ -604,6 +612,7 @@ defineExpose({
v-else
v-model="selectValue"
key="single"
+ :placeholder="placeholderText"
v-loading="loading"
@change="handleValueChange"
clearable
diff --git a/core/core-frontend/src/custom-component/v-query/TextSearch.vue b/core/core-frontend/src/custom-component/v-query/TextSearch.vue
index 5a6e1c706f..b058bafc0b 100644
--- a/core/core-frontend/src/custom-component/v-query/TextSearch.vue
+++ b/core/core-frontend/src/custom-component/v-query/TextSearch.vue
@@ -1,5 +1,5 @@
@@ -166,12 +174,25 @@ if (!chart.value.customStyle.component.hasOwnProperty('labelShow')) {
- 提示文字颜色
+ 提示词
+
+
+