Merge pull request #1525 from dataease/pr@dev@refactor_panel-edit

refactor: 移动端布局等待区域优化地图,时间组件排列方式
This commit is contained in:
王嘉豪 2021-12-27 14:21:51 +08:00 committed by GitHub
commit 14d6e1c21b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div v-if="editMode == 'edit'" class="v-text" @keydown="handleKeydown" @keyup="handleKeyup"> <div v-if="editStatus" class="v-text" @keydown="handleKeydown" @keyup="handleKeyup">
<!-- tabindex >= 0 使得双击时聚集该元素 --> <!-- tabindex >= 0 使得双击时聚集该元素 -->
<div <div
v-if="canEdit" v-if="canEdit"
@ -33,6 +33,7 @@
<script> <script>
import { keycodes } from '@/components/canvas/utils/shortcutKey.js' import { keycodes } from '@/components/canvas/utils/shortcutKey.js'
import { mapState } from 'vuex'
export default { export default {
props: { props: {
@ -65,13 +66,19 @@ export default {
} }
}, },
computed: { computed: {
editStatus() {
return this.editMode === 'edit' && !this.mobileLayoutStatus
},
textInfo() { textInfo() {
if (this.element && this.element.hyperlinks && this.element.hyperlinks.enable) { if (this.element && this.element.hyperlinks && this.element.hyperlinks.enable) {
return "<a title='" + this.element.hyperlinks.content + "' target='" + this.element.hyperlinks.openMode + "' href='" + this.element.hyperlinks.content + "'>" + this.element.propValue + '</a>' return "<a title='" + this.element.hyperlinks.content + "' target='" + this.element.hyperlinks.openMode + "' href='" + this.element.hyperlinks.content + "'>" + this.element.propValue + '</a>'
} else { } else {
return this.element.propValue return this.element.propValue
} }
} },
...mapState([
'mobileLayoutStatus'
])
}, },
watch: { watch: {

View File

@ -1,5 +1,5 @@
<template> <template>
<div style="display: flex;"> <div style="display: flex;position:relative">
<view-track-bar <view-track-bar
ref="viewTrack" ref="viewTrack"
:track-menu="trackMenu" :track-menu="trackMenu"
@ -368,7 +368,7 @@ export default {
position: absolute; position: absolute;
z-index: 999; z-index: 999;
left: 2%; left: 2%;
bottom: 3%; bottom: 5%;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
text-align: center; text-align: center;
padding: 5px; padding: 5px;

View File

@ -70,7 +70,7 @@ export default {
componentItemStyle() { componentItemStyle() {
return { return {
padding: '5px', padding: '5px',
display: 'inline-block', float: 'left',
width: '33%' width: '33%'
} }
}, },