Unverified 提交 fab98c0d authored 作者: fit2cloud-chenyw's avatar fit2cloud-chenyw 提交者: GitHub

Merge pull request #696 from dataease/pr@dev@fix_表格和文字类型圆角无效

fix: 表格和视图类型圆角无效
<template> <template>
<div ref="tableContainer" :style="bg_class" style="padding: 8px;"> <div ref="tableContainer" :style="bg_class" style="padding: 8px;width: 100%;height: 100%;overflow: hidden;">
<p v-show="title_show" ref="title" :style="title_class">{{ chart.title }}</p> <p v-show="title_show" ref="title" :style="title_class">{{ chart.title }}</p>
<div <div
v-if="chart.data && chart.data.x && chart.data.x.length > 0 && chart.data.series && chart.data.series.length > 0 && chart.data.series[0].data && chart.data.series[0].data.length > 0" v-if="chart.data && chart.data.x && chart.data.x.length > 0 && chart.data.series && chart.data.series.length > 0 && chart.data.series[0].data && chart.data.series[0].data.length > 0"
...@@ -76,9 +76,18 @@ export default { ...@@ -76,9 +76,18 @@ export default {
bg_class: { bg_class: {
background: hexColorToRGBA('#ffffff', 0) background: hexColorToRGBA('#ffffff', 0)
}, },
title_show: true title_show: true,
borderRadius: '0px'
} }
}, },
computed: {
// bg_class() {
// return {
// background: hexColorToRGBA('#ffffff', 0),
// borderRadius: this.borderRadius
// }
// }
},
watch: { watch: {
chart() { chart() {
this.init() this.init()
...@@ -100,6 +109,16 @@ export default { ...@@ -100,6 +109,16 @@ export default {
window.onresize = function() { window.onresize = function() {
that.calcHeight() that.calcHeight()
} }
this.setBackGroundBorder()
},
setBackGroundBorder() {
if (this.chart.customStyle) {
const customStyle = JSON.parse(this.chart.customStyle)
if (customStyle.background) {
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
this.bg_class.borderRadius = this.borderRadius
}
}
}, },
calcHeight() { calcHeight() {
const that = this const that = this
......
<template> <template>
<div ref="tableContainer" :style="bg_class" style="padding: 8px;"> <div ref="tableContainer" :style="bg_class" style="padding: 8px;width: 100%;height: 100%;overflow: hidden;">
<p v-show="title_show" ref="title" :style="title_class">{{ chart.title }}</p> <p v-show="title_show" ref="title" :style="title_class">{{ chart.title }}</p>
<ux-grid <ux-grid
ref="plxTable" ref="plxTable"
...@@ -68,9 +68,10 @@ export default { ...@@ -68,9 +68,10 @@ export default {
fontStyle: 'normal', fontStyle: 'normal',
fontWeight: 'normal' fontWeight: 'normal'
}, },
bg_class: { // bg_class: {
background: hexColorToRGBA('#ffffff', 0) // background: hexColorToRGBA('#ffffff', 0),
}, // borderRadius: this.borderRadius
// },
table_header_class: { table_header_class: {
fontSize: '12px', fontSize: '12px',
color: '#606266', color: '#606266',
...@@ -89,7 +90,16 @@ export default { ...@@ -89,7 +90,16 @@ export default {
background: '#ffffff', background: '#ffffff',
height: '36px' height: '36px'
}, },
title_show: true title_show: true,
borderRadius: '0px'
}
},
computed: {
bg_class() {
return {
background: hexColorToRGBA('#ffffff', 0),
borderRadius: this.borderRadius
}
} }
}, },
watch: { watch: {
...@@ -111,6 +121,15 @@ export default { ...@@ -111,6 +121,15 @@ export default {
this.initData() this.initData()
this.calcHeightDelay() this.calcHeightDelay()
}) })
this.setBackGroundBorder()
},
setBackGroundBorder() {
if (this.chart.customStyle) {
const customStyle = JSON.parse(this.chart.customStyle)
if (customStyle.background) {
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
}
}
}, },
initData() { initData() {
const that = this const that = this
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论