mali-applet-ui 1.0.95 → 1.0.96
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/lib/components/ml-list-select-user-page/ml-list-select-user-page.vue +15 -1
- package/lib/components/ml-number-input/ml-number-input.vue +24 -10
- package/lib/components/ml-select-picker/ml-select-picker.vue +1 -1
- package/lib/components/ml-upload/ml-upload.vue +1 -1
- package/package.json +1 -1
- package/theme.scss +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="ml-list-select-user-page" :class="[className || '', {'is-border': border, 'is-disabled': disabled}]" @tap="tapEvent">
|
|
3
|
-
<view class="ml-list-select-user-list">
|
|
3
|
+
<view v-if="selectRows.length" class="ml-list-select-user-list">
|
|
4
4
|
<view v-for="(item, index) in selectRows" :key="index" class="ml-list-select-user-item">
|
|
5
5
|
<view class="ml-list-select-user-name">
|
|
6
6
|
<view class="ml-list-select-user-content">{{ item[optLabelField] }}</view>
|
|
@@ -10,6 +10,9 @@
|
|
|
10
10
|
</view>
|
|
11
11
|
</view>
|
|
12
12
|
</view>
|
|
13
|
+
<view v-else class="ml-list-select-user-list">
|
|
14
|
+
<view class="ml-list-select-user-page-placeholder">{{ placeholder }}</view>
|
|
15
|
+
</view>
|
|
13
16
|
<view class="ml-list-select-user-add-item" @click="openUserEvent">
|
|
14
17
|
<view class="ml-list-select-user-add-btn">
|
|
15
18
|
<ml-icon name="add-circle" />
|
|
@@ -151,6 +154,14 @@ export default {
|
|
|
151
154
|
right: 20rpx;
|
|
152
155
|
font-size: 44rpx;
|
|
153
156
|
}
|
|
157
|
+
&.is-disabled {
|
|
158
|
+
// #ifdef H5
|
|
159
|
+
cursor: pointer;
|
|
160
|
+
// #endif
|
|
161
|
+
.ml-list-select-user-add-item {
|
|
162
|
+
color: $uni-text-color-disable;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
154
165
|
.ml-list-select-user-img {
|
|
155
166
|
width: 50rpx;
|
|
156
167
|
height: 50rpx;
|
|
@@ -170,5 +181,8 @@ export default {
|
|
|
170
181
|
flex-shrink: 0;
|
|
171
182
|
margin-left: 16rpx;
|
|
172
183
|
}
|
|
184
|
+
.ml-list-select-user-page-placeholder {
|
|
185
|
+
color: $ml-input-color-placeholder;
|
|
186
|
+
}
|
|
173
187
|
}
|
|
174
188
|
</style>
|
|
@@ -162,19 +162,33 @@ export default {
|
|
|
162
162
|
return { status: true, value: numVal }
|
|
163
163
|
},
|
|
164
164
|
minusEvent () {
|
|
165
|
-
const numVal = XEUtils.toNumber(this.inpVal)
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
this
|
|
169
|
-
|
|
165
|
+
const numVal = this.type === 'integer' ? XEUtils.toInteger(this.inpVal) : XEUtils.toNumber(this.inpVal)
|
|
166
|
+
let value = XEUtils.subtract(numVal, this.stepNum)
|
|
167
|
+
if (this.maxNum !== null) {
|
|
168
|
+
value = Math.min(this.maxNum, value)
|
|
169
|
+
}
|
|
170
|
+
if (this.minNum !== null) {
|
|
171
|
+
value = Math.max(this.minNum, value)
|
|
172
|
+
}
|
|
173
|
+
if (`${value}` !== `${this.value}`) {
|
|
174
|
+
this.inpVal = value
|
|
175
|
+
this.$emit('input', value)
|
|
176
|
+
this.$emit('change', { value })
|
|
170
177
|
}
|
|
171
178
|
},
|
|
172
179
|
plusEvent () {
|
|
173
|
-
const numVal = XEUtils.toNumber(this.inpVal)
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
this
|
|
177
|
-
|
|
180
|
+
const numVal = this.type === 'integer' ? XEUtils.toInteger(this.inpVal) : XEUtils.toNumber(this.inpVal)
|
|
181
|
+
let value = XEUtils.add(numVal, this.stepNum)
|
|
182
|
+
if (this.minNum !== null) {
|
|
183
|
+
value = Math.max(this.minNum, value)
|
|
184
|
+
}
|
|
185
|
+
if (this.maxNum !== null) {
|
|
186
|
+
value = Math.min(this.maxNum, value)
|
|
187
|
+
}
|
|
188
|
+
if (`${value}` !== `${this.value}`) {
|
|
189
|
+
this.inpVal = value
|
|
190
|
+
this.$emit('input', value)
|
|
191
|
+
this.$emit('change', { value })
|
|
178
192
|
}
|
|
179
193
|
},
|
|
180
194
|
blurEvent () {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- 上传图片 -->
|
|
4
4
|
<view v-if="mediatype === 'image'" class="ml-upload-image-list">
|
|
5
5
|
<view class="ml-upload-image-item" v-for="(item, index) in fileList" :key="index">
|
|
6
|
-
<image class="ml-upload-image-img" mode="
|
|
6
|
+
<image class="ml-upload-image-img" mode="aspectFill" :src="getThumbnailFileUrl(item)" @tap="previewImageEvent(item, index)"></image>
|
|
7
7
|
<view v-if="!isFromReadonly" class="ml-upload-image-del-btn" @tap="removeEvent(item)">
|
|
8
8
|
<ml-icon name="close" />
|
|
9
9
|
</view>
|
package/package.json
CHANGED
package/theme.scss
CHANGED
|
@@ -30,5 +30,5 @@ $ml-border-radius: 8rpx;
|
|
|
30
30
|
$ml-button-interval-margin: 16rpx;
|
|
31
31
|
// 输入框清除按钮颜色
|
|
32
32
|
$ml-input-clear-icon-color: rgba(23, 26, 29, 0.4);
|
|
33
|
-
//
|
|
34
|
-
$ml-input-color-placeholder: rgba(23, 26, 29, 0.
|
|
33
|
+
// 输入框提示文本颜色
|
|
34
|
+
$ml-input-color-placeholder: rgba(23, 26, 29, 0.7);
|