初始化

This commit is contained in:
砂糖
2025-11-08 10:38:36 +08:00
commit 3beeec7296
1626 changed files with 198488 additions and 0 deletions

View File

@@ -0,0 +1,114 @@
<template>
<div
style="width: 100%; height: 100%"
class="bs-design-wrap"
>
<div
:key="updateKey"
class="custom-border-box"
:style="{
'border-color': color,
'border-width': width + 'px',
'background-image': `linear-gradient(${gradientDirection}, ${
gradientColor0 ? gradientColor0 : gradientColor1
} , ${gradientColor1 ? gradientColor1 : gradientColor0})`,
'font-size': fontSize + 'px',
'font-weight': fontWeight,
opacity: opacity === 0 ? 0 : opacity / 100 ,
color: fontColor
}"
>
<span>
{{ text }}
</span>
</div>
</div>
</template>
<script>
import { refreshComponentMixin } from 'data-room-ui/js/mixins/refreshComponent'
export default {
name: 'Border15',
components: {},
mixins: [refreshComponentMixin],
props: {
// 卡片的属性
config: {
type: Object,
default: () => ({})
}
},
data () {
return {}
},
computed: {
text () {
return this.config.customize.text || ''
},
fontWeight () {
return this.config.customize.fontWeight || 400
},
color () {
return this.config.customize.borderColor || '#83bff6'
},
width () {
return this.config.customize.borderWidth || 1
},
gradientColor0 () {
return this.config.customize.gradientColor0 || ''
},
gradientColor1 () {
return this.config.customize.gradientColor1 || ''
},
gradientDirection () {
return this.config.customize.gradientDirection
},
fontSize () {
return this.config.customize.fontSize || 16
},
fontColor () {
return this.config.customize.fontColor || '#fff'
},
opacity () {
return (this.config.customize.opacity === 0 || this.config.customize.opacity) ? this.config.customize.opacity : 100
}
},
watch: {},
mounted () {
},
methods: {}
}
</script>
<style lang="scss" scoped>
.bs-design-wrap {
position: relative;
width: 100%;
height: 100%;
background-color: transparent;
border-radius: 4px;
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1);
box-sizing: border-box;
.custom-border-box {
width: 100%;
height: 100%;
border: 1px solid rgba(131, 191, 246, 0);
border-radius: 50% 50% 50% 50%;
display: flex;
justify-content: center;
align-items: center;
}
}
/*滚动条样式*/
::v-deep ::-webkit-scrollbar {
width: 4px;
border-radius: 4px;
height: 4px;
}
::v-deep ::-webkit-scrollbar-thumb {
background: #dddddd !important;
border-radius: 10px;
}
</style>

View File

