Merge pull request #7390 from dataease/pr@dev@fix_select_first_full_screen
fix: 文本下拉设置首项在全屏模式可能无效
This commit is contained in:
commit
8d07e7039b
@ -501,7 +501,16 @@ export default {
|
||||
if (!this.selectFirst) {
|
||||
return
|
||||
}
|
||||
const defaultV = this.data[0].id
|
||||
let defaultV = this.data[0].id
|
||||
if (this.inDraw) {
|
||||
let lastFilters = null
|
||||
if (this.$store.state.lastValidFilters) {
|
||||
lastFilters = this.$store.state.lastValidFilters[this.element.id]
|
||||
if (lastFilters) {
|
||||
defaultV = lastFilters.val === null ? '' : lastFilters.val.toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.element.options.attrs.multiple) {
|
||||
if (defaultV === null || typeof defaultV === 'undefined' || defaultV === '' || defaultV === '[object Object]') return []
|
||||
this.value = defaultV.split(this.separator)
|
||||
|
||||
@ -121,7 +121,7 @@ export const buildViewKeyFilters = (panelItems, result, isEdit = false) => {
|
||||
// 进行过滤时 如果过滤组件在主画布 则条件适用于所有画布视图 否则需要过滤组件和视图在相同画布
|
||||
if (element.canvasId === 'canvas-main' || element.canvasId === canvasIdMap[viewId]) {
|
||||
const vidMatch = viewIdMatch(condition.viewIds, viewId)
|
||||
if (vidMatch && selectFirst && !element.options.loaded) {
|
||||
if (vidMatch && selectFirst && !element.options.loaded && !lastFilter) {
|
||||
const obj = {}
|
||||
const promise = new Promise(resolve => {
|
||||
cacheCondition(cbParam => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user