mali-applet-ui 0.0.22 → 0.0.25
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 +1 -1
- package/components/ml-button/ml-button.vue +5 -1
- package/components/ml-checkbox/ml-checkbox.vue +2 -2
- package/components/ml-checkbox-group/ml-checkbox-group.vue +1 -1
- package/components/ml-col/ml-col.vue +53 -0
- package/components/ml-date-picker/ml-date-picker.vue +1 -1
- package/components/ml-date-range-picker/ml-date-range-picker.vue +1 -1
- package/components/ml-datetime-picker/ml-datetime-picker.vue +1 -1
- package/components/ml-datetime-range-picker/ml-datetime-range-picker.vue +1 -1
- package/components/ml-echarts/ml-echarts.vue +1 -1
- package/components/ml-form/ml-form.vue +1 -1
- package/components/ml-form-item/ml-form-item.vue +1 -1
- package/components/ml-full-watermark/ml-full-watermark.vue +1 -1
- package/components/ml-icon/ml-icon.vue +1 -1
- package/components/ml-input/ml-input.vue +1 -1
- 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-progress-bar/ml-progress-bar.vue +1 -1
- package/components/ml-province-city-picker/ml-province-city-picker.vue +1 -1
- package/components/ml-radio/ml-radio.vue +2 -2
- package/components/ml-radio-button/ml-radio-button.vue +3 -3
- package/components/ml-radio-group/ml-radio-group.vue +3 -2
- package/components/ml-row/ml-row.vue +4 -1
- package/components/ml-section/ml-section.vue +41 -0
- package/components/ml-select-picker/ml-select-picker.vue +1 -1
- package/components/{ml-layout-tabbar/ml-layout-tabbar.vue → ml-tabbar/ml-tabbar.vue} +16 -16
- package/components/ml-tabs/ml-tabs.vue +15 -4
- package/components/ml-textarea/ml-textarea.vue +1 -1
- package/components/ml-year-picker/ml-year-picker.vue +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
|
|
7
7
|
<script>
|
|
8
8
|
export default {
|
|
9
|
-
name: '
|
|
9
|
+
name: 'MlButton',
|
|
10
|
+
options: {
|
|
11
|
+
virtualHost: true
|
|
12
|
+
},
|
|
10
13
|
props: {
|
|
11
14
|
content: String,
|
|
12
15
|
status: String,
|
|
@@ -30,6 +33,7 @@ export default {
|
|
|
30
33
|
<style lang="scss">
|
|
31
34
|
.ml-button {
|
|
32
35
|
width: 100%;
|
|
36
|
+
margin: 0 10rpx;
|
|
33
37
|
&.type-button {
|
|
34
38
|
line-height: 80rpx;
|
|
35
39
|
border: 1px solid #e5e5e5;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
13
|
export default {
|
|
14
|
-
name: '
|
|
14
|
+
name: 'MlCheckbox',
|
|
15
15
|
props: {
|
|
16
16
|
value: [Boolean, Number, String],
|
|
17
17
|
label: {
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
display: inline-block;
|
|
51
51
|
margin-right: 20rpx;
|
|
52
52
|
&.is-checked {
|
|
53
|
-
color:
|
|
53
|
+
color: $uni-color-primary;
|
|
54
54
|
}
|
|
55
55
|
.checkbox-icon {
|
|
56
56
|
display: inline-block;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-col" :class="[span && !width ? `span-${span}` : '', align ? `align-${align}` : '', width ? 'is-fixed' : '']" :style="styles">
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: 'MlCol',
|
|
10
|
+
options: {
|
|
11
|
+
virtualHost: true
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
span: [String, Number],
|
|
15
|
+
align: String,
|
|
16
|
+
width: String
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
styles () {
|
|
20
|
+
const rest = {}
|
|
21
|
+
if (this.width) {
|
|
22
|
+
rest.width = this.width
|
|
23
|
+
}
|
|
24
|
+
return rest
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<style lang="scss">
|
|
31
|
+
.ml-col {
|
|
32
|
+
$spans: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 33.33333%,
|
|
33
|
+
37.5%, 41.66667%, 45.83333%, 50%, 54.16667%, 58.33333%, 62.5%, 66.66667%,
|
|
34
|
+
70.83333%, 75%, 79.16667%, 83.33333%, 87.5%, 91.66667%, 95.83333%, 100%;
|
|
35
|
+
&.align-left {
|
|
36
|
+
text-align: left;
|
|
37
|
+
}
|
|
38
|
+
&.align-center {
|
|
39
|
+
text-align: center;
|
|
40
|
+
}
|
|
41
|
+
&.align-right {
|
|
42
|
+
text-align: right;
|
|
43
|
+
}
|
|
44
|
+
&:not(.is-fixed) {
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
}
|
|
47
|
+
@for $index from 0 to length($spans) {
|
|
48
|
+
&.span-#{$index + 1} {
|
|
49
|
+
width: nth($spans, $index + 1);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
<script>
|
|
13
13
|
export default {
|
|
14
|
-
name: '
|
|
14
|
+
name: 'MlRadio',
|
|
15
15
|
props: {
|
|
16
16
|
value: [Boolean, Number, String],
|
|
17
17
|
label: {
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
display: inline-block;
|
|
42
42
|
margin-right: 20rpx;
|
|
43
43
|
&.is-checked {
|
|
44
|
-
color:
|
|
44
|
+
color: $uni-color-primary;
|
|
45
45
|
}
|
|
46
46
|
.radio-icon {
|
|
47
47
|
font-size: 1.1em;
|
|
@@ -13,10 +13,10 @@ export default {
|
|
|
13
13
|
disabled: Boolean
|
|
14
14
|
},
|
|
15
15
|
methods: {
|
|
16
|
-
changeEvent (
|
|
17
|
-
const value =
|
|
16
|
+
changeEvent (option) {
|
|
17
|
+
const value = option.value
|
|
18
18
|
this.$emit('input', value)
|
|
19
|
-
this.$emit('change', { value })
|
|
19
|
+
this.$emit('change', { value, option })
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<script>
|
|
10
10
|
export default {
|
|
11
|
-
name: '
|
|
11
|
+
name: 'MlRadioGroup',
|
|
12
12
|
props: {
|
|
13
13
|
value: [Boolean, Number, String],
|
|
14
14
|
options: Array,
|
|
@@ -17,8 +17,9 @@ export default {
|
|
|
17
17
|
},
|
|
18
18
|
methods: {
|
|
19
19
|
changeEvent ({ value }) {
|
|
20
|
+
const option = this.options.find(item => item.value === value)
|
|
20
21
|
this.$emit('input', value)
|
|
21
|
-
this.$emit('change', { value })
|
|
22
|
+
this.$emit('change', { value, option })
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-section" :class="[type ? `type-${type}` : '']">
|
|
3
|
+
<view v-if="title || $slots.header" class="ml-section-header">
|
|
4
|
+
<slot name="header">
|
|
5
|
+
<text class="ml-section-header-title">{{ title }}</text>
|
|
6
|
+
</slot>
|
|
7
|
+
</view>
|
|
8
|
+
<view class="ml-section-content">
|
|
9
|
+
<slot></slot>
|
|
10
|
+
</view>
|
|
11
|
+
</view>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
export default {
|
|
16
|
+
name: 'MlSection',
|
|
17
|
+
props: {
|
|
18
|
+
title: String,
|
|
19
|
+
type: String
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style lang="scss">
|
|
25
|
+
.ml-section {
|
|
26
|
+
&.type-line {
|
|
27
|
+
.ml-section-header-title {
|
|
28
|
+
border-left: 2px solid $uni-color-primary;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
.ml-section-header {
|
|
32
|
+
padding: 10rpx 20rpx;
|
|
33
|
+
.ml-section-header-title {
|
|
34
|
+
padding-left: 20rpx;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.ml-section-content {
|
|
38
|
+
padding: 0 20rpx;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
</style>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-
|
|
3
|
-
<view class="ml-
|
|
4
|
-
<view class="ml-
|
|
5
|
-
<view class="ml-
|
|
2
|
+
<view class="ml-tabbar">
|
|
3
|
+
<view class="ml-tabbar-list">
|
|
4
|
+
<view class="ml-tabbar-item" v-for="(item) in options" :key="item.value" :class="{'is-active': value == item.value}" @click="clickEvent(item)">
|
|
5
|
+
<view class="ml-tabbar-icon">
|
|
6
6
|
<ml-icon class="icon" :name="value == item.value ? item.activeIcon : item.icon"></ml-icon>
|
|
7
7
|
</view>
|
|
8
|
-
<view class="ml-
|
|
9
|
-
<view v-if="item.showNum && item.num > 0" class="ml-
|
|
8
|
+
<view class="ml-tabbar-name">{{ item.name }}</view>
|
|
9
|
+
<view v-if="item.showNum && item.num > 0" class="ml-tabbar-num">{{ item.num }}</view>
|
|
10
10
|
</view>
|
|
11
11
|
</view>
|
|
12
12
|
</view>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
<script>
|
|
16
16
|
export default {
|
|
17
|
-
name: '
|
|
17
|
+
name: 'MlTabbar',
|
|
18
18
|
props: {
|
|
19
19
|
value: [String, Number],
|
|
20
20
|
options: Array
|
|
@@ -25,24 +25,24 @@ export default {
|
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
methods: {
|
|
28
|
-
clickEvent (
|
|
29
|
-
const value =
|
|
28
|
+
clickEvent (option) {
|
|
29
|
+
const value = option.value
|
|
30
30
|
this.$emit('input', value)
|
|
31
|
-
this.$emit('change', { value })
|
|
31
|
+
this.$emit('change', { value, option })
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
</script>
|
|
36
36
|
|
|
37
37
|
<style lang="scss">
|
|
38
|
-
.ml-
|
|
38
|
+
.ml-tabbar {
|
|
39
39
|
width: 100%;
|
|
40
40
|
position: fixed;
|
|
41
41
|
left: 0;
|
|
42
42
|
bottom: 0;
|
|
43
43
|
z-index: 88;
|
|
44
44
|
background: #FFFFFF;
|
|
45
|
-
.ml-
|
|
45
|
+
.ml-tabbar-list {
|
|
46
46
|
width: 100%;
|
|
47
47
|
height: 120rpx;
|
|
48
48
|
display: flex;
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
justify-content: space-between;
|
|
52
52
|
box-sizing: border-box;
|
|
53
53
|
}
|
|
54
|
-
.ml-
|
|
54
|
+
.ml-tabbar-item {
|
|
55
55
|
position: relative;
|
|
56
56
|
flex: 1;
|
|
57
57
|
&.is-active {
|
|
@@ -59,7 +59,7 @@ export default {
|
|
|
59
59
|
color: #2497FF;
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
.ml-
|
|
62
|
+
.ml-tabbar-num {
|
|
63
63
|
position: absolute;
|
|
64
64
|
top: -4px;
|
|
65
65
|
right: 40rpx;
|
|
@@ -72,7 +72,7 @@ export default {
|
|
|
72
72
|
text-align: center;
|
|
73
73
|
font-size: 24rpx;
|
|
74
74
|
}
|
|
75
|
-
.ml-
|
|
75
|
+
.ml-tabbar-icon {
|
|
76
76
|
width: 45rpx;
|
|
77
77
|
height: 45rpx;
|
|
78
78
|
margin: 0 auto;
|
|
@@ -81,7 +81,7 @@ export default {
|
|
|
81
81
|
font-size: 40rpx;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
.ml-
|
|
84
|
+
.ml-tabbar-name {
|
|
85
85
|
width: 100%;
|
|
86
86
|
height: 30rpx;
|
|
87
87
|
text-align: center;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ml-tabs">
|
|
3
|
-
<scroll-view
|
|
4
|
-
<view class="ml-tabs-
|
|
3
|
+
<scroll-view scroll-x>
|
|
4
|
+
<view class="ml-tabs-navs">
|
|
5
|
+
<view class="ml-tabs-nav-item" v-for="(item, index) in options" :key="index" :class="{'is-active': value === item.value}" @tap="changeEvent(item)">{{ item.label }}</view>
|
|
6
|
+
</view>
|
|
5
7
|
</scroll-view>
|
|
6
8
|
</view>
|
|
7
9
|
</template>
|
|
8
10
|
|
|
9
11
|
<script>
|
|
10
12
|
export default {
|
|
13
|
+
name: 'MlTabs',
|
|
11
14
|
props: {
|
|
12
15
|
value: [String, Number],
|
|
13
16
|
options: Array
|
|
@@ -28,10 +31,18 @@ export default {
|
|
|
28
31
|
<style lang="scss">
|
|
29
32
|
.ml-tabs {
|
|
30
33
|
.ml-tabs-navs {
|
|
31
|
-
display:
|
|
34
|
+
display: inline-block;
|
|
35
|
+
white-space: nowrap;
|
|
32
36
|
}
|
|
33
37
|
.ml-tabs-nav-item {
|
|
34
|
-
|
|
38
|
+
position: relative;
|
|
39
|
+
display: inline-block;
|
|
40
|
+
padding: 10rpx 20rpx;
|
|
41
|
+
margin: 0 10rpx;
|
|
42
|
+
&.is-active {
|
|
43
|
+
color: $uni-color-primary;
|
|
44
|
+
border-bottom: 1px solid $uni-color-primary;
|
|
45
|
+
}
|
|
35
46
|
}
|
|
36
47
|
}
|
|
37
48
|
</style>
|