@@ -0,0 +1,192 @@
<template>
<div class="bs-setting-wrap">
<el-form
ref="form"
:model="config"
label-width="90px"
label-position="left"
class="setting-body bs-el-form"
>
<slot name="top" />
<el-form
:model="config.customize"
label-position="left"
class="setting-body bs-el-form"
label-width="90px"
>
<SettingTitle>标题</SettingTitle>
<el-form-item label="边框名称" class="lc-field-body">
<el-input
v-model="config.title"
clearable
/>
</el-form-item>
<SettingTitle>位置</SettingTitle>
<div class="lc-field-body">
<PosWhSetting :config="config" />
</div>
<SettingTitle>旋转</SettingTitle>
<div class="lc-field-body">
<RotateSetting
:config="config"
/>
</div>
</el-form>
<SettingTitle>基础</SettingTitle>
<div class="lc-field-body">
<el-form-item label="文本">
<el-input
v-model="config.customize.text"
clearable
/>
</el-form-item>
<el-form-item label="边框线颜色">
<ColorPicker
v-model="config.customize.borderColor"
placeholder="请选择边框线颜色"
:predefine-colors="predefineThemeColors"
/>
</el-form-item>
<el-form-item label="背景色一">
<ColorPicker
v-model="config.customize.gradientColor0"
placeholder="请选择背景色"
:predefine-colors="predefineThemeColors"
/>
</el-form-item>
<el-form-item label="背景色二">
<ColorPicker
v-model="config.customize.gradientColor1"
placeholder="请选择背景色"
:predefine-colors="predefineThemeColors"
/>
</el-form-item>
<el-form-item label="渐变色方向">
<el-select
v-model="config.customize.gradientDirection"
popper-class="bs-el-select"
class="bs-el-select"
>
<el-option
v-for="item in gradientDirection"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="字体颜色">
<ColorPicker
v-model="config.customize.fontColor"
placeholder="请选择背景色"
:predefine-colors="predefineThemeColors"
/>
</el-form-item>
<el-form-item label="边框线宽度">
<el-input-number
v-model="config.customize.borderWidth"
class="bs-el-input-number"
/>
</el-form-item>
<el-form-item label="字体大小">
<el-input-number
v-model="config.customize.fontSize"
class="bs-el-input-number"
:min="12"
:step="1"
/>
</el-form-item>
<el-form-item label="字体粗度">
<el-input-number
v-model="config.customize.fontWeight"
class="bs-el-input-number"
:min="400"
:step="1"
/>
</el-form-item>
<el-form-item label="不透明度">
<el-input-number
v-model="config.customize.opacity"
class="bs-el-input-number"
:min="0"
:max="100"
:step="1"
/>
</el-form-item>
</div>
</el-form>
</div>
</template>
<script>
import ColorPicker from 'data-room-ui/ColorPicker/index.vue'
import PosWhSetting from 'data-room-ui/BigScreenDesign/RightSetting/PosWhSetting.vue'
import RotateSetting from 'data-room-ui/BigScreenDesign/RightSetting/RotateSetting.vue'
import { predefineColors } from 'data-room-ui/js/utils/colorList'
import SettingTitle from 'data-room-ui/SettingTitle/index.vue'
export default {
name: 'Border14Setting',
components: {
SettingTitle,
ColorPicker,
PosWhSetting,
RotateSetting
},
props: {
config: {
type: Object,
required: true
},
predefineThemeColors: {
type: Array,
default: () => predefineColors
}
},
data () {
return {
gradientDirection: [
{
label: '从左到右',
value: 'to right'
},
{
label: '从右到左',
value: 'to left'
},
{
label: '从上到下',
value: 'to bottom'
},
{
label: '从下到上',
value: 'to top'
},
{
label: '从左上到右下',
value: 'to bottom right'
},
{
label: '从右上到左下',
value: 'to bottom left'
},
{
label: '从左下到右上',
value: 'to top right'
},
{
label: '从右下到左上',
value: 'to top left'
}
]
}
},
watch: {},
mounted () {},
methods: {}
}
</script>
<style lang="scss" scoped>
.lc-field-body {
padding: 16px;
}
</style>

View File

@@ -0,0 +1,54 @@
import { commonConfig } from '../../js/config'
export const settingConfig = {
// 设置面板属性的显隐
displayOption: {
dataAllocation: {
// 是否存在数据配置
enable: false
}
}
}
const customConfig = {
type: 'border15',
root: {
// 绕x轴旋转角度
rotateX: 0,
// 绕y轴旋转角度
rotateY: 0,
// 绕z轴旋转角度
rotateZ: 0,
// 透视距离
perspective: 0,
skewX: 0,
skewY: 0
},
customize: {
// 边框线颜色
borderColor: '#87888e',
// 边框线宽度
borderWidth: 2,
// 边框背景颜色
backgroundColor: '#232832',
colorType: 'single',
// 渐变色0值
gradientColor0: '',
// 渐变色1值
gradientColor1: '',
// 渐变色色值改变方向
gradientDirection: 'to right',
// 透明度
opacity: 100,
// 字体大小
fontSize: 40,
// 字体颜色
fontColor: '#fff',
// 字体粗细
fontWeight: 500,
// 中心文本
text: ''
}
}
export const dataConfig = {
...commonConfig(customConfig)
}