@10yun/cv-mobile-ui 0.5.19 → 0.5.21

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 (137) hide show
  1. package/other/mpvue-picker/mpvuePicker.vue +402 -0
  2. package/{uni-ui/lib → other}/mpvue-picker/style.css +0 -1
  3. package/{uni-ui/lib → other}/tab-nvue/style.css +0 -1
  4. package/other/uParse/components/style.css +1 -0
  5. package/other/uParse/components/wxParseAudio.vue +1 -0
  6. package/other/uParse/components/wxParseImg.vue +86 -0
  7. package/other/uParse/components/wxParseTable.vue +54 -0
  8. package/other/uParse/components/wxParseTemplate0.vue +98 -0
  9. package/other/uParse/components/wxParseTemplate1.vue +81 -0
  10. package/other/uParse/components/wxParseTemplate10.vue +81 -0
  11. package/other/uParse/components/wxParseTemplate11.vue +79 -0
  12. package/other/uParse/components/wxParseTemplate2.vue +81 -0
  13. package/other/uParse/components/wxParseTemplate3.vue +81 -0
  14. package/other/uParse/components/wxParseTemplate4.vue +81 -0
  15. package/other/uParse/components/wxParseTemplate5.vue +81 -0
  16. package/other/uParse/components/wxParseTemplate6.vue +81 -0
  17. package/other/uParse/components/wxParseTemplate7.vue +81 -0
  18. package/other/uParse/components/wxParseTemplate8.vue +81 -0
  19. package/other/uParse/components/wxParseTemplate9.vue +81 -0
  20. package/other/uParse/components/wxParseVideo.vue +14 -0
  21. package/other/uParse/editor.css +495 -0
  22. package/{uni-ui/lib/uParse/src → other/uParse}/libs/html2json.js +19 -22
  23. package/{uni-ui/lib/uParse/src → other/uParse}/libs/htmlparser.js +12 -5
  24. package/{uni-ui/lib/uParse/src → other/uParse}/libs/wxDiscode.js +2 -2
  25. package/other/uParse/wxParse.vue +196 -0
  26. package/package.json +1 -1
  27. package/plugins/map/amqp-wx.js +173 -0
  28. package/{uni-ui/lib/mpvueGestureLock/index.vue → ui-cv/components/cv-draw-gesture-lock/cv-draw-gesture-lock.vue} +4 -1
  29. package/ui-cv/components/cv-draw-gesture-lock/gestureLock.js +169 -0
  30. package/{uni-ui/lib/mpvueGestureLock → ui-cv/components/cv-draw-gesture-lock}/style.css +0 -1
  31. package/{uni-ui/lib/mpvue-citypicker → ui-cv/components/cv-geo-region}/style.css +0 -1
  32. package/ui-cv/components/cv-grid-item/cv-grid-item.vue +1 -1
  33. package/uni-ui/lib/uni-badge/uni-badge.vue +150 -1
  34. package/uni-ui/lib/uni-breadcrumb/uni-breadcrumb.vue +37 -1
  35. package/uni-ui/lib/uni-breadcrumb-item/uni-breadcrumb-item.vue +83 -1
  36. package/uni-ui/lib/uni-calendar/uni-calendar-item.vue +122 -1
  37. package/uni-ui/lib/uni-calendar/uni-calendar.vue +366 -1
  38. package/uni-ui/lib/uni-card/uni-card.vue +124 -1
  39. package/uni-ui/lib/uni-col/uni-col.vue +1 -1
  40. package/uni-ui/lib/uni-collapse/uni-collapse.vue +135 -1
  41. package/uni-ui/lib/uni-collapse-item/uni-collapse-item.vue +266 -1
  42. package/uni-ui/lib/uni-combox/uni-combox.vue +1 -1
  43. package/uni-ui/lib/uni-countdown/uni-countdown.vue +239 -1
  44. package/uni-ui/lib/uni-data-checkbox/uni-data-checkbox.vue +487 -1
  45. package/uni-ui/lib/uni-data-picker/uni-data-picker.vue +530 -1
  46. package/uni-ui/lib/uni-data-pickerview/uni-data-picker.js +157 -150
  47. package/uni-ui/lib/uni-data-pickerview/uni-data-pickerview.vue +166 -1
  48. package/uni-ui/lib/uni-data-select/uni-data-select.vue +289 -1
  49. package/uni-ui/lib/uni-datetime-picker/calendar-item.vue +70 -1
  50. package/uni-ui/lib/uni-datetime-picker/calendar.vue +629 -1
  51. package/uni-ui/lib/uni-datetime-picker/time-picker.vue +741 -1
  52. package/uni-ui/lib/uni-datetime-picker/uni-datetime-picker.vue +847 -1
  53. package/uni-ui/lib/uni-drawer/uni-drawer.vue +115 -1
  54. package/uni-ui/lib/uni-easyinput/uni-easyinput.vue +515 -1
  55. package/uni-ui/lib/uni-fab/uni-fab.vue +257 -1
  56. package/uni-ui/lib/uni-fav/uni-fav.vue +123 -1
  57. package/uni-ui/lib/uni-file-picker/uni-file-picker.vue +642 -1
  58. package/uni-ui/lib/uni-file-picker/upload-file.vue +177 -1
  59. package/uni-ui/lib/uni-file-picker/upload-image.vue +176 -1
  60. package/uni-ui/lib/uni-forms/uni-forms.vue +375 -1
  61. package/uni-ui/lib/uni-forms-item/uni-forms-item.vue +429 -1
  62. package/uni-ui/lib/uni-goods-nav/uni-goods-nav.vue +129 -1
  63. package/uni-ui/lib/uni-grid/uni-grid.vue +115 -1
  64. package/uni-ui/lib/uni-grid-item/uni-grid-item.vue +78 -1
  65. package/uni-ui/lib/uni-group/uni-group.vue +85 -1
  66. package/uni-ui/lib/uni-icons/uni-icons.vue +85 -1
  67. package/uni-ui/lib/uni-indexed-list/uni-indexed-list-item.vue +68 -1
  68. package/uni-ui/lib/uni-indexed-list/uni-indexed-list.vue +294 -1
  69. package/uni-ui/lib/uni-list/uni-list.vue +81 -1
  70. package/uni-ui/lib/uni-list-ad/uni-list-ad.vue +77 -1
  71. package/uni-ui/lib/uni-list-chat/uni-list-chat.vue +294 -1
  72. package/uni-ui/lib/uni-list-item/uni-list-item.vue +346 -1
  73. package/uni-ui/lib/uni-load-more/uni-load-more.vue +172 -1
  74. package/uni-ui/lib/uni-nav-bar/uni-nav-bar.vue +205 -1
  75. package/uni-ui/lib/uni-nav-bar/uni-status-bar.vue +18 -1
  76. package/uni-ui/lib/uni-notice-bar/uni-notice-bar.vue +331 -1
  77. package/uni-ui/lib/uni-number-box/uni-number-box.vue +166 -1
  78. package/uni-ui/lib/uni-pagination/uni-pagination.vue +323 -1
  79. package/uni-ui/lib/uni-popup/uni-popup.vue +1 -1
  80. package/uni-ui/lib/uni-popup-dialog/uni-popup-dialog.vue +173 -1
  81. package/uni-ui/lib/uni-popup-message/uni-popup-message.vue +74 -1
  82. package/uni-ui/lib/uni-popup-share/uni-popup-share.vue +106 -1
  83. package/uni-ui/lib/uni-rate/uni-rate.vue +322 -1
  84. package/uni-ui/lib/uni-row/uni-row.vue +1 -1
  85. package/uni-ui/lib/uni-search-bar/uni-search-bar.vue +236 -1
  86. package/uni-ui/lib/uni-section/uni-section.vue +109 -1
  87. package/uni-ui/lib/uni-segmented-control/uni-segmented-control.vue +103 -1
  88. package/uni-ui/lib/uni-status-bar/uni-status-bar.vue +1 -1
  89. package/uni-ui/lib/uni-steps/uni-steps.vue +120 -1
  90. package/uni-ui/lib/uni-swipe-action-item/uni-swipe-action-item.vue +226 -3
  91. package/uni-ui/lib/uni-swiper-dot/uni-swiper-dot.vue +167 -1
  92. package/uni-ui/lib/uni-table/uni-table.vue +297 -1
  93. package/uni-ui/lib/uni-tag/uni-tag.vue +100 -1
  94. package/uni-ui/lib/uni-td/uni-td.vue +78 -1
  95. package/uni-ui/lib/uni-th/filter-dropdown.vue +1 -1
  96. package/uni-ui/lib/uni-th/uni-th.vue +224 -1
  97. package/uni-ui/lib/uni-thead/uni-thead.vue +77 -1
  98. package/uni-ui/lib/uni-tr/table-checkbox.vue +79 -1
  99. package/uni-ui/lib/uni-tr/uni-tr.vue +135 -1
  100. package/uni-ui/lib/amap-wx/js/util.js +0 -181
  101. package/uni-ui/lib/marked/index.js +0 -1
  102. package/uni-ui/lib/mpvue-citypicker/city-data/area.js +0 -12542
  103. package/uni-ui/lib/mpvue-citypicker/city-data/city.js +0 -1503
  104. package/uni-ui/lib/mpvue-citypicker/city-data/province.js +0 -139
  105. package/uni-ui/lib/mpvue-picker/mpvuePicker.vue +0 -3
  106. package/uni-ui/lib/mpvueGestureLock/gestureLock.js +0 -175
  107. package/uni-ui/lib/uParse/src/components/style.css +0 -2
  108. package/uni-ui/lib/uParse/src/components/wxParseAudio.vue +0 -1
  109. package/uni-ui/lib/uParse/src/components/wxParseImg.vue +0 -1
  110. package/uni-ui/lib/uParse/src/components/wxParseTable.vue +0 -3
  111. package/uni-ui/lib/uParse/src/components/wxParseTemplate0.vue +0 -1
  112. package/uni-ui/lib/uParse/src/components/wxParseTemplate1.vue +0 -1
  113. package/uni-ui/lib/uParse/src/components/wxParseTemplate10.vue +0 -1
  114. package/uni-ui/lib/uParse/src/components/wxParseTemplate11.vue +0 -1
  115. package/uni-ui/lib/uParse/src/components/wxParseTemplate2.vue +0 -1
  116. package/uni-ui/lib/uParse/src/components/wxParseTemplate3.vue +0 -1
  117. package/uni-ui/lib/uParse/src/components/wxParseTemplate4.vue +0 -1
  118. package/uni-ui/lib/uParse/src/components/wxParseTemplate5.vue +0 -1
  119. package/uni-ui/lib/uParse/src/components/wxParseTemplate6.vue +0 -1
  120. package/uni-ui/lib/uParse/src/components/wxParseTemplate7.vue +0 -1
  121. package/uni-ui/lib/uParse/src/components/wxParseTemplate8.vue +0 -1
  122. package/uni-ui/lib/uParse/src/components/wxParseTemplate9.vue +0 -1
  123. package/uni-ui/lib/uParse/src/components/wxParseVideo.vue +0 -1
  124. package/uni-ui/lib/uParse/src/editor.css +0 -495
  125. package/uni-ui/lib/uParse/src/wxParse.vue +0 -1
  126. /package/{uni-ui/lib → other}/api-set-tabbar.nvue +0 -0
  127. /package/{uni-ui/lib → other}/mpvue-echarts/src/echarts.vue +0 -0
  128. /package/{uni-ui/lib → other}/mpvue-echarts/src/style.css +0 -0
  129. /package/{uni-ui/lib → other}/mpvue-echarts/src/wx-canvas.js +0 -0
  130. /package/{uni-ui/lib → other}/product.vue +0 -0
  131. /package/{uni-ui/lib → other}/style.css +0 -0
  132. /package/{uni-ui/lib → other}/tab-nvue/mediaList.vue +0 -0
  133. /package/{uni-ui/lib → other}/u-charts/u-charts.js +0 -0
  134. /package/{uni-ui/lib/uParse/src → other/uParse}/wxParse.css +0 -0
  135. /package/{uni-ui/lib/amap-wx → plugins/map}/lib/amap-wx.js +0 -0
  136. /package/{uni-ui/lib/mpvue-citypicker → ui-cv/components/cv-geo-region}/mpvueCityPicker.vue +0 -0
  137. /package/{uni-ui/lib/marked → ui-cv/components/cv-markdown-show}/lib/marked.js +0 -0
