@kengic/uni 0.5.1 → 0.5.2-beta.1

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.
Files changed (146) hide show
  1. package/dist/uni/uni-ui/uni-badge/uni-badge.vue +222 -219
  2. package/dist/uni/uni-ui/uni-breadcrumb/uni-breadcrumb.vue +29 -29
  3. package/dist/uni/uni-ui/uni-breadcrumb-item/uni-breadcrumb-item.vue +88 -88
  4. package/dist/uni/uni-ui/uni-calendar/calendar.js +936 -532
  5. package/dist/uni/uni-ui/uni-calendar/i18n/en.json +10 -10
  6. package/dist/uni/uni-ui/uni-calendar/i18n/index.js +8 -7
  7. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hans.json +10 -10
  8. package/dist/uni/uni-ui/uni-calendar/i18n/zh-Hant.json +10 -10
  9. package/dist/uni/uni-ui/uni-calendar/uni-calendar-item.vue +190 -168
  10. package/dist/uni/uni-ui/uni-calendar/uni-calendar.vue +459 -459
  11. package/dist/uni/uni-ui/uni-calendar/util.js +324 -340
  12. package/dist/uni/uni-ui/uni-card/uni-card.vue +8 -1
  13. package/dist/uni/uni-ui/uni-col/uni-col.vue +294 -287
  14. package/dist/uni/uni-ui/uni-collapse/uni-collapse.vue +139 -140
  15. package/dist/uni/uni-ui/uni-collapse-item/uni-collapse-item.vue +381 -378
  16. package/dist/uni/uni-ui/uni-combox/uni-combox.vue +280 -272
  17. package/dist/uni/uni-ui/uni-countdown/i18n/en.json +4 -4
  18. package/dist/uni/uni-ui/uni-countdown/i18n/index.js +8 -7
  19. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hans.json +4 -4
  20. package/dist/uni/uni-ui/uni-countdown/i18n/zh-Hant.json +4 -4
  21. package/dist/uni/uni-ui/uni-countdown/uni-countdown.vue +249 -257
  22. package/dist/uni/uni-ui/uni-data-checkbox/uni-data-checkbox.vue +832 -813
  23. package/dist/uni/uni-ui/uni-data-picker/keypress.js +42 -42
  24. package/dist/uni/uni-ui/uni-data-picker/uni-data-picker.vue +535 -516
  25. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-picker.js +623 -618
  26. package/dist/uni/uni-ui/uni-data-pickerview/uni-data-pickerview.vue +293 -288
  27. package/dist/uni/uni-ui/uni-data-select/uni-data-select.vue +495 -509
  28. package/dist/uni/uni-ui/uni-dateformat/date-format.js +181 -184
  29. package/dist/uni/uni-ui/uni-dateformat/uni-dateformat.vue +81 -82
  30. package/dist/uni/uni-ui/uni-datetime-picker/calendar-item.vue +176 -170
  31. package/dist/uni/uni-ui/uni-datetime-picker/calendar.vue +926 -920
  32. package/dist/uni/uni-ui/uni-datetime-picker/i18n/en.json +20 -20
  33. package/dist/uni/uni-ui/uni-datetime-picker/i18n/index.js +8 -7
  34. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hans.json +21 -21
  35. package/dist/uni/uni-ui/uni-datetime-picker/i18n/zh-Hant.json +21 -21
  36. package/dist/uni/uni-ui/uni-datetime-picker/time-picker.vue +921 -926
  37. package/dist/uni/uni-ui/uni-datetime-picker/uni-datetime-picker.vue +1059 -1012
  38. package/dist/uni/uni-ui/uni-datetime-picker/util.js +366 -377
  39. package/dist/uni/uni-ui/uni-drawer/keypress.js +42 -42
  40. package/dist/uni/uni-ui/uni-drawer/uni-drawer.vue +176 -167
  41. package/dist/uni/uni-ui/uni-easyinput/common.js +40 -42
  42. package/dist/uni/uni-ui/uni-easyinput/uni-easyinput.vue +628 -547
  43. package/dist/uni/uni-ui/uni-fab/uni-fab.vue +507 -483
  44. package/dist/uni/uni-ui/uni-fav/i18n/en.json +2 -2
  45. package/dist/uni/uni-ui/uni-fav/i18n/index.js +8 -7
  46. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hans.json +2 -2
  47. package/dist/uni/uni-ui/uni-fav/i18n/zh-Hant.json +2 -2
  48. package/dist/uni/uni-ui/uni-fav/uni-fav.vue +155 -147
  49. package/dist/uni/uni-ui/uni-file-picker/choose-and-upload-file.js +172 -198
  50. package/dist/uni/uni-ui/uni-file-picker/uni-file-picker.vue +636 -634
  51. package/dist/uni/uni-ui/uni-file-picker/upload-file.vue +294 -293
  52. package/dist/uni/uni-ui/uni-file-picker/upload-image.vue +267 -270
  53. package/dist/uni/uni-ui/uni-file-picker/utils.js +81 -82
  54. package/dist/uni/uni-ui/uni-forms/uni-forms.vue +360 -372
  55. package/dist/uni/uni-ui/uni-forms/utils.js +170 -174
  56. package/dist/uni/uni-ui/uni-forms/validate.js +447 -456
  57. package/dist/uni/uni-ui/uni-forms-item/uni-forms-item.vue +497 -497
  58. package/dist/uni/uni-ui/uni-goods-nav/i18n/en.json +4 -4
  59. package/dist/uni/uni-ui/uni-goods-nav/i18n/index.js +8 -7
  60. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hans.json +4 -4
  61. package/dist/uni/uni-ui/uni-goods-nav/i18n/zh-Hant.json +4 -4
  62. package/dist/uni/uni-ui/uni-goods-nav/uni-goods-nav.vue +238 -222
  63. package/dist/uni/uni-ui/uni-grid/uni-grid.vue +134 -134
  64. package/dist/uni/uni-ui/uni-grid-item/uni-grid-item.vue +121 -119
  65. package/dist/uni/uni-ui/uni-group/uni-group.vue +121 -121
  66. package/dist/uni/uni-ui/uni-icons/icons.js +1170 -1168
  67. package/dist/uni/uni-ui/uni-icons/uni-icons.vue +91 -86
  68. package/dist/uni/uni-ui/uni-icons/uniicons.css +166 -166
  69. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list-item.vue +129 -129
  70. package/dist/uni/uni-ui/uni-indexed-list/uni-indexed-list.vue +352 -347
  71. package/dist/uni/uni-ui/uni-link/uni-link.vue +134 -119
  72. package/dist/uni/uni-ui/uni-list/uni-list.vue +119 -110
  73. package/dist/uni/uni-ui/uni-list/uni-refresh.vue +14 -14
  74. package/dist/uni/uni-ui/uni-list/uni-refresh.wxs +14 -14
  75. package/dist/uni/uni-ui/uni-list-ad/uni-list-ad.vue +101 -95
  76. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.scss +18 -18
  77. package/dist/uni/uni-ui/uni-list-chat/uni-list-chat.vue +602 -586
  78. package/dist/uni/uni-ui/uni-list-item/uni-list-item.vue +507 -503
  79. package/dist/uni/uni-ui/uni-load-more/i18n/en.json +3 -3
  80. package/dist/uni/uni-ui/uni-load-more/i18n/index.js +8 -7
  81. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hans.json +3 -3
  82. package/dist/uni/uni-ui/uni-load-more/i18n/zh-Hant.json +3 -3
  83. package/dist/uni/uni-ui/uni-load-more/uni-load-more.vue +402 -392
  84. package/dist/uni/uni-ui/uni-nav-bar/uni-nav-bar.vue +328 -330
  85. package/dist/uni/uni-ui/uni-nav-bar/uni-status-bar.vue +17 -17
  86. package/dist/uni/uni-ui/uni-notice-bar/uni-notice-bar.vue +422 -401
  87. package/dist/uni/uni-ui/uni-number-box/uni-number-box.vue +211 -205
  88. package/dist/uni/uni-ui/uni-pagination/i18n/en.json +3 -3
  89. package/dist/uni/uni-ui/uni-pagination/i18n/es.json +3 -3
  90. package/dist/uni/uni-ui/uni-pagination/i18n/fr.json +3 -3
  91. package/dist/uni/uni-ui/uni-pagination/i18n/index.js +12 -11
  92. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hans.json +3 -3
  93. package/dist/uni/uni-ui/uni-pagination/i18n/zh-Hant.json +3 -3
  94. package/dist/uni/uni-ui/uni-pagination/uni-pagination.vue +450 -433
  95. package/dist/uni/uni-ui/uni-popup/uni-popup.vue +404 -404
  96. package/dist/uni/uni-ui/uni-popup-dialog/keypress.js +42 -42
  97. package/dist/uni/uni-ui/uni-popup-dialog/uni-popup-dialog.vue +1 -0
  98. package/dist/uni/uni-ui/uni-popup-message/uni-popup-message.vue +126 -125
  99. package/dist/uni/uni-ui/uni-popup-share/uni-popup-share.vue +172 -172
  100. package/dist/uni/uni-ui/uni-rate/uni-rate.vue +343 -347
  101. package/dist/uni/uni-ui/uni-row/uni-row.vue +180 -182
  102. package/dist/uni/uni-ui/uni-scss/changelog.md +11 -4
  103. package/dist/uni/uni-ui/uni-scss/package.json +73 -73
  104. package/dist/uni/uni-ui/uni-scss/readme.md +2 -1
  105. package/dist/uni/uni-ui/uni-scss/styles/setting/_border.scss +2 -2
  106. package/dist/uni/uni-ui/uni-scss/styles/setting/_color.scss +46 -47
  107. package/dist/uni/uni-ui/uni-scss/styles/setting/_radius.scss +49 -49
  108. package/dist/uni/uni-ui/uni-scss/styles/setting/_space.scss +52 -53
  109. package/dist/uni/uni-ui/uni-scss/styles/setting/_styles.scss +142 -147
  110. package/dist/uni/uni-ui/uni-scss/styles/setting/_text.scss +20 -20
  111. package/dist/uni/uni-ui/uni-scss/styles/setting/_variables.scss +111 -95
  112. package/dist/uni/uni-ui/uni-scss/styles/tools/functions.scss +28 -18
  113. package/dist/uni/uni-ui/uni-scss/theme.scss +10 -7
  114. package/dist/uni/uni-ui/uni-scss/variables.scss +42 -24
  115. package/dist/uni/uni-ui/uni-search-bar/i18n/en.json +3 -3
  116. package/dist/uni/uni-ui/uni-search-bar/i18n/index.js +8 -7
  117. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hans.json +2 -2
  118. package/dist/uni/uni-ui/uni-search-bar/i18n/zh-Hant.json +2 -2
  119. package/dist/uni/uni-ui/uni-search-bar/uni-search-bar.vue +290 -281
  120. package/dist/uni/uni-ui/uni-section/uni-section.vue +149 -146
  121. package/dist/uni/uni-ui/uni-segmented-control/uni-segmented-control.vue +141 -131
  122. package/dist/uni/uni-ui/uni-steps/uni-steps.vue +255 -236
  123. package/dist/uni/uni-ui/uni-swipe-action/uni-swipe-action.vue +51 -51
  124. package/dist/uni/uni-ui/uni-swipe-action-item/bindingx.js +276 -282
  125. package/dist/uni/uni-ui/uni-swipe-action-item/isPC.js +10 -10
  126. package/dist/uni/uni-ui/uni-swipe-action-item/mpalipay.js +182 -187
  127. package/dist/uni/uni-ui/uni-swipe-action-item/mpother.js +235 -244
  128. package/dist/uni/uni-ui/uni-swipe-action-item/mpwxs.js +70 -75
  129. package/dist/uni/uni-ui/uni-swipe-action-item/render.js +238 -247
  130. package/dist/uni/uni-ui/uni-swipe-action-item/uni-swipe-action-item.vue +387 -313
  131. package/dist/uni/uni-ui/uni-swipe-action-item/wx.wxs +206 -215
  132. package/dist/uni/uni-ui/uni-swiper-dot/uni-swiper-dot.vue +241 -197
  133. package/dist/uni/uni-ui/uni-table/uni-table.vue +445 -447
  134. package/dist/uni/uni-ui/uni-tag/uni-tag.vue +234 -244
  135. package/dist/uni/uni-ui/uni-tbody/uni-tbody.vue +20 -23
  136. package/dist/uni/uni-ui/uni-td/uni-td.vue +79 -80
  137. package/dist/uni/uni-ui/uni-th/filter-dropdown.vue +510 -503
  138. package/dist/uni/uni-ui/uni-th/uni-th.vue +289 -273
  139. package/dist/uni/uni-ui/uni-thead/uni-thead.vue +115 -114
  140. package/dist/uni/uni-ui/uni-title/uni-title.vue +151 -154
  141. package/dist/uni/uni-ui/uni-tooltip/uni-tooltip.vue +55 -60
  142. package/dist/uni/uni-ui/uni-tr/table-checkbox.vue +162 -163
  143. package/dist/uni/uni-ui/uni-tr/uni-tr.vue +158 -157
  144. package/dist/uni/uni-ui/uni-transition/createAnimation.js +130 -113
  145. package/dist/uni/uni-ui/uni-transition/uni-transition.vue +274 -272
  146. package/package.json +1 -1
