mali-applet-ui 0.0.27 → 0.0.30
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-amount-input/ml-amount-input.vue +3 -0
- package/components/ml-amount-text/ml-amount-text.vue +3 -0
- package/components/ml-checkbox/ml-checkbox.vue +3 -0
- package/components/ml-checkbox-group/ml-checkbox-group.vue +3 -0
- package/components/ml-date-picker/ml-date-picker.vue +3 -0
- package/components/ml-date-range-picker/ml-date-range-picker.vue +3 -0
- package/components/ml-datetime-picker/ml-datetime-picker.vue +3 -0
- package/components/ml-datetime-range-picker/ml-datetime-range-picker.vue +3 -0
- package/components/ml-echarts/ml-echarts.vue +3 -0
- package/components/ml-form/ml-form.vue +3 -0
- package/components/ml-form-item/ml-form-item.vue +3 -0
- package/components/ml-full-watermark/ml-full-watermark.vue +3 -0
- package/components/ml-icon/ml-icon.vue +3 -0
- package/components/ml-input/ml-input.vue +3 -0
- package/components/ml-list-menu/ml-list-menu.vue +65 -0
- package/components/ml-month-picker/ml-month-picker.vue +3 -0
- package/components/ml-number-input/ml-number-input.vue +3 -0
- package/components/ml-progress-bar/ml-progress-bar.vue +3 -0
- package/components/ml-province-city-picker/ml-province-city-picker.vue +1 -1
- package/components/ml-province-city-picker/{provinceCity.json → province-city.json} +0 -0
- package/components/ml-radio/ml-radio.vue +3 -0
- package/components/ml-radio-button/ml-radio-button.vue +3 -0
- package/components/ml-radio-group/ml-radio-group.vue +3 -0
- package/components/ml-section/ml-section.vue +3 -0
- package/components/ml-select-picker/ml-select-picker.vue +3 -0
- package/components/ml-tabbar/ml-tabbar.vue +44 -40
- package/components/ml-table/ml-table.vue +3 -0
- package/components/ml-tabs/ml-tabs.vue +3 -0
- package/components/ml-textarea/ml-textarea.vue +3 -0
- package/components/ml-textarea/voice-input.vue +3 -0
- package/components/ml-year-picker/ml-year-picker.vue +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-list-menu" @click="clickEvent" @tap="tapEvent">
|
|
3
|
+
<view v-if="prefixIcon" class="ml-list-menu-left-icon">
|
|
4
|
+
<ml-icon :className="prefixIcon"></ml-icon>
|
|
5
|
+
</view>
|
|
6
|
+
<view class="ml-list-menu-content">
|
|
7
|
+
<slot>
|
|
8
|
+
<text>{{ name }}</text>
|
|
9
|
+
</slot>
|
|
10
|
+
</view>
|
|
11
|
+
<view class="ml-list-menu-right-icon">
|
|
12
|
+
<ml-icon class="right-icon" name="arrow-right"></ml-icon>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name: 'MlListMenu',
|
|
20
|
+
options: {
|
|
21
|
+
virtualHost: true
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
name: String,
|
|
25
|
+
prefixIcon: String,
|
|
26
|
+
suffixIcon: String,
|
|
27
|
+
},
|
|
28
|
+
methods: {
|
|
29
|
+
clickEvent () {
|
|
30
|
+
this.$emit('click', {})
|
|
31
|
+
},
|
|
32
|
+
tapEvent () {
|
|
33
|
+
this.$emit('tap', {})
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<style lang="scss">
|
|
40
|
+
.ml-list-menu {
|
|
41
|
+
display: flex;
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
border-bottom: 1px solid #e5e5e5;
|
|
44
|
+
line-height: 90rpx;
|
|
45
|
+
font-size: 30rpx;
|
|
46
|
+
padding: 0 20rpx;
|
|
47
|
+
.ml-list-menu-content {
|
|
48
|
+
flex-grow: 1;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
text-overflow: ellipsis;
|
|
51
|
+
white-space: nowrap;
|
|
52
|
+
}
|
|
53
|
+
.ml-list-menu-left-icon,
|
|
54
|
+
.ml-list-menu-right-icon {
|
|
55
|
+
flex-shrink: 0;
|
|
56
|
+
padding: 0 10rpx;
|
|
57
|
+
}
|
|
58
|
+
.ml-list-menu-left-icon {
|
|
59
|
+
font-size: 38rpx;
|
|
60
|
+
}
|
|
61
|
+
.ml-list-menu-right-icon {
|
|
62
|
+
font-size: 30rpx;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</style>
|
|
File without changes
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ml-tabbar">
|
|
3
|
-
<view class="ml-tabbar-
|
|
4
|
-
<view class="ml-tabbar-
|
|
5
|
-
<
|
|
6
|
-
<ml-icon class="icon" :name="value == item.value ? item.activeIcon : item.icon"></ml-icon>
|
|
7
|
-
</view>
|
|
8
|
-
<view class="ml-tabbar-name">{{ item.name }}</view>
|
|
3
|
+
<view class="ml-tabbar-item" v-for="(item) in options" :key="item.value" :class="{'is-active': value == item.value}" @tap="tapEvent(item)">
|
|
4
|
+
<view class="ml-tabbar-icon">
|
|
5
|
+
<ml-icon class="icon" :name="value == item.value ? item.activeIcon : item.icon"></ml-icon>
|
|
9
6
|
<view v-if="item.showNum && item.num > 0" class="ml-tabbar-num">{{ item.num }}</view>
|
|
10
7
|
</view>
|
|
8
|
+
<view class="ml-tabbar-name">{{ item.name }}</view>
|
|
11
9
|
</view>
|
|
12
10
|
</view>
|
|
13
11
|
</template>
|
|
@@ -24,16 +22,34 @@ export default {
|
|
|
24
22
|
|
|
25
23
|
}
|
|
26
24
|
},
|
|
25
|
+
computed: {
|
|
26
|
+
selectItem () {
|
|
27
|
+
return this.options.find(item => item.value === this.value)
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
watch: {
|
|
31
|
+
value () {
|
|
32
|
+
this.updateTitle(this.selectItem)
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
created () {
|
|
36
|
+
this.$nextTick(() => {
|
|
37
|
+
this.updateTitle(this.selectItem)
|
|
38
|
+
})
|
|
39
|
+
},
|
|
27
40
|
methods: {
|
|
28
|
-
|
|
41
|
+
updateTitle (option) {
|
|
42
|
+
if (option && option.name) {
|
|
43
|
+
uni.setNavigationBarTitle({
|
|
44
|
+
title: option.name
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
tapEvent (option) {
|
|
29
49
|
const value = option.value
|
|
50
|
+
this.updateTitle(option)
|
|
30
51
|
this.$emit('input', value)
|
|
31
52
|
this.$emit('change', { value, option })
|
|
32
|
-
if (option.url) {
|
|
33
|
-
uni.redirectTo({
|
|
34
|
-
url: option.url
|
|
35
|
-
})
|
|
36
|
-
}
|
|
37
53
|
}
|
|
38
54
|
}
|
|
39
55
|
}
|
|
@@ -41,25 +57,20 @@ export default {
|
|
|
41
57
|
|
|
42
58
|
<style lang="scss">
|
|
43
59
|
.ml-tabbar {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: row;
|
|
44
62
|
width: 100%;
|
|
45
63
|
position: fixed;
|
|
46
64
|
left: 0;
|
|
47
65
|
bottom: 0;
|
|
48
66
|
z-index: 88;
|
|
67
|
+
padding: 6rpx 0 12rpx 0;
|
|
49
68
|
color: $uni-text-color;
|
|
50
69
|
background: #FFFFFF;
|
|
51
|
-
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 120rpx;
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
align-content: center;
|
|
57
|
-
justify-content: space-between;
|
|
58
|
-
box-sizing: border-box;
|
|
59
|
-
}
|
|
70
|
+
border-top: 1px solid #e5e5e5;
|
|
60
71
|
.ml-tabbar-item {
|
|
61
|
-
|
|
62
|
-
|
|
72
|
+
flex-grow: 1;
|
|
73
|
+
text-align: center;
|
|
63
74
|
&.is-active {
|
|
64
75
|
border: 0;
|
|
65
76
|
color: $uni-color-primary;
|
|
@@ -67,34 +78,27 @@ export default {
|
|
|
67
78
|
}
|
|
68
79
|
.ml-tabbar-num {
|
|
69
80
|
position: absolute;
|
|
70
|
-
top:
|
|
71
|
-
|
|
72
|
-
background-color:
|
|
81
|
+
top: 0;
|
|
82
|
+
left: 114rpx;
|
|
83
|
+
background-color: #f56c6c;
|
|
73
84
|
color: #fff;
|
|
74
85
|
border-radius: 20rpx;
|
|
75
|
-
padding:
|
|
86
|
+
padding: 0 10rpx;
|
|
76
87
|
display: inline-block;
|
|
77
|
-
min-width:
|
|
88
|
+
min-width: 30rpx;
|
|
78
89
|
text-align: center;
|
|
79
|
-
font-size:
|
|
90
|
+
font-size: 22rpx;
|
|
91
|
+
line-height: 32rpx;
|
|
80
92
|
}
|
|
81
93
|
.ml-tabbar-icon {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
margin: 0 auto;
|
|
85
|
-
text-align: center;
|
|
86
|
-
.icon{
|
|
87
|
-
font-size: 40rpx;
|
|
88
|
-
}
|
|
94
|
+
position: relative;
|
|
95
|
+
font-size: 40rpx;
|
|
89
96
|
}
|
|
90
97
|
.ml-tabbar-name {
|
|
91
98
|
width: 100%;
|
|
92
|
-
height: 30rpx;
|
|
93
99
|
text-align: center;
|
|
94
100
|
font-size: 24rpx;
|
|
95
|
-
|
|
96
|
-
letter-spacing: 2rpx;
|
|
97
|
-
line-height: 48rpx;
|
|
101
|
+
line-height: 40rpx;
|
|
98
102
|
}
|
|
99
103
|
}
|
|
100
104
|
</style>
|