vdesign-ui 0.1.24-beta → 0.1.25

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 (58) hide show
  1. package/dist/components/activityviews/index.vue +11 -13
  2. package/dist/components/button/index.vue +1 -1
  3. package/dist/components/dropdown/index.vue +31 -43
  4. package/dist/components/empty/index.vue +2 -30
  5. package/dist/components/empty/style.less +4 -0
  6. package/dist/components/footer/index.vue +1 -1
  7. package/dist/components/footnav/footnav-item/index.vue +6 -2
  8. package/dist/components/icon/font/iconfont.css +949 -59
  9. package/dist/components/icon/font/iconfont.js +1 -1
  10. package/dist/components/input/index.vue +8 -31
  11. package/dist/components/input/style.less +1 -0
  12. package/dist/components/loading/index.vue +3 -4
  13. package/dist/components/loading/loading.png +0 -0
  14. package/dist/components/loading/refresh.png +0 -0
  15. package/dist/components/loading/style.less +1 -1
  16. package/dist/components/mixins/clickoutside.js +1 -1
  17. package/dist/components/mixins/dom.js +41 -41
  18. package/dist/components/mixins/outlineConfigPlugin.js +40 -40
  19. package/dist/components/mixins/router-link.js +22 -22
  20. package/dist/components/pagebreak/index.vue +5 -11
  21. package/dist/components/radio/style.css +213 -213
  22. package/dist/components/result/completed-dark.png +0 -0
  23. package/dist/components/result/completed.png +0 -0
  24. package/dist/components/result/error-dark.png +0 -0
  25. package/dist/components/result/error.png +0 -0
  26. package/dist/components/result/index.vue +2 -1
  27. package/dist/components/result/style.less +2 -1
  28. package/dist/components/result/wait-dark.png +0 -0
  29. package/dist/components/result/wait.png +0 -0
  30. package/dist/components/selector/index.vue +31 -49
  31. package/dist/components/selector/style.less +0 -10
  32. package/dist/token.css +2940 -2948
  33. package/dist/vdesign-ui.common.js +444 -621
  34. package/dist/vdesign-ui.css +1 -1
  35. package/dist/vdesign-ui.umd.js +444 -621
  36. package/dist/vdesign-ui.umd.min.js +3 -3
  37. package/package.json +1 -1
  38. package/dist/components/empty/nocoupons-dark.png +0 -0
  39. package/dist/components/empty/nocoupons.png +0 -0
  40. package/dist/components/empty/nomargin-dark.png +0 -0
  41. package/dist/components/empty/nomargin.png +0 -0
  42. package/dist/components/empty/nonotice-dark.png +0 -0
  43. package/dist/components/empty/nonotice.png +0 -0
  44. package/dist/components/empty/noocomments-dark.png +0 -0
  45. package/dist/components/empty/noocomments.png +0 -0
  46. package/dist/components/empty/noorders-dark.png +0 -0
  47. package/dist/components/empty/noorders.png +0 -0
  48. package/dist/components/empty/noposition-dark.png +0 -0
  49. package/dist/components/empty/noposition.png +0 -0
  50. package/dist/components/empty/nosearch-dark.png +0 -0
  51. package/dist/components/empty/nosearch.png +0 -0
  52. package/dist/components/loading/img_status_loading_white_ani.svg +0 -155
  53. package/dist/components/loading/img_status_refresh_ani.svg +0 -158
  54. package/dist/img/completed-dark.4183a8a8.png +0 -0
  55. package/dist/img/error-dark.b80857da.png +0 -0
  56. package/dist/img/img_status_loading_white_ani.b56fcfae.svg +0 -155
  57. package/dist/img/img_status_refresh_ani.d0e59f12.svg +0 -158
  58. package/dist/img/wait-dark.6aa28731.png +0 -0
@@ -11,7 +11,6 @@
11
11
  :type="passwordIcon ? (passwordVisible ? 'text' : 'password') : type"
12
12
  :class="inputClasses"
13
13
  :disabled="disabled"
14
- :readonly="readonly"
15
14
  :placeholder="placeholder"
16
15
  :value="currentValue"
17
16
  @input="handleInput"
@@ -29,7 +28,6 @@
29
28
  :rows="rows"
30
29
  :class="inputClasses"
31
30
  :disabled="disabled"
32
- :readonly="readonly"
33
31
  :placeholder="placeholder"
34
32
  :value="currentValue"
35
33
  @focus="handleFocus"
@@ -39,12 +37,12 @@
39
37
  >
40
38
  </textarea>
41
39
  <div
42
- v-if="suffix || clearable || $slots.suffix || append || $slots.append || isWordLimitVisible"
40
+ v-if="suffix || $slots.suffix || append || $slots.append || isWordLimitVisible"
43
41
  class="vd-input-form__right"
