NEZ-1591 feat: viewport 在页面加载时自动配置
This commit is contained in:
@@ -15,6 +15,9 @@ export default {
|
||||
browserWindowZoom
|
||||
},
|
||||
async created () {
|
||||
if (window.outerWidth <= 1024) { // outerWidth 获取设备宽度
|
||||
document.querySelector('meta[name=viewport]').setAttribute('content', 'width=device-width, initial-scale=' + (1 / window.devicePixelRatio) + ', maximum-scale=1.0, user-scalable=0')
|
||||
}
|
||||
const herfSpiltArr = window.location.href.split('/')
|
||||
if (herfSpiltArr[3] !== '#') {
|
||||
herfSpiltArr[3] = '#'
|
||||
|
||||
@@ -150,13 +150,15 @@ export default {
|
||||
},
|
||||
columnChange (meta, index) {
|
||||
meta.nameIsEditing = false
|
||||
meta.operIsEditing = true
|
||||
const findTime = this.keyList.find(item => item.name === meta.name)
|
||||
this.compareList = findTime.opers
|
||||
this.rule = findTime.rule
|
||||
this.$nextTick(() => {
|
||||
this.$refs.operSelect[0].focus()
|
||||
})
|
||||
if (!meta.oper) {
|
||||
meta.operIsEditing = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.operSelect[0].focus()
|
||||
})
|
||||
}
|
||||
this.$emit('update:valueList', this.metaList)
|
||||
this.$emit('change')
|
||||
},
|
||||
@@ -178,10 +180,12 @@ export default {
|
||||
},
|
||||
operChange (meta, index) {
|
||||
meta.operIsEditing = false
|
||||
meta.valueIsEditing = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.valueInput[0].focus()
|
||||
})
|
||||
if (!meta.value) {
|
||||
meta.valueIsEditing = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.valueInput[0].focus()
|
||||
})
|
||||
}
|
||||
this.$emit('update:valueList', this.metaList)
|
||||
this.$emit('change')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user