mali-applet-ui 1.0.18 → 1.0.20
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/README.md +2 -0
- package/config/store.js +7 -7
- package/lib/components/ml-amount-input/ml-amount-input.vue +2 -2
- package/lib/components/ml-approval-type/ml-approval-type.vue +2 -2
- package/lib/components/ml-button/ml-button.vue +21 -2
- package/lib/components/ml-card/ml-card.vue +5 -1
- package/lib/components/ml-chunk-item/ml-chunk-item.vue +1 -1
- package/lib/components/ml-col/ml-col.vue +2 -2
- package/lib/components/ml-echarts/ml-echarts.vue +5 -0
- package/lib/components/ml-form/ml-form.vue +1 -2
- package/lib/components/ml-form-group/ml-form-group.vue +1 -0
- package/lib/components/ml-form-item/ml-form-item.vue +4 -7
- package/lib/components/ml-input/ml-input.vue +37 -13
- package/lib/components/ml-list-group/ml-list-group.vue +1 -0
- package/lib/components/ml-list-item/ml-list-item.vue +9 -1
- package/lib/components/ml-list-menu-group/ml-list-menu-group.vue +0 -1
- package/lib/components/ml-list-menu-item/ml-list-menu-item.vue +26 -5
- package/lib/components/ml-location-pick/location.js +12 -0
- package/lib/components/ml-location-pick/ml-location-pick.vue +72 -0
- package/lib/components/ml-modal/ml-modal.vue +1 -0
- package/lib/components/ml-month-picker/ml-month-picker.vue +1 -1
- package/lib/components/ml-not-data/ml-not-data.vue +1 -1
- package/lib/components/ml-number-input/ml-number-input.vue +2 -2
- package/lib/components/ml-progress-bar/ml-progress-bar.vue +1 -1
- package/lib/components/ml-search-bar/ml-search-bar.vue +8 -8
- package/lib/components/ml-select-picker/ml-select-picker.vue +1 -1
- package/lib/components/ml-status-tag/ml-status-tag.vue +12 -4
- package/lib/components/ml-tabs/ml-tabs.vue +1 -1
- package/lib/components/ml-textarea/ml-textarea.vue +3 -4
- package/lib/components/ml-textarea/voice-input.vue +1 -1
- package/lib/components/ml-upload/ml-upload.vue +5 -9
- package/lib/components/ml-year-picker/ml-year-picker.vue +1 -1
- package/package.json +1 -1
- package/theme.scss +9 -0
package/README.md
CHANGED
package/config/store.js
CHANGED
|
@@ -28,13 +28,13 @@ const globalStore = {
|
|
|
28
28
|
optionMethod: null
|
|
29
29
|
},
|
|
30
30
|
types: [
|
|
31
|
-
{ value: 0, label: '起草中', color: '#353535', background: '#
|
|
32
|
-
{ value: 1, label: '审批中', color: '#
|
|
33
|
-
{ value: 2, label: '已通过', color: '#
|
|
34
|
-
{ value: 3, label: '已驳回', color: '#
|
|
35
|
-
{ value: 4, label: '会签中', color: '#
|
|
36
|
-
{ value: 5, label: '处理中', color: '#
|
|
37
|
-
{ value: 6, label: '已完成', color: '#
|
|
31
|
+
{ value: 0, label: '起草中', color: '#353535', background: '#eaebed' },
|
|
32
|
+
{ value: 1, label: '审批中', color: '#007FFF', background: '#e0efff' },
|
|
33
|
+
{ value: 2, label: '已通过', color: '#00B042', background: '#e0f5e8' },
|
|
34
|
+
{ value: 3, label: '已驳回', color: '#FF5064', background: '#ffeaec' },
|
|
35
|
+
{ value: 4, label: '会签中', color: '#007FFF', background: '#e0efff' },
|
|
36
|
+
{ value: 5, label: '处理中', color: '#007FFF', background: '#e0efff' },
|
|
37
|
+
{ value: 6, label: '已完成', color: '#00B042', background: '#e0f5e8' }
|
|
38
38
|
]
|
|
39
39
|
},
|
|
40
40
|
// 上拉加载更多
|
|
@@ -215,7 +215,7 @@ export default {
|
|
|
215
215
|
display: flex;
|
|
216
216
|
flex-direction: row;
|
|
217
217
|
.ml-amount-input-placeholder {
|
|
218
|
-
color: $
|
|
218
|
+
color: $ml-input-color-placeholder;;
|
|
219
219
|
}
|
|
220
220
|
.ml-amount-input-readonly-content {
|
|
221
221
|
padding: 20rpx 4rpx;
|
|
@@ -263,7 +263,7 @@ export default {
|
|
|
263
263
|
}
|
|
264
264
|
.ml-amount-input-inp,
|
|
265
265
|
.ml-amount-input-simulate {
|
|
266
|
-
font-size: $
|
|
266
|
+
font-size: $ml-base-font-size;
|
|
267
267
|
width: 100%;
|
|
268
268
|
height: 70rpx;
|
|
269
269
|
padding: 0 10rpx;
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<button
|
|
2
|
+
<button
|
|
3
|
+
class="ml-button"
|
|
4
|
+
:class="[className || '', `type-${type}`, size ? `size-${size}` : '', status ? `ss-${status}` : '', {'is-round': round, 'is-underline': underline, 'is-disabled': disabled}]"
|
|
5
|
+
:disabled="disabled"
|
|
6
|
+
:open-type="openType"
|
|
7
|
+
:style="styles"
|
|
8
|
+
@tap="tapEvent"
|
|
9
|
+
@click="clickEvent">
|
|
3
10
|
<slot>{{ content }}</slot>
|
|
4
11
|
</button>
|
|
5
12
|
</template>
|
|
@@ -72,7 +79,19 @@ export default {
|
|
|
72
79
|
line-height: 1.5;
|
|
73
80
|
vertical-align: middle;
|
|
74
81
|
background: transparent;
|
|
75
|
-
font-size: $
|
|
82
|
+
font-size: $ml-base-font-size;
|
|
83
|
+
&.size-large {
|
|
84
|
+
font-size: 40rpx;
|
|
85
|
+
}
|
|
86
|
+
&.size-medium {
|
|
87
|
+
font-size: 36rpx;
|
|
88
|
+
}
|
|
89
|
+
&.size-small {
|
|
90
|
+
font-size: 28rpx;
|
|
91
|
+
}
|
|
92
|
+
&.size-mini {
|
|
93
|
+
font-size: 24rpx;
|
|
94
|
+
}
|
|
76
95
|
&.is-underline {
|
|
77
96
|
text-decoration: underline;
|
|
78
97
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-card" :class="{'is-bg': background, 'is-padding': padding}">
|
|
2
|
+
<view class="ml-card" :class="{'is-bg': background, 'is-padding': padding, 'is-border': border}">
|
|
3
3
|
<view v-if="title || showHeader" class="ml-card-header">
|
|
4
4
|
<view class="ml-card-title">
|
|
5
5
|
<slot name="title">{{ title }}</slot>
|
|
@@ -22,6 +22,7 @@ export default {
|
|
|
22
22
|
},
|
|
23
23
|
props: {
|
|
24
24
|
title: String,
|
|
25
|
+
border: Boolean,
|
|
25
26
|
background: {
|
|
26
27
|
type: Boolean,
|
|
27
28
|
default: true
|
|
@@ -42,6 +43,9 @@ export default {
|
|
|
42
43
|
&.is-bg {
|
|
43
44
|
background: #fff;
|
|
44
45
|
}
|
|
46
|
+
&.is-border {
|
|
47
|
+
border: 1px solid #e5e5e5;
|
|
48
|
+
}
|
|
45
49
|
&.is-padding {
|
|
46
50
|
.ml-card-body {
|
|
47
51
|
padding: 0 20rpx 20rpx 20rpx;
|
|
@@ -60,7 +60,7 @@ export default {
|
|
|
60
60
|
flex-direction: column;
|
|
61
61
|
padding: 20rpx;
|
|
62
62
|
line-height: 50rpx;
|
|
63
|
-
font-size: $
|
|
63
|
+
font-size: $ml-describe-font-size;
|
|
64
64
|
$spans: 4.16667%, 8.33333%, 12.5%, 16.66667%, 20.83333%, 25%, 29.16667%, 33.33333%,
|
|
65
65
|
37.5%, 41.66667%, 45.83333%, 50%, 54.16667%, 58.33333%, 62.5%, 66.66667%,
|
|
66
66
|
70.83333%, 75%, 79.16667%, 83.33333%, 87.5%, 91.66667%, 95.83333%, 100%;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ml-form-item" :class="[className || '', itemTitleAlign ? `title-align-${itemTitleAlign}` : '', itemAlign ? `align-${itemAlign}` : '', {'is-border': isFormBorder, 'is-vertical': itemVertical, 'is-required': isRequired, 'is-error': itemErrRule}]">
|
|
3
|
-
<view class="ml-form-item-header" :style="titleStyle">
|
|
3
|
+
<view v-if="title || $slots.title" class="ml-form-item-header" :style="titleStyle">
|
|
4
4
|
<view v-if="isRequired" class="ml-form-item-header-asterisk">*</view>
|
|
5
5
|
<view class="ml-form-item-header-title">
|
|
6
6
|
<slot name="title">{{ title }}</slot>
|
|
@@ -185,8 +185,8 @@ export default {
|
|
|
185
185
|
position: relative;
|
|
186
186
|
display: flex;
|
|
187
187
|
flex-direction: row;
|
|
188
|
-
font-size: $uni-font-size-base;
|
|
189
188
|
padding: 10rpx 20rpx;
|
|
189
|
+
font-size: $ml-base-font-size;
|
|
190
190
|
&.is-border {
|
|
191
191
|
border-bottom: 1px solid #e5e5e5;
|
|
192
192
|
}
|
|
@@ -207,6 +207,7 @@ export default {
|
|
|
207
207
|
}
|
|
208
208
|
.ml-form-item-header-title {
|
|
209
209
|
display: inline;
|
|
210
|
+
color: #171A1D;
|
|
210
211
|
}
|
|
211
212
|
&.is-vertical {
|
|
212
213
|
flex-direction: column;
|
|
@@ -256,12 +257,11 @@ export default {
|
|
|
256
257
|
.ml-form-item-content {
|
|
257
258
|
position: relative;
|
|
258
259
|
display: flex;
|
|
259
|
-
|
|
260
|
+
justify-content: center;
|
|
260
261
|
flex-direction: column;
|
|
261
262
|
flex-grow: 1;
|
|
262
263
|
}
|
|
263
264
|
.ml-form-item-content-warpper {
|
|
264
|
-
flex-grow: 1;
|
|
265
265
|
width: 100%;
|
|
266
266
|
padding: 10rpx 0;
|
|
267
267
|
}
|
|
@@ -269,9 +269,6 @@ export default {
|
|
|
269
269
|
vertical-align: middle;
|
|
270
270
|
}
|
|
271
271
|
.ml-form-item-content-error {
|
|
272
|
-
position: absolute;
|
|
273
|
-
left: 0;
|
|
274
|
-
bottom: -20rpx;
|
|
275
272
|
width: 100%;
|
|
276
273
|
color: $uni-color-error;
|
|
277
274
|
font-size: 24rpx;
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
<text v-else class="ml-input-placeholder">{{ placeholder }}</text>
|
|
9
9
|
</view>
|
|
10
10
|
</view>
|
|
11
|
-
<view v-else class="ml-input" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-prefix':
|
|
12
|
-
<view v-if="
|
|
13
|
-
<
|
|
14
|
-
|
|
11
|
+
<view v-else class="ml-input" :class="[className || '', {'is-right': align === 'right', 'is-border': border, 'is-prefix': hasPrefix || type === 'search', 'is-suffix': hasSuffix, 'is-disabled': disabled, 'is-clear': clearable && inpVal}]">
|
|
12
|
+
<view v-if="hasPrefix || type === 'search'" class="ml-input-prefix-icon">
|
|
13
|
+
<slot name="prefix">
|
|
14
|
+
<ml-icon v-if="prefixIcon" :name="prefixIcon"></ml-icon>
|
|
15
|
+
<ml-icon v-else name="search"></ml-icon>
|
|
16
|
+
</slot>
|
|
15
17
|
</view>
|
|
16
18
|
<input
|
|
17
19
|
v-model="inpVal"
|
|
@@ -29,8 +31,10 @@
|
|
|
29
31
|
<view v-if="clearable && !disabled && inpVal" class="ml-input-clear-icon" @click.stop="clearEvent">
|
|
30
32
|
<ml-icon name="delete-filling"></ml-icon>
|
|
31
33
|
</view>
|
|
32
|
-
<view v-if="
|
|
33
|
-
<
|
|
34
|
+
<view v-if="hasSuffix" class="ml-input-suffix-icon">
|
|
35
|
+
<slot name="suffix">
|
|
36
|
+
<ml-icon :name="suffixIcon"></ml-icon>
|
|
37
|
+
</slot>
|
|
34
38
|
</view>
|
|
35
39
|
</view>
|
|
36
40
|
</template>
|
|
@@ -41,6 +45,7 @@ import { getPlatformEnv } from '../../../utils'
|
|
|
41
45
|
export default {
|
|
42
46
|
name: 'MlInput',
|
|
43
47
|
options: {
|
|
48
|
+
styleIsolation: 'shared',
|
|
44
49
|
virtualHost: true
|
|
45
50
|
},
|
|
46
51
|
props: {
|
|
@@ -88,6 +93,12 @@ export default {
|
|
|
88
93
|
return true
|
|
89
94
|
}
|
|
90
95
|
return this.form ? this.form.readonly : false
|
|
96
|
+
},
|
|
97
|
+
hasSuffix () {
|
|
98
|
+
return this.$slots.suffix || this.suffixIcon
|
|
99
|
+
},
|
|
100
|
+
hasPrefix () {
|
|
101
|
+
return this.$slots.prefix || this.prefixIcon
|
|
91
102
|
}
|
|
92
103
|
},
|
|
93
104
|
watch: {
|
|
@@ -123,13 +134,13 @@ export default {
|
|
|
123
134
|
}
|
|
124
135
|
</script>
|
|
125
136
|
|
|
126
|
-
<style lang="scss">
|
|
137
|
+
<style lang="scss" scoped>
|
|
127
138
|
.ml-input {
|
|
128
139
|
flex-grow: 1;
|
|
129
140
|
display: flex;
|
|
130
141
|
flex-direction: row;
|
|
131
142
|
.ml-input-placeholder {
|
|
132
|
-
color: $
|
|
143
|
+
color: $ml-input-color-placeholder;;
|
|
133
144
|
}
|
|
134
145
|
.ml-input-simulate {
|
|
135
146
|
padding: 0 10rpx;
|
|
@@ -151,7 +162,7 @@ export default {
|
|
|
151
162
|
padding: 0 10rpx;
|
|
152
163
|
height: 70rpx;
|
|
153
164
|
width: 100%;
|
|
154
|
-
font-size: $
|
|
165
|
+
font-size: $ml-base-font-size;
|
|
155
166
|
}
|
|
156
167
|
.ml-input-clear-icon {
|
|
157
168
|
width: 60rpx;
|
|
@@ -170,10 +181,13 @@ export default {
|
|
|
170
181
|
flex-shrink: 0;
|
|
171
182
|
align-items: center;
|
|
172
183
|
justify-content: center;
|
|
173
|
-
border: 1px solid #e5e5e5;
|
|
174
184
|
font-size: 34rpx;
|
|
175
|
-
padding: 0 10rpx;
|
|
176
185
|
color: rgba(0, 0, 0, 0.4);
|
|
186
|
+
::v-deep .ml-button.type-button {
|
|
187
|
+
height: 67rpx !important;
|
|
188
|
+
line-height: 67rpx !important;
|
|
189
|
+
border: none;
|
|
190
|
+
}
|
|
177
191
|
}
|
|
178
192
|
.ml-input-prefix-icon {
|
|
179
193
|
border-right: 0;
|
|
@@ -187,8 +201,6 @@ export default {
|
|
|
187
201
|
text-align: right;
|
|
188
202
|
}
|
|
189
203
|
}
|
|
190
|
-
&.is-prefix,
|
|
191
|
-
&.is-suffix,
|
|
192
204
|
&.is-border {
|
|
193
205
|
.ml-input-clear-icon {
|
|
194
206
|
border: 1px solid #e5e5e5;
|
|
@@ -201,6 +213,12 @@ export default {
|
|
|
201
213
|
}
|
|
202
214
|
}
|
|
203
215
|
&.is-prefix {
|
|
216
|
+
&.is-border {
|
|
217
|
+
.ml-input-prefix-icon {
|
|
218
|
+
border: 1px solid #e5e5e5;
|
|
219
|
+
border-right: 0;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
204
222
|
.ml-input-prefix-icon {
|
|
205
223
|
border-radius: $ml-border-radius 0 0 $ml-border-radius;
|
|
206
224
|
}
|
|
@@ -210,6 +228,12 @@ export default {
|
|
|
210
228
|
}
|
|
211
229
|
}
|
|
212
230
|
&.is-suffix {
|
|
231
|
+
&.is-border {
|
|
232
|
+
.ml-input-suffix-icon {
|
|
233
|
+
border: 1px solid #e5e5e5;
|
|
234
|
+
border-left: 0;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
213
237
|
.ml-input-clear-icon {
|
|
214
238
|
border-radius: 0;
|
|
215
239
|
border-right: 0;
|
|
@@ -47,6 +47,7 @@ export default {
|
|
|
47
47
|
},
|
|
48
48
|
url: String,
|
|
49
49
|
redirect: Boolean,
|
|
50
|
+
itemStyle: Object,
|
|
50
51
|
backgroundColor: String,
|
|
51
52
|
color: String,
|
|
52
53
|
className: String
|
|
@@ -66,7 +67,13 @@ export default {
|
|
|
66
67
|
styles () {
|
|
67
68
|
const cr = this.color ? `color:${this.color};` : ''
|
|
68
69
|
const bgCr = this.backgroundColor ? `background-color:${this.backgroundColor};` : ''
|
|
69
|
-
|
|
70
|
+
let rest = `${bgCr}${cr}`
|
|
71
|
+
for (const key in this.itemStyle) {
|
|
72
|
+
if (!XEUtils.eqNull(this.itemStyle[key])) {
|
|
73
|
+
rest += `${key}:${this.itemStyle[key]};`
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return rest
|
|
70
77
|
},
|
|
71
78
|
hasCheckedChecked () {
|
|
72
79
|
return this.selection.includes(this.value)
|
|
@@ -154,6 +161,7 @@ export default {
|
|
|
154
161
|
padding: 20rpx;
|
|
155
162
|
border-radius: $ml-border-radius;
|
|
156
163
|
background: #ffffff;
|
|
164
|
+
font-size: $ml-describe-font-size;
|
|
157
165
|
&.is-disabled {
|
|
158
166
|
opacity: 0.5;
|
|
159
167
|
// #ifdef H5
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="ml-list-menu-item" :class="[className || '', itemType ? `type-${itemType}` : '', {'is-vertical': itemVertical, 'is-disabled': disabled}]" @click="clickEvent" @tap="tapEvent">
|
|
2
|
+
<view class="ml-list-menu-item" :class="[className || '', itemType ? `type-${itemType}` : '', {'is-vertical': itemVertical, 'is-border': border, 'is-disabled': disabled}]" :style="styles" @click="clickEvent" @tap="tapEvent">
|
|
3
3
|
<view v-if="itemType === 'checkbox'" class="ml-list-menu-checkbox-icon">
|
|
4
4
|
<ml-checkbox :value="hasCheckedChecked" :disabled="disabled"></ml-checkbox>
|
|
5
5
|
</view>
|
|
@@ -46,8 +46,16 @@ export default {
|
|
|
46
46
|
default: 'mlicon-arrow-right'
|
|
47
47
|
},
|
|
48
48
|
url: String,
|
|
49
|
+
border: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true
|
|
52
|
+
},
|
|
49
53
|
redirect: Boolean,
|
|
50
54
|
className: String,
|
|
55
|
+
backgroundColor: String,
|
|
56
|
+
margin: String,
|
|
57
|
+
color: String,
|
|
58
|
+
itemStyle: Object,
|
|
51
59
|
showDot: Boolean,
|
|
52
60
|
dotStatus: String,
|
|
53
61
|
dotNum: [String, Number]
|
|
@@ -64,6 +72,17 @@ export default {
|
|
|
64
72
|
}
|
|
65
73
|
},
|
|
66
74
|
computed: {
|
|
75
|
+
styles () {
|
|
76
|
+
const cr = this.color ? `color:${this.color};` : ''
|
|
77
|
+
const bgCr = this.backgroundColor ? `background-color:${this.backgroundColor};` : ''
|
|
78
|
+
let rest = `${bgCr}${cr}`
|
|
79
|
+
for (const key in this.itemStyle) {
|
|
80
|
+
if (!XEUtils.eqNull(this.itemStyle[key])) {
|
|
81
|
+
rest += `${key}:${this.itemStyle[key]};`
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return rest
|
|
85
|
+
},
|
|
67
86
|
hasCheckedChecked () {
|
|
68
87
|
return this.selection.includes(this.value)
|
|
69
88
|
},
|
|
@@ -152,9 +171,8 @@ export default {
|
|
|
152
171
|
display: flex;
|
|
153
172
|
flex-direction: row;
|
|
154
173
|
align-items: center;
|
|
155
|
-
border-bottom: 1px solid #e5e5e5;
|
|
156
174
|
min-height: 90rpx;
|
|
157
|
-
font-size:
|
|
175
|
+
font-size: $ml-base-font-size;
|
|
158
176
|
padding: 10rpx 20rpx;
|
|
159
177
|
background: #ffffff;
|
|
160
178
|
&.is-disabled {
|
|
@@ -163,8 +181,11 @@ export default {
|
|
|
163
181
|
cursor: no-drop;
|
|
164
182
|
// #endif
|
|
165
183
|
}
|
|
166
|
-
|
|
167
|
-
border-
|
|
184
|
+
&.is-border {
|
|
185
|
+
border-bottom: 1px solid #e5e5e5;
|
|
186
|
+
&:first-child {
|
|
187
|
+
border-top: 1px solid #e5e5e5;
|
|
188
|
+
}
|
|
168
189
|
}
|
|
169
190
|
.ml-list-menu-checkbox-icon,
|
|
170
191
|
.ml-list-menu-radio-icon {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="ml-location-pick">
|
|
3
|
+
<ml-input
|
|
4
|
+
:border="border"
|
|
5
|
+
:placeholder="placeholder"
|
|
6
|
+
v-model="useValue"
|
|
7
|
+
:disabled="disabled">
|
|
8
|
+
<template #suffix>
|
|
9
|
+
<ml-button @click="handleSelectLocation">
|
|
10
|
+
<ml-icon name="map"></ml-icon>
|
|
11
|
+
</ml-button>
|
|
12
|
+
</template>
|
|
13
|
+
</ml-input>
|
|
14
|
+
</view>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
import { getLocation } from './location.js'
|
|
19
|
+
|
|
20
|
+
export default {
|
|
21
|
+
name: 'MlLocationPick',
|
|
22
|
+
components: {},
|
|
23
|
+
|
|
24
|
+
options: {
|
|
25
|
+
virtualHost: true
|
|
26
|
+
},
|
|
27
|
+
props: {
|
|
28
|
+
value: String,
|
|
29
|
+
placeholder: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: '请选择地址'
|
|
32
|
+
},
|
|
33
|
+
latitude: Number,
|
|
34
|
+
longitude: Number,
|
|
35
|
+
border: Boolean,
|
|
36
|
+
disabled: Boolean,
|
|
37
|
+
simple: Boolean
|
|
38
|
+
},
|
|
39
|
+
methods: {
|
|
40
|
+
async handleSelectLocation () {
|
|
41
|
+
const [res, err] = await getLocation()
|
|
42
|
+
if (!err) {
|
|
43
|
+
const address = (this.simple ? '' : res.address) + res.name
|
|
44
|
+
this.$emit('input', address)
|
|
45
|
+
this.$emit('update:latitude', res.latitude)
|
|
46
|
+
this.$emit('update:longitude', res.longitude)
|
|
47
|
+
this.$emit('change', {
|
|
48
|
+
address: address,
|
|
49
|
+
latitude: res.latitude,
|
|
50
|
+
longitude: res.longitude
|
|
51
|
+
})
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
computed: {
|
|
56
|
+
useValue: {
|
|
57
|
+
set (val) {
|
|
58
|
+
this.$emit('input', val)
|
|
59
|
+
},
|
|
60
|
+
get () {
|
|
61
|
+
return this.value
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="scss" scoped>
|
|
69
|
+
.ml-location-pick {
|
|
70
|
+
display: flex;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -195,7 +195,7 @@ export default {
|
|
|
195
195
|
display: flex;
|
|
196
196
|
flex-direction: row;
|
|
197
197
|
.ml-number-input-placeholder {
|
|
198
|
-
color: $
|
|
198
|
+
color: $ml-input-color-placeholder;;
|
|
199
199
|
}
|
|
200
200
|
.ml-number-input-readonly-content {
|
|
201
201
|
padding: 20rpx 4rpx;
|
|
@@ -234,7 +234,7 @@ export default {
|
|
|
234
234
|
}
|
|
235
235
|
.ml-number-input-inp,
|
|
236
236
|
.ml-number-input-simulate {
|
|
237
|
-
font-size: $
|
|
237
|
+
font-size: $ml-base-font-size;
|
|
238
238
|
width: 100%;
|
|
239
239
|
height: 70rpx;
|
|
240
240
|
padding: 0 10rpx;
|
|
@@ -100,10 +100,10 @@ export default {
|
|
|
100
100
|
flex-grow: 1;
|
|
101
101
|
display: flex;
|
|
102
102
|
flex-direction: row;
|
|
103
|
-
background: #
|
|
103
|
+
background: #eaebed;
|
|
104
104
|
border-radius: $ml-border-radius;
|
|
105
105
|
.ml-search-bar-placeholder {
|
|
106
|
-
color: $
|
|
106
|
+
color: $ml-input-color-placeholder;
|
|
107
107
|
}
|
|
108
108
|
.ml-search-bar-simulate {
|
|
109
109
|
padding: 0 10rpx;
|
|
@@ -112,22 +112,22 @@ export default {
|
|
|
112
112
|
overflow: hidden;
|
|
113
113
|
text-overflow: ellipsis;
|
|
114
114
|
white-space: nowrap;
|
|
115
|
-
background: #
|
|
115
|
+
background: #eaebed;
|
|
116
116
|
}
|
|
117
117
|
.ml-search-bar-readonly-content {
|
|
118
118
|
padding: 20rpx 4rpx;
|
|
119
119
|
}
|
|
120
120
|
.ml-search-bar-inp {
|
|
121
121
|
outline: 0;
|
|
122
|
-
color:
|
|
123
|
-
background: #
|
|
122
|
+
color: rgba(0, 0, 0, 0.45);
|
|
123
|
+
background: #eaebed;
|
|
124
124
|
}
|
|
125
125
|
.ml-search-bar-inp,
|
|
126
126
|
.ml-search-bar-simulate {
|
|
127
127
|
padding: 0 10rpx;
|
|
128
128
|
height: 70rpx;
|
|
129
129
|
width: 100%;
|
|
130
|
-
font-size:
|
|
130
|
+
font-size: 26rpx;
|
|
131
131
|
}
|
|
132
132
|
.ml-search-bar-clear-icon {
|
|
133
133
|
width: 60rpx;
|
|
@@ -135,7 +135,7 @@ export default {
|
|
|
135
135
|
flex-shrink: 0;
|
|
136
136
|
align-items: center;
|
|
137
137
|
justify-content: center;
|
|
138
|
-
background: #
|
|
138
|
+
background: #eaebed;
|
|
139
139
|
color: $ml-input-clear-icon-color;
|
|
140
140
|
border-radius: 0 $ml-border-radius $ml-border-radius 0;
|
|
141
141
|
}
|
|
@@ -147,7 +147,7 @@ export default {
|
|
|
147
147
|
justify-content: center;
|
|
148
148
|
font-size: 34rpx;
|
|
149
149
|
padding: 0 10rpx;
|
|
150
|
-
color: rgba(0, 0, 0, 0.
|
|
150
|
+
color: rgba(0, 0, 0, 0.45);
|
|
151
151
|
}
|
|
152
152
|
&.is-right {
|
|
153
153
|
.ml-search-bar-inp,
|
|
@@ -37,41 +37,49 @@ export default {
|
|
|
37
37
|
<style lang="scss">
|
|
38
38
|
.ml-status-tag {
|
|
39
39
|
display: inline-block;
|
|
40
|
-
|
|
41
|
-
padding: 8rpx 16rpx;
|
|
40
|
+
padding: 6rpx 20rpx;
|
|
42
41
|
border-radius: $ml-border-radius;
|
|
43
|
-
font-size:
|
|
42
|
+
font-size: $ml-describe-font-size;
|
|
44
43
|
&.ss-primary {
|
|
44
|
+
color: #ffffff;
|
|
45
45
|
background: $uni-color-primary;
|
|
46
46
|
}
|
|
47
47
|
&.ss-success {
|
|
48
|
+
color: #ffffff;
|
|
48
49
|
background: $uni-color-success;
|
|
49
50
|
}
|
|
50
51
|
&.ss-info {
|
|
51
52
|
background: #909399;
|
|
52
53
|
}
|
|
53
54
|
&.ss-warning {
|
|
55
|
+
color: #ffffff;
|
|
54
56
|
background: $uni-color-warning;
|
|
55
57
|
}
|
|
56
58
|
&.ss-danger {
|
|
59
|
+
color: #ffffff;
|
|
57
60
|
background: $uni-color-error;
|
|
58
61
|
}
|
|
59
62
|
&.ss-gray {
|
|
60
63
|
background: $ml-gray-color;
|
|
61
64
|
}
|
|
62
65
|
&.ss-blue {
|
|
66
|
+
color: #ffffff;
|
|
63
67
|
background: $ml-blue-color;
|
|
64
68
|
}
|
|
65
69
|
&.ss-green {
|
|
70
|
+
color: #ffffff;
|
|
66
71
|
background: $ml-green-color;
|
|
67
72
|
}
|
|
68
73
|
&.ss-pink {
|
|
74
|
+
color: #ffffff;
|
|
69
75
|
background: $ml-pink-color;
|
|
70
76
|
}
|
|
71
77
|
&.ss-orange {
|
|
78
|
+
color: #ffffff;
|
|
72
79
|
background: $ml-orange-color;
|
|
73
80
|
}
|
|
74
81
|
&.ss-purple {
|
|
82
|
+
color: #ffffff;
|
|
75
83
|
background: $ml-purple-color;
|
|
76
84
|
}
|
|
77
85
|
.ml-status-tag-left-icon,
|
|
@@ -80,4 +88,4 @@ export default {
|
|
|
80
88
|
display: inline;
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
|
-
</style>
|
|
91
|
+
</style>
|
|
@@ -132,11 +132,10 @@ export default {
|
|
|
132
132
|
.ml-textarea {
|
|
133
133
|
display: block;
|
|
134
134
|
width: 100%;
|
|
135
|
-
font-size: $uni-font-size-base;
|
|
136
135
|
padding: 20rpx 10rpx 10rpx 20rpx;
|
|
137
136
|
background: #fff;
|
|
138
137
|
.ml-textarea-placeholder {
|
|
139
|
-
color: $
|
|
138
|
+
color: $ml-input-color-placeholder;;
|
|
140
139
|
}
|
|
141
140
|
.ml-textarea-simulate {
|
|
142
141
|
background: #ffffff;
|
|
@@ -159,7 +158,7 @@ export default {
|
|
|
159
158
|
.ml-textarea-simulate {
|
|
160
159
|
height: 280rpx;
|
|
161
160
|
width: 100%;
|
|
162
|
-
font-size: $
|
|
161
|
+
font-size: $ml-base-font-size;
|
|
163
162
|
}
|
|
164
163
|
.ml-textarea-word-count {
|
|
165
164
|
padding-top: 10rpx;
|
|
@@ -170,7 +169,7 @@ export default {
|
|
|
170
169
|
color: #999999;
|
|
171
170
|
text-align: right;
|
|
172
171
|
padding-right: 20rpx;
|
|
173
|
-
font-size:
|
|
172
|
+
font-size: $ml-describe-font-size;
|
|
174
173
|
}
|
|
175
174
|
}
|
|
176
175
|
</style>
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
<view class="ml-upload-file-info">
|
|
40
40
|
<view class="ml-upload-file-name">{{ item[nameField] }}</view>
|
|
41
41
|
<view class="ml-upload-file-desc">
|
|
42
|
-
<ml-button v-if="preview && previewTypes.includes(item[typeField])" status="primary" type="text" @click="previewDocs(item)">预览</ml-button>
|
|
43
|
-
<ml-button status="primary" type="text" @click="downloadEvent(item)">下载</ml-button>
|
|
42
|
+
<ml-button v-if="preview && previewTypes.includes(item[typeField])" status="primary" type="text" size="small" @click="previewDocs(item)">预览</ml-button>
|
|
43
|
+
<ml-button status="primary" type="text" size="small" @click="downloadEvent(item)">下载</ml-button>
|
|
44
44
|
</view>
|
|
45
45
|
</view>
|
|
46
46
|
<view v-if="!isFromReadonly" class="ml-upload-file-right">
|
|
@@ -425,10 +425,6 @@ export default {
|
|
|
425
425
|
</script>
|
|
426
426
|
|
|
427
427
|
<style lang="scss">
|
|
428
|
-
.ml-upload{
|
|
429
|
-
margin: 20rpx 0;
|
|
430
|
-
background: #fff;
|
|
431
|
-
}
|
|
432
428
|
.ml-upload-image-list {
|
|
433
429
|
display: flex;
|
|
434
430
|
flex-direction: row;
|
|
@@ -477,9 +473,9 @@ export default {
|
|
|
477
473
|
font-size: 24rpx;
|
|
478
474
|
}
|
|
479
475
|
.ml-upload-image-img {
|
|
480
|
-
width:
|
|
481
|
-
height:
|
|
482
|
-
line-height:
|
|
476
|
+
width: 116rpx;
|
|
477
|
+
height: 116rpx;
|
|
478
|
+
line-height: 116rpx;
|
|
483
479
|
border-radius: $ml-border-radius;
|
|
484
480
|
}
|
|
485
481
|
}
|
package/package.json
CHANGED
package/theme.scss
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
// 页面宽度
|
|
2
2
|
$ml-page-full-width: 100%;
|
|
3
3
|
|
|
4
|
+
// 字体
|
|
5
|
+
$ml-base-font-size: 34rpx;
|
|
6
|
+
// 副标题体
|
|
7
|
+
$ml-subhead-font-size: 30rpx;
|
|
8
|
+
// 描述体
|
|
9
|
+
$ml-describe-font-size: 28rpx;
|
|
10
|
+
|
|
4
11
|
// 页面间隔宽度
|
|
5
12
|
$ml-page-interval-margin: 16rpx;
|
|
6
13
|
$ml-page-toolbar-left-width: 120rpx;
|
|
@@ -20,3 +27,5 @@ $ml-border-radius: 8rpx;
|
|
|
20
27
|
$ml-button-interval-margin: 16rpx;
|
|
21
28
|
// 输入框清除按钮颜色
|
|
22
29
|
$ml-input-clear-icon-color: rgba(23, 26, 29, 0.4);
|
|
30
|
+
// 输入框提示物资颜色
|
|
31
|
+
$ml-input-color-placeholder: rgba(23, 26, 29, 0.4);
|