feat:边框组件配置开发

main
liu.tao3 2 years ago
parent a09fc942c8
commit 29150810ae

@ -4,12 +4,14 @@
<el-color-picker <el-color-picker
v-model="startColor" v-model="startColor"
class="bs-el-color-picker" class="bs-el-color-picker"
show-alpha
popper-class="bs-el-color-picker" popper-class="bs-el-color-picker"
/> />
<div class="el-icon-right" /> <div class="el-icon-right" />
<el-color-picker <el-color-picker
v-model="endColor" v-model="endColor"
class="bs-el-color-picker" class="bs-el-color-picker"
show-alpha
popper-class="bs-el-color-picker" popper-class="bs-el-color-picker"
/> />
</div> </div>
@ -37,6 +39,9 @@ export default {
computed: { computed: {
}, },
watch: { watch: {
colors(){
this.init()
},
startColor () { startColor () {
this.colorChange() this.colorChange()
}, },
@ -53,8 +58,8 @@ export default {
this.endColor = this.colors[1] this.endColor = this.colors[1]
}, },
colorChange (val) { colorChange (val) {
this.colorsValue = [this.startColor,this.endColor] const colorsValue = [this.startColor,this.endColor]
this.$emit('change', this.colorsValue) this.$emit('change', colorsValue)
} }
} }
} }

@ -290,7 +290,7 @@ export default {
}) })
} }
} }
},immediate: true }
}, },
}, },
computed:{ computed:{

@ -91,18 +91,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -101,18 +101,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -91,18 +91,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -61,6 +61,7 @@ export default {
return this.config.border.borderWidth || 2 return this.config.border.borderWidth || 2
}, },
gradientColor0 () { gradientColor0 () {
console.log(this.config.border.gradientColor)
if(this.config.border.gradientColor){ if(this.config.border.gradientColor){
return this.config.border.gradientColor[0] ||this.config.border.gradientColor[1] return this.config.border.gradientColor[0] ||this.config.border.gradientColor[1]
}else{ }else{
@ -68,6 +69,7 @@ export default {
} }
}, },
gradientColor1 () { gradientColor1 () {
console.log(this.config.border.gradientColor)
if(this.config.border.gradientColor){ if(this.config.border.gradientColor){
return this.config.border.gradientColor[1] ||this.config.border.gradientColor[0] return this.config.border.gradientColor[1] ||this.config.border.gradientColor[0]
}else{ }else{

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
{ {
label:'左上圆角值', label:'左上圆角值',
// 设置组件类型, select / input / colorPicker // 设置组件类型, select / input / colorPicker

@ -89,18 +89,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
{ {
label:'翻转形态', label:'翻转形态',
// 设置组件类型, select / input / colorPicker // 设置组件类型, select / input / colorPicker

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
{ {
label:'翻转形态', label:'翻转形态',
// 设置组件类型, select / input / colorPicker // 设置组件类型, select / input / colorPicker

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
{ {
label:'翻转形态', label:'翻转形态',
// 设置组件类型, select / input / colorPicker // 设置组件类型, select / input / colorPicker

@ -90,18 +90,6 @@ const setting = [
} }
] ]
}, },
{
label:'不透明度',
// 设置组件类型, select / input / colorPicker
type: 'inputNumber',
// 字段
field: 'opacity',
optionField: 'opacity', // 对应options中的字段
// 是否多选
multiple: false,
// 绑定的值
value: 100,
},
] ]

@ -32,7 +32,7 @@ function getPlotList (files) {
category: configMapKey, category: configMapKey,
name: config.name, name: config.name,
title: config.title, title: config.title,
border: { type: '', titleHeight: 100, fontSize: 30, isTitle: true, padding: [16, 16, 16, 16] }, border:{ type: '', titleHeight: 60, fontSize: 30, isTitle: true, padding: [16, 16, 16, 16] },
icon: null, icon: null,
img: require(`../G2Plots/images/componentLogo/${config.title}.png`), img: require(`../G2Plots/images/componentLogo/${config.title}.png`),
className: className:
@ -66,7 +66,7 @@ export function getCustomPlots () {
category: config.category, category: config.category,
name: config.name, name: config.name,
title: config.title, title: config.title,
border: { type: '', titleHeight: 100, fontSize: 30, isTitle: true, padding: [16, 16, 16, 16] }, border:{ type: '', titleHeight: 60, fontSize: 30, isTitle: true, padding: [16, 16, 16, 16] },
icon: null, icon: null,
img: config.img, img: config.img,
className: className:

Loading…
Cancel
Save