@@ -1,323 +1,328 @@
1
1
  <template>
2
- <view class="uni-data-pickerview">
3
- <scroll-view v-if="!isCloudDataList" class="selected-area" scroll-x="true">
4
- <view class="selected-list">
5
- <view
6
- class="selected-item"
7
- v-for="(item,index) in selected"
8
- :key="index"
9
- :class="{
10
- 'selected-item-active':index == selectedIndex
11
- }"
12
- @click="handleSelect(index)"
13
- >
14
- <text>{{item.text || ''}}</text>
15
- </view>
16
- </view>
17
- </scroll-view>
18
- <view class="tab-c">
19
- <scroll-view class="list" :scroll-y="true">
20
- <view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in dataList[selectedIndex]" :key="j"
21
- @click="handleNodeClick(item, selectedIndex, j)">
22
- <text class="item-text">{{item[map.text]}}</text>
23
- <view class="check" v-if="selected.length > selectedIndex && item[map.value] == selected[selectedIndex].value"></view>
24
- </view>
25
- </scroll-view>
2
+ <view class="uni-data-pickerview">
3
+ <scroll-view v-if="!isCloudDataList" class="selected-area" scroll-x="true">
4
+ <view class="selected-list">
5
+ <view
6
+ class="selected-item"
7
+ v-for="(item, index) in selected"
8
+ :key="index"
9
+ :class="{
10
+ 'selected-item-active': index == selectedIndex,
11
+ }"
12
+ @click="handleSelect(index)"
13
+ >
14
+ <text>{{ item.text || '' }}</text>
15
+ </view>
16
+ </view>
17
+ </scroll-view>
18
+ <view class="tab-c">
19
+ <scroll-view class="list" :scroll-y="true">
20
+ <view
21
+ class="item"
22
+ :class="{ 'is-disabled': !!item.disable }"
23
+ v-for="(item, j) in dataList[selectedIndex]"
24
+ :key="j"
25
+ @click="handleNodeClick(item, selectedIndex, j)"
26
+ >
27
+ <text class="item-text">{{ item[map.text] }}</text>
28
+ <view class="check" v-if="selected.length > selectedIndex && item[map.value] == selected[selectedIndex].value"></view>
29
+ </view>
30
+ </scroll-view>
26
31
 
