mali-applet-ui 0.0.34 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ml-approval-type/ml-approval-type.vue +50 -0
- package/components/ml-button/ml-button.vue +47 -23
- package/components/ml-checkbox/ml-checkbox.vue +6 -4
- package/components/ml-checkbox-group/ml-checkbox-group.vue +1 -1
- package/components/ml-chunk-group/ml-chunk-group.vue +113 -0
- package/components/ml-chunk-item/ml-chunk-item.vue +81 -0
- package/components/ml-col/ml-col.vue +2 -1
- package/components/ml-fixed-bottom/ml-fixed-bottom.vue +33 -0
- package/components/ml-form/ml-form.vue +1 -1
- package/components/ml-icon/ml-icon.vue +20 -1
- package/components/ml-input/ml-input.vue +1 -1
- package/components/ml-list-group/ml-list-group.vue +32 -0
- package/components/{ml-list-menu/ml-list-menu.vue → ml-list-item/ml-list-item.vue} +26 -17
- package/components/ml-list-menu-group/ml-list-menu-group.vue +51 -0
- package/components/ml-list-menu-item/ml-list-menu-item.vue +128 -0
- package/components/ml-month-picker/ml-month-picker.vue +1 -1
- package/components/ml-number-input/ml-number-input.vue +1 -1
- package/components/ml-radio/ml-radio.vue +6 -4
- package/components/ml-radio-button/ml-radio-button.vue +1 -1
- package/components/ml-radio-group/ml-radio-group.vue +1 -1
- package/components/ml-row/ml-row.vue +2 -1
- package/components/ml-section/ml-section.vue +1 -1
- package/components/ml-select-picker/ml-select-picker.vue +1 -1
- package/components/ml-switch/ml-switch.vue +27 -0
- package/components/ml-tab-pane/ml-tab-pane.vue +35 -0
- package/components/ml-tabbar/ml-tabbar.vue +4 -1
- package/components/ml-tabs/ml-tabs.vue +35 -11
- package/components/ml-textarea/ml-textarea.vue +1 -1
- package/components/ml-year-picker/ml-year-picker.vue +1 -1
- package/iconfont.css +681 -673
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-approval-type" :class="className" :style="styles">{{ currLabel }}</view>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
name: 'MlApprovalType',
|
|
8
|
+
options: {
|
|
9
|
+
virtualHost: true
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
value: [String, Number],
|
|
13
|
+
className: String
|
|
14
|
+
},
|
|
15
|
+
data () {
|
|
16
|
+
return {
|
|
17
|
+
statusList: [
|
|
18
|
+
{ value: 0, label: '起草中', color: '' },
|
|
19
|
+
{ value: 1, label: '审批中', color: '#09B2FE' },
|
|
20
|
+
{ value: 2, label: '已通过', color: '#42E38D' },
|
|
21
|
+
{ value: 3, label: '已驳回', color: '#FF4A4A' },
|
|
22
|
+
{ value: 4, label: '会签中', color: '#F4788E' },
|
|
23
|
+
{ value: 5, label: '处理中', color: '#FFA500' },
|
|
24
|
+
{ value: 6, label: '已完成', color: '#2497FF' }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
computed: {
|
|
29
|
+
selectItem () {
|
|
30
|
+
return this.statusList.find(item => String(item.value) === String(this.value))
|
|
31
|
+
},
|
|
32
|
+
currLabel () {
|
|
33
|
+
return this.selectItem ? this.selectItem.label : ''
|
|
34
|
+
},
|
|
35
|
+
styles () {
|
|
36
|
+
return this.selectItem && this.selectItem.color? `background:${this.selectItem.color};` : ''
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="scss">
|
|
43
|
+
.ml-approval-type {
|
|
44
|
+
display: inline-block;
|
|
45
|
+
color: #ffffff;
|
|
46
|
+
padding: 6rpx 18rpx;
|
|
47
|
+
border-radius: 10rpx;
|
|
48
|
+
font-size: 24rpx;
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<button class="ml-button" :class="[className, `type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" @tap="tapEvent" @click="clickEvent">
|
|
2
|
+
<button class="ml-button" :class="[className || '', `type-${type}`, status ? `status-${status}` : '', round ? 'is-round' : '']" @tap="tapEvent" @click="clickEvent">
|
|
3
3
|
<slot>{{ content }}</slot>
|
|
4
4
|
</button>
|
|
5
5
|
</template>
|
|
@@ -33,35 +33,59 @@ export default {
|
|
|
33
33
|
|
|
34
34
|
<style lang="scss">
|
|
35
35
|
.ml-button {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
&.type-text {
|
|
37
|
+
display: inline;
|
|
38
|
+
border: 0;
|
|
39
|
+
padding: 0 10rpx;
|
|
40
|
+
line-height: 1.5;
|
|
41
|
+
vertical-align: middle;
|
|
42
|
+
background: transparent;
|
|
43
|
+
&.status-primary {
|
|
44
|
+
color: $uni-color-primary;
|
|
45
|
+
}
|
|
46
|
+
&.status-success {
|
|
47
|
+
color: $uni-color-success;
|
|
48
|
+
}
|
|
49
|
+
&.status-info {
|
|
50
|
+
color: #909399;
|
|
51
|
+
}
|
|
52
|
+
&.status-warning {
|
|
53
|
+
color: $uni-color-warning;
|
|
54
|
+
}
|
|
55
|
+
&.status-danger {
|
|
56
|
+
color: $uni-color-error;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
38
59
|
&.type-button {
|
|
60
|
+
width: 100%;
|
|
61
|
+
margin: 0 10rpx;
|
|
62
|
+
padding: 0 20rpx;
|
|
39
63
|
line-height: 80rpx;
|
|
40
64
|
border: 1px solid #e5e5e5;
|
|
41
65
|
border-radius: 10rpx;
|
|
66
|
+
&.status-primary {
|
|
67
|
+
color: #ffffff;
|
|
68
|
+
background: $uni-color-primary;
|
|
69
|
+
}
|
|
70
|
+
&.status-success {
|
|
71
|
+
color: #ffffff;
|
|
72
|
+
background: $uni-color-success;
|
|
73
|
+
}
|
|
74
|
+
&.status-info {
|
|
75
|
+
color: #ffffff;
|
|
76
|
+
background: #909399;
|
|
77
|
+
}
|
|
78
|
+
&.status-warning {
|
|
79
|
+
color: #ffffff;
|
|
80
|
+
background: $uni-color-warning;
|
|
81
|
+
}
|
|
82
|
+
&.status-danger {
|
|
83
|
+
color: #ffffff;
|
|
84
|
+
background: $uni-color-error;
|
|
85
|
+
}
|
|
42
86
|
}
|
|
43
87
|
&.is-round {
|
|
44
88
|
border-radius: 40rpx;
|
|
45
89
|
}
|
|
46
|
-
&.status-primary {
|
|
47
|
-
color: #ffffff;
|
|
48
|
-
background: $uni-color-primary;
|
|
49
|
-
}
|
|
50
|
-
&.status-success {
|
|
51
|
-
color: #ffffff;
|
|
52
|
-
background: $uni-color-success;
|
|
53
|
-
}
|
|
54
|
-
&.status-info {
|
|
55
|
-
color: #ffffff;
|
|
56
|
-
background: #909399;
|
|
57
|
-
}
|
|
58
|
-
&.status-warning {
|
|
59
|
-
color: #ffffff;
|
|
60
|
-
background: $uni-color-warning;
|
|
61
|
-
}
|
|
62
|
-
&.status-danger {
|
|
63
|
-
color: #ffffff;
|
|
64
|
-
background: $uni-color-error;
|
|
65
|
-
}
|
|
66
90
|
}
|
|
67
91
|
</style>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-checkbox" :class="[className, {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
|
-
<
|
|
4
|
-
|
|
2
|
+
<view class="ml-checkbox" :class="[className || '', {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
|
+
<text class="ml-checkbox-icon">
|
|
4
|
+
<ml-icon :name="checked ? 'checkbox-checked' : (indeterminate ? 'checkbox-indeterminate' : 'checkbox-unchecked')"></ml-icon>
|
|
5
|
+
</text>
|
|
6
|
+
<text class="ml-checkbox-content">
|
|
5
7
|
<slot>
|
|
6
8
|
<text>{{ content }}</text>
|
|
7
9
|
</slot>
|
|
@@ -56,7 +58,7 @@ export default {
|
|
|
56
58
|
&.is-checked {
|
|
57
59
|
color: $uni-color-primary;
|
|
58
60
|
}
|
|
59
|
-
.checkbox-icon {
|
|
61
|
+
.ml-checkbox-icon {
|
|
60
62
|
display: inline-block;
|
|
61
63
|
width: 40rpx;
|
|
62
64
|
margin-right: 5rpx;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-radio-group" :class="[className, {'is-disabled': disabled, 'is-vertical': vertical}]">
|
|
2
|
+
<view class="ml-radio-group" :class="[className || '', {'is-disabled': disabled, 'is-vertical': vertical}]">
|
|
3
3
|
<view class="ml-radio-group-item" v-for="(item, index) in options" :key="index">
|
|
4
4
|
<ml-checkbox :value="value.includes(item.value) ? item.value : null" :label="item.value" :content="item.label" :disabled="disabled || item.disabled" @change="changeEvent"></ml-checkbox>
|
|
5
5
|
</view>
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-chunk-group" :class="[className || '', status ? `status-${status}` : '', align ? `align-${align}` : '', {'is-vertical': vertical, 'is-header': title || $slots.title}]">
|
|
3
|
+
<view v-if="title || $slots.title" class="ml-chunk-group-title">
|
|
4
|
+
<slot name="title">
|
|
5
|
+
<view v-if="prefixIcon" class="ml-chunk-group-left-icon">
|
|
6
|
+
<ml-icon :className="prefixIcon" :status="status"></ml-icon>
|
|
7
|
+
</view>
|
|
8
|
+
<text class="ml-chunk-group-title-content">{{ title }}</text>
|
|
9
|
+
</slot>
|
|
10
|
+
</view>
|
|
11
|
+
<view class="ml-chunk-group-body">
|
|
12
|
+
<view class="ml-chunk-group-content">
|
|
13
|
+
<slot></slot>
|
|
14
|
+
</view>
|
|
15
|
+
</view>
|
|
16
|
+
</view>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: 'MlChunkGroup',
|
|
22
|
+
options: {
|
|
23
|
+
virtualHost: true
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
title: String,
|
|
27
|
+
prefixIcon: String,
|
|
28
|
+
vertical: Boolean,
|
|
29
|
+
status: String,
|
|
30
|
+
align: String,
|
|
31
|
+
className: String
|
|
32
|
+
},
|
|
33
|
+
provide() {
|
|
34
|
+
return {
|
|
35
|
+
mlChunk: this
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<style lang="scss">
|
|
42
|
+
.ml-chunk-group {
|
|
43
|
+
display: block;
|
|
44
|
+
border-radius: 10rpx;
|
|
45
|
+
background: #ffffff;
|
|
46
|
+
.ml-chunk-group-title {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: row;
|
|
49
|
+
align-items: center;
|
|
50
|
+
height: 80rpx;
|
|
51
|
+
padding: 0 20rpx ;
|
|
52
|
+
}
|
|
53
|
+
.ml-chunk-group-left-icon {
|
|
54
|
+
font-size: 38rpx;
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
padding-right: 10rpx;
|
|
57
|
+
}
|
|
58
|
+
.ml-chunk-group-content {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: row;
|
|
61
|
+
border-radius: 10rpx;
|
|
62
|
+
}
|
|
63
|
+
&.is-header {
|
|
64
|
+
.ml-chunk-group-body {
|
|
65
|
+
padding: 0 20rpx;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
&.is-vertical {
|
|
69
|
+
.ml-chunk-group-content {
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
&.align-left {
|
|
74
|
+
text-align: left;
|
|
75
|
+
}
|
|
76
|
+
&.align-center {
|
|
77
|
+
text-align: center;
|
|
78
|
+
}
|
|
79
|
+
&.align-right {
|
|
80
|
+
text-align: right;
|
|
81
|
+
}
|
|
82
|
+
&.status-primary {
|
|
83
|
+
.ml-chunk-group-content {
|
|
84
|
+
color: #ffffff;
|
|
85
|
+
background: $uni-color-primary;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
&.status-success {
|
|
89
|
+
.ml-chunk-group-content {
|
|
90
|
+
color: #ffffff;
|
|
91
|
+
background: $uni-color-success;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
&.status-info {
|
|
95
|
+
.ml-chunk-group-content {
|
|
96
|
+
color: #ffffff;
|
|
97
|
+
background: #909399;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
&.status-warning {
|
|
101
|
+
.ml-chunk-group-content {
|
|
102
|
+
color: #ffffff;
|
|
103
|
+
background: $uni-color-warning;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
&.status-danger {
|
|
107
|
+
.ml-chunk-group-content {
|
|
108
|
+
color: #ffffff;
|
|
109
|
+
background: $uni-color-error;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
</style>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-chunk-item" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', {'is-fixed': width, 'is-vertical': isVertical}]" :style="styles" @click="clickEvent" @tap="tapEvent">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'MlChunkItem',
|
|
10
|
+
options: {
|
|
11
|
+
virtualHost: true
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
span: [String, Number],
|
|
15
|
+
align: String,
|
|
16
|
+
width: String,
|
|
17
|
+
className: String
|
|
18
|
+
},
|
|
19
|
+
inject: {
|
|
20
|
+
chunk: {
|
|
21
|
+
from: 'mlChunk',
|
|
22
|
+
default: null
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
isVertical () {
|
|
27
|
+
return this.chunk ? this.chunk.vertical : ''
|
|
28
|
+
},
|
|
29
|
+
styles () {
|
|
30
|
+
return this.width ? `width: ${this.width};` : ''
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
methods: {
|
|
34
|
+
clickEvent () {
|
|
35
|
+
this.$emit('click', {})
|
|
36
|
+
},
|
|
37
|
+
tapEvent () {
|
|
38
|
+
this.$emit('tap', {})
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<style lang="scss">
|
|
45
|
+
.ml-chunk-item {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
padding: 10rpx;
|
|
49
|
+
line-height: 50rpx;
|
|
50
|
+
$spans: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 33.33333%,
|
|
51
|
+
37.5%, 41.66667%, 45.83333%, 50%, 54.16667%, 58.33333%, 62.5%, 66.66667%,
|
|
52
|
+
70.83333%, 75%, 79.16667%, 83.33333%, 87.5%, 91.66667%, 95.83333%, 100%;
|
|
53
|
+
&.align-left {
|
|
54
|
+
text-align: left;
|
|
55
|
+
}
|
|
56
|
+
&.align-center {
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
59
|
+
&.align-right {
|
|
60
|
+
text-align: right;
|
|
61
|
+
}
|
|
62
|
+
&:not(.is-fixed) {
|
|
63
|
+
flex-grow: 1;
|
|
64
|
+
}
|
|
65
|
+
@for $index from 0 to length($spans) {
|
|
66
|
+
&.span-#{$index + 1} {
|
|
67
|
+
width: nth($spans, $index + 1);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
&:not(.is-vertical) {
|
|
71
|
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
|
72
|
+
}
|
|
73
|
+
&.is-vertical {
|
|
74
|
+
flex-direction: row;
|
|
75
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
|
|
76
|
+
}
|
|
77
|
+
&:last-child {
|
|
78
|
+
border: 0;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-col" :class="[className, span && !width ? `span-${span}` : '', align ? `align-${align}` : '',
|
|
2
|
+
<view class="ml-col" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', {'is-fixed': width || shrink}]" :style="styles">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -12,6 +12,7 @@ export default {
|
|
|
12
12
|
},
|
|
13
13
|
props: {
|
|
14
14
|
span: [String, Number],
|
|
15
|
+
shrink: Boolean,
|
|
15
16
|
align: String,
|
|
16
17
|
width: String,
|
|
17
18
|
className: String
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-fixed-bottom" :class="[className || '']" :style="styles">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'MlFixedBottom',
|
|
10
|
+
options: {
|
|
11
|
+
virtualHost: true
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
bottom: String,
|
|
15
|
+
className: String
|
|
16
|
+
},
|
|
17
|
+
computed: {
|
|
18
|
+
styles () {
|
|
19
|
+
return this.bottom ? `bottom:${this.bottom};` : ''
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style lang="scss">
|
|
26
|
+
.ml-fixed-bottom {
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: row;
|
|
29
|
+
position: fixed;
|
|
30
|
+
width: 100%;
|
|
31
|
+
bottom: 40rpx;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-form" :class="[className, {'is-vertical': vertical}]">
|
|
2
|
+
<view class="ml-form" :class="[className || '', {'is-vertical': vertical}]">
|
|
3
3
|
<uni-forms ref="uniForm" :modelValue="data" :rules="formRules" :label-position="vertical ? 'top' : 'left'">
|
|
4
4
|
<slot></slot>
|
|
5
5
|
</uni-forms>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<text class="ml-icon" :class="[className, name ? `${prefix}${name}` : '']" @click="clickEvent"></text>
|
|
2
|
+
<text class="ml-icon" :class="[className || '', status ? `status-${status}` : '', name ? `${prefix}${name}` : '']" @click="clickEvent"></text>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
@@ -10,6 +10,7 @@ export default {
|
|
|
10
10
|
},
|
|
11
11
|
props: {
|
|
12
12
|
name: String,
|
|
13
|
+
status: String,
|
|
13
14
|
className: String
|
|
14
15
|
},
|
|
15
16
|
data () {
|
|
@@ -27,4 +28,22 @@ export default {
|
|
|
27
28
|
|
|
28
29
|
<style lang="scss">
|
|
29
30
|
@import '../../iconfont.css';
|
|
31
|
+
|
|
32
|
+
.ml-icon {
|
|
33
|
+
&.status-primary {
|
|
34
|
+
color: $uni-color-primary;
|
|
35
|
+
}
|
|
36
|
+
&.status-success {
|
|
37
|
+
color: $uni-color-success;
|
|
38
|
+
}
|
|
39
|
+
&.status-info {
|
|
40
|
+
color: #909399;
|
|
41
|
+
}
|
|
42
|
+
&.status-warning {
|
|
43
|
+
color: $uni-color-warning;
|
|
44
|
+
}
|
|
45
|
+
&.status-danger {
|
|
46
|
+
color: $uni-color-error;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
30
49
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-input" :class="[className, {'is-right': align === 'right', 'is-border': border, 'is-prefix': prefixIcon || type === 'search', 'is-suffix': suffixIcon, 'is-disabled': disabled}]">
|
|
2
|
+
<view class="ml-input" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-prefix': prefixIcon || type === 'search', 'is-suffix': suffixIcon, 'is-disabled': disabled}]">
|
|
3
3
|
<view v-if="prefixIcon || type === 'search'" class="ml-input-prefix-icon">
|
|
4
4
|
<ml-icon v-if="prefixIcon" :class="prefixIcon"></ml-icon>
|
|
5
5
|
<ml-icon v-else name="search"></ml-icon>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-list-group" :class="className">
|
|
3
|
+
<view class="ml-list-group-content">
|
|
4
|
+
<scroll-view scroll-y>
|
|
5
|
+
<slot></slot>
|
|
6
|
+
</scroll-view>
|
|
7
|
+
</view>
|
|
8
|
+
</view>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
export default {
|
|
13
|
+
name: 'MlListGroup',
|
|
14
|
+
options: {
|
|
15
|
+
virtualHost: true
|
|
16
|
+
},
|
|
17
|
+
props: {
|
|
18
|
+
title: String,
|
|
19
|
+
className: String
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="scss">
|
|
25
|
+
.ml-list-group {
|
|
26
|
+
padding: 0 10rpx;
|
|
27
|
+
.ml-list-group-content {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-list-
|
|
3
|
-
<view v-if="prefixIcon" class="ml-list-
|
|
2
|
+
<view class="ml-list-item" :class="className" @click="clickEvent" @tap="tapEvent">
|
|
3
|
+
<view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-list-item-left-icon">
|
|
4
4
|
<ml-icon :className="prefixIcon"></ml-icon>
|
|
5
5
|
</view>
|
|
6
|
-
<view class="ml-list-
|
|
6
|
+
<view class="ml-list-item-content">
|
|
7
7
|
<slot>
|
|
8
8
|
<text>{{ name }}</text>
|
|
9
9
|
</slot>
|
|
10
10
|
</view>
|
|
11
|
-
<view class="ml-list-
|
|
12
|
-
<ml-icon
|
|
11
|
+
<view v-if="suffixIcon && suffixIcon !== 'none'" class="ml-list-item-right-icon">
|
|
12
|
+
<ml-icon :className="suffixIcon"></ml-icon>
|
|
13
13
|
</view>
|
|
14
14
|
</view>
|
|
15
15
|
</template>
|
|
16
16
|
|
|
17
17
|
<script>
|
|
18
18
|
export default {
|
|
19
|
-
name: '
|
|
19
|
+
name: 'MlListItem',
|
|
20
20
|
options: {
|
|
21
21
|
virtualHost: true
|
|
22
22
|
},
|
|
23
23
|
props: {
|
|
24
24
|
name: String,
|
|
25
25
|
prefixIcon: String,
|
|
26
|
-
suffixIcon:
|
|
26
|
+
suffixIcon: {
|
|
27
|
+
type: String,
|
|
28
|
+
default: 'mlicon-arrow-right'
|
|
29
|
+
},
|
|
27
30
|
url: String,
|
|
28
31
|
redirect: Boolean,
|
|
29
32
|
className: String
|
|
@@ -50,29 +53,35 @@ export default {
|
|
|
50
53
|
}
|
|
51
54
|
</script>
|
|
52
55
|
|
|
56
|
+
|
|
53
57
|
<style lang="scss">
|
|
54
|
-
.ml-list-
|
|
58
|
+
.ml-list-item {
|
|
55
59
|
display: flex;
|
|
56
60
|
flex-direction: row;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.ml-list-
|
|
61
|
+
padding: 20rpx;
|
|
62
|
+
margin: 10rpx 0;
|
|
63
|
+
border-radius: 10rpx;
|
|
64
|
+
background: #ffffff;
|
|
65
|
+
.ml-list-item-content {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: row;
|
|
62
68
|
flex-grow: 1;
|
|
63
69
|
overflow: hidden;
|
|
64
70
|
text-overflow: ellipsis;
|
|
65
71
|
white-space: nowrap;
|
|
66
72
|
}
|
|
67
|
-
.ml-list-
|
|
68
|
-
.ml-list-
|
|
73
|
+
.ml-list-item-left-icon,
|
|
74
|
+
.ml-list-item-right-icon {
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: row;
|
|
77
|
+
align-items: center;
|
|
69
78
|
flex-shrink: 0;
|
|
70
79
|
padding: 0 10rpx;
|
|
71
80
|
}
|
|
72
|
-
.ml-list-
|
|
81
|
+
.ml-list-item-left-icon {
|
|
73
82
|
font-size: 38rpx;
|
|
74
83
|
}
|
|
75
|
-
.ml-list-
|
|
84
|
+
.ml-list-item-right-icon {
|
|
76
85
|
font-size: 30rpx;
|
|
77
86
|
}
|
|
78
87
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-list-menu-group" :class="className">
|
|
3
|
+
<view v-if="title || $slots.title" class="ml-list-menu-group-title">
|
|
4
|
+
<view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-list-menu-group-left-icon">
|
|
5
|
+
<ml-icon :className="prefixIcon"></ml-icon>
|
|
6
|
+
</view>
|
|
7
|
+
<slot name="title">
|
|
8
|
+
<text class="ml-list-menu-group-title-content">{{ title }}</text>
|
|
9
|
+
</slot>
|
|
10
|
+
</view>
|
|
11
|
+
<view class="ml-list-menu-group-content">
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: 'MlListMenuGroup',
|
|
20
|
+
options: {
|
|
21
|
+
virtualHost: true
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
title: String,
|
|
25
|
+
prefixIcon: String,
|
|
26
|
+
className: String
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<style lang="scss">
|
|
32
|
+
.ml-list-menu-group {
|
|
33
|
+
margin: 20rpx 0;
|
|
34
|
+
background: #ffffff;
|
|
35
|
+
.ml-list-menu-group-title {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: row;
|
|
38
|
+
align-items: center;
|
|
39
|
+
height: 70rpx;
|
|
40
|
+
}
|
|
41
|
+
.ml-list-menu-group-left-icon {
|
|
42
|
+
font-size: 38rpx;
|
|
43
|
+
flex-shrink: 0;
|
|
44
|
+
padding: 0 10rpx;
|
|
45
|
+
}
|
|
46
|
+
.ml-list-menu-group-content {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
</style>
|