sadais-piui 1.2.7-beta189 → 1.2.7-beta190
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-cascader/index.vue +11 -12
- package/package.json +2 -2
|
@@ -80,9 +80,7 @@
|
|
|
80
80
|
shape="round"
|
|
81
81
|
active-mode="fill-circle"
|
|
82
82
|
class="pi-mg-right-16"
|
|
83
|
-
@change="
|
|
84
|
-
handleChangeParentSelect({ item, isSelected: $event })
|
|
85
|
-
"
|
|
83
|
+
@change="handleChangeParentSelect({ item })"
|
|
86
84
|
/>
|
|
87
85
|
<view
|
|
88
86
|
class="pi-align-center pi-lh-36 pi-flex-sub column-item-inner"
|
|
@@ -125,15 +123,12 @@
|
|
|
125
123
|
</view>
|
|
126
124
|
<view v-else class="cascader-area">
|
|
127
125
|
<text>已选:</text>
|
|
128
|
-
<scroll-view
|
|
129
|
-
class="node-breadcrumb pi-solid-bottom-1"
|
|
130
|
-
scroll-x
|
|
131
|
-
style="flex: 1; padding-left: 0; overflow: hidden;"
|
|
132
|
-
>
|
|
126
|
+
<scroll-view class="scroll-area" scroll-x>
|
|
133
127
|
<view
|
|
134
128
|
v-for="(item, index) in currentPathItems"
|
|
135
129
|
:key="index"
|
|
136
|
-
class="
|
|
130
|
+
class="pi-inline-flex pi-text-nowrap pi-lh-36"
|
|
131
|
+
:style="{ alignItems: 'center' }"
|
|
137
132
|
@click="handleClickItem(item)"
|
|
138
133
|
>
|
|
139
134
|
<pi-icon
|
|
@@ -476,8 +471,8 @@ export default {
|
|
|
476
471
|
}
|
|
477
472
|
},
|
|
478
473
|
handleChangeParentSelect(options) {
|
|
479
|
-
const { item
|
|
480
|
-
if (
|
|
474
|
+
const { item } = options
|
|
475
|
+
if (this.selectedIds.includes(item[this.keyField])) {
|
|
481
476
|
this.handleRemoveItem(item[this.keyField])
|
|
482
477
|
} else if (this.isSingle) {
|
|
483
478
|
this.selectedIds = [item[this.keyField]]
|
|
@@ -551,12 +546,14 @@ export default {
|
|
|
551
546
|
<style lang="scss" scoped>
|
|
552
547
|
.cascader-wrap {
|
|
553
548
|
width: 100%;
|
|
554
|
-
height:
|
|
549
|
+
min-height: 0;
|
|
555
550
|
background: #f4f2f6;
|
|
556
551
|
}
|
|
557
552
|
.scroll-view {
|
|
558
553
|
flex: 1;
|
|
559
554
|
width: 100%;
|
|
555
|
+
height: 0;
|
|
556
|
+
min-height: 0;
|
|
560
557
|
overflow: auto hidden;
|
|
561
558
|
white-space: nowrap;
|
|
562
559
|
.column {
|
|
@@ -597,6 +594,7 @@ export default {
|
|
|
597
594
|
}
|
|
598
595
|
|
|
599
596
|
.node-breadcrumb {
|
|
597
|
+
flex-shrink: 0;
|
|
600
598
|
width: 100%;
|
|
601
599
|
padding-right: 32rpx;
|
|
602
600
|
padding-left: 32rpx;
|
|
@@ -616,6 +614,7 @@ export default {
|
|
|
616
614
|
|
|
617
615
|
.cascader-area {
|
|
618
616
|
display: flex;
|
|
617
|
+
flex-shrink: 0;
|
|
619
618
|
align-items: center;
|
|
620
619
|
padding: 22rpx 24rpx;
|
|
621
620
|
color: #333333;
|
package/package.json
CHANGED