@@ -1 +1,79 @@
1
- <template>
2
1
  <view class="uni-table-checkbox" @click="selected">
3
2
  <view v-if="!indeterminate" class="checkbox__inner" :class="{ 'is-checked': isChecked, 'is-disable': isDisabled }">
4
3
  <view class="checkbox__inner-icon"></view>
5
4
  </view>
6
5
  <view v-else class="checkbox__inner checkbox--indeterminate">
7
6
  <view class="checkbox__inner-icon"></view>
8
7
  </view>
9
8
  </view>
10
9
  name: 'TableCheckbox',
11
10
  emits: ['checkboxSelected'],
12
11
  props: {
13
12
  indeterminate: {
14
13
  type: Boolean,
15
14
  default: false
16
15
  },
17
16
  checked: {
18
17
  type: [Boolean, String],
19
18
  default: false
20
19
  },
21
20
  disabled: {
22
21
  type: Boolean,
23
22
  default: false
24
23
  },
25
24
  index: {
26
25
  type: Number,
27
26
  default: -1
28
27
  },
29
28
  cellData: {
30
29
  type: Object,
31
30
  default() {
32
31
  return {};
33
32
  }
34
33
  }
35
34
  },
36
35
  watch: {
37
36
  checked(newVal) {
38
37
  if (typeof this.checked === 'boolean') {
39
38
  this.isChecked = newVal;
40
39
  } else {
41
40
  this.isChecked = true;
42
41
  }
43
42
  },
44
43
  indeterminate(newVal) {
45
44
  this.isIndeterminate = newVal;
46
45
  }
47
46
  },
