vdesign-ui 0.1.18 → 0.1.20

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 (33) hide show
  1. package/dist/components/activityviews/index.vue +17 -16
  2. package/dist/components/activityviews/style.less +2 -14
  3. package/dist/components/dialog/index.vue +105 -54
  4. package/dist/components/dialog/overlay-manager.js +18 -0
  5. package/dist/components/dialog/style.less +1 -1
  6. package/dist/components/empty/404-dark.png +0 -0
  7. package/dist/components/empty/index.vue +36 -6
  8. package/dist/components/empty/network-dark.png +0 -0
  9. package/dist/components/empty/nodata-dark.png +0 -0
  10. package/dist/components/empty/style.less +7 -0
  11. package/dist/components/footnav/index.vue +20 -5
  12. package/dist/components/footnav/style.less +2 -1
  13. package/dist/components/headnav/index.vue +78 -54
  14. package/dist/components/headnav/style.less +13 -0
  15. package/dist/components/icon/font/iconfont.css +1050 -1041
  16. package/dist/components/icon/font/iconfont.js +1 -1
  17. package/dist/components/input/index.vue +1 -1
  18. package/dist/components/input/password/index.vue +1 -1
  19. package/dist/components/input/style.less +3 -3
  20. package/dist/components/result/index.vue +9 -0
  21. package/dist/components/tabs/style.less +2 -0
  22. package/dist/img/404-dark.775df5bb.png +0 -0
  23. package/dist/img/network-dark.11a147bb.png +0 -0
  24. package/dist/img/nodata-dark.b0ea0e39.png +0 -0
  25. package/dist/token.css +4 -3
  26. package/dist/vdesign-ui.common.js +426 -247
  27. package/dist/vdesign-ui.css +1 -1
  28. package/dist/vdesign-ui.umd.js +426 -247
  29. package/dist/vdesign-ui.umd.min.js +3 -3
  30. package/package.json +1 -1
  31. /package/dist/components/empty/{empty-404.png → 404.png} +0 -0
  32. /package/dist/components/empty/{empty-network.png → network.png} +0 -0
  33. /package/dist/components/empty/{empty-img.png → nodata.png} +0 -0
@@ -1,64 +1,66 @@
1
1
  <template>
2
- <div class="vd-head-nav" :class="wrapClasses">
3
-
4
- <div v-if="showLeftSection" class="vd-head-nav--left">
5
-
6
- <span v-if="showSidebar" class="vd-head-nav__icon">
7
- <slot name="left-primary">
8
- <vd-icon name="icon_nav_sidebar"></vd-icon>
9
- </slot>
10
- </span>
11
-
12
- <span v-if="$slots['left-secondary']" class="vd-head-nav__icon">
13
- <slot name="left-secondary"></slot>
14
- </span>
15
- <span v-if="leftTitle" class="vd-head-nav__left-title">{{ leftTitle }}</span>
16
- <span v-if="editLeftText" class="vd-head-nav__edit-left-text">{{ editLeftText }}</span>
17
- </div>
18
-
19
- <div v-if="showContentSection" class="vd-head-nav__content" :class="contentClasses">
20
- <div v-if="$slots.selector" class="vd-head-nav__content--selector">
21
- <slot name="selector"></slot>
2
+ <div class="vd-head-nav--placeholder" :style="{height:height + 'px'}">
3
+ <div class="vd-head-nav" :class="wrapClasses" :style="{zIndex:zIndex}" ref="headNav">
4
+
5
+ <div v-if="showLeftSection" class="vd-head-nav--left">
6
+
7
+ <span v-if="showSidebar" class="vd-head-nav__icon">
8
+ <slot name="left-primary">
9
+ <vd-icon name="icon_nav_sidebar"></vd-icon>
10
+ </slot>
11
+ </span>
12
+
13
+ <span v-if="$slots['left-secondary']" class="vd-head-nav__icon">
14
+ <slot name="left-secondary"></slot>
15
+ </span>
16
+ <span v-if="leftTitle" class="vd-head-nav__left-title">{{ leftTitle }}</span>
17
+ <span v-if="editLeftText" class="vd-head-nav__edit-left-text">{{ editLeftText }}</span>
22
18
  </div>
23
19
 
24
- <span v-if="title" class="vd-head-nav__title vd-ellipsis" :class="titleClasses">{{ title }}</span>
25
- <span v-if="description" class="vd-head-nav__description">{{ description }}</span>
20
+ <div v-if="showContentSection" class="vd-head-nav__content" :class="contentClasses">
21
+ <div v-if="$slots.selector" class="vd-head-nav__content--selector">
22
+ <slot name="selector"></slot>
23
+ </div>
26
24
 
27
- <span class="vd-head-nav__stock" :class="stockColor" v-if="colors">
28
- <slot name="state"></slot>
29
- <span class="vd-head-nav__price--price">{{ price }}</span>
30
- <span class="vd-head-nav__price--chgp">{{ chgp }}</span>
31
- <span class="vd-head-nav__price--chg">{{ chg }}</span>
32
- </span>
25
+ <span v-if="title" class="vd-head-nav__title vd-ellipsis" :class="titleClasses">{{ title }}</span>
26
+ <span v-if="description" class="vd-head-nav__description">{{ description }}</span>
33
27
 
