Skip to content

Commit 5088917

Browse files
committed
样式优化
1 parent 3298999 commit 5088917

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

src/assets/json/field-types.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@
4747
}, {
4848
"value": "accFund",
4949
"label": "是否有本地公积金"
50-
}],
51-
52-
"hPickerTypes": [{
50+
}],
51+
52+
"hPickerTypes": [{
5353
"value": "age",
54-
"label": "年龄"
54+
"label": "年龄",
55+
"options": ["20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"]
5556
}, {
5657
"value": "amount",
57-
"label": "金额"
58+
"label": "金额",
59+
"options": ["1000以下", "2000", "3000", "5000", "1万", "3万", "5万", "10万", "10万以上"]
5860
}],
5961

6062
"dateTypes": [{

src/assets/json/widget.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"type": "h-picker",
9595
"name": "横向滑动单选",
9696
"labelTitle": "年龄",
97-
"value": "25",
97+
"value": "",
9898
"options": ["20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30"],
9999
"labelPosition": "left",
100100
"fieldTypes": "hPickerTypes",

src/components/widget-config.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
</el-select>
4141
</el-form-item>
4242
<el-form-item label="选项" v-if="selectWg.hasOwnProperty('options')">
43-
<template v-if="selectWg.type=='checkbox' || selectWg.type=='select'">
43+
<!-- <template v-if="selectWg.type=='checkbox' || selectWg.type=='select'"> -->
44+
<template>
4445
<draggable element="ul" :list="selectWg.options" :options="{group:{ name:'options'}, ghostClass: 'ghost',handle: '.move-icon'}">
4546
<li v-for="(item, index) in selectWg.options" :key="index">
4647
<div class="flex align-middle">
@@ -105,6 +106,9 @@
105106
<el-form-item label="按钮背景色" v-if="selectWg.style.hasOwnProperty('btnStyle')">
106107
<el-color-picker v-model="selectWg.style.btnStyle.background"/>
107108
</el-form-item>
109+
<el-form-item label="选中后文字颜色" v-if="selectWg.hasOwnProperty('pickerColor')">
110+
<el-color-picker v-model="selectWg.pickerColor"/>
111+
</el-form-item>
108112
</el-collapse-item>
109113
</el-collapse>
110114
</el-form>

src/components/widget-form-list.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@
108108
<div class="wg-horizontal-picker">
109109
<div
110110
class="picker-item"
111-
v-for="optionsItem in item.options"
111+
v-for="(optionsItem,key) in item.options"
112112
:key="optionsItem"
113-
:style="optionsItem===item.value?{ color: item.pickerColor }:{}"
113+
:style="key===0?{ color: item.pickerColor }:{}"
114114
>{{optionsItem}}</div>
115115
</div>
116116
</div>

0 commit comments

Comments
 (0)