vdesign-ui 0.1.19 → 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 (193) hide show
  1. package/dist/components/actionbar/actionbar-cell/index.vue +34 -0
  2. package/dist/components/actionbar/index.js +8 -0
  3. package/dist/components/actionbar/index.vue +39 -0
  4. package/dist/components/actionbar/style.less +48 -0
  5. package/dist/components/actions-cell/actions/index.js +7 -0
  6. package/dist/components/actions-cell/actions/index.vue +76 -0
  7. package/dist/components/actions-cell/actions/style.less +112 -0
  8. package/dist/components/actions-cell/index.js +7 -0
  9. package/dist/components/actions-cell/index.vue +94 -0
  10. package/dist/components/actions-cell/style.less +39 -0
  11. package/dist/components/activityviews/index.js +8 -0
  12. package/dist/components/activityviews/index.vue +140 -0
  13. package/dist/components/activityviews/style.less +138 -0
  14. package/dist/components/badge/index.js +8 -0
  15. package/dist/components/badge/index.vue +49 -0
  16. package/dist/components/badge/style.less +66 -0
  17. package/dist/components/button/index.js +8 -0
  18. package/dist/components/button/index.vue +89 -0
  19. package/dist/components/button/style.less +563 -0
  20. package/dist/components/calendar/end.png +0 -0
  21. package/dist/components/calendar/index-element.vue +84 -0
  22. package/dist/components/calendar/index.js +8 -0
  23. package/dist/components/calendar/index.vue +52 -0
  24. package/dist/components/calendar/start.png +0 -0
  25. package/dist/components/calendar/style.less +167 -0
  26. package/dist/components/checkbox/assist.js +34 -0
  27. package/dist/components/checkbox/checkbox-group/index.js +8 -0
  28. package/dist/components/checkbox/checkbox-group/index.vue +69 -0
  29. package/dist/components/checkbox/index.js +8 -0
  30. package/dist/components/checkbox/index.vue +184 -0
  31. package/dist/components/checkbox/style.less +291 -0
  32. package/dist/components/common/state/index.vue +80 -0
  33. package/dist/components/data-list/index.js +10 -0
  34. package/dist/components/data-list/index.vue +19 -0
  35. package/dist/components/data-list/style.less +624 -0
  36. package/dist/components/datetime-picker/index.js +8 -0
  37. package/dist/components/datetime-picker/index.vue +37 -0
  38. package/dist/components/datetime-picker/style.less +24 -0
  39. package/dist/components/dialog/index.js +8 -0
  40. package/dist/components/dialog/index.vue +162 -0
  41. package/dist/components/dialog/overlay-manager.js +18 -0
  42. package/dist/components/dialog/style.less +132 -0
  43. package/dist/components/divider/index.js +8 -0
  44. package/dist/components/divider/index.vue +54 -0
  45. package/dist/components/divider/style.less +92 -0
  46. package/dist/components/dropdown/index.js +8 -0
  47. package/dist/components/dropdown/index.vue +210 -0
  48. package/dist/components/dropdown/style.less +418 -0
  49. package/dist/components/empty/404-dark.png +0 -0
  50. package/dist/components/empty/404.png +0 -0
  51. package/dist/components/empty/index.js +8 -0
  52. package/dist/components/empty/index.vue +95 -0
  53. package/dist/components/empty/network-dark.png +0 -0
  54. package/dist/components/empty/network.png +0 -0
  55. package/dist/components/empty/nodata-dark.png +0 -0
  56. package/dist/components/empty/nodata.png +0 -0
  57. package/dist/components/empty/style.less +60 -0
  58. package/dist/components/footer/index.js +7 -0
  59. package/dist/components/footer/index.vue +29 -0
  60. package/dist/components/footer/style.less +22 -0
  61. package/dist/components/footnav/footnav-item/index.js +7 -0
  62. package/dist/components/footnav/footnav-item/index.vue +75 -0
  63. package/dist/components/footnav/footnav-item/style.less +39 -0
  64. package/dist/components/footnav/index.js +7 -0
  65. package/dist/components/footnav/index.vue +97 -0
  66. package/dist/components/footnav/style.less +23 -0
  67. package/dist/components/form/index.js +7 -0
  68. package/dist/components/form/index.vue +12 -0
  69. package/dist/components/headnav/index.js +7 -0
  70. package/dist/components/headnav/index.vue +163 -0
  71. package/dist/components/headnav/style.less +245 -0
  72. package/dist/components/icon/font/iconfont.css +1050 -0
  73. package/dist/components/icon/font/iconfont.js +2 -0
  74. package/dist/components/icon/index.js +9 -0
  75. package/dist/components/icon/index.vue +46 -0
  76. package/dist/components/icon/style.less +44 -0
  77. package/dist/components/input/calcTextareaHeight.js +266 -0
  78. package/dist/components/input/index.js +8 -0
  79. package/dist/components/input/index.vue +343 -0
  80. package/dist/components/input/password/index.js +8 -0
  81. package/dist/components/input/password/index.vue +60 -0
  82. package/dist/components/input/search/index.js +8 -0
  83. package/dist/components/input/search/index.vue +66 -0
  84. package/dist/components/input/stepper/index.js +8 -0
  85. package/dist/components/input/stepper/index.vue +136 -0
  86. package/dist/components/input/style.less +497 -0
  87. package/dist/components/list/index.js +8 -0
  88. package/dist/components/list/index.vue +159 -0
  89. package/dist/components/list/style.less +292 -0
  90. package/dist/components/loading/index.js +7 -0
  91. package/dist/components/loading/index.vue +53 -0
  92. package/dist/components/loading/loading.png +0 -0
  93. package/dist/components/loading/refresh.png +0 -0
  94. package/dist/components/loading/style.less +48 -0
  95. package/dist/components/mixins/clickoutside.js +81 -0
  96. package/dist/components/mixins/dom.js +41 -0
  97. package/dist/components/mixins/languageMixin.js +38 -0
  98. package/dist/components/mixins/outlineConfigPlugin.js +40 -0
  99. package/dist/components/mixins/router-link.js +23 -0
  100. package/dist/components/mixins/themeMixin.js +29 -0
  101. package/dist/components/noticebar/index.js +8 -0
  102. package/dist/components/noticebar/index.vue +247 -0
  103. package/dist/components/noticebar/style.less +332 -0
  104. package/dist/components/overlay/index.js +8 -0
  105. package/dist/components/overlay/index.vue +161 -0
  106. package/dist/components/overlay/style.less +23 -0
  107. package/dist/components/pagebreak/index.js +7 -0
  108. package/dist/components/pagebreak/index.vue +60 -0
  109. package/dist/components/pagebreak/style.less +43 -0
  110. package/dist/components/popover/index.js +8 -0
  111. package/dist/components/popover/index.vue +99 -0
  112. package/dist/components/popover/style.less +346 -0
  113. package/dist/components/popover/vue-popover.vue +314 -0
  114. package/dist/components/radio/assist.js +34 -0
  115. package/dist/components/radio/index.js +8 -0
  116. package/dist/components/radio/index.vue +159 -0
  117. package/dist/components/radio/radio-group/index.vue +70 -0
  118. package/dist/components/radio/style.less +297 -0
  119. package/dist/components/result/completed-dark.png +0 -0
  120. package/dist/components/result/completed.png +0 -0
  121. package/dist/components/result/error-dark.png +0 -0
  122. package/dist/components/result/error.png +0 -0
  123. package/dist/components/result/index.js +8 -0
  124. package/dist/components/result/index.vue +75 -0
  125. package/dist/components/result/style.less +42 -0
  126. package/dist/components/result/wait-dark.png +0 -0
  127. package/dist/components/result/wait.png +0 -0
  128. package/dist/components/selector/index.js +8 -0
  129. package/dist/components/selector/index.vue +124 -0
  130. package/dist/components/selector/style.less +474 -0
  131. package/dist/components/skeleton/index.js +7 -0
  132. package/dist/components/skeleton/index.vue +142 -0
  133. package/dist/components/skeleton/style.less +192 -0
  134. package/dist/components/slider/draggable.js +49 -0
  135. package/dist/components/slider/index.js +7 -0
  136. package/dist/components/slider/index.vue +173 -0
  137. package/dist/components/slider/style.less +96 -0
  138. package/dist/components/slider/utils.js +60 -0
  139. package/dist/components/step/index.js +7 -0
  140. package/dist/components/step/index.vue +48 -0
  141. package/dist/components/step/style.less +59 -0
  142. package/dist/components/step-item/index.js +7 -0
  143. package/dist/components/step-item/index.vue +117 -0
  144. package/dist/components/step-item/style.less +361 -0
  145. package/dist/components/style/index.vue +42 -0
  146. package/dist/components/switch/index.js +8 -0
  147. package/dist/components/switch/index.vue +72 -0
  148. package/dist/components/switch/style.less +56 -0
  149. package/dist/components/tabs/index.js +8 -0
  150. package/dist/components/tabs/index.vue +145 -0
  151. package/dist/components/tabs/style.less +385 -0
  152. package/dist/components/tabs/tab/index.vue +56 -0
  153. package/dist/components/tag/index.js +7 -0
  154. package/dist/components/tag/index.vue +50 -0
  155. package/dist/components/tag/style.less +211 -0
  156. package/dist/components/title/index.js +8 -0
  157. package/dist/components/title/index.vue +92 -0
  158. package/dist/components/title/style.less +188 -0
  159. package/dist/components/toast/index.js +80 -0
  160. package/dist/components/toast/index.vue +44 -0
  161. package/dist/components/toast/style.less +55 -0
  162. package/dist/components/transition/index.js +8 -0
  163. package/dist/components/transition/index.vue +13 -0
  164. package/dist/components/transition/style.less +208 -0
  165. package/dist/components/upload/index.js +7 -0
  166. package/dist/components/upload/index.vue +224 -0
  167. package/dist/components/upload/style.less +156 -0
  168. package/dist/demo.html +10 -0
  169. package/dist/locale/ar.js +98 -0
  170. package/dist/locale/en.js +98 -0
  171. package/dist/locale/zh.js +98 -0
  172. package/dist/token.css +2982 -0
  173. package/dist/vdesign-ui.common.js +27204 -0
  174. package/dist/vdesign-ui.css +1 -0
  175. package/dist/vdesign-ui.umd.js +27214 -0
  176. package/dist/vdesign-ui.umd.min.js +32 -0
  177. package/package.json +1 -1
  178. package/dist/css/chunk-1952c402.04c2303e.css +0 -1
  179. package/dist/css/chunk-6a5c6104.38021b56.css +0 -1
  180. package/dist/css/chunk-vendors.4ecfba63.css +0 -1
  181. package/dist/css/sites.395ce21f.css +0 -1
  182. package/dist/img/bg_mobile.5909f667.png +0 -0
  183. package/dist/img/icon.a67073c3.svg +0 -7
  184. package/dist/img/iphoneX.38c8778e.png +0 -0
  185. package/dist/img/logo-white.fad4f907.png +0 -0
  186. package/dist/img/logo.1eda11d6.png +0 -0
  187. package/dist/img/qrcode2.0a9d9044.png +0 -0
  188. package/dist/index.html +0 -1
  189. package/dist/js/chunk-1952c402.c58ecfb5.js +0 -1
  190. package/dist/js/chunk-2d2183be.2a64419d.js +0 -1
  191. package/dist/js/chunk-6a5c6104.c8fa5635.js +0 -1
  192. package/dist/js/chunk-vendors.490b7673.js +0 -37
  193. package/dist/js/sites.5a217467.js +0 -1
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <div class="vd-foot-nav-item" :class="{ 'vd-foot-nav-item--active': active }" @click="onClick">
3
+ <vd-icon v-if="icon" :name="icon" :svg="isSvg"></vd-icon>
4
+ <vd-badge v-if="dot || badge" :is-dot="dot" :value="badge" :max="99">
5
+ <vd-icon :name="iconName" size="large" :svg="isSvg"></vd-icon>
6
+ </vd-badge>
7
+ <slot></slot>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+
13
+ import RouterLink from '../../mixins/router-link';
14
+
15
+ export default {
16
+ name: 'vd-foot-nav-item',
17
+ mixins: [RouterLink],
18
+ props: {
19
+ iconName: {
20
+ type: String,
21
+ },
22
+ icon: {
23
+ type: String,
24
+ },
25
+ name: {
26
+ type: String,
27
+ },
28
+ text: {
29
+ type: String,
30
+ },
31
+ dot: {
32
+ type: Boolean,
33
+ },
34
+ badge: {
35
+ type: [Number, String],
36
+ },
37
+ isSvg: {
38
+ type: Boolean,
39
+ },
40
+ },
41
+ computed: {
42
+ // isActive() {
43
+ // return this.$parent.active === this.$parent.$children.indexOf(this);
44
+ // // return this.activeIndex === this.index;
45
+
46
+ // },
47
+ },
48
+ data() {
49
+ return {
50
+ active: false
51
+ };
52
+ },
53
+
54
+ beforeCreate() {
55
+ this.$parent.items.push(this);
56
+ },
57
+
58
+ destroyed() {
59
+ this.$parent.items.splice(this.$parent.items.indexOf(this), 1);
60
+ },
61
+ methods: {
62
+ onClick(event) {
63
+ // this.$parent.updateActive(this.$parent.$children.indexOf(this));
64
+ // this.$emit('click', event);
65
+ this.$parent.onChange(this.$parent.items.indexOf(this));
66
+ this.$emit('click', event);
67
+ this.routerLink();
68
+ },
69
+ }
70
+ }
71
+ </script>
72
+
73
+ <style lang="less">
74
+ @import './style.less';
75
+ </style>
@@ -0,0 +1,39 @@
1
+ @footnav-item-prefix-cls: vd-foot-nav-item;
2
+
3
+ .@{footnav-item-prefix-cls} {
4
+ flex: 1;
5
+ display: flex;
6
+ align-items: center;
7
+ flex-direction: column;
8
+ justify-content: center;
9
+ font-size: calc(var(--en-single-f-a-r-fontSize) * 1px);
10
+ font-weight: var(--en-single-f-a-r-fontWeight);
11
+ color: var(--color-footnav-text-default);
12
+
13
+ .vd-iconfont {
14
+ margin-bottom: 2px;
15
+ font-size: calc(var(--icon-footnav-size) * 1px);
16
+ color: var(--text-color-h2);
17
+ }
18
+
19
+ &:active {
20
+ border-color: transparent;
21
+ background-color: transparent;
22
+ color: var(--color-button-border-text-press);
23
+ }
24
+
25
+ &--active {
26
+ color: var(--color-footnav-text-active);
27
+
28
+ .vd-iconfont {
29
+ color: var(--color-footnav-text-active);
30
+ }
31
+ }
32
+
33
+ .vd-badge {
34
+ .is-fixed {
35
+ top: 4px;
36
+ right: 4px;
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,7 @@
1
+ import FootNav from './index.vue';
2
+ import './style.less';
3
+ FootNav.install = function(Vue) {
4
+ Vue.component(FootNav.name, FootNav)
5
+ }
6
+
7
+ export default FootNav;
@@ -0,0 +1,97 @@
1
+ <template>
2
+ <div class="vd-foot-nav--placeholder" :style="{height:height + 'px'}">
3
+ <div class="vd-foot-nav" ref="footNav"
4
+ :class="{ 'vd-foot-nav--fixed': fixed, 'vd-hairline--top': border, 'vd-foot-nav--unfit': !this.fit }"
5
+ :style="style">
6
+ <slot></slot>
7
+ </div>
8
+ </div>
9
+ </template>
10
+
11
+ <script>
12
+ export default {
13
+ name: 'vd-foot-nav',
14
+ props: {
15
+ value: Number,
16
+ fixed: {
17
+ type: Boolean,
18
+ default: true
19
+ },
20
+ border: {
21
+ type: Boolean,
22
+ default: true
23
+ },
24
+ zIndex: [Number, String],
25
+ safeAreaInsetBottom: {
26
+ type: Boolean,
27
+ default: null,
28
+ },
29
+ placeholder: Boolean,
30
+ },
31
+ computed: {
32
+ fit() {
33
+ if (this.safeAreaInsetBottom !== null) {
34
+ return this.safeAreaInsetBottom;
35
+ }
36
+ // enable safe-area-inset-bottom by default when fixed
37
+ return this.fixed;
38
+ },
39
+ style() {
40
+ return {
41
+ zIndex: this.zIndex
42
+ };
43
+ }
44
+ },
45
+ data() {
46
+ return {
47
+ // active: 0,
48
+ items: [],
49
+ height: null,
50
+ }
51
+ },
52
+ watch: {
53
+ items() {
54
+ this.setActiveItem();
55
+ },
56
+
57
+ value() {
58
+ this.setActiveItem();
59
+ }
60
+ },
61
+ methods: {
62
+ setActiveItem() {
63
+ this.items.forEach((item, index) => {
64
+ item.active = index === this.value;
65
+ });
66
+ },
67
+
68
+ onChange(active) {
69
+ if (active !== this.value) {
70
+ this.$emit('input', active);
71
+ this.$emit('change', active);
72
+ }
73
+ },
74
+ // updateActive(index) {
75
+ // this.active = index;
76
+ // },
77
+ // handleClick() {
78
+ // this.$emit('click',this.active)
79
+ // }
80
+ },
81
+ mounted() {
82
+ if (this.placeholder && this.fixed) {
83
+ const setHeight = () => {
84
+ this.height = this.$refs.footNav.getBoundingClientRect().height;
85
+ };
86
+
87
+ setHeight();
88
+ setTimeout(setHeight, 100);
89
+ }
90
+ }
91
+
92
+ }
93
+ </script>
94
+
95
+ <style lang="less">
96
+ @import './style.less';
97
+ </style>
@@ -0,0 +1,23 @@
1
+
2
+ @footnav-prefix-cls: vd-foot-nav;
3
+
4
+ .@{footnav-prefix-cls}{
5
+ width: 100%;
6
+ display: flex;
7
+ padding: 4px calc(var(--spacing-footnav-icon-margin_bottom) * 1px);
8
+ height: calc(var(--height-footnav-content) * 1px);
9
+ background-color: var(--color-footnav-bg);
10
+ padding-bottom: constant(safe-area-inset-bottom);
11
+ padding-bottom: env(safe-area-inset-bottom);
12
+
13
+ &--fixed{
14
+ position: fixed;
15
+ bottom: 0;
16
+ left: 0;
17
+ width: 100%;
18
+ z-index: 1;
19
+ }
20
+ &--unfit {
21
+ padding-bottom: 0;
22
+ }
23
+ }
@@ -0,0 +1,7 @@
1
+ import Form from './index.vue';
2
+ import './style.less';
3
+ Form.install = function(Vue) {
4
+ Vue.component(Form.name, Form)
5
+ }
6
+
7
+ export default Form;
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <div class="vd-form"></div>
3
+ </template>
4
+
5
+ <script>
6
+
7
+ export default {
8
+ name: 'vd-form',
9
+ }
10
+ </script>
11
+
12
+ <style lang="less"></style>
@@ -0,0 +1,7 @@
1
+ import HeadNav from './index.vue';
2
+ import './style.less';
3
+ HeadNav.install = function(Vue) {
4
+ Vue.component(HeadNav.name, HeadNav)
5
+ }
6
+
7
+ export default HeadNav;
@@ -0,0 +1,163 @@
1
+ <template>
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>
18
+ </div>
19
+
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>
24
+
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>
27
+
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>
34
+
35
+ <slot name="selector-bottom"></slot>
36
+
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>
42
+
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>
64
+ </div>
65
+ </div>
66
+ </template>
67
+
68
+ <script>
69
+
70
+ const prefixCls = 'vd-head-nav';
71
+ export default {
72
+ name: 'vd-head-nav',
73
+ props: {
74
+ title: String,
75
+ time: String,
76
+ type: String,
77
+ leftPrimary: Boolean,
78
+ rightPrimary: Boolean,
79
+ rightSecondary: Boolean,
80
+ start: Boolean,
81
+ description: String,
82
+ price: String,
83
+ chg: String,
84
+ chgp: String,
85
+ colors: String,
86
+ leftTitle: String,
87
+ editLeftText: String,
88
+ editRightText: String,
89
+ accountText: String,
90
+ accountType: String,
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
+ };
101
+ },
102
+
103
+ computed: {
104
+ wrapClasses() {
105
+ return [
106
+ {
107
+ [`${prefixCls}--${this.type}`]: this.type,
108
+ [`${prefixCls}--fixed`]: this.fixed,
109
+ [`${prefixCls}--safe-area-inset-top`]: this.safeAreaInsetTop,
110
+ }
111
+ ]
112
+ },
113
+ contentClasses() {
114
+ return [
115
+ {
116
+ 'vd-head-nav__content--start': this.start,
117
+ }
118
+ ];
119
+ },
120
+ titleClasses() {
121
+ return [
122
+ {
123
+ [`${prefixCls}__title--normal`]: this.type,
124
+ }
125
+ ]
126
+ },
127
+ stockColor() {
128
+ return [
129
+ {
130
+ [`${prefixCls}__stock--${this.colors}`]: this.colors,
131
+
132
+ }
133
+ ]
134
+ },
135
+ showSidebar() {
136
+ return this.leftPrimary || this.$slots['left-primary'];
137
+ },
138
+ showLeftSection() {
139
+ return this.showSidebar || this.$slots['left-secondary'] || this.leftTitle || this.editLeftText;
140
+ },
141
+ showContentSection() {
142
+ return this.title || this.$slots.selector || this.$slots['selector-bottom'] || this.account || this.colors;
143
+ },
144
+ showRightSection() {
145
+ return this.rightPrimary || this.$slots['right-primary'] || this.rightSecondary || this.$slots['right-secondary'] || this.editRightText || this.accountText;
146
+ }
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
+ },
158
+ }
159
+ </script>
160
+
161
+ <style lang="less">
162
+ @import './style.less';
163
+ </style>
@@ -0,0 +1,245 @@
1
+ @headnav-prefix-cls: vd-head-nav;
2
+
3
+
4
+ .@{headnav-prefix-cls} {
5
+ position: relative;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ height: calc(var(--height-headnav-primary) * 1px);
10
+ padding: 0 calc(var(--spacing-headnav-padding_y) * 1px);
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
+
25
+ &__title {
26
+ max-width: 100%;
27
+ font-size: calc(var(--en-single-f-f-b-fontSize) * 1px);
28
+ font-weight: var(--en-single-f-f-b-fontWeight);
29
+ color: var(--color-headnav-title);
30
+
31
+ }
32
+
33
+ &--left {
34
+ position: absolute;
35
+ left: calc(var(--spacing-headnav-padding_y) * 1px);
36
+ top: 0;
37
+ bottom: 0;
38
+ display: flex;
39
+ justify-content: center;
40
+ align-items: center;
41
+ gap: calc(var(--spacing-headnav-icon-margin_left) * 1px);
42
+ }
43
+
44
+ &--right {
45
+ position: absolute;
46
+ right: calc(var(--spacing-headnav-padding_y) * 1px);
47
+ top: 0;
48
+ bottom: 0;
49
+ display: flex;
50
+ justify-content: center;
51
+ align-items: center;
52
+ gap: calc(var(--spacing-headnav-icon-margin_left) * 1px);
53
+
54
+ }
55
+
56
+ &--normal {
57
+ height: calc(var(--height-headnav-secondary) * 1px);
58
+
59
+ .@{headnav-prefix-cls} {
60
+
61
+ &__title--normal {
62
+ font-size: calc(var(--en-single-f-e-s-fontSize) * 1px);
63
+ font-weight: var(--en-single-f-e-s-fontWeight);
64
+ color: var(--color-headnav-title);
65
+ }
66
+ }
67
+
68
+ .vd-selector-l__title {
69
+ overflow: hidden;
70
+ white-space: nowrap;
71
+ text-overflow: ellipsis;
72
+ font-size: calc(var(--en-single-f-e-s-fontSize) * 1px);
73
+ font-weight: var(--en-single-f-e-s-fontWeight);
74
+ }
75
+
76
+ .vd-selector-s__title {
77
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
78
+ font-weight: var(--en-single-f-c-r-fontWeight);
79
+ color: var(--color-headnav-title);
80
+ }
81
+
82
+ }
83
+
84
+
85
+ &__content {
86
+ flex: 1;
87
+ max-width: 60%;
88
+ position: relative;
89
+ display: flex;
90
+ justify-content: center;
91
+ flex-direction: column;
92
+ align-items: center;
93
+ margin: 0 calc(var(--spacing-headnav-title-margin_y) * 1px);
94
+
95
+ &--start {
96
+ flex: 1;
97
+ max-width: 100%;
98
+ align-items: flex-start;
99
+ padding-inline-end: calc(var(--spacing-headnav-title-margin_right) * 1px);
100
+ }
101
+
102
+ .vd-selector {
103
+
104
+ &-xl__title {
105
+ white-space: nowrap;
106
+ overflow: hidden;
107
+ text-overflow: ellipsis;
108
+ }
109
+ }
110
+
111
+ &--selector {
112
+ max-width: 100%;
113
+ padding-inline-start: 20px;
114
+ }
115
+
116
+
117
+
118
+ }
119
+
120
+ &__icontype{
121
+ display: flex;
122
+ }
123
+
124
+ &__left-title {
125
+ font-size: calc(var(--en-single-f-f-b-fontSize) * 1px);
126
+ font-weight: var(--en-single-f-f-b-fontWeight);
127
+ color: var(--color-headnav-title);
128
+ }
129
+
130
+ &__edit-left-text {
131
+ font-size: calc(var(--en-single-f-d-r-fontSize) * 1px);
132
+ font-weight: var(--en-single-f-d-r-fontWeight);
133
+ color: var(--color-headnav-title);
134
+ }
135
+
136
+ &__edit-right-text {
137
+ font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
138
+ font-weight: var(--en-single-f-d-s-fontWeight);
139
+ color: var(--primary-color);
140
+ }
141
+
142
+ &__account-text {
143
+ font-size: calc(var(--en-single-f-d-r-fontSize) * 1px);
144
+ font-weight: var(--en-single-f-d-r-fontWeight);
145
+ color: var(--color-headnav-title);
146
+ }
147
+
148
+ &__account-type {
149
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
150
+ font-weight: var(--en-single-f-c-r-fontWeight);
151
+ color: var(--color-headnav-title);
152
+
153
+ &--icon {
154
+ font-size: calc(var(--icon-selector-s) * 1px);
155
+ margin-inline-end: calc(var(--spacing-selector-s-margin_y) * 1px);
156
+ }
157
+ }
158
+
159
+ &__icon {
160
+ display: flex;
161
+
162
+ .vd-iconfont {
163
+ font-size: calc(var(--icon-large) * 1px);
164
+ color: var(--color-headnav-icon);
165
+ }
166
+ }
167
+
168
+ // &__space--end {
169
+ // margin-inline-end: calc(var(--spacing-headnav-icon-margin_left) * 1px);
170
+ // }
171
+
172
+ // &__space--start {
173
+ // margin-inline-start: calc(var(--spacing-headnav-icon-margin_left) * 1px);
174
+ // }
175
+
176
+ &__time {
177
+ margin-inline-start: calc(var(--spacing-headnav-primary-text-margin_right) * 1px);
178
+ font-size: calc(var(--en-single-f-a-r-fontSize) * 1px);
179
+ font-weight: var(--en-single-f-a-r-fontWeight);
180
+ color: var(--color-headnav-text_delayed);
181
+ }
182
+
183
+ &__info {
184
+ position: absolute;
185
+ left: 0;
186
+ right: 0;
187
+ bottom: 8px;
188
+ display: flex;
189
+ align-items: center;
190
+ justify-content: center;
191
+ }
192
+
193
+
194
+ &__description {
195
+ margin-block-start: calc(var(--spacing-headnav-text_description-margin_top) * 1px);
196
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
197
+ font-weight: var(--en-single-f-c-r-fontWeight);
198
+ color: var(--color-headnav-text_description);
199
+ }
200
+
201
+ &__stock {
202
+ display: flex;
203
+ align-items: center;
204
+ font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
205
+ font-weight: var(--en-single-f-b-r-fontWeight);
206
+
207
+ &--rise {
208
+ color: var(--rise-color);
209
+ }
210
+
211
+ &--fall {
212
+ color: var(--fall-color);
213
+
214
+ }
215
+
216
+ span {
217
+ margin-inline-end: calc(var(--spacing-headnav-primary-dot-margin_right) * 1px);
218
+ }
219
+ }
220
+ }
221
+
222
+
223
+
224
+ [lang='ar'] {
225
+ .@{headnav-prefix-cls} {
226
+ &--left {
227
+ position: absolute;
228
+ left: auto;
229
+ right: calc(var(--spacing-headnav-padding_y) * 1px);
230
+
231
+ }
232
+
233
+ &--right {
234
+ position: absolute;
235
+ left: calc(var(--spacing-headnav-padding_y) * 1px);
236
+ right: auto;
237
+ }
238
+ }
239
+
240
+ .vd-head-nav__icon {
241
+ .vd-icon-icon_nav_back{
242
+ transform: scaleX(-1);
243
+ }
244
+ }
245
+ }