mali-applet-ui 0.0.35 → 0.0.36
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-button/ml-button.vue +47 -23
- package/components/ml-checkbox/ml-checkbox.vue +1 -1
- package/components/ml-checkbox-group/ml-checkbox-group.vue +1 -1
- package/components/ml-chunk-group/ml-chunk-group.vue +2 -2
- package/components/ml-chunk-item/ml-chunk-item.vue +1 -1
- package/components/ml-col/ml-col.vue +1 -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-menu-group/ml-list-menu-group.vue +3 -3
- package/components/ml-list-menu-item/ml-list-menu-item.vue +26 -5
- 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 +1 -1
- 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 +1 -1
- package/components/ml-section/ml-section.vue +1 -1
- package/components/ml-select-picker/ml-select-picker.vue +1 -1
- 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
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-checkbox" :class="[className, {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
2
|
+
<view class="ml-checkbox" :class="[className || '', {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
3
|
<ml-icon class="checkbox-icon" :name="checked ? 'checkbox-checked' : (indeterminate ? 'checkbox-indeterminate' : 'checkbox-unchecked')"></ml-icon>
|
|
4
4
|
<text class="checkbox-content">
|
|
5
5
|
<slot>
|
|
@@ -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>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-chunk-group" :class="[className, status ? `status-${status}` : '', align ? `align-${align}` : '', {'is-vertical': vertical, 'is-header': title || $slots.title}]">
|
|
2
|
+
<view class="ml-chunk-group" :class="[className || '', status ? `status-${status}` : '', align ? `align-${align}` : '', {'is-vertical': vertical, 'is-header': title || $slots.title}]">
|
|
3
3
|
<view v-if="title || $slots.title" class="ml-chunk-group-title">
|
|
4
4
|
<slot name="title">
|
|
5
5
|
<view v-if="prefixIcon" class="ml-chunk-group-left-icon">
|
|
6
|
-
<ml-icon :className="prefixIcon"></ml-icon>
|
|
6
|
+
<ml-icon :className="prefixIcon" :status="status"></ml-icon>
|
|
7
7
|
</view>
|
|
8
8
|
<text class="ml-chunk-group-title-content">{{ title }}</text>
|
|
9
9
|
</slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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">
|
|
2
|
+
<view class="ml-chunk-item" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', {'is-fixed': width, 'is-vertical': isVertical}]" :style="styles">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-col" :class="[className, span && !width ? `span-${span}` : '', align ? `align-${align}` : '', width ? 'is-fixed' : '']" :style="styles">
|
|
2
|
+
<view class="ml-col" :class="[className || '', span && !width ? `span-${span}` : '', align ? `align-${align}` : '', width ? 'is-fixed' : '']" :style="styles">
|
|
3
3
|
<slot></slot>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -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>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ml-list-menu-group" :class="className">
|
|
3
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>
|
|
4
7
|
<slot name="title">
|
|
5
|
-
<view v-if="prefixIcon" class="ml-list-menu-group-left-icon">
|
|
6
|
-
<ml-icon :className="prefixIcon"></ml-icon>
|
|
7
|
-
</view>
|
|
8
8
|
<text class="ml-list-menu-group-title-content">{{ title }}</text>
|
|
9
9
|
</slot>
|
|
10
10
|
</view>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ml-list-menu-item" :class="className" @click="clickEvent" @tap="tapEvent">
|
|
3
|
-
<view v-if="prefixIcon" class="ml-list-menu-item-left-icon">
|
|
3
|
+
<view v-if="prefixIcon && prefixIcon !== 'none'" class="ml-list-menu-item-left-icon">
|
|
4
4
|
<ml-icon :className="prefixIcon"></ml-icon>
|
|
5
5
|
</view>
|
|
6
6
|
<view class="ml-list-menu-item-content">
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
</slot>
|
|
10
10
|
</view>
|
|
11
11
|
<view v-if="showDot" class="ml-list-menu-item-dot">
|
|
12
|
-
<text class="ml-list-menu-item-dot-num">{{ getDotNum(dotNum) }}</text>
|
|
12
|
+
<text class="ml-list-menu-item-dot-num" :class="[dotStatus ? `status-${dotStatus}` : '']">{{ getDotNum(dotNum) }}</text>
|
|
13
13
|
</view>
|
|
14
|
-
<view class="ml-list-menu-item-right-icon">
|
|
15
|
-
<ml-icon
|
|
14
|
+
<view v-if="suffixIcon && suffixIcon !== 'none'" class="ml-list-menu-item-right-icon">
|
|
15
|
+
<ml-icon :className="suffixIcon"></ml-icon>
|
|
16
16
|
</view>
|
|
17
17
|
</view>
|
|
18
18
|
</template>
|
|
@@ -26,11 +26,15 @@ export default {
|
|
|
26
26
|
props: {
|
|
27
27
|
name: String,
|
|
28
28
|
prefixIcon: String,
|
|
29
|
-
suffixIcon:
|
|
29
|
+
suffixIcon: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: 'mlicon-arrow-right'
|
|
32
|
+
},
|
|
30
33
|
url: String,
|
|
31
34
|
redirect: Boolean,
|
|
32
35
|
className: String,
|
|
33
36
|
showDot: Boolean,
|
|
37
|
+
dotStatus: String,
|
|
34
38
|
dotNum: [String, Number]
|
|
35
39
|
},
|
|
36
40
|
methods: {
|
|
@@ -71,6 +75,8 @@ export default {
|
|
|
71
75
|
border-top: 1px solid #e5e5e5;
|
|
72
76
|
}
|
|
73
77
|
.ml-list-menu-item-content {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-direction: row;
|
|
74
80
|
flex-grow: 1;
|
|
75
81
|
overflow: hidden;
|
|
76
82
|
text-overflow: ellipsis;
|
|
@@ -90,6 +96,21 @@ export default {
|
|
|
90
96
|
text-align: center;
|
|
91
97
|
font-size: 22rpx;
|
|
92
98
|
line-height: 40rpx;
|
|
99
|
+
&.status-primary {
|
|
100
|
+
background-color: $uni-color-primary;
|
|
101
|
+
}
|
|
102
|
+
&.status-success {
|
|
103
|
+
background-color: $uni-color-success;
|
|
104
|
+
}
|
|
105
|
+
&.status-info {
|
|
106
|
+
background-color: #909399;
|
|
107
|
+
}
|
|
108
|
+
&.status-warning {
|
|
109
|
+
background-color: $uni-color-warning;
|
|
110
|
+
}
|
|
111
|
+
&.status-danger {
|
|
112
|
+
background-color: $uni-color-error;
|
|
113
|
+
}
|
|
93
114
|
}
|
|
94
115
|
}
|
|
95
116
|
.ml-list-menu-item-left-icon,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<picker :value="value" class="ml-month-picker" :class="[className, {'is-border': border}]" mode="date" fields="month" @change="changeEvent">
|
|
2
|
+
<picker :value="value" class="ml-month-picker" :class="[className || '', {'is-border': border}]" mode="date" fields="month" @change="changeEvent">
|
|
3
3
|
<view class="picker-warpper">
|
|
4
4
|
<view class="picker-text">{{ value || '请选择' }}</view>
|
|
5
5
|
<ml-icon class="picker-icon" name="arrow-down"></ml-icon>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="ml-number-input"
|
|
4
4
|
v-model="inpVal"
|
|
5
5
|
type="text"
|
|
6
|
-
:class="[className, {'is-right': align === 'right', 'is-border': border}]"
|
|
6
|
+
:class="[className || '', {'is-right': align === 'right', 'is-border': border}]"
|
|
7
7
|
autocomplete="off"
|
|
8
8
|
:placeholder="placeholder"
|
|
9
9
|
:maxlength="maxLength"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-radio" :class="[className, {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
2
|
+
<view class="ml-radio" :class="[className || '', {'is-checked': checked, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
3
|
<ml-icon class="radio-icon" :name="checked ? 'radio-checked' : 'radio-unchecked'"></ml-icon>
|
|
4
4
|
<text class="radio-content">
|
|
5
5
|
<slot>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-radio-button" :class="[className, {'is-disabled': disabled}]">
|
|
2
|
+
<view class="ml-radio-button" :class="[className || '', {'is-disabled': disabled}]">
|
|
3
3
|
<view class="ml-radio-button-item" v-for="(item, index) in options" :class="{'is-active': value === item.value}" :key="index" @tap="changeEvent(item)">{{ item.label }}</view>
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
@@ -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-radio :value="value" :label="item.value" :content="item.label" :disabled="disabled || item.disabled" @change="changeEvent"></ml-radio>
|
|
5
5
|
</view>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-section" :class="[className, type ? `type-${type}` : '']">
|
|
2
|
+
<view class="ml-section" :class="[className || '', type ? `type-${type}` : '']">
|
|
3
3
|
<view v-if="title || $slots.header" class="ml-section-header">
|
|
4
4
|
<slot name="header">
|
|
5
5
|
<text class="ml-section-header-title">{{ title }}</text>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<picker class="ml-select-picker" :class="[className, {'is-border': border}]" :range="optionList" :range-key="optLabelField" @change="changeEvent">
|
|
2
|
+
<picker class="ml-select-picker" :class="[className || '', {'is-border': border}]" :range="optionList" :range-key="optLabelField" @change="changeEvent">
|
|
3
3
|
<view class="picker-warpper" :style="{width: width || '160rpx'}">
|
|
4
4
|
<view class="picker-text">
|
|
5
5
|
<text v-if="value !== null">{{ selectName }}</text>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-textarea" :class="[className, {'is-border': border}]">
|
|
2
|
+
<view class="ml-textarea" :class="[className || '', {'is-border': border}]">
|
|
3
3
|
<view v-if="readonly" class="content">{{ inpVal }}</view>
|
|
4
4
|
<view v-else>
|
|
5
5
|
<textarea class="textarea" v-model="inpVal" :rows="rows" :maxlength="maxLength" :placeholder="placeholder" @input="inputEvent" :style="{color: fontColor, height: `${rows * 30}rpx`}"></textarea>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<picker :value="value" class="ml-year-picker" :class="[className, {'is-border': border}]" mode="date" fields="year" @change="changeEvent">
|
|
2
|
+
<picker :value="value" class="ml-year-picker" :class="[className || '', {'is-border': border}]" mode="date" fields="year" @change="changeEvent">
|
|
3
3
|
<view class="picker-warpper">
|
|
4
4
|
<view class="picker-text">{{ value || '请选择' }}</view>
|
|
5
5
|
<ml-icon class="picker-icon" name="arrow-down"></ml-icon>
|