Skip to content

Commit 4532560

Browse files
committed
feat:【商城】店铺装修-标题栏:增加 skew 标题栏。
1 parent 897ecfe commit 4532560

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

src/components/DiyEditor/components/mobile/TitleBar/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import {ComponentStyle, DiyComponent} from '@/components/DiyEditor/util'
44
export interface TitleBarProperty {
55
// 偏移
66
marginLeft: number
7+
// 偏移量
8+
skew: number
79
// 显示位置
810
textAlign: 'left' | 'center'
911
// 主标题
@@ -52,6 +54,7 @@ export const component = {
5254
descriptionWeight: 200,
5355
titleColor: 'rgba(50, 50, 51, 10)',
5456
descriptionColor: 'rgba(150, 151, 153, 10)',
57+
skew: 0,
5558
more: {
5659
//查看更多
5760
show: false,

src/components/DiyEditor/components/mobile/TitleBar/index.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
fontSize: `${property.titleSize}px`,
1818
fontWeight: property.titleWeight,
1919
color: property.titleColor,
20-
textAlign: property.textAlign
20+
textAlign: property.textAlign,
21+
marginLeft: property.skew + 'px'
2122
}"
2223
>
2324
{{ property.title }}
@@ -29,7 +30,8 @@
2930
fontSize: `${property.descriptionSize}px`,
3031
fontWeight: property.descriptionWeight,
3132
color: property.descriptionColor,
32-
textAlign: property.textAlign
33+
textAlign: property.textAlign,
34+
marginLeft: property.skew + 'px'
3335
}"
3436
class="m-t-8px"
3537
>

src/components/DiyEditor/components/mobile/TitleBar/property.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
</el-tooltip>
1717
</el-radio-group>
1818
</el-form-item>
19+
<el-form-item label="偏移量" prop="skew">
20+
<el-slider
21+
v-model="formData.skew"
22+
:max="100"
23+
:min="0"
24+
:step="1"
25+
input-size="small"
26+
show-input
27+
/>
28+
</el-form-item>
1929
</el-card>
2030
<el-card class="property-group" header="主标题" shadow="never">
2131
<el-form-item label="文字" label-width="40px" prop="title">

0 commit comments

Comments
 (0)