@10yun/cv-mobile-ui 0.4.1 → 0.4.2

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 (112) hide show
  1. package/package.json +1 -1
  2. package/ui-cv/cv-badge/{uni-badge.vue → cv-badge.vue} +2 -2
  3. package/ui-cv/cv-calendar/calendar.js +762 -345
  4. package/ui-cv/cv-calendar/cv-calendar-item.vue +198 -0
  5. package/ui-cv/cv-calendar/cv-calendar.vue +508 -0
  6. package/ui-cv/cv-card/cv-card.vue +427 -0
  7. package/ui-cv/cv-col/cv-col.vue +2965 -0
  8. package/ui-cv/cv-collapse/cv-collapse.vue +146 -0
  9. package/ui-cv/cv-collapse-item/cv-collapse-item.vue +395 -0
  10. package/ui-cv/cv-combox/cv-combox.vue +250 -0
  11. package/ui-cv/cv-countdown/cv-countdown.vue +245 -0
  12. package/ui-cv/cv-data-checkbox/cv-data-checkbox.vue +841 -0
  13. package/ui-cv/cv-data-indexed-list/cv-data-indexed-list-item.vue +154 -0
  14. package/ui-cv/cv-data-indexed-list/cv-data-indexed-list.vue +376 -0
  15. package/ui-cv/cv-data-picker/cv-data-picker.vue +486 -0
  16. package/ui-cv/cv-data-pickerview/{uni-data-picker.js → cv-data-picker.js} +0 -0
  17. package/ui-cv/cv-data-pickerview/cv-data-pickerview.vue +304 -0
  18. package/ui-cv/cv-dateformat/cv-dateformat.vue +86 -0
  19. package/ui-cv/cv-datetime-picker/calendar.vue +752 -738
  20. package/ui-cv/cv-datetime-picker/cv-datetime-picker.vue +958 -0
  21. package/ui-cv/cv-datetime-picker/time-picker.vue +900 -892
  22. package/ui-cv/cv-easyinput/cv-easyinput.vue +514 -0
  23. package/ui-cv/cv-fab/cv-fab.vue +465 -0
  24. package/ui-cv/cv-fab/{uni-fab.vue.bak → cv-fab.vue.bak} +2 -2
  25. package/ui-cv/cv-fav/cv-fav.vue +150 -0
  26. package/ui-cv/cv-file-picker/cv-file-picker.vue +619 -0
  27. package/ui-cv/cv-form-item/cv-form-item.vue +1 -1
  28. package/ui-cv/cv-goods-nav/{uni-goods-nav.vue → cv-goods-nav.vue} +1 -1
  29. package/ui-cv/{cv-icons2/cv-icons2.vue → cv-icon2/cv-icon2.vue} +3 -3
  30. package/ui-cv/{cv-icons2 → cv-icon2}/icons.js +0 -0
  31. package/ui-cv/{cv-icons2 → cv-icon2}/uni.ttf +0 -0
  32. package/ui-cv/cv-indexed-list/cv-indexed-list-item.vue +154 -0
  33. package/ui-cv/cv-indexed-list/cv-indexed-list.vue +371 -0
  34. package/ui-cv/cv-input-password/cv-input-password.vue +2 -2
  35. package/ui-cv/{cv-link/uni-link.vue → cv-link2/cv-link2.vue} +1 -1
  36. package/ui-cv/cv-list/cv-list.vue +107 -0
  37. package/ui-cv/cv-list/cv-refresh.vue +65 -0
  38. package/ui-cv/cv-list-ad/cv-list-ad.vue +113 -0
  39. package/ui-cv/cv-list-chat/{uni-list-chat.scss → cv-list-chat.scss} +0 -0
  40. package/ui-cv/cv-list-chat/{uni-list-chat.vue → cv-list-chat.vue} +0 -0
  41. package/ui-cv/cv-list-item/cv-list-item.vue +449 -0
  42. package/ui-cv/cv-nav-bar/cv-nav-bar.vue +256 -0
  43. package/ui-cv/cv-nav-bar/{uni-status-bar.vue → cv-status-bar.vue} +0 -0
  44. package/ui-cv/cv-notice-bar/cv-notice-bar.vue +453 -0
  45. package/ui-cv/cv-number-box/cv-number-box.vue +223 -0
  46. package/ui-cv/cv-pagination/cv-pagination.vue +397 -0
  47. package/ui-cv/cv-popup/cv-popup.vue +429 -0
  48. package/ui-cv/cv-popup-dialog/{uni-popup-dialog.vue → cv-popup-dialog.vue} +0 -0
  49. package/ui-cv/cv-popup-message/cv-popup-message.vue +143 -0
  50. package/ui-cv/cv-popup-share/{uni-popup-share.vue → cv-popup-share.vue} +0 -0
  51. package/ui-cv/cv-row/{uni-row.vue → cv-row.vue} +1 -1
  52. package/ui-cv/cv-search-bar/cv-search-bar.vue +280 -0
  53. package/ui-cv/cv-section/{uni-section.vue → cv-section.vue} +0 -0
  54. package/ui-cv/cv-segmented-control/{uni-segmented-control.vue → cv-segmented-control.vue} +0 -0
  55. package/ui-cv/cv-status-bar/{uni-status-bar.vue → cv-status-bar.vue} +0 -0
  56. package/ui-cv/cv-steps/cv-steps.vue +293 -0
  57. package/ui-cv/cv-swipe-action/{uni-swipe-action.vue → cv-swipe-action.vue} +0 -0
  58. package/ui-cv/cv-swipe-action-item/{uni-swipe-action-item.vue → cv-swipe-action-item.vue} +0 -0
  59. package/ui-cv/cv-swiper-dot/cv-swiper-dot.vue +255 -0
  60. package/ui-cv/cv-table/cv-table.vue +460 -0
  61. package/ui-cv/cv-tag/cv-tag.vue +276 -0
  62. package/ui-cv/cv-tbody/cv-tbody.vue +28 -0
  63. package/ui-cv/cv-td/cv-td.vue +93 -0
  64. package/ui-cv/cv-test/{uni-test.vue → cv-test.vue} +0 -0
  65. package/ui-cv/cv-th/cv-th.vue +270 -0
  66. package/ui-cv/cv-thead/cv-thead.vue +114 -0
  67. package/ui-cv/cv-title/cv-title.vue +168 -0
  68. package/ui-cv/cv-tr/cv-tr.vue +166 -0
  69. package/ui-cv/cv-transition/cv-transition.vue +279 -0
  70. package/ui-cv/cv-calendar/uni-calendar-item.vue +0 -171
  71. package/ui-cv/cv-calendar/uni-calendar.vue +0 -504
  72. package/ui-cv/cv-card/uni-card.vue +0 -420
  73. package/ui-cv/cv-col/uni-col.vue +0 -2968
  74. package/ui-cv/cv-collapse/uni-collapse.vue +0 -146
  75. package/ui-cv/cv-collapse-item/uni-collapse-item.vue +0 -378
  76. package/ui-cv/cv-combox/uni-combox.vue +0 -237
  77. package/ui-cv/cv-countdown/uni-countdown.vue +0 -234
  78. package/ui-cv/cv-data-checkbox/uni-data-checkbox.vue +0 -792
  79. package/ui-cv/cv-data-indexed-list/uni-data-indexed-list-item.vue +0 -142
  80. package/ui-cv/cv-data-indexed-list/uni-data-indexed-list.vue +0 -364
  81. package/ui-cv/cv-data-picker/uni-data-picker.vue +0 -468
  82. package/ui-cv/cv-data-pickerview/uni-data-pickerview.vue +0 -298
  83. package/ui-cv/cv-dateformat/uni-dateformat.vue +0 -88
  84. package/ui-cv/cv-datetime-picker/uni-datetime-picker.vue +0 -874
  85. package/ui-cv/cv-easyinput/uni-easyinput.vue +0 -438
  86. package/ui-cv/cv-fab/uni-fab.vue +0 -443
  87. package/ui-cv/cv-fav/uni-fav.vue +0 -136
  88. package/ui-cv/cv-file-picker/uni-file-picker.vue +0 -614
  89. package/ui-cv/cv-indexed-list/uni-indexed-list-item.vue +0 -142
  90. package/ui-cv/cv-indexed-list/uni-indexed-list.vue +0 -357
  91. package/ui-cv/cv-list/uni-list.vue +0 -107
  92. package/ui-cv/cv-list/uni-refresh.vue +0 -65
  93. package/ui-cv/cv-list-ad/uni-list-ad.vue +0 -106
  94. package/ui-cv/cv-list-item/uni-list-item.vue +0 -428
  95. package/ui-cv/cv-nav-bar/uni-nav-bar.vue +0 -244
  96. package/ui-cv/cv-notice-bar/uni-notice-bar.vue +0 -394
  97. package/ui-cv/cv-number-box/uni-number-box.vue +0 -224
  98. package/ui-cv/cv-pagination/uni-pagination.vue +0 -376
  99. package/ui-cv/cv-popup/uni-popup.vue +0 -412
  100. package/ui-cv/cv-popup-message/uni-popup-message.vue +0 -143
  101. package/ui-cv/cv-search-bar/uni-search-bar.vue +0 -262
  102. package/ui-cv/cv-steps/uni-steps.vue +0 -250
  103. package/ui-cv/cv-swiper-dot/uni-swiper-dot.vue +0 -205
  104. package/ui-cv/cv-table/uni-table.vue +0 -455
  105. package/ui-cv/cv-tag/uni-tag.vue +0 -283
  106. package/ui-cv/cv-tbody/uni-tbody.vue +0 -30
  107. package/ui-cv/cv-td/uni-td.vue +0 -88
  108. package/ui-cv/cv-th/uni-th.vue +0 -259
  109. package/ui-cv/cv-thead/uni-thead.vue +0 -114
  110. package/ui-cv/cv-title/uni-title.vue +0 -171
  111. package/ui-cv/cv-tr/uni-tr.vue +0 -156
  112. package/ui-cv/cv-transition/uni-transition.vue +0 -287
