sadais-piui 1.2.4-beta1 → 1.2.4-beta4
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/pi-calendar-panel/index.vue +13 -11
- package/components/pi-dropdown/index.vue +1 -1
- package/components/pi-marquee/index.vue +2 -2
- package/components/pi-mask/index.vue +2 -2
- package/components/pi-popup/index.vue +2 -2
- package/components/pi-skeleton/index.vue +1 -1
- package/components/pi-upload-img/index.vue +2 -2
- package/package.json +1 -1
|
@@ -223,7 +223,7 @@ export default {
|
|
|
223
223
|
return this.minDate ? this.$pi.date.parseDate(this.minDate) : ''
|
|
224
224
|
},
|
|
225
225
|
getMaxDate() {
|
|
226
|
-
return this.
|
|
226
|
+
return this.maxDate ? this.$pi.date.parseDate(this.maxDate) : ''
|
|
227
227
|
},
|
|
228
228
|
isMinYear() {
|
|
229
229
|
return this.year === parseInt(this.minYear, 10)
|
|
@@ -299,9 +299,10 @@ export default {
|
|
|
299
299
|
}
|
|
300
300
|
},
|
|
301
301
|
watch: {
|
|
302
|
-
value(
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
value(newVal, oldVal) {
|
|
303
|
+
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
|
|
304
|
+
this.init()
|
|
305
|
+
}
|
|
305
306
|
}
|
|
306
307
|
},
|
|
307
308
|
created() {
|
|
@@ -312,7 +313,6 @@ export default {
|
|
|
312
313
|
if (this.type === 'date') return true
|
|
313
314
|
if (this.type === 'range' && this.$pi.lang.isArray(this.value) && this.value.length === 2)
|
|
314
315
|
return true
|
|
315
|
-
console.error(TAG, 'value 参数不合法,请检查')
|
|
316
316
|
return false
|
|
317
317
|
},
|
|
318
318
|
init() {
|
|
@@ -325,11 +325,11 @@ export default {
|
|
|
325
325
|
this.year = nowDate.year
|
|
326
326
|
this.month = nowDate.month
|
|
327
327
|
}
|
|
328
|
-
this.
|
|
328
|
+
this.handleChange([nowDate, endDate])
|
|
329
329
|
} else {
|
|
330
330
|
this.year = nowDate.year
|
|
331
331
|
this.month = nowDate.month
|
|
332
|
-
this.
|
|
332
|
+
this.handleChange(nowDate)
|
|
333
333
|
}
|
|
334
334
|
},
|
|
335
335
|
isSameDay(day1, day2) {
|
|
@@ -358,7 +358,7 @@ export default {
|
|
|
358
358
|
// 处理范围选择方式
|
|
359
359
|
if (this.calendarValue.length === 2) {
|
|
360
360
|
// 如果选了两项,则重新开始选择范围
|
|
361
|
-
this.
|
|
361
|
+
this.handleChange([date])
|
|
362
362
|
} else {
|
|
363
363
|
// 如果第二项选择的和第一项一样,不做处理
|
|
364
364
|
const isSameDay = this.isSameDay(this.calendarValue[0], date)
|
|
@@ -394,15 +394,17 @@ export default {
|
|
|
394
394
|
this.year = this.now.year
|
|
395
395
|
this.month = this.now.month
|
|
396
396
|
if (this.type === 'date') {
|
|
397
|
-
this.
|
|
397
|
+
this.handleChange(this.now)
|
|
398
398
|
}
|
|
399
399
|
},
|
|
400
400
|
handleChange(calendarValue) {
|
|
401
401
|
this.calendarValue = calendarValue
|
|
402
402
|
this.val =
|
|
403
403
|
this.type === 'range'
|
|
404
|
-
? this.calendarValue.map(cv =>
|
|
405
|
-
|
|
404
|
+
? this.calendarValue.map(cv =>
|
|
405
|
+
this.$pi.date.formatDate(new Date(cv.timestamp), this.dateFormat)
|
|
406
|
+
)
|
|
407
|
+
: this.$pi.date.formatDate(new Date(this.calendarValue.timestamp), this.dateFormat)
|
|
406
408
|
this.handleEmitChange()
|
|
407
409
|
}
|
|
408
410
|
}
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
:class="[customClass, isVertical ? 'vertical' : '']"
|
|
6
6
|
@mouseenter="handlePause"
|
|
7
7
|
@mouseleave="handleStart"
|
|
8
|
-
@touchmove.stop.prevent
|
|
9
|
-
@mousewheel.stop.prevent
|
|
8
|
+
@touchmove.stop.prevent="() => {}"
|
|
9
|
+
@mousewheel.stop.prevent="() => {}"
|
|
10
10
|
>
|
|
11
11
|
<view class="inner-wrap" :class="direction" :style="[animate]">
|
|
12
12
|
<view v-for="(marqueeItems, index) in getItems" :key="index" class="inner">
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
'animation-duration': getDuration.css
|
|
17
17
|
}
|
|
18
18
|
]"
|
|
19
|
-
@touchmove.stop.prevent
|
|
19
|
+
@touchmove.stop.prevent="() => {}"
|
|
20
20
|
@tap.stop.prevent="handleCloseMask"
|
|
21
21
|
>
|
|
22
22
|
<!-- 遮罩层内区域插槽 -->
|
|
23
|
-
<view @tap.stop.prevent><slot /></view>
|
|
23
|
+
<view @tap.stop.prevent="() => {}"><slot /></view>
|
|
24
24
|
</view>
|
|
25
25
|
</template>
|
|
26
26
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
'animation-duration': getDuration.css
|
|
15
15
|
}
|
|
16
16
|
]"
|
|
17
|
-
@touchmove.stop.prevent
|
|
17
|
+
@touchmove.stop.prevent="() => {}"
|
|
18
18
|
@tap.stop.prevent="handleCloseMask"
|
|
19
19
|
>
|
|
20
20
|
<view
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
positionStyle,
|
|
36
36
|
customStyle
|
|
37
37
|
]"
|
|
38
|
-
@tap.stop.prevent
|
|
38
|
+
@tap.stop.prevent="() => {}"
|
|
39
39
|
>
|
|
40
40
|
<!-- 关闭图标 -->
|
|
41
41
|
<view
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2021-08-13 11:31:57
|
|
4
|
-
* @LastEditTime:
|
|
4
|
+
* @LastEditTime: 2022-04-07 11:51:44
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 图片上传组件
|
|
7
7
|
* @FilePath: /piui-awesome/src/piui/components/pi-upload-img/index.vue
|
|
@@ -340,7 +340,7 @@ export default {
|
|
|
340
340
|
? this.beforeRemove.fn
|
|
341
341
|
: this.beforeRemove
|
|
342
342
|
if (this.$pi.lang.isFunction(beforeRemove)) {
|
|
343
|
-
//
|
|
343
|
+
// 删除之前的钩子, 如果定义了则使用钩子删除文件
|
|
344
344
|
val = await beforeRemove(index)
|
|
345
345
|
} else {
|
|
346
346
|
val = this.isValString ? '' : this.val.filter((_, i) => i !== index)
|