mali-applet-ui 1.0.87 → 1.0.88

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.
@@ -0,0 +1,91 @@
1
+ <template>
2
+ <ml-fixed-footer :zIndex="showPopup ? 999 : null">
3
+ <view class="ml-list-select-page-footer">
4
+ <view v-if="type === 'checkbox'" class="ml-list-select-page-footer-checked" @click="openSelectPopup">
5
+ <text>已选<text class="ml-list-select-page-footer-checked-num">{{ checkedKeys.length }}</text>个</text>
6
+ <ml-icon name="arrow-right" />
7
+ </view>
8
+ <view class="ml-list-select-page-footer-btns">
9
+ <ml-button status="primary" size="medium" @click="confirmEvent">确认</ml-button>
10
+ </view>
11
+
12
+ <ml-picker-drawer v-model="showPopup" height="600rpx" showFooter @confirm="confirmSelectEvent">
13
+ <ml-list-select-group
14
+ border
15
+ type="checkbox"
16
+ :options="selectRows"
17
+ :checkedKeys.sync="checkList"
18
+ :optionProps="optionProps">
19
+ </ml-list-select-group>
20
+ </ml-picker-drawer>
21
+ </view>
22
+ </ml-fixed-footer>
23
+ </template>
24
+
25
+ <script>
26
+ export default {
27
+ options: {
28
+ virtualHost: true
29
+ },
30
+ props: {
31
+ type: String,
32
+ options: Array,
33
+ checkedKeys: Array,
34
+ optionProps: Object
35
+ },
36
+ data () {
37
+ return {
38
+ showPopup: false,
39
+ checkList: []
40
+ }
41
+ },
42
+ computed: {
43
+ optOptions () {
44
+ return Object.assign({}, this.optionProps)
45
+ },
46
+ optLabelField () {
47
+ return this.optOptions.label || 'label'
48
+ },
49
+ optValueField () {
50
+ return this.optOptions.value || 'value'
51
+ },
52
+ selectRows () {
53
+ return this.options.filter(item => this.checkedKeys.includes(item[this.optValueField]))
54
+ }
55
+ },
56
+ methods: {
57
+ confirmEvent () {
58
+ this.$emit('confirm')
59
+ },
60
+ openSelectPopup () {
61
+ this.checkList = this.checkedKeys
62
+ this.showPopup = true
63
+ },
64
+ confirmSelectEvent () {
65
+ this.$emit('update:checkedKeys', this.checkList)
66
+ this.showPopup = false
67
+ }
68
+ }
69
+ }
70
+ </script>
71
+
72
+ <style lang="scss">
73
+ .ml-list-select-page-footer {
74
+ flex-grow: 1;
75
+ width: 100%;
76
+ .ml-list-select-page-footer-checked {
77
+ padding: 10rpx 0;
78
+ text-align: center;
79
+ margin-bottom: 32rpx;
80
+ font-size: $ml-describe-font-size;
81
+ }
82
+ .ml-list-select-page-footer-checked-num {
83
+ padding: 0 8rpx;
84
+ color: $uni-color-primary;
85
+ }
86
+ .ml-list-select-page-footer-btns {
87
+ display: flex;
88
+ flex-direction: row;
89
+ }
90
+ }
91
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mali-applet-ui",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "description": "码里云小程序组件库",
5
5
  "files": [
6
6
  "lib",