27
- <view class="loading-cover" v-if="loading">
28
- <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
29
- </view>
30
- <view class="error-message" v-if="errorMessage">
31
- <text class="error-text">{{errorMessage}}</text>
32
- </view>
32
+ <view class="loading-cover" v-if="loading">
33
+ <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>
34
+ </view>
35
+ <view class="error-message" v-if="errorMessage">
36
+ <text class="error-text">{{ errorMessage }}</text>
37
+ </view>
38
+ </view>
33
39
  </view>
34
- </view>
35
40
  </template>
36
41
 
37
42
  <script>
38
- import dataPicker from "./uni-data-picker.js"
43
+ import dataPicker from './uni-data-picker.js';
39
44
 
40
- /**
41
- * DataPickerview
42
- * @description uni-data-pickerview
43
- * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
44
- * @property {Array} localdata 本地数据,参考
45
- * @property {Boolean} step-searh = [true|false] 是否分布查询
46
- * @value true 启用分布查询,仅查询当前选中节点
47
- * @value false 关闭分布查询,一次查询出所有数据
48
- * @property {String|DBFieldString} self-field 分布查询当前字段名称
49
- * @property {String|DBFieldString} parent-field 分布查询父字段名称
50
- * @property {String|DBCollectionString} collection 表名
51
- * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
52
- * @property {String} orderby 排序字段及正序倒叙设置
53
- * @property {String|JQLString} where 查询条件
54
- */
55
- export default {
56
- name: 'UniDataPickerView',
57
- emits: ['nodeclick', 'change', 'datachange', 'update:modelValue'],
58
- mixins: [dataPicker],
59
- props: {
60
- managedMode: {
61
- type: Boolean,
62
- default: false
63
- },
64
- ellipsis: {
65
- type: Boolean,
66
- default: true
67
- }
68
- },
69
- created() {
70
- if (!this.managedMode) {
71
- this.$nextTick(() => {
72
- this.loadData();
73
- })
74
- }
75
- },
76
- methods: {
77
- onPropsChange() {
78
- this._treeData = [];
79
- this.selectedIndex = 0;
80
- this.$nextTick(() => {
81
- this.loadData();
82
- })
83
- },
84
- handleSelect(index) {
85
- this.selectedIndex = index;
86
- },
87
- handleNodeClick(item, i, j) {
88
- if (item.disable) {
89
- return;
90
- }
45
+ /**
46
+ * DataPickerview
47
+ * @description uni-data-pickerview
48
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=3796
49
+ * @property {Array} localdata 本地数据,参考
50
+ * @property {Boolean} step-searh = [true|false] 是否分布查询
51
+ * @value true 启用分布查询,仅查询当前选中节点
52
+ * @value false 关闭分布查询,一次查询出所有数据
53
+ * @property {String|DBFieldString} self-field 分布查询当前字段名称
54
+ * @property {String|DBFieldString} parent-field 分布查询父字段名称
55
+ * @property {String|DBCollectionString} collection 表名
56
+ * @property {String|DBFieldString} field 查询字段,多个字段用 `,` 分割
57
+ * @property {String} orderby 排序字段及正序倒叙设置
58
+ * @property {String|JQLString} where 查询条件
59
+ */
60
+ export default {
61
+ name: 'UniDataPickerView',
62
+ emits: ['nodeclick', 'change', 'datachange', 'update:modelValue'],
63
+ mixins: [dataPicker],
64
+ props: {
65
+ managedMode: {
66
+ type: Boolean,
67
+ default: false,
68
+ },
69
+ ellipsis: {
70
+ type: Boolean,
71
+ default: true,
72
+ },
73
+ },
74
+ created() {
75
+ if (!this.managedMode) {
76
+ this.$nextTick(() => {
77
+ this.loadData();
78
+ });
79
+ }
80
+ },
81
+ methods: {
82
+ onPropsChange() {
83
+ this._treeData = [];
84
+ this.selectedIndex = 0;
85
+ this.$nextTick(() => {
86
+ this.loadData();
87
+ });
88
+ },
89
+ handleSelect(index) {
90
+ this.selectedIndex = index;
91
+ },
92
+ handleNodeClick(item, i, j) {
93
+ if (item.disable) {
94
+ return;
95
+ }
91
96
 
92
- const node = this.dataList[i][j];
93
- const text = node[this.map.text];
94
- const value = node[this.map.value];
97
+ const node = this.dataList[i][j];
98
+ const text = node[this.map.text];
99
+ const value = node[this.map.value];
95
100
 
96
- if (i < this.selected.length - 1) {
97
- this.selected.splice(i, this.selected.length - i)
98
- this.selected.push({
99
- text,
100
- value
101
- })
102
- } else if (i === this.selected.length - 1) {
103
- this.selected.splice(i, 1, {
104
- text,
105
- value
106
- })
107
- }
101
+ if (i < this.selected.length - 1) {
102
+ this.selected.splice(i, this.selected.length - i);
103
+ this.selected.push({
104
+ text,
105
+ value,
106
+ });
107
+ } else if (i === this.selected.length - 1) {
108
+ this.selected.splice(i, 1, {
109
+ text,
110
+ value,
111
+ });
112
+ }
108
113
 
109
- if (node.isleaf) {
110
- this.onSelectedChange(node, node.isleaf)
111
- return
112
- }
114
+ if (node.isleaf) {
115
+ this.onSelectedChange(node, node.isleaf);
116
+ return;
117
+ }
113
118
 
114
- const {
115
- isleaf,
116
- hasNodes
117
- } = this._updateBindData()
119
+ const { isleaf, hasNodes } = this._updateBindData();
118
120
 
119
- // 本地数据
120
- if (this.isLocalData) {
121
- this.onSelectedChange(node, (!hasNodes || isleaf))
122
- } else if (this.isCloudDataList) { // Cloud 数据 (单列)
123
- this.onSelectedChange(node, true)
124
- } else if (this.isCloudDataTree) { // Cloud 数据 (树形)
125
- if (isleaf) {
126
- this.onSelectedChange(node, node.isleaf)
127
- } else if (!hasNodes) { // 请求一次服务器以确定是否为叶子节点
128
- this.loadCloudDataNode((data) => {
129
- if (!data.length) {
130
- node.isleaf = true
131
- } else {
132
- this._treeData.push(...data)
133
- this._updateBindData(node)
134
- }
135
- this.onSelectedChange(node, node.isleaf)
136
- })
137
- }
138
- }
139
- },
140
- updateData(data) {
141
- this._treeData = data.treeData
142
- this.selected = data.selected
143
- if (!this._treeData.length) {
144
- this.loadData()
145
- } else {
146
- //this.selected = data.selected
147
- this._updateBindData()
148
- }
149
- },
150
- onDataChange() {
151
- this.$emit('datachange');
152
- },
153
- onSelectedChange(node, isleaf) {
154
- if (isleaf) {
155
- this._dispatchEvent()
156
- }
121
+ // 本地数据
122
+ if (this.isLocalData) {
123
+ this.onSelectedChange(node, !hasNodes || isleaf);
124
+ } else if (this.isCloudDataList) {
125
+ // Cloud 数据 (单列)
126
+ this.onSelectedChange(node, true);
127
+ } else if (this.isCloudDataTree) {
128
+ // Cloud 数据 (树形)
129
+ if (isleaf) {
130
+ this.onSelectedChange(node, node.isleaf);
131
+ } else if (!hasNodes) {
132
+ // 请求一次服务器以确定是否为叶子节点
133
+ this.loadCloudDataNode((data) => {
134
+ if (!data.length) {
135
+ node.isleaf = true;
136
+ } else {
137
+ this._treeData.push(...data);
138
+ this._updateBindData(node);
139
+ }
140
+ this.onSelectedChange(node, node.isleaf);
141
+ });
142
+ }
143
+ }
144
+ },
145
+ updateData(data) {
146
+ this._treeData = data.treeData;
147
+ this.selected = data.selected;
148
+ if (!this._treeData.length) {
149
+ this.loadData();
150
+ } else {
151
+ //this.selected = data.selected
152
+ this._updateBindData();
153
+ }
154
+ },
155
+ onDataChange() {
156
+ this.$emit('datachange');
157
+ },
158
+ onSelectedChange(node, isleaf) {
159
+ if (isleaf) {
160
+ this._dispatchEvent();
161
+ }
157
162
 
158
- if (node) {
159
- this.$emit('nodeclick', node)
160
- }
161
- },
162
- _dispatchEvent() {
163
- this.$emit('change', this.selected.slice(0))
164
- }
165
- }
166
- }
163
+ if (node) {
164
+ this.$emit('nodeclick', node);
165
+ }
166
+ },
167
+ _dispatchEvent() {
168
+ this.$emit('change', this.selected.slice(0));
169
+ },
170
+ },
171
+ };
167
172
  </script>