48
47
  data() {
49
48
  return {
50
49
  isChecked: false,
51
50
  isDisabled: false,
52
51
  isIndeterminate: false
53
52
  };
54
53
  },
55
54
  created() {
56
55
  if (typeof this.checked === 'boolean') {
57
56
  this.isChecked = this.checked;
58
57
  }
59
58
  this.isDisabled = this.disabled;
60
59
  },
61
60
  methods: {
62
61
  selected() {
63
62
  if (this.isDisabled) return;
64
63
  this.isIndeterminate = false;
65
64
  this.isChecked = !this.isChecked;
66
65
  this.$emit('checkboxSelected', {
67
66
  checked: this.isChecked,
68
67
  data: this.cellData
69
68
  });
70
69
  }
71
70
  }
71
+ <template>
72
+ <view class="uni-table-checkbox" @click="selected">
73
+ <view v-if="!indeterminate" class="checkbox__inner" :class="{ 'is-checked': isChecked, 'is-disable': isDisabled }">
74
+ <view class="checkbox__inner-icon"></view>
75
+ </view>
76
+ <view v-else class="checkbox__inner checkbox--indeterminate">
77
+ <view class="checkbox__inner-icon"></view>
78
+ </view>
79
+ </view>
80
+ </template>
81
+ <script>
82
+ export default {
83
+ name: 'TableCheckbox',
84
+ emits: ['checkboxSelected'],
85
+ props: {
86
+ indeterminate: {
87
+ type: Boolean,
88
+ default: false
89
+ },
90
+ checked: {
91
+ type: [Boolean, String],
92
+ default: false
93
+ },
94
+ disabled: {
95
+ type: Boolean,
96
+ default: false
97
+ },
98
+ index: {
99
+ type: Number,
100
+ default: -1
101
+ },
102
+ cellData: {
103
+ type: Object,
104
+ default() {
105
+ return {};
106
+ }
107
+ }
108
+ },
109
+ watch: {
110
+ checked(newVal) {
111
+ if (typeof this.checked === 'boolean') {
112
+ this.isChecked = newVal;
113
+ } else {
114
+ this.isChecked = true;
115
+ }
116
+ },
117
+ indeterminate(newVal) {
118
+ this.isIndeterminate = newVal;
119
+ }
120
+ },
121
+ data() {
122
+ return {
123
+ isChecked: false,
124
+ isDisabled: false,
125
+ isIndeterminate: false
126
+ };
127
+ },
128
+ created() {
129
+ if (typeof this.checked === 'boolean') {
130
+ this.isChecked = this.checked;
131
+ }
132
+ this.isDisabled = this.disabled;
133
+ },
134
+ methods: {
135
+ selected() {
136
+ if (this.isDisabled) return;
137
+ this.isIndeterminate = false;
138
+ this.isChecked = !this.isChecked;
139
+ this.$emit('checkboxSelected', {
140
+ checked: this.isChecked,
141
+ data: this.cellData
142
+ });
143
+ }
144
+ }
145
+ };
146
+ </script>
147
+ <style>
148
+ @import 'style.css';
149
+ </style>
@@ -1 +1,135 @@
1
- <template>
2
1
  <!-- #ifdef H5 -->
