mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 19:42:56 +08:00
fix: 仪表板文字组件编辑文字可能保存不上问题
This commit is contained in:
parent
77db760939
commit
db09c658e3
@ -229,7 +229,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
_isMobile() {
|
||||
console.log('navigator.userAgent:' + navigator.userAgent)
|
||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
||||
this.terminal = flag ? 'mobile' : 'pc'
|
||||
// this.terminal = 'mobile'
|
||||
@ -311,7 +310,7 @@ export default {
|
||||
}
|
||||
},
|
||||
handleMouseDown() {
|
||||
this.$store.commit('setClickComponentStatus', fals)
|
||||
this.$store.commit('setClickComponentStatus', false)
|
||||
},
|
||||
initMobileCanvas() {
|
||||
this.$store.commit('openMobileLayout')
|
||||
|
@ -15,7 +15,16 @@
|
||||
@input="handleInput"
|
||||
v-html="element.propValue"
|
||||
/>
|
||||
<div v-if="!canEdit" :style="{ verticalAlign: element.style.verticalAlign }" @dblclick="setEdit" v-html="element.propValue" />
|
||||
<div
|
||||
v-if="!canEdit"
|
||||
:style="{ verticalAlign: element.style.verticalAlign }"
|
||||
@dblclick="setEdit"
|
||||
@paste="clearStyle"
|
||||
@mousedown="handleMousedown"
|
||||
@blur="handleBlur"
|
||||
@input="handleInput"
|
||||
v-html="element.propValue"
|
||||
/>
|
||||
</div>
|
||||
<div v-else class="v-text">
|
||||
<div :style="{ verticalAlign: element.style.verticalAlign }" v-html="textInfo" />
|
||||
@ -75,6 +84,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleInput(e) {
|
||||
this.$store.state.styleChangeTimes++
|
||||
this.$emit('input', this.element, e.target.innerHTML)
|
||||
this.$store.commit('recordStyleChange')
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user