168
173
 
169
174
  <style lang="scss">
170
- $uni-primary: #007aff !default;
171
-
172
- .uni-data-pickerview {
173
- flex: 1;
174
- /* #ifndef APP-NVUE */
175
- display: flex;
176
- /* #endif */
177
- flex-direction: column;
178
- overflow: hidden;
179
- height: 100%;
180
- }
175
+ $uni-primary: #007aff !default;
181
176
 
182
- .error-text {
183
- color: #DD524D;
184
- }
177
+ .uni-data-pickerview {
178
+ flex: 1;
179
+ /* #ifndef APP-NVUE */
180
+ display: flex;
181
+ /* #endif */
182
+ flex-direction: column;
183
+ overflow: hidden;
184
+ height: 100%;
185
+ }
185
186
 
186
- .loading-cover {
187
- position: absolute;
188
- left: 0;
189
- top: 0;
190
- right: 0;
191
- bottom: 0;
192
- background-color: rgba(255, 255, 255, .5);
193
- /* #ifndef APP-NVUE */
194
- display: flex;
195
- /* #endif */
196
- flex-direction: column;
197
- align-items: center;
198
- z-index: 1001;
199
- }
187
+ .error-text {
188
+ color: #dd524d;
189
+ }
200
190
 
201
- .load-more {
202
- /* #ifndef APP-NVUE */
203
- margin: auto;
204
- /* #endif */
205
- }
191
+ .loading-cover {
192
+ position: absolute;
193
+ left: 0;
194
+ top: 0;
195
+ right: 0;
196
+ bottom: 0;
197
+ background-color: rgba(255, 255, 255, 0.5);
198
+ /* #ifndef APP-NVUE */
199
+ display: flex;
200
+ /* #endif */
201
+ flex-direction: column;
202
+ align-items: center;
203
+ z-index: 1001;
204
+ }
206
205
 
