feat(视图): 指标卡/文本卡在非编辑状态下可以选中并复制内容 #7726
This commit is contained in:
parent
6d847f7f9b
commit
c8c6fd2ce2
@ -332,7 +332,13 @@ export default {
|
||||
elementMouseDown(e) {
|
||||
// // private 设置当前组件数据及状态
|
||||
this.$store.commit('setClickComponentStatus', true)
|
||||
if (this.config.component !== 'v-text' && this.config.component !== 'rect-shape' && this.config.component !== 'de-input-search' && this.config.component !== 'de-select-grid' && this.config.component !== 'de-number-range' && this.config.component !== 'de-date') {
|
||||
if (this.config.component !== 'v-text' &&
|
||||
this.config.component !== 'rect-shape' &&
|
||||
this.config.component !== 'de-input-search' &&
|
||||
this.config.component !== 'de-select-grid' &&
|
||||
this.config.component !== 'de-number-range' &&
|
||||
this.config.component !== 'de-date' &&
|
||||
(this.config.component === 'user-view' && !['label', 'text'].includes(this.config.propValue?.innerType))) {
|
||||
e.preventDefault()
|
||||
}
|
||||
// 阻止冒泡事件
|
||||
|
||||
@ -120,15 +120,17 @@
|
||||
v-else-if="labelShowFlag"
|
||||
:ref="element.propValue.id"
|
||||
:chart="chart"
|
||||
:in-screen="inScreen"
|
||||
class="table-class"
|
||||
/>
|
||||
<label-normal-text
|
||||
v-else-if="labelTextShowFlag"
|
||||
:ref="element.propValue.id"
|
||||
:chart="chart"
|
||||
class="table-class"
|
||||
:track-menu="trackMenu"
|
||||
:search-count="searchCount"
|
||||
:in-screen="inScreen"
|
||||
class="table-class"
|
||||
@onChartClick="chartClick"
|
||||
@onJumpClick="jumpClick"
|
||||
/>
|
||||
|
||||
@ -54,6 +54,7 @@ import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||
import { CHART_CONT_FAMILY_MAP, DEFAULT_COLOR_CASE, DEFAULT_SIZE, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
||||
import ChartTitleUpdate from '../ChartTitleUpdate.vue'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'LabelNormal',
|
||||
@ -69,6 +70,10 @@ export default {
|
||||
default: function() {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
inScreen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -92,7 +97,8 @@ export default {
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: 'auto'
|
||||
height: 'auto',
|
||||
userSelect: 'none'
|
||||
},
|
||||
label_class: {
|
||||
margin: 0
|
||||
@ -124,7 +130,9 @@ export default {
|
||||
chartInfo() {
|
||||
const { id, title } = this.chart
|
||||
return { id, title }
|
||||
}
|
||||
},
|
||||
...mapState(['editMode']),
|
||||
...mapState('panel', ['mainActiveName'])
|
||||
},
|
||||
watch: {
|
||||
chart() {
|
||||
@ -203,6 +211,9 @@ export default {
|
||||
|
||||
this.content_class.alignItems = customAttr.size.hPosition ? customAttr.size.hPosition : DEFAULT_SIZE.hPosition
|
||||
this.content_class.justifyContent = customAttr.size.vPosition ? customAttr.size.vPosition : DEFAULT_SIZE.vPosition
|
||||
if (!this.inScreen || this.editMode === 'preview' || this.mainActiveName === 'PanelMain') {
|
||||
this.content_class.userSelect = 'text'
|
||||
}
|
||||
this.suffix = customAttr.size.quotaSuffix
|
||||
if (this.suffix) {
|
||||
this.label_suffix_class.fontSize = (customAttr.size.quotaSuffixFontSize ?? DEFAULT_SIZE.quotaSuffixFontSize) + 'px'
|
||||
|
||||
@ -63,6 +63,7 @@ import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar'
|
||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||
import { CHART_CONT_FAMILY_MAP, DEFAULT_SIZE, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
||||
import ChartTitleUpdate from '../ChartTitleUpdate.vue'
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'LabelNormalText',
|
||||
@ -85,6 +86,10 @@ export default {
|
||||
default: function() {
|
||||
return []
|
||||
}
|
||||
},
|
||||
inScreen: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -108,7 +113,8 @@ export default {
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
height: 'auto'
|
||||
height: 'auto',
|
||||
userSelect: 'none'
|
||||
},
|
||||
label_class: {
|
||||
margin: 0
|
||||
@ -145,7 +151,9 @@ export default {
|
||||
chartInfo() {
|
||||
const { id, title } = this.chart
|
||||
return { id, title }
|
||||
}
|
||||
},
|
||||
...mapState(['editMode']),
|
||||
...mapState('panel', ['mainActiveName'])
|
||||
},
|
||||
watch: {
|
||||
chart() {
|
||||
@ -220,6 +228,9 @@ export default {
|
||||
|
||||
this.content_class.alignItems = customAttr.size.hPosition ? customAttr.size.hPosition : DEFAULT_SIZE.hPosition
|
||||
this.content_class.justifyContent = customAttr.size.vPosition ? customAttr.size.vPosition : DEFAULT_SIZE.vPosition
|
||||
if (!this.inScreen || this.editMode === 'preview' || this.mainActiveName === 'PanelMain') {
|
||||
this.content_class.userSelect = 'text'
|
||||
}
|
||||
|
||||
if (!this.dimensionShow) {
|
||||
this.label_space.marginTop = '0px'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user