sadais-piui 1.2.7-beta46 → 1.2.7-beta48
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/index.vue +3 -0
- package/components/pi-calendar-input/index.vue +6 -2
- package/components/pi-cascader/index.vue +27 -1
- package/components/pi-date-picker/index.vue +3 -0
- package/components/pi-date-picker-input/index.vue +6 -2
- package/components/pi-input/index.vue +20 -2
- package/components/pi-popup/index.vue +4 -0
- package/components/pi-regions-select/index.vue +3 -0
- package/components/pi-regions-select-input/index.vue +6 -2
- package/components/pi-select/index.vue +3 -0
- package/components/pi-select-input/index.vue +6 -2
- package/config/cascader.js +1 -0
- package/config/input.js +1 -0
- package/package.json +1 -1
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
:z-index="getPopup.zIndex"
|
|
16
16
|
:background="getPopup.background"
|
|
17
17
|
@close="handlePopupClose"
|
|
18
|
+
@closed="$emit('closed', $event)"
|
|
19
|
+
@show="$emit('show', $event)"
|
|
20
|
+
@showed="$emit('showed', $event)"
|
|
18
21
|
>
|
|
19
22
|
<view class="pi-calendar" :style="[customStyle]" :class="[customClass]">
|
|
20
23
|
<!-- 标题栏 -->
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2022-05-18 11:08:49
|
|
4
|
-
* @LastEditTime: 2022-
|
|
4
|
+
* @LastEditTime: 2022-10-20 09:32:17
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 日历输入
|
|
7
|
-
* @FilePath: /
|
|
7
|
+
* @FilePath: /dt-weitibao-console/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-calendar-input/index.vue
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -61,6 +61,10 @@
|
|
|
61
61
|
}"
|
|
62
62
|
:popup="getCalendar.popup"
|
|
63
63
|
@confirm="handleCalendarConfirm"
|
|
64
|
+
@close="$emit('close', $event)"
|
|
65
|
+
@closed="$emit('closed', $event)"
|
|
66
|
+
@show="$emit('show', $event)"
|
|
67
|
+
@showed="$emit('showed', $event)"
|
|
64
68
|
/>
|
|
65
69
|
</view>
|
|
66
70
|
</template>
|
|
@@ -64,10 +64,22 @@
|
|
|
64
64
|
>
|
|
65
65
|
<view class="pi-flex-sub pi-lh-36">
|
|
66
66
|
<slot name="item" :item="item">
|
|
67
|
+
<pi-checkbox
|
|
68
|
+
v-if="parentCanSelect"
|
|
69
|
+
:value="selectedIds.includes(item[keyField])"
|
|
70
|
+
shape="round"
|
|
71
|
+
active-mode="fill-circle"
|
|
72
|
+
class="pi-mg-right-16"
|
|
73
|
+
@click.stop="handleChangeParentSelect(item)"
|
|
74
|
+
/>
|
|
67
75
|
{{ item[displayField] || '' }}
|
|
68
76
|
</slot>
|
|
69
77
|
</view>
|
|
70
|
-
<pi-icon
|
|
78
|
+
<pi-icon
|
|
79
|
+
v-if="!parentCanSelect && selectedIds.includes(item[keyField])"
|
|
80
|
+
name="blod-check"
|
|
81
|
+
size="36"
|
|
82
|
+
/>
|
|
71
83
|
<pi-icon v-if="item[childrenField] && item[childrenField].length > 0" name="right" />
|
|
72
84
|
</view>
|
|
73
85
|
</scroll-view>
|
|
@@ -156,6 +168,12 @@ export default {
|
|
|
156
168
|
// 'children'
|
|
157
169
|
default: cascader.childrenField
|
|
158
170
|
},
|
|
171
|
+
// 父节点是否可选(默认:'false')
|
|
172
|
+
parentCanSelect: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
// false
|
|
175
|
+
default: cascader.parentCanSelect
|
|
176
|
+
},
|
|
159
177
|
// 弹窗选择参数设置
|
|
160
178
|
popupSelect: {
|
|
161
179
|
type: Object,
|
|
@@ -384,6 +402,14 @@ export default {
|
|
|
384
402
|
this.$emit('close')
|
|
385
403
|
this.handleEmitChange()
|
|
386
404
|
},
|
|
405
|
+
handleChangeParentSelect(item, selected) {
|
|
406
|
+
if (this.selectedIds.includes(item[this.keyField])) {
|
|
407
|
+
this.handleRemoveItem(item[this.keyField])
|
|
408
|
+
} else {
|
|
409
|
+
// 选中
|
|
410
|
+
this.selectedIds.push(item[this.keyField])
|
|
411
|
+
}
|
|
412
|
+
},
|
|
387
413
|
/**
|
|
388
414
|
* @vuese
|
|
389
415
|
* 根据id获取item
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2022-05-18 11:08:49
|
|
4
|
-
* @LastEditTime: 2022-
|
|
4
|
+
* @LastEditTime: 2022-10-20 09:34:58
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 日历输入
|
|
7
|
-
* @FilePath: /
|
|
7
|
+
* @FilePath: /dt-weitibao-console/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-date-picker-input/index.vue
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -64,6 +64,10 @@
|
|
|
64
64
|
:confirm-btn="getDatePicker.confirmBtn"
|
|
65
65
|
:cancel-btn="getDatePicker.cancelBtn"
|
|
66
66
|
@confirm="handleDatePickerConfirm"
|
|
67
|
+
@close="$emit('close', $event)"
|
|
68
|
+
@closed="$emit('closed', $event)"
|
|
69
|
+
@show="$emit('show', $event)"
|
|
70
|
+
@showed="$emit('showed', $event)"
|
|
67
71
|
/>
|
|
68
72
|
</view>
|
|
69
73
|
</template>
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="pi-input-wrap" :style="[getInputWrapStyle]" :class="[{ disabled: getDisabled }]">
|
|
3
|
+
<view
|
|
4
|
+
v-if="type === 'textarea' && readonly"
|
|
5
|
+
class="pi-input-textarea"
|
|
6
|
+
:style="[customStyle, readonlyStyle]"
|
|
7
|
+
:class="[customClass, readonlyClass]"
|
|
8
|
+
>
|
|
9
|
+
{{ val || placeholder }}
|
|
10
|
+
</view>
|
|
3
11
|
<textarea
|
|
4
|
-
v-if="type === 'textarea'"
|
|
12
|
+
v-else-if="type === 'textarea'"
|
|
5
13
|
class="pi-input-textarea"
|
|
6
14
|
:style="[customStyle]"
|
|
7
15
|
:class="[customClass]"
|
|
@@ -266,6 +274,10 @@ export default {
|
|
|
266
274
|
default() {
|
|
267
275
|
return input.clearIcon
|
|
268
276
|
}
|
|
277
|
+
},
|
|
278
|
+
readonly: {
|
|
279
|
+
type: Boolean,
|
|
280
|
+
default: input.readonly || false
|
|
269
281
|
}
|
|
270
282
|
},
|
|
271
283
|
data() {
|
|
@@ -274,6 +286,12 @@ export default {
|
|
|
274
286
|
}
|
|
275
287
|
},
|
|
276
288
|
computed: {
|
|
289
|
+
readonlyClass() {
|
|
290
|
+
return this.val ? '' : this.placeholderClass
|
|
291
|
+
},
|
|
292
|
+
readonlyStyle() {
|
|
293
|
+
return this.val ? '' : this.placeholderStyle
|
|
294
|
+
},
|
|
277
295
|
getDisabled() {
|
|
278
296
|
const parentFormItem = this.$pi.parent(this, 'PiFormItem')
|
|
279
297
|
const disabled = this.disabled || (parentFormItem && parentFormItem.getDisabled)
|
|
@@ -287,7 +305,7 @@ export default {
|
|
|
287
305
|
if (this.$pi.lang.isString(this.border)) {
|
|
288
306
|
style.border = this.border
|
|
289
307
|
} else {
|
|
290
|
-
style.border = '
|
|
308
|
+
style.border = '1px solid #d9d9d9'
|
|
291
309
|
}
|
|
292
310
|
}
|
|
293
311
|
return style
|
|
@@ -279,10 +279,14 @@ export default {
|
|
|
279
279
|
this.closed = false
|
|
280
280
|
this.show = true
|
|
281
281
|
this.showed = false
|
|
282
|
+
// 弹窗即将显示
|
|
283
|
+
this.$emit('show')
|
|
282
284
|
this.handleEmitChange()
|
|
283
285
|
uni.hideKeyboard()
|
|
284
286
|
this.getMask.hideTabBar && uni.hideTabBar()
|
|
285
287
|
setTimeout(() => {
|
|
288
|
+
// 弹窗已经显示
|
|
289
|
+
this.$emit('showed')
|
|
286
290
|
this.showed = true
|
|
287
291
|
}, this.getDuration.js)
|
|
288
292
|
// #ifdef H5
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
@close="handlePopupClose"
|
|
17
17
|
@cancel="handleCancel"
|
|
18
18
|
@confirm="handleConfirm"
|
|
19
|
+
@closed="$emit('closed', $event)"
|
|
20
|
+
@show="$emit('show', $event)"
|
|
21
|
+
@showed="$emit('showed', $event)"
|
|
19
22
|
>
|
|
20
23
|
<view class="pi-h-100P pi-flex-column" :style="[customStyle]" :class="[customClass]">
|
|
21
24
|
<slot name="header" />
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2022-05-18 11:08:49
|
|
4
|
-
* @LastEditTime: 2022-
|
|
4
|
+
* @LastEditTime: 2022-10-20 09:36:49
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 日历输入
|
|
7
|
-
* @FilePath: /
|
|
7
|
+
* @FilePath: /dt-weitibao-console/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-regions-select-input/index.vue
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -63,6 +63,10 @@
|
|
|
63
63
|
:confirm-btn="getRegionsSelect.confirmBtn"
|
|
64
64
|
:cancel-btn="getRegionsSelect.cancelBtn"
|
|
65
65
|
@confirm="handleRegionsSelectConfirm"
|
|
66
|
+
@close="$emit('close', $event)"
|
|
67
|
+
@closed="$emit('closed', $event)"
|
|
68
|
+
@show="$emit('show', $event)"
|
|
69
|
+
@showed="$emit('showed', $event)"
|
|
66
70
|
/>
|
|
67
71
|
</view>
|
|
68
72
|
</template>
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
@close="handlePopupClose"
|
|
17
17
|
@cancel="handleCancel"
|
|
18
18
|
@confirm="handleConfirm"
|
|
19
|
+
@closed="$emit('closed', $event)"
|
|
20
|
+
@show="$emit('show', $event)"
|
|
21
|
+
@showed="$emit('showed', $event)"
|
|
19
22
|
>
|
|
20
23
|
<view class="pi-select pi-h-100P pi-flex-column" :style="[customStyle]" :class="[customClass]">
|
|
21
24
|
<slot name="header" />
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
* @Author: zhangzhenfei
|
|
3
3
|
* @Date: 2022-05-18 11:08:49
|
|
4
|
-
* @LastEditTime: 2022-
|
|
4
|
+
* @LastEditTime: 2022-10-20 09:35:52
|
|
5
5
|
* @LastEditors: zhangzhenfei
|
|
6
6
|
* @Description: 选择输入
|
|
7
|
-
* @FilePath: /
|
|
7
|
+
* @FilePath: /dt-weitibao-console/Users/feilin/workspace/piui/piui-awesome/src/piui/components/pi-select-input/index.vue
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<template>
|
|
@@ -68,6 +68,10 @@
|
|
|
68
68
|
:confirm-btn="getSelect.confirmBtn"
|
|
69
69
|
:cancel-btn="getSelect.cancelBtn"
|
|
70
70
|
@confirm="handleSelectConfirm"
|
|
71
|
+
@close="$emit('close', $event)"
|
|
72
|
+
@closed="$emit('closed', $event)"
|
|
73
|
+
@show="$emit('show', $event)"
|
|
74
|
+
@showed="$emit('showed', $event)"
|
|
71
75
|
/>
|
|
72
76
|
</view>
|
|
73
77
|
</template>
|
package/config/cascader.js
CHANGED
|
@@ -11,6 +11,7 @@ export default {
|
|
|
11
11
|
itemHeight: 110, // 行高(默认:'110rpx')
|
|
12
12
|
showItemBottomBorder: false, // 是否显示item下边框(默认:'true')
|
|
13
13
|
itemStyle: {}, // 行样式(默认:'{}')
|
|
14
|
+
parentCanSelect: false, // 父节点是否可选(默认:'false')
|
|
14
15
|
popupSelect: popupSelect, // popupSelect配置
|
|
15
16
|
popup: popupSelect.popup, // 弹窗的配置,默认选项请参照popup
|
|
16
17
|
confirmBtn: popupSelect.confirmBtn, // 确认按钮配置
|
package/config/input.js
CHANGED