44
42
  >
45
- <span v-if="(suffix || $slots.suffix) || showClear" class="vd-input-form__suffix">
43
+ <span v-if="suffix || $slots.suffix" class="vd-input-form__suffix">
46
44
  <slot name="suffix">
47
- <vd-icon name="icon_btn_clean" @mousedown.prevent.native="handleClear"></vd-icon>
45
+ <vd-icon name="icon_btn_clean" @click="handleClear"></vd-icon>
48
46
  </slot>
49
47
  </span>
50
48
  <span v-if="append || $slots.append" class="vd-input-form__append">
@@ -66,7 +64,7 @@
66
64
  class="vd-input-form__password"
67
65
  >
68
66
  <span v-if="passwordClose" class="vd-input-form__password--close">
69
- <vd-icon name="icon_btn_close" @mousedown.prevent.native="handleClear"></vd-icon>
67
+ <vd-icon name="icon_btn_close" @click="handleClear"></vd-icon>
70
68
  </span>
71
69
  <span v-if="passwordIcon" class="vd-input-form__password--password">
72
70
  <vd-icon
@@ -84,14 +82,11 @@
84
82
  :wrap="wrap"
85
83
  :class="inputClasses"
86
84
  :disabled="disabled"
87
- :readonly="readonly"
88
85
  :placeholder="placeholder"
89
86
  :value="currentValue"
90
87
  :rows="rows"
91
88
  :name="name"
92
89
  @input="handleInput"
93
- @focus="handleFocus"
94
- @blur="handleBlur"
95
90
  :style="textareaStyles"
96
91
  >
97
92
  </textarea>
@@ -149,6 +144,10 @@ export default {
149
144
  passwordClose: {
150
145
  type: Boolean,
151
146
  },
147
+ passwordType: {
148
+ type: String,
149
+ default: "icon_btn_eye_close",
150
+ },
152
151
  form: {
153
152
  type: String,
154
153
  },
@@ -193,8 +192,6 @@ export default {
193
192
  type: Boolean,
194
193
  default: false,
195
194
  },
196
- clearable:Boolean,
197
- readonly:Boolean
198
195
  },