@@ -1,262 +0,0 @@
1
- <template>
2
- <view class="uni-searchbar">
3
- <view :style="{borderRadius:radius+'px',backgroundColor: bgColor}" class="uni-searchbar__box" @click="searchClick">
4
- <view class="uni-searchbar__box-icon-search">
5
- <slot name="searchIcon">
6
- <uni-icons color="#999999" size="18" type="search" />
7
- </slot>
8
- </view>
9
- <input v-if="show || searchVal" :focus="showSync" :placeholder="placeholder" :maxlength="maxlength" class="uni-searchbar__box-search-input" confirm-type="search" type="text" v-model="searchVal" @confirm="confirm" @blur="blur" @focus="emitFocus" />
10
- <text v-else class="uni-searchbar__text-placeholder">{{ placeholder }}</text>
11
- <view v-if="show && (clearButton==='always'||clearButton==='auto'&&searchVal!=='')" class="uni-searchbar__box-icon-clear" @click="clear">
12
- <slot name="clearIcon">
13
- <uni-icons color="#c0c4cc" size="15" type="clear" />
14
- </slot>
15
- </view>
16
- </view>
17
- <text @click="cancel" class="uni-searchbar__cancel" v-if="cancelButton ==='always' || show && cancelButton ==='auto'">{{cancelText}}</text>
18
- </view>
19
- </template>
20
-
21
- <script>
22
- /**
23
- * SearchBar 搜索栏
24
- * @description 评分组件
25
- * @tutorial https://ext.dcloud.net.cn/plugin?id=866
26
- * @property {Number} radius 搜索栏圆角
27
- * @property {Number} maxlength 输入最大长度
28
- * @property {String} placeholder 搜索栏Placeholder
29
- * @property {String} clearButton = [always|auto|none] 是否显示清除按钮
30
- * @value always 一直显示
31
- * @value auto 输入框不为空时显示
32
- * @value none 一直不显示
33
- * @property {String} cancelButton = [always|auto|none] 是否显示取消按钮
34
- * @value always 一直显示
35
- * @value auto 输入框不为空时显示
36
- * @value none 一直不显示
37
- * @property {String} cancelText 取消按钮的文字
38
- * @property {String} bgColor 输入框背景颜色
39
- * @property {Boolean} focus 是否自动聚焦
40
- * @event {Function} confirm uniSearchBar 的输入框 confirm 事件,返回参数为uniSearchBar的value,e={value:Number}
41
- * @event {Function} input uniSearchBar 的 value 改变时触发事件,返回参数为uniSearchBar的value,e=value
42
- * @event {Function} cancel 点击取消按钮时触发事件,返回参数为uniSearchBar的value,e={value:Number}
43
- * @event {Function} clear 点击清除按钮时触发事件,返回参数为uniSearchBar的value,e={value:Number}
44
- * @event {Function} blur input失去焦点时触发事件,返回参数为uniSearchBar的value,e={value:Number}
45
- */
46
-
47
- export default {
48
- name: "UniSearchBar",
49
- emits: ['input', 'update:modelValue', 'clear', 'cancel', 'confirm', 'blur', 'focus'],
50
- props: {
51
- placeholder: {
52
- type: String,
53
- default: "请输入搜索内容"
54
- },
55
- radius: {
56
- type: [Number, String],
57
- default: 5
58
- },
59
- clearButton: {
60
- type: String,
61
- default: "auto"
62
- },
63
- cancelButton: {
64
- type: String,
65
- default: "auto"
66
- },
67
- cancelText: {
68
- type: String,
69
- default: '取消'
70
- },
71
- bgColor: {
72
- type: String,
73
- default: "#F8F8F8"
74
- },
75
- maxlength: {
76
- type: [Number, String],
77
- default: 100
78
- },
79
- value: {
80
- type: [Number, String],
81
- default: ""
82
- },
83
- modelValue: {
84
- type: [Number, String],
85
- default: ""
86
- },
87
- focus: {
88
- type: Boolean,
89
- default: false
90
- }
91
- },
92
- data() {
93
- return {
94
- show: false,
95
- showSync: false,
96
- searchVal: ''
97
- }
98
- },
99
- watch: {
100
- value: {
101
- immediate: true,
102
- handler(newVal) {
103
- this.searchVal = newVal
104
- if (newVal) {
105
- this.show = true
106
- }
107
- }
108
- },
109
- modelValue: {
110
- immediate: true,
111
- handler(newVal) {
112
- this.searchVal = newVal
113
- if (newVal) {
114
- this.show = true
115
- }
116
- }
117
- },
118
- focus: {
119
- immediate: true,
120
- handler(newVal) {
121
- if (newVal) {
122
- this.show = true;
123
- this.$nextTick(() => {
124
- this.showSync = true
125
- })
126
- }
127
- }
128
- },
129
- searchVal(newVal, oldVal) {
130
- this.$emit("input", newVal)
131
- this.$emit("update:modelValue", newVal)
132
- }
133
- },
134
- methods: {
135
- searchClick() {
136
- if (this.show) {
137
- return
138
- }
139
- this.show = true;
140
- this.$nextTick(() => {
141
- this.showSync = true
142
- })
143
- },
144
- clear() {
145
- this.$emit("clear", {
146
- value: this.searchVal
147
- })
148
- this.searchVal = ""
149
- },
150
- cancel() {
151
- this.$emit("cancel", {
152
- value: this.searchVal
153
- });
154
- this.searchVal = ""
155
- this.show = false
156
- this.showSync = false
157
- // #ifndef APP-PLUS
158
- uni.hideKeyboard()
159
- // #endif
160
- // #ifdef APP-PLUS
161
- plus.key.hideSoftKeybord()
162
- // #endif
163
- },
164
- confirm() {
165
- // #ifndef APP-PLUS
166
- uni.hideKeyboard();
167
- // #endif
168
- // #ifdef APP-PLUS
169
- plus.key.hideSoftKeybord()
170
- // #endif
171
- this.$emit("confirm", {
172
- value: this.searchVal
173
- })
174
- },
175
- blur() {
176
- // #ifndef APP-PLUS
177
- uni.hideKeyboard();
178
- // #endif
179
- // #ifdef APP-PLUS
180
- plus.key.hideSoftKeybord()
181
- // #endif
182
- this.$emit("blur", {
183
- value: this.searchVal
184
- })
185
- },
186
- emitFocus(e) {
187
- this.$emit("focus", e.detail)
188
- }
189
- }
190
- };
191
- </script>
192
-
193
- <style scoped>
194
- .uni-searchbar {
195
- /* #ifndef APP-NVUE */
196
- display: flex;
197
- /* #endif */
198
- flex-direction: row;
199
- position: relative;
200
- padding: 8px;
201
- }
202
-
203
- .uni-searchbar__box {
204
- /* #ifndef APP-NVUE */
205
- display: flex;
206
- box-sizing: border-box;
207
- /* #endif */
208
- overflow: hidden;
209
- position: relative;
210
- flex: 1;
211
- justify-content: center;
212
- flex-direction: row;
213
- align-items: center;
214
- height: 36px;
215
- padding: 5px 8px 5px 0px;
216
- border-width: 0.5px;
217
- border-style: solid;
218
- border-color: #e5e5e5;
219
- }
220
-
221
- .uni-searchbar__box-icon-search {
222
- /* #ifndef APP-NVUE */
223
- display: flex;
224
- /* #endif */
225
- flex-direction: row;
226
- padding: 0 8px;
227
- justify-content: center;
228
- align-items: center;
229
- color: #808080;
230
- }
231
-
232
- .uni-searchbar__box-search-input {
233
- flex: 1;
234
- font-size: 14px;
235
- color: #333;
236
- }
237
-
238
- .uni-searchbar__box-icon-clear {
239
- align-items: center;
240
- line-height: 24px;
241
- padding-left: 8px;
242
- /* #ifdef H5 */
243
- cursor: pointer;
244
- /* #endif */
245
- }
246
-
247
- .uni-searchbar__text-placeholder {
248
- font-size: 14px;
249
- color: #808080;
250
- margin-left: 5px;
251
- }
252
-
253
- .uni-searchbar__cancel {
254
- padding-left: 10px;
255
- line-height: 36px;
256
- font-size: 14px;
257
- color: #333;
258
- /* #ifdef H5 */
259
- cursor: pointer;
260
- /* #endif */
261
- }
262
- </style>
@@ -1,250 +0,0 @@
1
- <template>
2
- <view class="uni-steps">
3
- <view :class="[direction==='column'?'uni-steps__column':'uni-steps__row']">
4
- <view :class="[direction==='column'?'uni-steps__column-text-container':'uni-steps__row-text-container']">
5
- <view v-for="(item,index) in options" :key="index" :class="[direction==='column'?'uni-steps__column-text':'uni-steps__row-text']">
6
- <text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-title':'uni-steps__row-title']">{{item.title}}</text>
7
- <text :style="{color:index<=active?activeColor:deactiveColor}" :class="[direction==='column'?'uni-steps__column-desc':'uni-steps__row-desc']">{{item.desc}}</text>
8
- </view>
9
- </view>
10
- <view :class="[direction==='column'?'uni-steps__column-container':'uni-steps__row-container']">
11
- <view :class="[direction==='column'?'uni-steps__column-line-item':'uni-steps__row-line-item']" v-for="(item,index) in options" :key="index">
12
- <view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--before':'uni-steps__row-line--before']" :style="{backgroundColor:index<=active&&index!==0?activeColor:index===0?'transparent':deactiveColor}"></view>
13
- <view :class="[direction==='column'?'uni-steps__column-check':'uni-steps__row-check']" v-if="index === active">
14
- <uni-icons :color="activeColor" type="checkbox-filled" size="14"></uni-icons>
15
- </view>
16
- <view :class="[direction==='column'?'uni-steps__column-circle':'uni-steps__row-circle']" v-else :style="{backgroundColor:index<active?activeColor:deactiveColor}"></view>
17
- <view :class="[direction==='column'?'uni-steps__column-line':'uni-steps__row-line',direction==='column'?'uni-steps__column-line--after':'uni-steps__row-line--after']" :style="{backgroundColor:index<active&&index!==options.length-1?activeColor:index===options.length-1?'transparent':deactiveColor}"></view>
18
- </view>
19
- </view>
20
- </view>
21
- </view>
22
- </template>
23
-
24
- <script>
25
- /**
26
- * Steps 步骤条
27
- * @description 评分组件
28
- * @tutorial https://ext.dcloud.net.cn/plugin?id=34
29
- * @property {Number} active 当前步骤
30
- * @property {String} direction = [row|column] 当前步骤
31
- * @value row 横向
32
- * @value column 纵向
33
- * @property {String} activeColor 选中状态的颜色
34
- * @property {Array} options 数据源,格式为:[{title:'xxx',desc:'xxx'},{title:'xxx',desc:'xxx'}]
35
- */
36
-
37
- export default {
38
- name: 'UniSteps',
39
- props: {
40
- direction: {
41
- // 排列方向 row column
42
- type: String,
43
- default: 'row'
44
- },
45
- activeColor: {
46
- // 激活状态颜色
47
- type: String,
48
- default: '#1aad19'
49
- },
50
- deactiveColor: {
51
- // 未激活状态颜色
52
- type: String,
53
- default: '#999999'
54
- },
55
- active: {
56
- // 当前步骤
57
- type: Number,
58
- default: 0
59
- },
60
- options: {
61
- type: Array,
62
- default () {
63
- return []
64
- }
65
- } // 数据
66
- },
67
- data() {
68
- return {}
69
- }
70
- }
71
- </script>
72
-
73
- <style scoped>
74
- .uni-steps {
75
- /* #ifndef APP-NVUE */
76
- display: flex;
77
- width: 100%;
78
- /* #endif */
79
- /* #ifdef APP-NVUE */
80
- flex: 1;
81
- /* #endif */
82
- flex-direction: column;
83
- }
84
-
85
- .uni-steps__row {
86
- /* #ifndef APP-NVUE */
87
- display: flex;
88
- /* #endif */
89
- flex-direction: column;
90
- }
91
-
92
- .uni-steps__column {
93
- /* #ifndef APP-NVUE */
94
- display: flex;
95
- /* #endif */
96
- flex-direction: row-reverse;
97
- }
98
-
99
- .uni-steps__row-text-container {
100
- /* #ifndef APP-NVUE */
101
- display: flex;
102
- /* #endif */
103
- flex-direction: row;
104
- align-items: flex-end;
105
- margin-bottom: 8px;
106
- }
107
-
108
- .uni-steps__column-text-container {
109
- /* #ifndef APP-NVUE */
110
- display: flex;
111
- /* #endif */
112
- flex-direction: column;
113
- flex: 1;
114
- }
115
-
116
- .uni-steps__row-text {
117
- /* #ifndef APP-NVUE */
118
- display: inline-flex;
119
- /* #endif */
120
- flex: 1;
121
- flex-direction: column;
122
- }
123
-
124
- .uni-steps__column-text {
125
- padding: 6px 0px;
126
- border-bottom-style: solid;
127
- border-bottom-width: 1px;
128
- border-bottom-color: #e5e5e5;
129
- /* #ifndef APP-NVUE */
130
- display: flex;
131
- /* #endif */
132
- flex-direction: column;
133
- }
134
-
135
- .uni-steps__row-title {
136
- font-size: 14px;
137
- line-height: 16px;
138
- text-align: center;
139
- }
140
-
141
- .uni-steps__column-title {
142
- font-size: 14px;
143
- text-align: left;
144
- line-height: 18px;
145
- }
146
-
147
- .uni-steps__row-desc {
148
- font-size: 12px;
149
- line-height: 14px;
150
- text-align: center;
151
- }
152
-
153
- .uni-steps__column-desc {
154
- font-size: 12px;
155
- text-align: left;
156
- line-height: 18px;
157
- }
158
-
159
- .uni-steps__row-container {
160
- /* #ifndef APP-NVUE */
161
- display: flex;
162
- /* #endif */
163
- flex-direction: row;
164
- }
165
-
166
- .uni-steps__column-container {
167
- /* #ifndef APP-NVUE */
168
- display: inline-flex;
169
- /* #endif */
170
- width: 30px;
171
- flex-direction: column;
172
- }
173
-
174
- .uni-steps__row-line-item {
175
- /* #ifndef APP-NVUE */
176
- display: inline-flex;
177
- /* #endif */
178
- flex-direction: row;
179
- flex: 1;
180
- height: 14px;
181
- line-height: 14px;
182
- align-items: center;
183
- justify-content: center;
184
- }
185
-
186
- .uni-steps__column-line-item {
187
- /* #ifndef APP-NVUE */
188
- display: flex;
189
- /* #endif */
190
- flex-direction: column;
191
- flex: 1;
192
- align-items: center;
193
- justify-content: center;
194
- }
195
-
196
- .uni-steps__row-line {
197
- flex: 1;
198
- height: 1px;
199
- background-color: #999;
200
- }
201
-
202
- .uni-steps__column-line {
203
- width: 1px;
204
- background-color: #999;
205
- }
206
-
207
- .uni-steps__row-line--after {
208
- transform: translateX(1px);
209
- }
210
-
211
- .uni-steps__column-line--after {
212
- flex: 1;
213
- transform: translate(0px, 1px);
214
- }
215
-
216
- .uni-steps__row-line--before {
217
- transform: translateX(-1px);
218
- }
219
-
220
- .uni-steps__column-line--before {
221
- height: 6px;
222
- transform: translate(0px, -1px);
223
- }
224
-
225
- .uni-steps__row-circle {
226
- width: 5px;
227
- height: 5px;
228
- border-radius: 100px;
229
- background-color: #999;
230
- margin: 0px 3px;
231
- }
232
-
233
- .uni-steps__column-circle {
234
- width: 5px;
235
- height: 5px;
236
- border-radius: 100px;
237
- background-color: #999;
238
- margin: 4px 0px 5px 0px;
239
- }
240
-
241
- .uni-steps__row-check {
242
- margin: 0px 6px;
243
- }
244
-
245
- .uni-steps__column-check {
246
- height: 14px;
247
- line-height: 14px;
248
- margin: 2px 0px;
249
- }
250
- </style>
@@ -1,205 +0,0 @@
1
- <template>
2
- <view class="uni-swiper__warp">
3
- <slot />
4
- <view v-if="mode === 'default'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='default'>
5
- <view v-for="(item,index) in info" @click="clickItem(index)" :style="{
6
- 'width': (index === current? dots.width*2:dots.width ) + 'px','height':dots.width/3 +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border-radius':'0px'}" :key="index" class="uni-swiper__dots-item uni-swiper__dots-bar" />
7
- </view>
8
- <view v-if="mode === 'dot'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='dot'>
9
- <view v-for="(item,index) in info" @click="clickItem(index)" :style="{
10
- 'width': dots.width + 'px','height':dots.height +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}" :key="index" class="uni-swiper__dots-item" />
11
- </view>
12
- <view v-if="mode === 'round'" :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box" key='round'>
13
- <view v-for="(item,index) in info" @click="clickItem(index)" :class="[index === current&&'uni-swiper__dots-long']" :style="{
14
- 'width':(index === current? dots.width*3:dots.width ) + 'px','height':dots.height +'px' ,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}" :key="index" class="uni-swiper__dots-item " />
15
- </view>
16
- <view v-if="mode === 'nav'" key='nav' :style="{'background-color':dotsStyles.backgroundColor,'bottom':'0'}" class="uni-swiper__dots-box uni-swiper__dots-nav">
17
- <text :style="{'color':dotsStyles.color}" class="uni-swiper__dots-nav-item">{{ (current+1)+"/"+info.length +' ' +info[current][field] }}</text>
18
- </view>
19
- <view v-if="mode === 'indexes'" key='indexes' :style="{'bottom':dots.bottom + 'px'}" class="uni-swiper__dots-box">
20
- <view v-for="(item,index) in info" @click="clickItem(index)" :style="{
21
- 'width':dots.width + 'px','height':dots.height +'px' ,'color':index === current?dots.selectedColor:dots.color,'background-color':index !== current?dots.backgroundColor:dots.selectedBackgroundColor,'border':index !==current ? dots.border:dots.selectedBorder}" :key="index" class="uni-swiper__dots-item uni-swiper__dots-indexes"><text class="uni-swiper__dots-indexes-text">{{ index+1 }}</text></view>
22
- </view>
23
- </view>
24
- </template>
25
-
26
- <script>
27
- /**
28
- * SwiperDod 轮播图指示点
29
- * @description 自定义轮播图指示点
30
- * @tutorial https://ext.dcloud.net.cn/plugin?id=284
31
- * @property {Number} current 当前指示点索引,必须是通过 `swiper` 的 `change` 事件获取到的 `e.detail.current`
32
- * @property {String} mode = [default|round|nav|indexes] 指示点的类型
33
- * @value defualt 默认指示点
34
- * @value round 圆形指示点
35
- * @value nav 条形指示点
36
- * @value indexes 索引指示点
37
- * @property {String} field mode 为 nav 时,显示的内容字段(mode = nav 时必填)
38
- * @property {String} info 轮播图的数据,通过数组长度决定指示点个数
39
- * @property {Object} dotsStyles 指示点样式
40
- * @event {Function} clickItem 组件触发点击事件时触发,e={currentIndex}
41
- */
42
-
43
- export default {
44
- name: 'UniSwiperDot',
45
- emits: ['clickItem'],
46
- props: {
47
- info: {
48
- type: Array,
49
- default () {
50
- return []
51
- }
52
- },
53
- current: {
54
- type: Number,
55
- default: 0
56
- },
57
- dotsStyles: {
58
- type: Object,
59
- default () {
60
- return {}
61
- }
62
- },
63
- // 类型 :default(默认) indexes long nav
64
- mode: {
65
- type: String,
66
- default: 'default'
67
- },
68
- // 只在 nav 模式下生效,变量名称
69
- field: {
70
- type: String,
71
- default: ''
72
- }
73
- },
74
- data() {
75
- return {
76
- dots: {
77
- width: 8,
78
- height: 8,
79
- bottom: 10,
80
- color: '#fff',
81
- backgroundColor: 'rgba(0, 0, 0, .3)',
82
- border: '1px rgba(0, 0, 0, .3) solid',
83
- selectedBackgroundColor: '#333',
84
- selectedBorder: '1px rgba(0, 0, 0, .9) solid'
85
- }
86
- }
87
- },
88
- watch: {
89
- dotsStyles(newVal) {
90
- this.dots = Object.assign(this.dots, this.dotsStyles)
91
- },
92
- mode(newVal) {
93
- if (newVal === 'indexes') {
94
- this.dots.width = 20
95
- this.dots.height = 20
96
- } else {
97
- this.dots.width = 8
98
- this.dots.height = 8
99
- }
100
- }
101
-
102
- },
103
- created() {
104
- if (this.mode === 'indexes') {
105
- this.dots.width = 20
106
- this.dots.height = 20
107
- }
108
- this.dots = Object.assign(this.dots, this.dotsStyles)
109
- },
110
- methods: {
111
- clickItem(index) {
112
- this.$emit('clickItem', index)
113
- }
114
- }
115
- }
116
- </script>
117
-
118
- <style scoped>
119
- .uni-swiper__warp {
120
- /* #ifndef APP-NVUE */
121
- display: flex;
122
- /* #endif */
123
- flex: 1;
124
- flex-direction: column;
125
- position: relative;
126
- overflow: hidden;
127
- }
128
-
129
- .uni-swiper__dots-box {
130
- position: absolute;
131
- bottom: 10px;
132
- left: 0;
133
- right: 0;
134
- /* #ifndef APP-NVUE */
135
- display: flex;
136
- /* #endif */
137
- flex: 1;
138
- flex-direction: row;
139
- justify-content: center;
140
- align-items: center;
141
- }
142
-
143
- .uni-swiper__dots-item {
144
- width: 8px;
145
- border-radius: 100px;
146
- margin-left: 6px;
147
- background-color: rgba(0, 0, 0, 0.4);
148
- /* #ifndef APP-NVUE */
149
- cursor: pointer;
150
- /* #endif */
151
- /* #ifdef H5 */
152
- /* #endif */
153
- }
154
-
155
- .uni-swiper__dots-item:first-child {
156
- margin: 0;
157
- }
158
-
159
- .uni-swiper__dots-default {
160
- border-radius: 100px;
161
- }
162
-
163
- .uni-swiper__dots-long {
164
- border-radius: 50px;
165
- }
166
-
167
- .uni-swiper__dots-bar {
168
- border-radius: 50px;
169
- }
170
-
171
- .uni-swiper__dots-nav {
172
- bottom: 0px;
173
- height: 40px;
174
- /* #ifndef APP-NVUE */
175
- display: flex;
176
- /* #endif */
177
- flex: 1;
178
- flex-direction: row;
179
- justify-content: flex-start;
180
- align-items: center;
181
- background-color: rgba(0, 0, 0, 0.2);
182
- }
183
-
184
- .uni-swiper__dots-nav-item {
185
- /* overflow: hidden;
186
- text-overflow: ellipsis;
187
- white-space: nowrap; */
188
- font-size: 14px;
189
- color: #fff;
190
- margin: 0 15px;
191
- }
192
-
193
- .uni-swiper__dots-indexes {
194
- /* #ifndef APP-NVUE */
195
- display: flex;
196
- /* #endif */
197
- justify-content: center;
198
- align-items: center;
199
- }
200
-
201
- .uni-swiper__dots-indexes-text {
202
- color: #fff;
203
- font-size: 12px;
204
- }
205
- </style>