Skip to content

Commit 08d4fc3

Browse files
committed
dev: css panel
1 parent 8949fca commit 08d4fc3

File tree

1 file changed

+47
-3
lines changed
  • packages/sparrow-client/src/components/CssPanel/Font

1 file changed

+47
-3
lines changed

packages/sparrow-client/src/components/CssPanel/Font/index.vue

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@
2424
></el-input-number>
2525
</div>
2626
<div>
27-
<el-input class="mb10" size="mini" placeholder="请输入内容">
27+
<el-input
28+
v-model="fontForm.color"
29+
class="mb10"
30+
size="mini"
31+
placeholder="请输入内容"
32+
>
2833
<template slot="append">
2934
<el-popover placement="bottom" width="225" trigger="click">
3035
<chrome-picker v-model="fontForm.color"></chrome-picker>
@@ -42,7 +47,16 @@
4247
</div>
4348
</css-item>
4449
<css-item lang="对齐方式">
45-
<s-radio-group :list="textAlignList"></s-radio-group>
50+
<s-radio-group
51+
v-model="fontForm.textAlign"
52+
:list="textAlignList"
53+
></s-radio-group>
54+
</css-item>
55+
<css-item>
56+
<s-radio-group
57+
v-model="fontForm.verticalAlign"
58+
:list="verticalAlignList"
59+
></s-radio-group>
4660
</css-item>
4761
<css-item label="透明度">
4862
<div>
@@ -68,7 +82,7 @@ export default {
6882
fontForm: {
6983
fontWeight: '',
7084
fontSize: '',
71-
color: '#000000',
85+
color: '',
7286
lineHeight: '',
7387
textAlign: '',
7488
verticalAlign: '',
@@ -109,8 +123,38 @@ export default {
109123
icon: '两端',
110124
value: 'justify',
111125
}
126+
],
127+
verticalAlignList: [
128+
{
129+
label: 'baseline',
130+
icon: '基线',
131+
value: 'baseline',
132+
},
133+
{
134+
label: 'top',
135+
icon: '',
136+
value: 'top',
137+
},
138+
{
139+
label: 'bottom',
140+
icon: '',
141+
value: 'bottom',
142+
},
143+
{
144+
label: 'middle',
145+
icon: '居中',
146+
value: 'middle',
147+
}
112148
]
113149
};
150+
},
151+
watch: {
152+
fontForm: {
153+
handler: function(val, oldVal) {
154+
this.$emit('change', this.fontForm);
155+
},
156+
deep: true
157+
}
114158
}
115159
};
116160
</script>

0 commit comments

Comments
 (0)