199
196
  data() {
200
197
  return {
@@ -203,20 +200,9 @@ export default {
203
200
  isOnComposition: false,
204
201
  textareaStyles: {},
205
202
  passwordVisible: false,
206
- focused: false,
207
203
  };
208
204
  },
209
205
  computed: {
210
- showClear() {
211
- const show = (
212
- this.clearable &&
213
- this.focused &&
214
- this.currentValue !== '' &&
215
- !this.disabled &&
216
- !this.readonly
217
- );
218
- return show;
219
- },
220
206
  wrapClasses() {
221
207
  return [
222
208
  {
@@ -271,18 +257,12 @@ export default {
271
257
  },
272
258
  methods: {
273
259
  handleFocus(event) {
274
- this.focused = true;
275
260
  if (this.form) {
276
261
  this.focusClass = true;
277
262
  }
278
263
  this.$emit("focus", event);
279
-
280
- if (this.readonly) {
281
- this.blur();
282
- }
283
264
  },
284
265
  handleBlur(event) {
285
- this.focused = false;
286
266
  if (this.form) {
287
267
  this.focusClass = false;
288
268
  }
@@ -339,9 +319,6 @@ export default {
339
319
  this.setCurrentValue("");
340
320
  this.$emit("change", e);
341
321
  this.$emit("clear");
342
- this.$nextTick(() => {
343
- this.focus();
344
- });
345
322
  },
346
323
  handlePasswordVisible() {
347
324
  this.passwordVisible = !this.passwordVisible;
@@ -139,6 +139,7 @@
139
139
  &__right {
140
140
  display: inline-flex;
141
141
  align-items: center;
142
+
142
143
  .@{input-prefix-cls}__word-limit {
143
144
  text-align: end;
144
145
  color: var(--color-input-text-default);
@@ -1,15 +1,14 @@
1
1
  <template>
2
2
  <div class="vd-loading-wrapper">
3
+
3
4
  <div class="vd-loading" v-if="loading">
4
5
  <slot>
5
- <img src="./img_status_loading_white_ani.svg" alt="">
6
+ <img src="./loading.png" alt="">
6
7
  </slot>
7
8
  <span class="vd-loading__text" v-if="text">{{ text }}</span>
8
9
  </div>
9
10
  <div class="vd-refresh" :class="refreshClasses" v-else>
10
- <slot>
11
- <img src="./img_status_refresh_ani.svg" alt="">
12
- </slot>
11
+ <img src="./refresh.png" alt="">
13
12
  </div>
14
13
  </div>
15
14
  </template>
@@ -1,6 +1,6 @@
1
1
 
2
2
  .vd-loading{
3
- position: fixed;
3
+ position: absolute;
4
4
  left: 50%;
5
5
  top: 50%;
6
6
  transform: translate(-50%, -50%);
@@ -33,7 +33,7 @@ function createDocumentHandler(el, binding, vnode) {
33
33
  if (binding.expression &&
34
34
  el[ctx].methodName &&
35
35
  vnode.context[el[ctx].methodName]) {
36
- vnode.context[el[ctx].methodName](mouseup.target);
36
+ vnode.context[el[ctx].methodName]();
37
37
  } else {
38
38
  el[ctx].bindingFn && el[ctx].bindingFn();
39
39
  }
@@ -1,41 +1,41 @@
1
- /* istanbul ignore next */
2
-
3
- import Vue from 'vue';
4
-
5
- const isServer = Vue.prototype.$isServer;
6
- /* istanbul ignore next */
7
- export const on = (function () {
8
- // 添加事件监听器
9
- if (!isServer && document.addEventListener) {
10
- return function (element, event, handler) {
11
- if (element && event && handler) {
12
- element.addEventListener(event, handler, false);
13
- }
14
- };
15
- } else {
16
- // IE8 及其以下版本没有 addEventListener 方法
17
- return function (element, event, handler) {
18
- if (element && event && handler) {
19
- element.attachEvent('on' + event, handler);
20
- }
21
- };
22
- }
23
- })();
24
-
25
- /* istanbul ignore next */
26
- export const off = (function () {
27
- // 移除事件监听器
28
- if (!isServer && document.removeEventListener) {
29
- return function (element, event, handler) {
30
- if (element && event) {
31
- element.removeEventListener(event, handler, false);
32
- }
33
- };
34
- } else {
35
- return function (element, event, handler) {
36
- if (element && event) {
37
- element.detachEvent('on' + event, handler);
38
- }
39
- };
40
- }
41
- })();
1
+ /* istanbul ignore next */
2
+
3
+ import Vue from 'vue';
4
+
5
+ const isServer = Vue.prototype.$isServer;
6
+ /* istanbul ignore next */
7
+ export const on = (function () {
8
+ // 添加事件监听器
9
+ if (!isServer && document.addEventListener) {
10
+ return function (element, event, handler) {
11
+ if (element && event && handler) {
12
+ element.addEventListener(event, handler, false);
13
+ }
14
+ };
15
+ } else {
16
+ // IE8 及其以下版本没有 addEventListener 方法
17
+ return function (element, event, handler) {
18
+ if (element && event && handler) {
19
+ element.attachEvent('on' + event, handler);
20
+ }
21
+ };
22
+ }
23
+ })();
24
+
25
+ /* istanbul ignore next */
26
+ export const off = (function () {
27
+ // 移除事件监听器
28
+ if (!isServer && document.removeEventListener) {
29
+ return function (element, event, handler) {
30
+ if (element && event) {
31
+ element.removeEventListener(event, handler, false);
32
+ }
33
+ };
34
+ } else {
35
+ return function (element, event, handler) {
36
+ if (element && event) {
37
+ element.detachEvent('on' + event, handler);
38
+ }
39
+ };
40
+ }
41
+ })();
@@ -1,40 +1,40 @@
1
- // outlineConfigPlugin.js
2
-
3
- // __debug=1&__debug_vdesign_token=1
4
- const OutlineConfig = {
5
- install(Vue, options = {}) {
6
- const outlineConfig = Vue.observable({
7
- outlineEnabled: options.outlineEnabled ||false,
8
- });
9
-
10
- Vue.prototype.$outlineConfig = outlineConfig;
11
-
12
- Vue.mixin({
13
- created() {
14
- this.$outlineConfig.outlineEnabled = this.shouldEnableOutline()
15
-
16
- this.$watch('$outlineConfig.outlineEnabled', (newValue) => {
17
- document.documentElement.style.setProperty('--outline-visible', newValue ? '1px' : '0');
18
- }, { immediate: true });
19
- },
20
- methods:{
21
- shouldEnableOutline() {
22
- // 获取URL的查询参数部分
23
- const searchParams = new URLSearchParams(window.location.search);
24
- // 对于哈希模式,也解析哈希中的查询字符串
25
- const hashParams = window.location.hash.split('?')[1] ? new URLSearchParams(window.location.hash.split('?')[1]) : null;
26
-
27
- // 检查查询参数或哈希中的参数
28
- const debug = searchParams.has('__debug') || (hashParams && hashParams.has('__debug')) ? searchParams.get('__debug') === '1' || (hashParams && hashParams.get('__debug') === '1') : false;
29
- const vdesignToken = searchParams.has('__debug_vdesign_token') || (hashParams && hashParams.has('__debug_vdesign_token')) ? searchParams.get('__debug_vdesign_token') === '1' || (hashParams && hashParams.get('__debug_vdesign_token') === '1') : false;
30
-
31
- return debug && vdesignToken;
32
- }
33
- }
34
- });
35
- }
36
- };
37
-
38
-
39
-
40
- export default OutlineConfig;
1
+ // outlineConfigPlugin.js
2
+
3
+ // __debug=1&__debug_vdesign_token=1
4
+ const OutlineConfig = {
5
+ install(Vue, options = {}) {
6
+ const outlineConfig = Vue.observable({
7
+ outlineEnabled: options.outlineEnabled ||false,
8
+ });
9
+
10
+ Vue.prototype.$outlineConfig = outlineConfig;
11
+
12
+ Vue.mixin({
13
+ created() {
14
+ this.$outlineConfig.outlineEnabled = this.shouldEnableOutline()
15
+
16
+ this.$watch('$outlineConfig.outlineEnabled', (newValue) => {
17
+ document.documentElement.style.setProperty('--outline-visible', newValue ? '1px' : '0');
18
+ }, { immediate: true });
19
+ },
20
+ methods:{
21
+ shouldEnableOutline() {
22
+ // 获取URL的查询参数部分
23
+ const searchParams = new URLSearchParams(window.location.search);
24
+ // 对于哈希模式,也解析哈希中的查询字符串
25
+ const hashParams = window.location.hash.split('?')[1] ? new URLSearchParams(window.location.hash.split('?')[1]) : null;
26
+
27
+ // 检查查询参数或哈希中的参数
28
+ const debug = searchParams.has('__debug') || (hashParams && hashParams.has('__debug')) ? searchParams.get('__debug') === '1' || (hashParams && hashParams.get('__debug') === '1') : false;
29
+ const vdesignToken = searchParams.has('__debug_vdesign_token') || (hashParams && hashParams.has('__debug_vdesign_token')) ? searchParams.get('__debug_vdesign_token') === '1' || (hashParams && hashParams.get('__debug_vdesign_token') === '1') : false;
30
+
31
+ return debug && vdesignToken;
32
+ }
33
+ }
34
+ });
35
+ }
36
+ };
37
+
38
+
39
+
40
+ export default OutlineConfig;
@@ -1,23 +1,23 @@
1
- /**
2
- * add Vue-Router support
3
- */
4
-
5
- export default {
6
- props: {
7
- url: String,
8
- replace: Boolean,
9
- to: [String, Object]
10
- },
11
-
12
- methods: {
13
- routerLink() {
14
- const { to, url, $router, replace } = this;
15
- if (to && $router) {
16
- $router[replace ? 'replace' : 'push'](to);
17
- } else if (url) {
18
- replace ? location.replace(url) : location.href = url;
19
- }
20
- }
21
- }
22
- };
1
+ /**
2
+ * add Vue-Router support
3
+ */
4
+
5
+ export default {
6
+ props: {
7
+ url: String,
8
+ replace: Boolean,
9
+ to: [String, Object]
10
+ },
11
+
12
+ methods: {
13
+ routerLink() {
14
+ const { to, url, $router, replace } = this;
15
+ if (to && $router) {
16
+ $router[replace ? 'replace' : 'push'](to);
17
+ } else if (url) {
18
+ replace ? location.replace(url) : location.href = url;
19
+ }
20
+ }
21
+ }
22
+ };
23
23
 
@@ -8,7 +8,7 @@
8
8
  </template>
9
9
 
10
10
  <div class="vd-page-break__number" v-else>
11
- <span class="vd-page-break__number--active" v-if="number">{{ number }}</span>
11
+ <span class="vd-page-break__number--active" v-html="number"></span>
12
12
  <span class="vd-page-break__number--line">/</span>
13
13
  <span class="vd-page-break__number--total">{{ total }}</span>
14
14
  </div>
@@ -34,27 +34,21 @@ export default {
34
34
  total: {
35
35
  type: Number,
36
36
  default: 9
37
- },
38
- activePage: {
39
- type: Number,
40
- default: 1 // 默认显示第一页
41
37
  }
42
38
  },
43
39
  data() {
44
40
  return {
45
- currentPage: this.activePage // 从外部传入的值初始化,
41
+ currentPage: 1,
46
42
  }
47
43
  },
48
- watch: {
49
- activePage(newVal) {
50
- this.currentPage = newVal; // 外部传入值变化时更新当前页
51
- }
44
+ computed: {
45
+
52
46
  },
53
47
  methods: {
54
48
  changePage(pageNumber) {
55
49
  if (pageNumber >= 1 && pageNumber <= this.totalPages) {
56
50
  this.currentPage = pageNumber;
57
- this.$emit('change', pageNumber);
51
+ this.$emit('page-changed', pageNumber);
58
52
  }
59
53
  },
60
54
  },