@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,85 @@
1
- <template>
2
1
  <view class="uni-group" :class="['uni-group--' + mode, margin ? 'group-margin' : '']" :style="{ marginTop: `${top}px` }">
3
2
  <slot name="title">
4
3
  <view v-if="title" class="uni-group__title" :style="{ 'padding-left': border ? '30px' : '15px' }">
5
4
  <text class="uni-group__title-text">{{ title }}</text>
6
5
  </view>
7
6
  </slot>
8
7
  <view class="uni-group__content" :class="{ 'group-conent-padding': border }">
9
8
  <slot />
10
9
  </view>
11
10
  </view>
12
11
  * Group 分组
13
12
  * @description 表单字段分组
14
13
  * @tutorial https://ext.dcloud.net.cn/plugin?id=3281
15
14
  * @property {String} title 主标题
16
15
  * @property {Number} top 分组间隔
17
16
  * @property {Number} mode 模式
18
17
  */
19
18
  name: 'uniGroup',
20
19
  emits: ['click'],
21
20
  props: {
22
21
  title: {
23
22
  type: String,
24
23
  default: ''
25
24
  },
26
25
  top: {
27
26
  type: [Number, String],
28
27
  default: 10
29
28
  },
30
29
  mode: {
31
30
  type: String,
32
31
  default: 'default'
33
32
  },
34
33
  stat: {
35
34
  type: Boolean,
36
35
  default: false
37
36
  }
38
37
  },
39
38
  data() {
40
39
  return {
41
40
  margin: false,
42
41
  border: false
43
42
  };
44
43
  },
45
44
  watch: {
46
45
  title(newVal) {
47
46
  if (uni.report && this.stat && newVal !== '') {
48
47
  uni.report('title', newVal);
49
48
  }
50
49
  }
51
50
  },
52
51
  created() {
53
52
  this.form = this.getForm();
54
53
  if (this.form) {
55
54
  this.margin = true;
56
55
  this.border = this.form.border;
57
56
  }
58
57
  },
59
58
  methods: {
60
59
  /**
61
60
  * 获取父元素实例
62
61
  */
63
62
  getForm() {
64
63
  let parent = this.$parent;
65
64
  let parentName = parent.$options.name;
66
65
  while (parentName !== 'uniForms') {
67
66
  parent = parent.$parent;
68
67
  if (!parent) return false;
69
68
  parentName = parent.$options.name;
70
69
  }
71
70
  return parent;
72
71
  },
73
72
  onClick() {
74
73
  this.$emit('click');
75
74
  }
76
75
  }
76
+ <template>
77
+ <view class="uni-group" :class="['uni-group--' + mode, margin ? 'group-margin' : '']" :style="{ marginTop: `${top}px` }">
78
+ <slot name="title">
79
+ <view v-if="title" class="uni-group__title" :style="{ 'padding-left': border ? '30px' : '15px' }">
80
+ <text class="uni-group__title-text">{{ title }}</text>
81
+ </view>
82
+ </slot>
83
+ <view class="uni-group__content" :class="{ 'group-conent-padding': border }">
84
+ <slot />
85
+ </view>
86
+ </view>
87
+ </template>
88
+ <script>
89
+ /**
90
+ * Group 分组
91
+ * @description 表单字段分组
92
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=3281
93
+ * @property {String} title 主标题
94
+ * @property {Number} top 分组间隔
95
+ * @property {Number} mode 模式
96
+ */
97
+ export default {
98
+ name: 'uniGroup',
99
+ emits: ['click'],
100
+ props: {
101
+ title: {
102
+ type: String,
103
+ default: ''
104
+ },
105
+ top: {
106
+ type: [Number, String],
107
+ default: 10
108
+ },
109
+ mode: {
110
+ type: String,
111
+ default: 'default'
112
+ },
113
+ stat: {
114
+ type: Boolean,
115
+ default: false
116
+ }
117
+ },
118
+ data() {
119
+ return {
120
+ margin: false,
121
+ border: false
122
+ };
123
+ },
124
+ watch: {
125
+ title(newVal) {
126
+ if (uni.report && this.stat && newVal !== '') {
127
+ uni.report('title', newVal);
128
+ }
129
+ }
130
+ },
131
+ created() {
132
+ this.form = this.getForm();
133
+ if (this.form) {
134
+ this.margin = true;
135
+ this.border = this.form.border;
136
+ }
137
+ },
138
+ methods: {
139
+ /**
140
+ * 获取父元素实例
141
+ */
142
+ getForm() {
143
+ let parent = this.$parent;
144
+ let parentName = parent.$options.name;
145
+ while (parentName !== 'uniForms') {
146
+ parent = parent.$parent;
147
+ if (!parent) return false;
148
+ parentName = parent.$options.name;
149
+ }
150
+ return parent;
151
+ },
152
+ onClick() {
153
+ this.$emit('click');
154
+ }
155
+ }
156
+ };
157
+ </script>
158
+ <style>
159
+ @import 'style.css';
160
+ </style>
@@ -1 +1,85 @@
1
- <template>
2
1
  <!-- #ifdef APP-NVUE -->
