fix:数字组件初步提交
parent
b9cb723691
commit
f5dc2bd96e
@ -0,0 +1,170 @@
|
||||
<!--
|
||||
* @description: 标题属性设置面板
|
||||
* @Date: 2022-08-17 16:53:28
|
||||
* @Author: shiyi
|
||||
-->
|
||||
<template>
|
||||
<div class="bs-setting-wrap">
|
||||
<el-form
|
||||
ref="form"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
:model="config"
|
||||
:rules="rules"
|
||||
class="bs-el-form"
|
||||
>
|
||||
<SettingTitle>标题</SettingTitle>
|
||||
<div class="bs-setting-wrap">
|
||||
<el-form-item
|
||||
label="标题"
|
||||
label-width="100px"
|
||||
prop="title"
|
||||
>
|
||||
<el-input
|
||||
v-model="config.title"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<SettingTitle>位置</SettingTitle>
|
||||
<div class="lc-field-body">
|
||||
<PosWhSetting :config="config" />
|
||||
</div>
|
||||
<SettingTitle v-if="config.border">
|
||||
边框
|
||||
</SettingTitle>
|
||||
<div class="lc-field-body">
|
||||
<BorderSetting
|
||||
v-if="config.border"
|
||||
label-width="100px"
|
||||
:config="config.border"
|
||||
:big-title="config.title"
|
||||
/>
|
||||
</div>
|
||||
<SettingTitle>旋转</SettingTitle>
|
||||
<div class="lc-field-body">
|
||||
<RotateSetting
|
||||
:config="config"
|
||||
/>
|
||||
</div>
|
||||
<SettingTitle>基础</SettingTitle>
|
||||
<div class="lc-field-body">
|
||||
<el-form-item
|
||||
label="标题字体大小"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input
|
||||
v-model="config.customize.fontSize"
|
||||
placeholder="请输入标题字体大小"
|
||||
clearable
|
||||
>
|
||||
<template slot="append">
|
||||
px
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="标题字体权重"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-input-number
|
||||
v-model="config.customize.fontWeight"
|
||||
class="bs-el-input-number"
|
||||
placeholder="请输入标题字体权重"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="标题字体类型"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-select
|
||||
v-model="config.customize.fontFamily"
|
||||
popper-class="bs-el-select"
|
||||
class="bs-el-select"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in fontFamilyList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<TextGradient v-model="config.customize.color" />
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
|
||||
import BorderSetting from 'data-room-ui/BigScreenDesign/RightSetting/BorderSetting.vue'
|
||||
import TextGradient from 'data-room-ui/BigScreenDesign/RightSetting/TextGradient/index'
|
||||
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
|
||||
import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
|
||||
export default {
|
||||
name: 'TextSetting',
|
||||
components: {
|
||||
TextGradient,
|
||||
PosWhSetting,
|
||||
SettingTitle,
|
||||
BorderSetting,
|
||||
RotateSetting
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
fontFamilyList: [
|
||||
{
|
||||
label: '默认',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
label: '时钟加粗倾斜',
|
||||
value: 'ds-digitalbold_italic'
|
||||
},
|
||||
{
|
||||
label: '时钟加粗正常',
|
||||
value: 'ds-digitalbold'
|
||||
},
|
||||
{
|
||||
label: '时钟倾斜',
|
||||
value: 'ds-digitalitalic'
|
||||
},
|
||||
{
|
||||
label: '时钟正常',
|
||||
value: 'ds-digitalnormal'
|
||||
}],
|
||||
rules: {
|
||||
title: [
|
||||
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
config: {
|
||||
get () {
|
||||
return this.$store.state.bigScreen.activeItemConfig
|
||||
},
|
||||
set (val) {
|
||||
this.$store.state.bigScreen.activeItemConfig = val
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
},
|
||||
mounted () {},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "../../assets/style/settingWrap.scss";
|
||||
.bs-setting-wrap{
|
||||
padding-top: 16px;
|
||||
}
|
||||
.lc-field-body {
|
||||
padding: 12px 16px;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @Author: liu.shiyi
|
||||
* @Date: 2022-10-13 11:18:03
|
||||
* @LastEditTime: 2022-10-13 13:55:11
|
||||
*/
|
||||
import { commonConfig, displayOption } from 'data-room-ui/js/config'
|
||||
|
||||
export const settingConfig = {
|
||||
theme: 'dark',
|
||||
text: '文本标签占位符', // text内容
|
||||
// 设置面板属性的显隐
|
||||
displayOption: {
|
||||
...displayOption,
|
||||
metricField: {
|
||||
// 指标
|
||||
label: '指标',
|
||||
enable: true,
|
||||
multiple: false // 是否多选
|
||||
},
|
||||
dimensionField: {
|
||||
// 维度
|
||||
label: '维度', // 维度/查询字段
|
||||
enable: false,
|
||||
multiple: true // 是否多选
|
||||
},
|
||||
text: { // 文本占位符
|
||||
label: '占位内容', // 维度/查询字段
|
||||
enable: true
|
||||
},
|
||||
expression: { // 文本占位符
|
||||
label: '表达式', // 维度/查询字段
|
||||
enable: true
|
||||
}
|
||||
}
|
||||
}
|
||||
const customConfig = {
|
||||
type: 'numbers',
|
||||
root: {
|
||||
version: '2023071001',
|
||||
url: 'https://www.runoob.com/',
|
||||
expression: 'return ',
|
||||
expressionCodes: [],
|
||||
// 绕x轴旋转角度
|
||||
rotateX: 0,
|
||||
// 绕y轴旋转角度
|
||||
rotateY: 0,
|
||||
// 绕z轴旋转角度
|
||||
rotateZ: 0,
|
||||
// 透视距离
|
||||
perspective: 500
|
||||
},
|
||||
customize: {
|
||||
title: '数字标签占位符',
|
||||
fontSize: 20,
|
||||
fontWeight: 700,
|
||||
fontFamily: '', // 字体类型
|
||||
color: 'left,#ffffff,#ffffff'
|
||||
}
|
||||
|
||||
}
|
||||
export const dataConfig = {
|
||||
...commonConfig(customConfig)
|
||||
}
|
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1697102660694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9751" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M1024 870.4H0V153.6h1024v716.8zM51.2 819.2h921.6V204.8H51.2v614.4z" fill="#4B6EEF" p-id="9752"></path><path d="M128 281.6h102.4v460.8H128zM460.8 281.6h102.4v281.6h-102.4zM793.6 281.6h102.4v307.2h-102.4zM307.2 460.8h102.4v256h-102.4z" fill="#409FFF" p-id="9753"></path><path d="M793.6 460.8h102.4v256h-102.4zM307.2 281.6h204.8v102.4h-204.8zM640 281.6h204.8v102.4h-204.8zM307.2 460.8h204.8v102.4h-204.8z" fill="#409FFF" p-id="9754"></path><path d="M640 460.8h204.8v102.4h-204.8zM307.2 640h256v102.4H307.2zM640 640h256v102.4H640z" fill="#409FFF" p-id="9755"></path></svg>
|
After Width: | Height: | Size: 901 B |
Loading…
Reference in New Issue