3
2
  <tr class="uni-table-tr">
4
3
  <th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
5
4
  <table-checkbox
6
5
  :checked="checked"
7
6
  :indeterminate="indeterminate"
8
7
  :disabled="disabled"
9
8
  @checkboxSelected="checkboxSelected"
10
9
  ></table-checkbox>
11
10
  </th>
12
11
  <slot></slot>
13
12
  <!-- <uni-th class="th-fixed">123</uni-th> -->
14
13
  </tr>
15
14
  <!-- #endif -->
16
15
  <!-- #ifndef H5 -->
17
16
  <view class="uni-table-tr">
18
17
  <view v-if="selection === 'selection'" class="checkbox" :class="{ 'tr-table--border': border }">
19
18
  <table-checkbox
20
19
  :checked="checked"
21
20
  :indeterminate="indeterminate"
22
21
  :disabled="disabled"
23
22
  @checkboxSelected="checkboxSelected"
24
23
  ></table-checkbox>
25
24
  </view>
26
25
  <slot></slot>
27
26
  </view>
28
27
  <!-- #endif -->
29
28
  * Tr 表格行组件
30
29
  * @description 表格行组件 仅包含 th,td 组件
31
30
  * @tutorial https://ext.dcloud.net.cn/plugin?id=
32
31
  */