207
- .error-message {
208
- background-color: #fff;
209
- position: absolute;
210
- left: 0;
211
- top: 0;
212
- right: 0;
213
- bottom: 0;
214
- padding: 15px;
215
- opacity: .9;
216
- z-index: 102;
217
- }
206
+ .load-more {
207
+ /* #ifndef APP-NVUE */
208
+ margin: auto;
209
+ /* #endif */
210
+ }
218
211
 
219
- /* #ifdef APP-NVUE */
220
- .selected-area {
221
- width: 750rpx;
222
- }
223
- /* #endif */
212
+ .error-message {
213
+ background-color: #fff;
214
+ position: absolute;
215
+ left: 0;
216
+ top: 0;
217
+ right: 0;
218
+ bottom: 0;
219
+ padding: 15px;
220
+ opacity: 0.9;
221
+ z-index: 102;
222
+ }
224
223
 
225
- .selected-list {
226
- /* #ifndef APP-NVUE */
227
- display: flex;
228
- flex-wrap: nowrap;
224
+ /* #ifdef APP-NVUE */
225
+ .selected-area {
226
+ width: 750rpx;
227
+ }
229
228
  /* #endif */
230
- flex-direction: row;
231
- padding: 0 5px;
232
- border-bottom: 1px solid #f8f8f8;
233
- }
234
229
 
