fix: 过滤组件编辑状态选择多个选项无法被选中
This commit is contained in:
parent
9bdbd2c0f9
commit
f27dd9483a
@ -45,7 +45,6 @@
|
||||
</div> -->
|
||||
<div class="first-element">
|
||||
<div
|
||||
v-clickoutside="lostFocus"
|
||||
:class="element.component === 'de-select-grid' ? 'first-element-grid-container': ''"
|
||||
:style="deSelectGridBg"
|
||||
class="first-element-container"
|
||||
@ -78,14 +77,10 @@
|
||||
|
||||
<script>
|
||||
import inputStyleMixin from '@/components/widget/deWidget/inputStyleMixin'
|
||||
import clickoutside from 'element-ui/src/utils/clickoutside.js'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'DeOutWidget',
|
||||
directives: {
|
||||
clickoutside
|
||||
},
|
||||
mixins: [inputStyleMixin],
|
||||
props: {
|
||||
canvasId: {
|
||||
@ -201,9 +196,6 @@ export default {
|
||||
this.$set(this.element.style, 'innerBgColor', innerBgColor || '')
|
||||
},
|
||||
methods: {
|
||||
lostFocus() {
|
||||
this.$refs['deOutWidget'].selectOnScroll?.()
|
||||
},
|
||||
filterLoaded(p) {
|
||||
this.$emit('filter-loaded', p)
|
||||
},
|
||||
|
||||
@ -116,6 +116,7 @@ import EditBar from '@/components/canvas/components/editor/EditBar'
|
||||
import MobileCheckBar from '@/components/canvas/components/editor/MobileCheckBar'
|
||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||
import { imgUrlTrans } from '@/components/canvas/utils/utils'
|
||||
import bus from '@/utils/bus'
|
||||
|
||||
let eventsFor = events.mouse
|
||||
|
||||
@ -717,6 +718,7 @@ export default {
|
||||
active(val) {
|
||||
this.enabled = val
|
||||
if (val) {
|
||||
bus.$emit('select-pop-change', this.element.id)
|
||||
this.$emit('activated')
|
||||
} else {
|
||||
this.$emit('deactivated')
|
||||
|
||||
@ -267,17 +267,21 @@ export default {
|
||||
|
||||
mounted() {
|
||||
bus.$on('onScroll', this.onScroll)
|
||||
bus.$on('select-pop-change', this.popChange)
|
||||
if (this.inDraw) {
|
||||
bus.$on('reset-default-value', this.resetDefaultValue)
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
bus.$off('select-pop-change', this.popChange)
|
||||
bus.$off('onScroll', this.onScroll)
|
||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||
},
|
||||
methods: {
|
||||
selectOnScroll() {
|
||||
this.onScroll()
|
||||
popChange(id) {
|
||||
if (id !== this.element.id) {
|
||||
this.onScroll()
|
||||
}
|
||||
},
|
||||
clearDefault(optionList) {
|
||||
const emptyOption = !optionList?.length
|
||||
|
||||
Loading…
Reference in New Issue
Block a user