33
32
  name: 'uniTr',
34
33
  components: { tableCheckbox },
35
34
  props: {
36
35
  disabled: {
37
36
  type: Boolean,
38
37
  default: false
39
38
  },
40
39
  keyValue: {
41
40
  type: [String, Number],
42
41
  default: ''
43
42
  }
44
43
  },
45
44
  options: {
46
45
  virtualHost: true
47
46
  },
48
47
  data() {
49
48
  return {
50
49
  value: false,
51
50
  border: false,
52
51
  selection: false,
53
52
  widthThArr: [],
54
53
  ishead: true,
55
54
  checked: false,
56
55
  indeterminate: false
57
56
  };
58
57
  },
59
58
  created() {
60
59
  this.root = this.getTable();
61
60
  this.head = this.getTable('uniThead');
62
61
  if (this.head) {
63
62
  this.ishead = false;
64
63
  this.head.init(this);
65
64
  }
66
65
  this.border = this.root.border;
67
66
  this.selection = this.root.type;
68
67
  this.root.trChildren.push(this);
69
68
  const rowData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
70
69
  if (rowData) {
71
70
  this.rowData = rowData;
72
71
  }
73
72
  this.root.isNodata();
74
73
  },
75
74
  mounted() {
76
75
  if (this.widthThArr.length > 0) {
77
76
  const selectionWidth = this.selection === 'selection' ? 50 : 0;
78
77
  this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth;
79
78
  }
80
79
  },