235
- .selected-item {
236
- margin-left: 10px;
237
- margin-right: 10px;
238
- padding: 12px 0;
239
- text-align: center;
240
- /* #ifndef APP-NVUE */
241
- white-space: nowrap;
242
- /* #endif */
243
- }
230
+ .selected-list {
231
+ /* #ifndef APP-NVUE */
232
+ display: flex;
233
+ flex-wrap: nowrap;
234
+ /* #endif */
235
+ flex-direction: row;
236
+ padding: 0 5px;
237
+ border-bottom: 1px solid #f8f8f8;
238
+ }
244
239
 
245
- .selected-item-text-overflow {
246
- width: 168px;
247
- /* fix nvue */
248
- overflow: hidden;
249
- /* #ifndef APP-NVUE */
250
- width: 6em;
251
- white-space: nowrap;
252
- text-overflow: ellipsis;
253
- -o-text-overflow: ellipsis;
254
- /* #endif */
255
- }
240
+ .selected-item {
241
+ margin-left: 10px;
242
+ margin-right: 10px;
243
+ padding: 12px 0;
244
+ text-align: center;
245
+ /* #ifndef APP-NVUE */
246
+ white-space: nowrap;
247
+ /* #endif */
248
+ }
256
249
 
257
- .selected-item-active {
258
- border-bottom: 2px solid $uni-primary;
259
- }
250
+ .selected-item-text-overflow {
251
+ width: 168px;
252
+ /* fix nvue */
253
+ overflow: hidden;
254
+ /* #ifndef APP-NVUE */
255
+ width: 6em;
256
+ white-space: nowrap;
257
+ text-overflow: ellipsis;
258
+ -o-text-overflow: ellipsis;
259
+ /* #endif */
260
+ }
260
261
 