3
2
  <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{ unicode }}</text>
4
3
  <!-- #endif -->
5
4
  <!-- #ifndef APP-NVUE -->
6
5
  <text
7
6
  :style="{ color: color, 'font-size': iconSize }"
8
7
  class="uni-icons"
9
8
  :class="['uniui-' + type, customPrefix, customPrefix ? type : '']"
10
9
  @click="_onClick"
11
10
  ></text>
12
11
  <!-- #endif -->
13
12
  const reg = /^[0-9]*$/g;
14
13
  return typeof val === 'number' || reg.test(val) ? val + 'px' : val;
15
14
  fontFamily: 'uniicons',
16
15
  src: "url('" + iconUrl + "')"
17
16
  * Icons 图标
18
17
  * @description 用于展示 icons 图标
19
18
  * @tutorial https://ext.dcloud.net.cn/plugin?id=28
20
19
  * @property {Number} size 图标大小
21
20
  * @property {String} type 图标图案,参考示例
22
21
  * @property {String} color 图标颜色
23
22
  * @property {String} customPrefix 自定义图标
24
23
  * @event {Function} click 点击 Icon 触发事件
25
24
  */
26
25
  name: 'UniIcons',
27
26
  emits: ['click'],
28
27
  props: {
29
28
  type: {
30
29
  type: String,
31
30
  default: ''
32
31
  },
33
32
  color: {
34
33
  type: String,
35
34
  default: '#333333'
36
35
  },
37
36
  size: {
38
37
  type: [Number, String],
39
38
  default: 16
40
39
  },
41
40
  customPrefix: {
42
41
  type: String,
43
42
  default: ''
44
43
  }
45
44
  },
46
45
  data() {
47
46
  return {
48
47
  icons: icons.glyphs
49
48
  };
50
49
  },
51
50
  computed: {
52
51
  unicode() {
53
52
  let code = this.icons.find((v) => v.font_class === this.type);
54
53
  if (code) {
55
54
  return unescape(`%u${code.unicode}`);
56
55
  }
57
56
  return '';
58
57
  },
59
58
  iconSize() {
60
59
  return getVal(this.size);
61
60
  }
62
61
  },
63
62
  methods: {
64
63
  _onClick() {
65
64
  this.$emit('click');
66
65
  }
67
66
  }
67
+ <template>
68
+ <!-- #ifdef APP-NVUE -->
69
+ <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{ unicode }}</text>
70
+ <!-- #endif -->
71
+ <!-- #ifndef APP-NVUE -->
72
+ <text
73
+ :style="{ color: color, 'font-size': iconSize }"
74
+ class="uni-icons"
75
+ :class="['uniui-' + type, customPrefix, customPrefix ? type : '']"
76
+ @click="_onClick"
77
+ ></text>
78
+ <!-- #endif -->
79
+ </template>
80
+ <script>
81
+ import icons from './icons.js';
82
+ const getVal = (val) => {
83
+ const reg = /^[0-9]*$/g;
84
+ return typeof val === 'number' || reg.test(val) ? val + 'px' : val;
85
+ };
86
+ // #ifdef APP-NVUE
87
+ var domModule = weex.requireModule('dom');
88
+ import iconUrl from './uniicons.ttf';
89
+ domModule.addRule('fontFace', {
90
+ fontFamily: 'uniicons',
91
+ src: "url('" + iconUrl + "')"
92
+ });
93
+ // #endif
94
+ /**
95
+ * Icons 图标
96
+ * @description 用于展示 icons 图标
97
+ * @tutorial https://ext.dcloud.net.cn/plugin?id=28
98
+ * @property {Number} size 图标大小
99
+ * @property {String} type 图标图案,参考示例
100
+ * @property {String} color 图标颜色
101
+ * @property {String} customPrefix 自定义图标
102
+ * @event {Function} click 点击 Icon 触发事件
103
+ */
104
+ export default {
105
+ name: 'UniIcons',
106
+ emits: ['click'],
107
+ props: {
108
+ type: {
109
+ type: String,
110
+ default: ''
111
+ },
112
+ color: {
113
+ type: String,
114
+ default: '#333333'
115
+ },
116
+ size: {
117
+ type: [Number, String],
118
+ default: 16
119
+ },
120
+ customPrefix: {
121
+ type: String,
122
+ default: ''
123
+ }
124
+ },
125
+ data() {
126
+ return {
127
+ icons: icons.glyphs
128
+ };
129
+ },
130
+ computed: {
131
+ unicode() {
132
+ let code = this.icons.find((v) => v.font_class === this.type);
133
+ if (code) {
134
+ return unescape(`%u${code.unicode}`);
135
+ }
136
+ return '';
137
+ },
138
+ iconSize() {
139
+ return getVal(this.size);
140
+ }
141
+ },
142
+ methods: {
143
+ _onClick() {
144
+ this.$emit('click');
145
+ }
146
+ }
147
+ };
148
+ </script>
149
+ <style>
150
+ @import 'style.css';
151
+ </style>
@@ -1 +1,68 @@
1
- <template>
2
1
  <view>
