Commit cf8db42c authored by Jenny's avatar Jenny

feat: table border

parent f405a929
......@@ -55,17 +55,17 @@
},
computed: {
tableStyle() {
const { frameStyle, frameWidth, frameColor } = this.elementInfo.table
const { frameStyle, frameWidth, frameColor, bordered } = this.elementInfo.table
const { backgroundColor } = this.elementInfo.table.tableCell
return {
'width': `${240 * this.columns.length}rpx`,
'border-left': `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`,
'border-top': `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`,
'border-left': bordered ? `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`: 'none',
'border-top': bordered ? `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`: 'none',
'background-color': backgroundColor
}
},
thStyle() {
const { frameStyle, frameWidth, frameColor } = this.elementInfo.table
const { frameStyle, frameWidth, frameColor, bordered } = this.elementInfo.table
const { headerRowHeight, titleColor, backgroundColor, titlePostion, titleFontSize } = this.elementInfo.table.tableHeader
return {
'lineHeight': `${headerRowHeight}px`,
......@@ -73,12 +73,12 @@
'background-color': backgroundColor,
'font-size': `${this.$u.common.pxToRpx(titleFontSize)}rpx`,
'text-align': titlePostion || 'center',
'border-bottom': `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`,
'border-right': `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`
'border-bottom': bordered ? `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`: 'none',
'border-right': bordered ? `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`: 'none'
}
},
tdStyle() {
const { frameStyle, frameWidth, frameColor } = this.elementInfo.table
const { frameStyle, frameWidth, frameColor, bordered } = this.elementInfo.table
const { titlePostion, titleFontSize, cellRowHeight, titleColor } = this.elementInfo.table.tableCell
return {
'text-align': titlePostion,
......@@ -86,8 +86,8 @@
'font-size': `${titleFontSize || 14}px`,
'lineHeight': `${cellRowHeight || 30}px`,
'color': titleColor,
'border-bottom': `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`,
'border-right': `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`
'border-bottom': bordered ? `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`: 'none',
'border-right': bordered ? `${frameStyle || 'solid'} ${frameWidth || 1}px ${frameColor || '#e4e7ed'}`: 'none'
}
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment