sadais-piui 1.2.7-beta112 → 1.2.7-beta114
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.
|
@@ -280,6 +280,12 @@ export default {
|
|
|
280
280
|
default() {
|
|
281
281
|
return input.clearIcon
|
|
282
282
|
}
|
|
283
|
+
},
|
|
284
|
+
// 是否失去焦点更新v-model
|
|
285
|
+
updateOnBlur: {
|
|
286
|
+
type: Boolean,
|
|
287
|
+
// true
|
|
288
|
+
default: input.updateOnBlur
|
|
283
289
|
}
|
|
284
290
|
},
|
|
285
291
|
data() {
|
|
@@ -347,14 +353,16 @@ export default {
|
|
|
347
353
|
// 获得焦点
|
|
348
354
|
this.$emit('focus')
|
|
349
355
|
},
|
|
350
|
-
handleBlur() {
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
356
|
+
handleBlur(e) {
|
|
357
|
+
const value = e.detail.value
|
|
358
|
+
if (this.updateOnBlur) {
|
|
359
|
+
this.handleChange(value)
|
|
360
|
+
}
|
|
354
361
|
this.$emit('blur', value)
|
|
355
362
|
setTimeout(() => {
|
|
363
|
+
this.focused = false
|
|
356
364
|
this.dispatch('PiFormItem', 'form-blur', value)
|
|
357
|
-
},
|
|
365
|
+
}, 100)
|
|
358
366
|
},
|
|
359
367
|
handleClearInput() {
|
|
360
368
|
this.handleChange('')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2021-08-13 11:31:57
|
|
4
|
-
* @LastEditTime: 2024-06-11
|
|
4
|
+
* @LastEditTime: 2024-06-11 11:39:08
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 图片上传组件
|
|
7
7
|
* @FilePath: /piui-awesome/src/piui/components/pi-upload-img/index.vue
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
<template>
|
|
11
11
|
<view
|
|
12
|
-
class="pi-upload-img
|
|
12
|
+
class="pi-upload-img"
|
|
13
13
|
:style="[customStyle]"
|
|
14
|
-
:class="[customClass]"
|
|
14
|
+
:class="[customClass, { 'pi-pd-top-12': !getDisabled }]"
|
|
15
15
|
>
|
|
16
16
|
<!-- 已上传图片展示 -->
|
|
17
17
|
<view
|
|
@@ -756,7 +756,6 @@ export default {
|
|
|
756
756
|
const [, result] = await uni.chooseFile({
|
|
757
757
|
count: this.getUploadMaxCount,
|
|
758
758
|
sizeType,
|
|
759
|
-
extension: this.getExtension,
|
|
760
759
|
sourceType,
|
|
761
760
|
crop
|
|
762
761
|
})
|
|
@@ -814,7 +813,6 @@ export default {
|
|
|
814
813
|
const [, result] = await uni.chooseImage({
|
|
815
814
|
count: this.getUploadMaxCount,
|
|
816
815
|
sizeType,
|
|
817
|
-
extension: this.getExtension,
|
|
818
816
|
sourceType,
|
|
819
817
|
crop
|
|
820
818
|
})
|
package/config/input.js
CHANGED