34
- <slot name="selector-bottom"></slot>
28
+ <span class="vd-head-nav__stock" :class="stockColor" v-if="colors">
29
+ <slot name="state"></slot>
30
+ <span class="vd-head-nav__price--price">{{ price }}</span>
31
+ <span class="vd-head-nav__price--chgp">{{ chgp }}</span>
32
+ <span class="vd-head-nav__price--chg">{{ chg }}</span>
33
+ </span>
35
34
 
36
- <span v-if="accountIcon || accountType" class="vd-head-nav__icontype">
37
- <vd-icon svg :name="accountIcon" class="vd-head-nav__account-type--icon"></vd-icon>
38
- <span class="vd-head-nav__account-type">{{ accountType }}</span>
39
- </span>
40
- </div>
35
+ <slot name="selector-bottom"></slot>
41
36
 
42
- <div class="vd-head-nav--right" v-if="showRightSection">
43
- <span v-if="rightSecondary || $slots['right-secondary']" class="vd-head-nav__icon">
44
- <slot name="right-secondary">
45
- <vd-icon name="icon_nav_search" style="transform: scale(1);"></vd-icon>
46
- </slot>
47
- </span>
48
-
49
- <span v-if="rightPrimary || $slots['right-primary']" class="vd-head-nav__icon">
50
- <slot name="right-primary">
51
- <vd-icon name="icon_nav_trade" style="transform: scale(1);"></vd-icon>
52
- </slot>
53
- </span>
54
-
55
- <span class="vd-head-nav__edit-right-text" v-if="editRightText">{{ editRightText }}</span>
56
- <span class="vd-head-nav__account-text" v-if="accountText">{{ accountText }}</span>
57
- </div>
37
+ <span v-if="accountIcon || accountType" class="vd-head-nav__icontype">
38
+ <vd-icon svg :name="accountIcon" class="vd-head-nav__account-type--icon"></vd-icon>
39
+ <span class="vd-head-nav__account-type">{{ accountType }}</span>
40
+ </span>
41
+ </div>
58
42
 
59
- <div class="vd-head-nav__info" v-if="$slots['stock-time'] || time">
60
- <slot name="stock-time"></slot>
61
- <span v-if="time" class="vd-head-nav__time">{{ time }}</span>
43
+ <div class="vd-head-nav--right" v-if="showRightSection">
44
+ <span v-if="rightSecondary || $slots['right-secondary']" class="vd-head-nav__icon">
45
+ <slot name="right-secondary">
46
+ <vd-icon name="icon_nav_search" style="transform: scale(1);"></vd-icon>
47
+ </slot>
48
+ </span>
49
+
50
+ <span v-if="rightPrimary || $slots['right-primary']" class="vd-head-nav__icon">
51
+ <slot name="right-primary">
52
+ <vd-icon name="icon_nav_trade" style="transform: scale(1);"></vd-icon>
53
+ </slot>
54
+ </span>
55
+
56
+ <span class="vd-head-nav__edit-right-text" v-if="editRightText">{{ editRightText }}</span>
57
+ <span class="vd-head-nav__account-text" v-if="accountText">{{ accountText }}</span>
58
+ </div>
59
+
60
+ <div class="vd-head-nav__info" v-if="$slots['stock-time'] || time">
61
+ <slot name="stock-time"></slot>
62
+ <span v-if="time" class="vd-head-nav__time">{{ time }}</span>
63
+ </div>
62
64
  </div>
63
65
  </div>
64
66
  </template>
@@ -87,12 +89,24 @@ export default {
87
89
  accountText: String,
88
90
  accountType: String,
89
91
  accountIcon: String,
92
+ fixed: Boolean,
93
+ zIndex: [Number, String],
94
+ safeAreaInsetTop: Boolean,
95
+ placeholder: Boolean,
96
+ },
97
+ data() {
98
+ return {
99
+ height: null,
100
+ };
90
101
  },
102
+
91
103
  computed: {
92
104
  wrapClasses() {
93
105
  return [
94
106
  {
95
107
  [`${prefixCls}--${this.type}`]: this.type,
108
+ [`${prefixCls}--fixed`]: this.fixed,
109
+ [`${prefixCls}--safe-area-inset-top`]: this.safeAreaInsetTop,
96
110
  }
97
111
  ]
98
112
  },
@@ -130,7 +144,17 @@ export default {
130
144
  showRightSection() {
131
145
  return this.rightPrimary || this.$slots['right-primary'] || this.rightSecondary || this.$slots['right-secondary'] || this.editRightText || this.accountText;
132
146
  }
133
- }
147
+ },
148
+ mounted() {
149
+ if (this.placeholder && this.fixed) {
150
+ const setHeight = () => {
151
+ this.height = this.$refs.headNav.getBoundingClientRect().height;
152
+ };
153
+
154
+ setHeight();
155
+ setTimeout(setHeight, 100);
156
+ }
157
+ },
134
158
  }
135
159
  </script>
136
160
 
@@ -9,6 +9,19 @@
9
9
  height: calc(var(--height-headnav-primary) * 1px);
10
10
  padding: 0 calc(var(--spacing-headnav-padding_y) * 1px);
11
11
 
12
+ &--fixed {
13
+ top: 0;
14
+ left: 0;
15
+ width: 100%;
16
+ position: fixed;
17
+ z-index: 1;
18
+ }
19
+
20
+ &--safe-area-inset-top {
21
+ padding-top: constant(safe-area-inset-top);
22
+ padding-top: env(safe-area-inset-top);
23
+ }
24
+
12
25
  &__title {
13
26
  max-width: 100%;
14
27
  font-size: calc(var(--en-single-f-f-b-fontSize) * 1px);