261
- .selected-item-text {
262
- color: $uni-primary;
263
- }
262
+ .selected-item-active {
263
+ border-bottom: 2px solid $uni-primary;
264
+ }
264
265
 
265
- .tab-c {
266
- position: relative;
267
- flex: 1;
268
- /* #ifndef APP-NVUE */
269
- display: flex;
270
- /* #endif */
271
- flex-direction: row;
272
- overflow: hidden;
273
- }
266
+ .selected-item-text {
267
+ color: $uni-primary;
268
+ }
274
269
 
275
- .list {
276
- flex: 1;
277
- }
270
+ .tab-c {
271
+ position: relative;
272
+ flex: 1;
273
+ /* #ifndef APP-NVUE */
274
+ display: flex;
275
+ /* #endif */
276
+ flex-direction: row;
277
+ overflow: hidden;
278
+ }
278
279
 
279
- .item {
280
- padding: 12px 15px;
281
- /* border-bottom: 1px solid #f0f0f0; */
282
- /* #ifndef APP-NVUE */
283
- display: flex;
284
- /* #endif */
285
- flex-direction: row;
286
- justify-content: space-between;
287
- }
280
+ .list {
281
+ flex: 1;
282
+ }
288
283
 
289
- .is-disabled {
290
- opacity: .5;
291
- }
284
+ .item {
285
+ padding: 12px 15px;
286
+ /* border-bottom: 1px solid #f0f0f0; */
287
+ /* #ifndef APP-NVUE */
288
+ display: flex;
289
+ /* #endif */
290
+ flex-direction: row;
291
+ justify-content: space-between;
292
+ }
292
293
 