81
80
  // #ifndef VUE3
82
81
  destroyed() {
83
82
  const index = this.root.trChildren.findIndex((i) => i === this);
84
83
  this.root.trChildren.splice(index, 1);
85
84
  this.root.isNodata();
86
85
  },
87
86
  // #endif
88
87
  // #ifdef VUE3
89
88
  unmounted() {
90
89
  const index = this.root.trChildren.findIndex((i) => i === this);
91
90
  this.root.trChildren.splice(index, 1);
92
91
  this.root.isNodata();
93
92
  },
94
93
  // #endif
95
94
  methods: {
96
95
  minWidthUpdate(width) {
97
96
  this.widthThArr.push(width);
98
97
  },
99
98
  // 选中
100
99
  checkboxSelected(e) {
101
100
  let rootData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
102
101
  this.checked = e.checked;
103
102
  this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null);
104
103
  },
105
104
  change(e) {
106
105
  this.root.trChildren.forEach((item) => {
107
106
  if (item === this) {
108
107
  this.root.check(this, e.detail.value.length > 0 ? true : false);
109
108
  }
110
109
  });
111
110
  },
112
111
  /**
113
112
  * 获取父元素实例
114
113
  */
115
114
  getTable(name = 'uniTable') {
116
115
  let parent = this.$parent;
117
116
  let parentName = parent.$options.name;
118
117
  while (parentName !== name) {
119
118
  parent = parent.$parent;
120
119
  if (!parent) return false;
121
120
  parentName = parent.$options.name;
122
121
  }
123
122
  return parent;
124
123
  }
125
124
  }
