Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
85a6f1ae
提交
85a6f1ae
authored
2月 02, 2022
作者:
junjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: S2
上级
52a976c8
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
54 行增加
和
5 行删除
+54
-5
common_table.js
frontend/src/views/chart/chart/common/common_table.js
+43
-4
SizeSelectorAntV.vue
...rc/views/chart/components/shape-attr/SizeSelectorAntV.vue
+11
-1
没有找到文件。
frontend/src/views/chart/chart/common/common_table.js
浏览文件 @
85a6f1ae
import
{
hexColorToRGBA
}
from
'@/views/chart/chart/util'
import
{
DEFAULT_COLOR_CASE
,
DEFAULT_SIZE
}
from
'@/views/chart/chart/chart'
export
function
getCustomTheme
(
chart
)
{
const
theme
=
{}
const
background
=
{
color
:
'#00000000'
const
theme
=
{
background
:
{
color
:
'#00000000'
},
colCell
:
{
cell
:
{
backgroundColor
:
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableHeaderBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
},
bolderText
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableTitleFontSize
}
},
dataCell
:
{
cell
:
{
backgroundColor
:
hexColorToRGBA
(
DEFAULT_COLOR_CASE
.
tableItemBgColor
,
DEFAULT_COLOR_CASE
.
alpha
)
},
text
:
{
fill
:
DEFAULT_COLOR_CASE
.
tableFontColor
,
fontSize
:
DEFAULT_SIZE
.
tableItemFontSize
}
}
}
let
customAttr
=
{}
if
(
chart
.
customAttr
)
{
customAttr
=
JSON
.
parse
(
chart
.
customAttr
)
// color
if
(
customAttr
.
color
)
{
const
c
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
color
))
theme
.
colCell
.
cell
.
backgroundColor
=
hexColorToRGBA
(
c
.
tableHeaderBgColor
,
c
.
alpha
)
theme
.
colCell
.
bolderText
.
fill
=
c
.
tableFontColor
theme
.
dataCell
.
cell
.
backgroundColor
=
hexColorToRGBA
(
c
.
tableItemBgColor
,
c
.
alpha
)
theme
.
dataCell
.
text
.
fill
=
c
.
tableFontColor
}
// size
if
(
customAttr
.
size
)
{
const
s
=
JSON
.
parse
(
JSON
.
stringify
(
customAttr
.
size
))
theme
.
colCell
.
bolderText
.
fontSize
=
parseInt
(
s
.
tableTitleFontSize
)
theme
.
dataCell
.
text
.
fontSize
=
parseInt
(
s
.
tableItemFontSize
)
}
}
theme
.
background
=
background
return
theme
}
...
...
frontend/src/views/chart/components/shape-attr/SizeSelectorAntV.vue
浏览文件 @
85a6f1ae
...
...
@@ -110,8 +110,18 @@
<el-form-item
:label=
"$t('chart.table_column_width_config')"
class=
"form-item"
>
<el-radio-group
v-model=
"sizeForm.tableColumnMode"
@
change=
"changeBarSizeCase"
>
<el-radio
label=
"adapt"
><span>
{{
$t
(
'chart.table_column_adapt'
)
}}
</span></el-radio>
<el-radio
label=
"custom"
><span>
{{
$t
(
'chart.table_column_custom'
)
}}
</span></el-radio>
<el-radio
label=
"custom"
>
<span>
{{
$t
(
'chart.table_column_custom'
)
}}
</span>
</el-radio>
</el-radio-group>
<el-tooltip
class=
"item"
effect=
"dark"
placement=
"bottom"
>
<div
slot=
"content"
>
列宽并非任何时候都能生效。
<br>
容器宽度优先级高于列宽,即(表格容器宽度 / 列数 > 指定列宽),则列宽优先取(容器宽度 / 列数)。
</div>
<i
class=
"el-icon-info"
style=
"cursor: pointer;color: #606266;margin-left: 4px;"
/>
</el-tooltip>
</el-form-item>
<el-form-item
v-show=
"sizeForm.tableColumnMode === 'custom'"
label=
""
class=
"form-item form-item-slider"
>
<el-slider
v-model=
"sizeForm.tableColumnWidth"
:min=
"100"
:max=
"500"
show-input
:show-input-controls=
"false"
input-size=
"mini"
@
change=
"changeBarSizeCase"
/>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论