sadais-piui 1.2.7-beta111 → 1.2.7-beta113
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,12 +280,6 @@ 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
|
|
289
283
|
}
|
|
290
284
|
},
|
|
291
285
|
data() {
|
|
@@ -344,22 +338,16 @@ export default {
|
|
|
344
338
|
handleItemClick(e) {
|
|
345
339
|
this.$emit('click', e)
|
|
346
340
|
},
|
|
347
|
-
handleInput
|
|
348
|
-
|
|
349
|
-
let value = e.detail.value
|
|
350
|
-
// 输入内容
|
|
341
|
+
handleInput(e) {
|
|
342
|
+
const value = e.detail.value
|
|
351
343
|
this.handleChange(value)
|
|
352
|
-
},
|
|
344
|
+
},
|
|
353
345
|
handleFocus() {
|
|
354
346
|
this.focused = true
|
|
355
347
|
// 获得焦点
|
|
356
348
|
this.$emit('focus')
|
|
357
349
|
},
|
|
358
|
-
handleBlur(
|
|
359
|
-
const value = e.detail.value
|
|
360
|
-
if (this.updateOnBlur) {
|
|
361
|
-
this.handleChange(value)
|
|
362
|
-
}
|
|
350
|
+
handleBlur() {
|
|
363
351
|
setTimeout(() => {
|
|
364
352
|
this.focused = false
|
|
365
353
|
}, 100)
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view
|
|
2
|
+
<view
|
|
3
|
+
class="pi-align-center pi-w-100P"
|
|
4
|
+
:style="[customStyle]"
|
|
5
|
+
:class="[customClass]"
|
|
6
|
+
>
|
|
3
7
|
<view v-if="searchLabel" class="pi-pd-right-18" :style="[searchLabelStyle]">
|
|
4
8
|
{{ searchLabel }}
|
|
5
9
|
</view>
|
|
@@ -67,7 +71,11 @@
|
|
|
67
71
|
@focus="handleInputFocus"
|
|
68
72
|
/>
|
|
69
73
|
<!-- clear action -->
|
|
70
|
-
<view
|
|
74
|
+
<view
|
|
75
|
+
v-if="clearable && val"
|
|
76
|
+
class="pi-pd-lr-18"
|
|
77
|
+
@tap="handleClearInput"
|
|
78
|
+
>
|
|
71
79
|
<view class="pi-icon-roundclosefill" :style="[clearIconStyle]" />
|
|
72
80
|
</view>
|
|
73
81
|
</view>
|
|
@@ -130,7 +138,7 @@ export default {
|
|
|
130
138
|
type: String,
|
|
131
139
|
// `'round'`
|
|
132
140
|
default: search.shape,
|
|
133
|
-
validator: function
|
|
141
|
+
validator: function(value) {
|
|
134
142
|
return ['square', 'round'].includes(value)
|
|
135
143
|
}
|
|
136
144
|
},
|
|
@@ -251,7 +259,7 @@ export default {
|
|
|
251
259
|
type: String,
|
|
252
260
|
// `'left'`
|
|
253
261
|
default: search.searchIconPosition,
|
|
254
|
-
validator: function
|
|
262
|
+
validator: function(value) {
|
|
255
263
|
return ['left', 'right'].includes(value)
|
|
256
264
|
}
|
|
257
265
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2021-08-13 11:31:57
|
|
4
|
-
* @LastEditTime: 2024-06-
|
|
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
|
|
@@ -491,9 +491,9 @@ export default {
|
|
|
491
491
|
getExtension() {
|
|
492
492
|
let extension = []
|
|
493
493
|
if (this.type === 'image') {
|
|
494
|
-
extension = this.getChooseImageOpts.extension
|
|
494
|
+
extension = this.getChooseImageOpts.extension || []
|
|
495
495
|
} else if (this.type === 'video') {
|
|
496
|
-
extension = this.getChooseVideoOpts.extension
|
|
496
|
+
extension = this.getChooseVideoOpts.extension || []
|
|
497
497
|
} else {
|
|
498
498
|
// all
|
|
499
499
|
extension = [
|
|
@@ -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