125
+ <template>
126
+ <!-- #ifdef H5 -->
127
+ <tr class="uni-table-tr">
128
+ <th v-if="selection === 'selection' && ishead" class="checkbox" :class="{ 'tr-table--border': border }">
129
+ <table-checkbox
130
+ :checked="checked"
131
+ :indeterminate="indeterminate"
132
+ :disabled="disabled"
133
+ @checkboxSelected="checkboxSelected"
134
+ ></table-checkbox>
135
+ </th>
136
+ <slot></slot>
137
+ <!-- <uni-th class="th-fixed">123</uni-th> -->
138
+ </tr>
139
+ <!-- #endif -->
140
+ <!-- #ifndef H5 -->
141
+ <view class="uni-table-tr">
142
+ <view v-if="selection === 'selection'" class="checkbox" :class="{ 'tr-table--border': border }">
143
+ <table-checkbox
144
+ :checked="checked"
145
+ :indeterminate="indeterminate"
146
+ :disabled="disabled"
147
+ @checkboxSelected="checkboxSelected"
148
+ ></table-checkbox>
149
+ </view>
150
+ <slot></slot>
151
+ </view>
152
+ <!-- #endif -->
153
+ </template>
154
+ <script>
155
+ import tableCheckbox from './table-checkbox.vue';
156
+ /**
157
+ * Tr 表格行组件
158
+ * @description 表格行组件 仅包含 th,td 组件
159
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=
160
+ */
161
+ export default {
162
+ name: 'uniTr',
163
+ components: { tableCheckbox },
164
+ props: {
165
+ disabled: {
166
+ type: Boolean,
167
+ default: false
168
+ },
169
+ keyValue: {
170
+ type: [String, Number],
171
+ default: ''
172
+ }
173
+ },
174
+ options: {
175
+ virtualHost: true
176
+ },
177
+ data() {
178
+ return {
179
+ value: false,
180
+ border: false,
181
+ selection: false,
182
+ widthThArr: [],
183
+ ishead: true,
184
+ checked: false,
185
+ indeterminate: false
186
+ };
187
+ },
188
+ created() {
189
+ this.root = this.getTable();
190
+ this.head = this.getTable('uniThead');
191
+ if (this.head) {
192
+ this.ishead = false;
193
+ this.head.init(this);
194
+ }
195
+ this.border = this.root.border;
196
+ this.selection = this.root.type;
197
+ this.root.trChildren.push(this);
198
+ const rowData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
199
+ if (rowData) {
200
+ this.rowData = rowData;
201
+ }
202
+ this.root.isNodata();
203
+ },
204
+ mounted() {
205
+ if (this.widthThArr.length > 0) {
206
+ const selectionWidth = this.selection === 'selection' ? 50 : 0;
207
+ this.root.minWidth = this.widthThArr.reduce((a, b) => Number(a) + Number(b)) + selectionWidth;
208
+ }
209
+ },
210
+ // #ifndef VUE3
211
+ destroyed() {
212
+ const index = this.root.trChildren.findIndex((i) => i === this);
213
+ this.root.trChildren.splice(index, 1);
214
+ this.root.isNodata();
215
+ },
216
+ // #endif
217
+ // #ifdef VUE3
218
+ unmounted() {
219
+ const index = this.root.trChildren.findIndex((i) => i === this);
220
+ this.root.trChildren.splice(index, 1);
221
+ this.root.isNodata();
222
+ },
223
+ // #endif
224
+ methods: {
225
+ minWidthUpdate(width) {
226
+ this.widthThArr.push(width);
227
+ },
228
+ // 选中
229
+ checkboxSelected(e) {
230
+ let rootData = this.root.data.find((v) => v[this.root.rowKey] === this.keyValue);
231
+ this.checked = e.checked;
232
+ this.root.check(rootData || this, e.checked, rootData ? this.keyValue : null);
233
+ },
234
+ change(e) {
235
+ this.root.trChildren.forEach((item) => {
236
+ if (item === this) {
237
+ this.root.check(this, e.detail.value.length > 0 ? true : false);
238
+ }
239
+ });
240
+ },
241
+ /**
242
+ * 获取父元素实例
243
+ */
244
+ getTable(name = 'uniTable') {
245
+ let parent = this.$parent;
246
+ let parentName = parent.$options.name;
247
+ while (parentName !== name) {
248
+ parent = parent.$parent;
249
+ if (!parent) return false;
250
+ parentName = parent.$options.name;
251
+ }
252
+ return parent;
253
+ }
254
+ }
255
+ };
256
+ </script>
257
+ <style>
258
+ @import 'style.css';
259
+ </style>
@@ -1,181 +0,0 @@
1
- import amap from '@/components/amap-wx/lib/amap-wx.js';
2
- // 地铁颜色图
3
- const line = {
4
- '1号线': '#C43B33',
5
- '2号线': '#016299',
6
- '4号线/大兴线': '#008E9C',
7
- '5号线': '#A42380',
8
- '6号线': '#D09900',
9
- '7号线': '#F2C172',
10
- '8号线': '#009D6A',
11
- '9号线': '#8FC41E',
12
- '10号线': '#009DBE',
13
- '13号线': '#F9E701',
14
- '14号线东段': '#D4A7A2',
15
- '14号线西段': '#D4A7A2',
16
- '15号线': '#5D2D69',
17
- '八通线': '#C33A32',
18
- '昌平线': '#DE82B1',
19
- '亦庄线': '#E40177',
20
- '房山线': '#E66021',
21
- '机场线': '#A29BBC',
22
- }
23
-
24
- // 150500:地铁站 ,150700:公交站 , 190700:地名地址
25
- const typecode = [{
26
- id: '150500',
27
- icon: 'icon-ditie'
28
- }, {
29
- id: '150700',
30
- icon: 'icon-gongjiao'
31
- }, {
32
- id: '190700',
33
- icon: 'icon-gonglu'
34
- }];
35
-
36
- const util = {
37
- key:'b526b09b86cd2996e7732be8ab8c4430',
38
- /**
39
- * 初始化高德地图api
40
- */
41
- mapInit() {
42
- return new amap.AMapWX({
43
- key: this.key
44
- });
45
- },
46
- // 服务状态吗
47
- typecode,
48
- /**
49
- * 获取地图颜色
50
- */
51
- lineColor(name) {
52
- if (line[name]) {
53
- return line[name];
54
- } else {
55
- return '#ccc';
56
- }
57
- },
58
- /**
59
- * 关键字颜色变化
60
- */
61
- serachNmme(val, name) {
62
- let namestr = new RegExp(val);
63
- let nameresult =
64
- `<div style="font-size: 14px;color: #333;line-height: 1.5;">
65
- ${name.replace(namestr, "<span style='color:#66ccff;'>" + val + '</span>')}
66
- </div>`
67
- .trim();
68
-
69
- return nameresult;
70
- },
71
- /**
72
- * 地址转地铁线路
73
- */
74
- addressToLine(address, type) {
75
- let addr = address.split(';');
76
- let dt = '';
77
- addr.forEach(elm => {
78
- let color = '#cccccc';
79
- if (type === typecode[0].id) {
80
- color = this.lineColor(elm)
81
- } else if (type === typecode[1].id) {
82
- color = '#4075cb'
83
- }
84
- let style = 'margin:5px 0;margin-right:5px;padding:0 5px;background:' + color +
85
- ';font-size:12px;color:#fff;border-radius:3px;';
86
- dt += `<div style=\'${style}\'>${elm}</div>`;
87
-
88
- });
89
- return `<div style="display:flex;flex-wrap: wrap;">${dt}</div>`;
90
- },
91
- /**
92
- * 数据处理
93
- */
94
- dataHandle(item, val) {
95
- // 改变字体颜色
96
- if (val) {
97
- item.nameNodes = util.serachNmme(val, item.name);
98
- } else {
99
- item.nameNodes = `<div style="font-size: 14px;color: #333;line-height: 1.5;">${item.name}</div>`;
100
-
101
- }
102
- // 地址解析 地铁
103
- if (
104
- item.typecode === util.typecode[0].id ||
105
- item.typecode === util.typecode[1].id
106
- ) {
107
- item.addressNodes = util.addressToLine(item.address, item.typecode);
108
- if (item.typecode === util.typecode[0].id) {
109
- item.icon = util.typecode[0].icon;
110
- } else if (item.typecode === util.typecode[1].id) {
111
- item.icon = util.typecode[1].icon;
112
- }
113
- } else {
114
- item.addressNodes = `<span>${item.district}${
115
- item.address.length > 0 ? '·' + item.address : ''
116
- }</span>`.trim();
117
- item.icon = 'icon-weizhi';
118
- }
119
-
120
- if (item.location && item.location.length === 0) {
121
- item.icon = 'icon-sousuo';
122
- }
123
-
124
- return item;
125
- },
126
- /**
127
- * 存储历史数据
128
- * val [string | object]需要存储的内容
129
- */
130
- setHistory(val) {
131
- let searchHistory = uni.getStorageSync('search:history');
132
- if (!searchHistory) searchHistory = [];
133
- let serachData = {};
134
- if (typeof(val) === 'string') {
135
- serachData = {
136
- adcode: [],
137
- address: [],
138
- city: [],
139
- district: [],
140
- id: [],
141
- location: [],
142
- name: val,
143
- typecode: []
144
- };
145
- } else {
146
- serachData = val
147
- }
148
-
149
- // 判断数组是否存在,如果存在,那么将放到最前面
150
- for (var i = 0; i < searchHistory.length; i++) {
151
- if (searchHistory[i].name === serachData.name) {
152
- searchHistory.splice(i, 1);
153
- break;
154
- }
155
- }
156
-
157
- searchHistory.unshift(util.dataHandle(serachData));
158
- uni.setStorage({
159
- key: 'search:history',
160
- data: searchHistory,
161
- success: function() {
162
- // console.log('success');
163
- }
164
- });
165
- },
166
- getHistory() {
167
-
168
- },
169
- removeHistory() {
170
- uni.removeStorage({
171
- key: 'search:history',
172
- success: function(res) {
173
- console.log('success');
174
- }
175
- });
176
- return []
177
- }
178
-
179
- }
180
-
181
- export default util;
@@ -1 +0,0 @@
1
- export default './lib/marked'