3
2
  <view v-if="loaded || list.itemIndex < 15" class="uni-indexed-list__title-wrapper">
4
3
  <text v-if="list.items && list.items.length > 0" class="uni-indexed-list__title">{{ list.key }}</text>
5
4
  </view>
6
5
  <view v-if="(loaded || list.itemIndex < 15) && list.items && list.items.length > 0" class="uni-indexed-list__list">
7
6
  <view
8
7
  v-for="(item, index) in list.items"
9
8
  :key="index"
10
9
  class="uni-indexed-list__item"
11
10
  hover-class="uni-indexed-list__item--hover"
12
11
  >
13
12
  <view class="uni-indexed-list__item-container" @click="onClick(idx, index)">
14
13
  <view
15
14
  class="uni-indexed-list__item-border"
16
15
  :class="{ 'uni-indexed-list__item-border--last': index === list.items.length - 1 }"
17
16
  >
18
17
  <view v-if="showSelect" style="margin-right: 20rpx">
19
18
  <uni-icons
20
19
  :type="item.checked ? 'checkbox-filled' : 'circle'"
21
20
  :color="item.checked ? '#007aff' : '#C0C0C0'"
22
21
  size="24"
23
22
  />
24
23
  </view>
25
24
  <text class="uni-indexed-list__item-content">{{ item.name }}</text>
26
25
  </view>
27
26
  </view>
28
27
  </view>
29
28
  </view>
30
29
  </view>
31
30
  name: 'UniIndexedList',
32
31
  emits: ['itemClick'],
33
32
  props: {
34
33
  loaded: {
35
34
  type: Boolean,
36
35
  default: false
37
36
  },
38
37
  idx: {
39
38
  type: Number,
40
39
  default: 0
41
40
  },
42
41
  list: {
43
42
  type: Object,
44
43
  default() {
45
44
  return {};
46
45
  }
47
46
  },
48
47
  showSelect: {
49
48
  type: Boolean,
50
49
  default: false
51
50
  }
52
51
  },
53
52
  methods: {
54
53
  onClick(idx, index) {
55
54
  this.$emit('itemClick', {
56
55
  idx,
57
56
  index
58
57
  });
59
58
  }
60
59
  }
60
+ <template>
61
+ <view>
62
+ <view v-if="loaded || list.itemIndex < 15" class="uni-indexed-list__title-wrapper">
63
+ <text v-if="list.items && list.items.length > 0" class="uni-indexed-list__title">{{ list.key }}</text>
64
+ </view>
65
+ <view v-if="(loaded || list.itemIndex < 15) && list.items && list.items.length > 0" class="uni-indexed-list__list">
66
+ <view
67
+ v-for="(item, index) in list.items"
68
+ :key="index"
69
+ class="uni-indexed-list__item"
70
+ hover-class="uni-indexed-list__item--hover"
71
+ >
72
+ <view class="uni-indexed-list__item-container" @click="onClick(idx, index)">
73
+ <view
74
+ class="uni-indexed-list__item-border"
75
+ :class="{ 'uni-indexed-list__item-border--last': index === list.items.length - 1 }"
76
+ >
77
+ <view v-if="showSelect" style="margin-right: 20rpx">
78
+ <uni-icons
79
+ :type="item.checked ? 'checkbox-filled' : 'circle'"
80
+ :color="item.checked ? '#007aff' : '#C0C0C0'"
81
+ size="24"
82
+ />
83
+ </view>
84
+ <text class="uni-indexed-list__item-content">{{ item.name }}</text>
85
+ </view>
86
+ </view>
87
+ </view>
88
+ </view>
89
+ </view>
90
+ </template>
91
+ <script>
92
+ export default {
93
+ name: 'UniIndexedList',
94
+ emits: ['itemClick'],
95
+ props: {
96
+ loaded: {
97
+ type: Boolean,
98
+ default: false
99
+ },
100
+ idx: {
101
+ type: Number,
102
+ default: 0
103
+ },
104
+ list: {
105
+ type: Object,
106
+ default() {
107
+ return {};
108
+ }
109
+ },
110
+ showSelect: {
111
+ type: Boolean,
112
+ default: false
113
+ }
114
+ },
115
+ methods: {
116
+ onClick(idx, index) {
117
+ this.$emit('itemClick', {
118
+ idx,
119
+ index
120
+ });
121
+ }
122
+ }
123
+ };
124
+ </script>
125
+ <style>
126
+ @import 'style.css';
127
+ </style>