1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| /**
| * CDescription - 描述
| * @author Tevin
| */
|
| <template>
| <view
| class="c-description"
| :class="[hasBorder?'c-description-bordered':'', enlarged?'c-description-enlarged':'']"
| >
| <view
| class="c-description-label"
| :class="'c-description-label-' + labelAlign"
| >{{label}}</view>
| <view class="c-desctiption-content">
| <slot />
| </view>
| </view>
| </template>
|
| <script>
| import Taro from '@tarojs/taro';
| import {} from 'taro-ui-vue';
| import './cDescription.scss';
|
| export default {
| name: 'CDescription',
| components: {},
| props: {
| // 左边标题
| label: String,
| // 标题对齐方式:left(定宽左对齐)、right(定宽右对齐)、none(无宽度)
| labelAlign: {
| type: String,
| default: 'left',
| },
| // 加大显示区域
| enlarged: {
| type: Boolean,
| default: false,
| },
| // 是否有底部边线
| hasBorder: {
| type: Boolean,
| default: false,
| },
| },
| data() {
| return {};
| },
| methods: {},
| };
| </script>
|
|