mirror of
https://github.com/dataease/dataease.git
synced 2025-02-25 20:42:55 +08:00
Merge pull request #2249 from dataease/pr@dev@fix_panel_filter_title_position
feat: 仪表板条件组件设置标题位置
This commit is contained in:
commit
88df12a3cf
@ -150,6 +150,12 @@
|
|||||||
<tab-style :style-info="styleInfo" />
|
<tab-style :style-info="styleInfo" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-if="attrShow('titlePostion')" style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;">
|
||||||
|
<el-tooltip content="标题位置">
|
||||||
|
<title-postion :style-info="styleInfo" />
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
<!--tab 内部组件样式-->
|
<!--tab 内部组件样式-->
|
||||||
<div v-if="attrTabShow('videoLinks')" style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;">
|
<div v-if="attrTabShow('videoLinks')" style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;">
|
||||||
<el-tooltip content="视频信息">
|
<el-tooltip content="视频信息">
|
||||||
@ -264,7 +270,8 @@ export default {
|
|||||||
'fontSize',
|
'fontSize',
|
||||||
'fontWeight',
|
'fontWeight',
|
||||||
'letterSpacing',
|
'letterSpacing',
|
||||||
'color'
|
'color',
|
||||||
|
'titlePostion'
|
||||||
],
|
],
|
||||||
// tab组件显示的属性
|
// tab组件显示的属性
|
||||||
'de-tabs': [
|
'de-tabs': [
|
||||||
|
67
frontend/src/components/widget/DeWidget/TitlePostion.vue
Normal file
67
frontend/src/components/widget/DeWidget/TitlePostion.vue
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<el-popover
|
||||||
|
placement="right"
|
||||||
|
trigger="click"
|
||||||
|
>
|
||||||
|
<el-col>
|
||||||
|
<el-form ref="tabsStyleForm" :model="styleInfo" label-width="80px" size="mini" class="demo-form-inline">
|
||||||
|
<el-form-item :label="$t('chart.text_h_position')" class="form-item">
|
||||||
|
<el-radio-group v-model="styleInfo.hPosition" size="mini" @change="styleChange">
|
||||||
|
<el-radio-button label="left">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||||
|
<el-radio-button label="center">{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||||
|
<el-radio-button label="right">{{ $t('chart.text_pos_right') }}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t('chart.text_v_position')" class="form-item">
|
||||||
|
<el-radio-group v-model="styleInfo.vPosition" size="mini" @change="styleChange">
|
||||||
|
<el-radio-button label="top">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||||
|
<el-radio-button label="center">{{ $t('chart.text_pos_center') }}</el-radio-button>
|
||||||
|
<el-radio-button label="bottom">{{ $t('chart.text_pos_bottom') }}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</el-form>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<i slot="reference" class="iconfont icon-tabs" />
|
||||||
|
</el-popover>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
|
||||||
|
name: 'TitlePosition',
|
||||||
|
props: {
|
||||||
|
styleInfo: {
|
||||||
|
type: Object,
|
||||||
|
default: null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
defaultPosition: {
|
||||||
|
hPosition: 'left',
|
||||||
|
vPosition: 'center'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
styleChange() {
|
||||||
|
this.$store.commit('recordStyleChange')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -37,7 +37,9 @@ const drawPanel = {
|
|||||||
lineHeight: '',
|
lineHeight: '',
|
||||||
letterSpacing: 0,
|
letterSpacing: 0,
|
||||||
textAlign: '',
|
textAlign: '',
|
||||||
color: ''
|
color: '',
|
||||||
|
hPosition: 'left',
|
||||||
|
vPosition: 'center'
|
||||||
},
|
},
|
||||||
component: 'de-select'
|
component: 'de-select'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user