293
- .item-text {
294
- /* flex: 1; */
295
- color: #333333;
296
- }
294
+ .is-disabled {
295
+ opacity: 0.5;
296
+ }
297
297
 
298
- .item-text-overflow {
299
- width: 280px;
300
- /* fix nvue */
301
- overflow: hidden;
302
- /* #ifndef APP-NVUE */
303
- width: 20em;
304
- white-space: nowrap;
305
- text-overflow: ellipsis;
306
- -o-text-overflow: ellipsis;
307
- /* #endif */
308
- }
298
+ .item-text {
299
+ /* flex: 1; */
300
+ color: #333333;
301
+ }
309
302
 
310
- .check {
311
- margin-right: 5px;
312
- border: 2px solid $uni-primary;
313
- border-left: 0;
314
- border-top: 0;
315
- height: 12px;
316
- width: 6px;
317
- transform-origin: center;
318
- /* #ifndef APP-NVUE */
319
- transition: all 0.3s;
320
- /* #endif */
321
- transform: rotate(45deg);
322
- }
303
+ .item-text-overflow {
304
+ width: 280px;
305
+ /* fix nvue */
306
+ overflow: hidden;
307
+ /* #ifndef APP-NVUE */
308
+ width: 20em;
309
+ white-space: nowrap;
310
+ text-overflow: ellipsis;
311
+ -o-text-overflow: ellipsis;
312
+ /* #endif */
313
+ }
314
+
315
+ .check {
316
+ margin-right: 5px;
317
+ border: 2px solid $uni-primary;
318
+ border-left: 0;
319
+ border-top: 0;
320
+ height: 12px;
321
+ width: 6px;
322
+ transform-origin: center;
323
+ /* #ifndef APP-NVUE */
324
+ transition: all 0.3s;
325
+ /* #endif */
326
+ transform: rotate(45deg);
327
+ }
323
328
  </style>