vdesign-ui 0.2.6 → 0.2.8

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 (195) hide show
  1. package/dist/components/actionbar/index.js +8 -0
  2. package/dist/components/actionbar/index.vue +39 -0
  3. package/dist/components/actionbar/style.less +44 -0
  4. package/dist/components/actionbar-cell/index.js +7 -0
  5. package/dist/components/actionbar-cell/index.vue +38 -0
  6. package/dist/components/actions/index.js +7 -0
  7. package/dist/components/actions/index.vue +76 -0
  8. package/dist/components/actions/style.less +109 -0
  9. package/dist/components/actions-cell/index.js +7 -0
  10. package/dist/components/actions-cell/index.vue +94 -0
  11. package/dist/components/actions-cell/style.less +39 -0
  12. package/dist/components/activityviews/index.js +8 -0
  13. package/dist/components/activityviews/index.vue +192 -0
  14. package/dist/components/activityviews/style.less +152 -0
  15. package/dist/components/badge/index.js +8 -0
  16. package/dist/components/badge/index.vue +49 -0
  17. package/dist/components/badge/style.less +54 -0
  18. package/dist/components/button/index.js +8 -0
  19. package/dist/components/button/index.vue +93 -0
  20. package/dist/components/button/style.less +558 -0
  21. package/dist/components/calendar/end.png +0 -0
  22. package/dist/components/calendar/index-element.vue +84 -0
  23. package/dist/components/calendar/index.js +8 -0
  24. package/dist/components/calendar/index.vue +52 -0
  25. package/dist/components/calendar/start.png +0 -0
  26. package/dist/components/calendar/style.less +138 -0
  27. package/dist/components/checkbox/index.js +8 -0
  28. package/dist/components/checkbox/index.vue +161 -0
  29. package/dist/components/checkbox/style.less +289 -0
  30. package/dist/components/checkbox-group/index.js +7 -0
  31. package/dist/components/checkbox-group/index.vue +69 -0
  32. package/dist/components/common/state/index.vue +33 -0
  33. package/dist/components/common/state/style.less +48 -0
  34. package/dist/components/data-list/index.js +10 -0
  35. package/dist/components/data-list/index.vue +19 -0
  36. package/dist/components/data-list/style.less +623 -0
  37. package/dist/components/datetime-picker/index.js +8 -0
  38. package/dist/components/datetime-picker/index.vue +37 -0
  39. package/dist/components/datetime-picker/style.less +24 -0
  40. package/dist/components/dialog/index.js +8 -0
  41. package/dist/components/dialog/index.vue +164 -0
  42. package/dist/components/dialog/overlay-manager.js +18 -0
  43. package/dist/components/dialog/style.less +139 -0
  44. package/dist/components/divider/index.js +8 -0
  45. package/dist/components/divider/index.vue +54 -0
  46. package/dist/components/divider/style.less +92 -0
  47. package/dist/components/dropdown/index.js +8 -0
  48. package/dist/components/dropdown/index.vue +218 -0
  49. package/dist/components/dropdown/style.less +432 -0
  50. package/dist/components/empty/404-dark.png +0 -0
  51. package/dist/components/empty/404.png +0 -0
  52. package/dist/components/empty/index.js +8 -0
  53. package/dist/components/empty/index.vue +138 -0
  54. package/dist/components/empty/network-dark.png +0 -0
  55. package/dist/components/empty/network.png +0 -0
  56. package/dist/components/empty/nocoupons-dark.png +0 -0
  57. package/dist/components/empty/nocoupons.png +0 -0
  58. package/dist/components/empty/nodata-dark.png +0 -0
  59. package/dist/components/empty/nodata.png +0 -0
  60. package/dist/components/empty/nomargin-dark.png +0 -0
  61. package/dist/components/empty/nomargin.png +0 -0
  62. package/dist/components/empty/nonotice-dark.png +0 -0
  63. package/dist/components/empty/nonotice.png +0 -0
  64. package/dist/components/empty/noocomments-dark.png +0 -0
  65. package/dist/components/empty/noocomments.png +0 -0
  66. package/dist/components/empty/noorders-dark.png +0 -0
  67. package/dist/components/empty/noorders.png +0 -0
  68. package/dist/components/empty/noposition-dark.png +0 -0
  69. package/dist/components/empty/noposition.png +0 -0
  70. package/dist/components/empty/nosearch-dark.png +0 -0
  71. package/dist/components/empty/nosearch.png +0 -0
  72. package/dist/components/empty/style.less +61 -0
  73. package/dist/components/footer/index.js +7 -0
  74. package/dist/components/footer/index.vue +33 -0
  75. package/dist/components/footer/style.less +21 -0
  76. package/dist/components/footnav/index.js +7 -0
  77. package/dist/components/footnav/index.vue +93 -0
  78. package/dist/components/footnav/style.less +23 -0
  79. package/dist/components/footnav-item/index.js +7 -0
  80. package/dist/components/footnav-item/index.vue +50 -0
  81. package/dist/components/footnav-item/style.less +39 -0
  82. package/dist/components/form/index.js +7 -0
  83. package/dist/components/form/index.vue +12 -0
  84. package/dist/components/headnav/index.js +7 -0
  85. package/dist/components/headnav/index.vue +185 -0
  86. package/dist/components/headnav/style.less +232 -0
  87. package/dist/components/icon/font/iconfont.css +163 -0
  88. package/dist/components/icon/font/iconfont.js +6 -0
  89. package/dist/components/icon/index.js +9 -0
  90. package/dist/components/icon/index.vue +96 -0
  91. package/dist/components/icon/style.less +44 -0
  92. package/dist/components/input/calcTextareaHeight.js +162 -0
  93. package/dist/components/input/index.js +8 -0
  94. package/dist/components/input/index.vue +345 -0
  95. package/dist/components/input/style.less +471 -0
  96. package/dist/components/list/index.js +8 -0
  97. package/dist/components/list/index.vue +152 -0
  98. package/dist/components/list/style.less +213 -0
  99. package/dist/components/loading/index.js +7 -0
  100. package/dist/components/loading/index.vue +68 -0
  101. package/dist/components/loading/style.less +54 -0
  102. package/dist/components/mixins/clickoutside.js +81 -0
  103. package/dist/components/mixins/dom.js +41 -0
  104. package/dist/components/mixins/languageMixin.js +41 -0
  105. package/dist/components/mixins/outlineConfigPlugin.js +45 -0
  106. package/dist/components/mixins/router-link.js +23 -0
  107. package/dist/components/mixins/themeMixin.js +43 -0
  108. package/dist/components/noticebar/index.js +8 -0
  109. package/dist/components/noticebar/index.vue +258 -0
  110. package/dist/components/noticebar/style.less +328 -0
  111. package/dist/components/overlay/index.js +8 -0
  112. package/dist/components/overlay/index.vue +184 -0
  113. package/dist/components/overlay/style.less +23 -0
  114. package/dist/components/pagebreak/index.js +7 -0
  115. package/dist/components/pagebreak/index.vue +67 -0
  116. package/dist/components/pagebreak/style.less +42 -0
  117. package/dist/components/password/index.js +8 -0
  118. package/dist/components/password/index.vue +60 -0
  119. package/dist/components/popover/index.js +8 -0
  120. package/dist/components/popover/index.vue +100 -0
  121. package/dist/components/popover/style.less +346 -0
  122. package/dist/components/popover/vue-popover.vue +314 -0
  123. package/dist/components/popup/index.js +7 -0
  124. package/dist/components/popup/index.vue +243 -0
  125. package/dist/components/radio/index.js +8 -0
  126. package/dist/components/radio/index.vue +184 -0
  127. package/dist/components/radio/style.less +294 -0
  128. package/dist/components/radio-group/index.js +6 -0
  129. package/dist/components/radio-group/index.vue +58 -0
  130. package/dist/components/result/completed-dark.png +0 -0
  131. package/dist/components/result/completed.png +0 -0
  132. package/dist/components/result/error-dark.png +0 -0
  133. package/dist/components/result/error.png +0 -0
  134. package/dist/components/result/index.js +8 -0
  135. package/dist/components/result/index.vue +73 -0
  136. package/dist/components/result/style.less +44 -0
  137. package/dist/components/result/wait-dark.png +0 -0
  138. package/dist/components/result/wait.png +0 -0
  139. package/dist/components/search/index.js +8 -0
  140. package/dist/components/search/index.vue +66 -0
  141. package/dist/components/selector/index.js +8 -0
  142. package/dist/components/selector/index.vue +161 -0
  143. package/dist/components/selector/style.less +484 -0
  144. package/dist/components/skeleton/index.js +7 -0
  145. package/dist/components/skeleton/index.vue +206 -0
  146. package/dist/components/skeleton/style.less +197 -0
  147. package/dist/components/slider/draggable.js +49 -0
  148. package/dist/components/slider/index.js +7 -0
  149. package/dist/components/slider/index.vue +167 -0
  150. package/dist/components/slider/style.less +100 -0
  151. package/dist/components/slider/utils.js +60 -0
  152. package/dist/components/step/index.js +7 -0
  153. package/dist/components/step/index.vue +48 -0
  154. package/dist/components/step/style.less +58 -0
  155. package/dist/components/step-item/index.js +7 -0
  156. package/dist/components/step-item/index.vue +126 -0
  157. package/dist/components/step-item/style.less +362 -0
  158. package/dist/components/stepper/index.js +8 -0
  159. package/dist/components/stepper/index.vue +146 -0
  160. package/dist/components/style/index.vue +42 -0
  161. package/dist/components/switch/index.js +8 -0
  162. package/dist/components/switch/index.vue +72 -0
  163. package/dist/components/switch/style.less +56 -0
  164. package/dist/components/tab/index.js +7 -0
  165. package/dist/components/tab/index.vue +68 -0
  166. package/dist/components/tabs/index.js +8 -0
  167. package/dist/components/tabs/index.vue +180 -0
  168. package/dist/components/tabs/style.less +383 -0
  169. package/dist/components/tag/index.js +7 -0
  170. package/dist/components/tag/index.vue +64 -0
  171. package/dist/components/tag/style.less +211 -0
  172. package/dist/components/title/index.js +8 -0
  173. package/dist/components/title/index.vue +99 -0
  174. package/dist/components/title/style.less +188 -0
  175. package/dist/components/toast/index.js +76 -0
  176. package/dist/components/toast/index.vue +49 -0
  177. package/dist/components/toast/style.less +57 -0
  178. package/dist/components/transition/index.js +8 -0
  179. package/dist/components/transition/index.vue +13 -0
  180. package/dist/components/transition/style.less +208 -0
  181. package/dist/components/upload/index.js +7 -0
  182. package/dist/components/upload/index.vue +106 -0
  183. package/dist/components/upload/style.less +147 -0
  184. package/dist/components/utils/assist.js +34 -0
  185. package/dist/components/utils/env.js +21 -0
  186. package/dist/demo.html +10 -0
  187. package/dist/locale/ar.js +98 -0
  188. package/dist/locale/en.js +98 -0
  189. package/dist/locale/zh.js +98 -0
  190. package/dist/token.css +2990 -0
  191. package/dist/vdesign-ui.common.js +27108 -0
  192. package/dist/vdesign-ui.css +1 -0
  193. package/dist/vdesign-ui.umd.js +27118 -0
  194. package/dist/vdesign-ui.umd.min.js +32 -0
  195. package/package.json +1 -1
@@ -0,0 +1,218 @@
1
+ <template>
2
+ <div class="vd-dropdown" :class="wrapClasses" v-show="isMask">
3
+ <!-- <transition :name="isAnimation ? 'vd-dropdown-fade' : ''">
4
+ <div class="vd-menu-mask" @click.stop="clickMenuMask"></div>
5
+ </transition> -->
6
+ <transition :name="isAnimation ? 'vd-dropdown-slide-down' : ''">
7
+ <div v-clickoutside="clickMenuMask" class="vd-dropdown-menu" v-show="isMask">
8
+ <template v-if="!isMultiple && !$slots.custom">
9
+ <div class="vd-dropdown-item" :class="itemClass(item)" v-for="(item, index) in datalist" :key="item.name"
10
+ @click.stop="selectedItem(item, index)">
11
+ <span class="vd-dropdown-left">
12
+ <vd-icon v-if="item.icon" :name="item.icon" svg class="vd-dropdown-icon"></vd-icon>
13
+ <span class="vd-dropdown-group-cell">
14
+ <span class="vd-dropdown-text">{{ item.text }}</span>
15
+ <span v-if="types === 'group'" class="vd-dropdown-group-sub">
16
+ <vd-icon v-if="item.subIcon" :name="item.subIcon" svg class="vd-dropdown-sub-icon"></vd-icon>
17
+ <span class="vd-dropdown-subtext" v-html="item.subText"></span>
18
+ </span>
19
+ </span>
20
+ </span>
21
+ <vd-icon v-if="types === 'primary' && item.selected" class="vd-dropdown-active-select"
22
+ name="icon_btn_singleslt" color="#1BC47D"></vd-icon>
23
+ <span v-if="types === 'state'" v-html="item.stateText" class="vd-dropdown-state-text"
24
+ :class="`vd-dropdown-state-text--${item.state}`"></span>
25
+ </div>
26
+ </template>
27
+
28
+ <template v-if="isMultiple">
29
+ <div class="vd-dropdown-item" :class="itemClass(item)" v-for="item in datalist" :key="item.name">
30
+ <vd-checkbox v-model="item.selected" :disabled="!item.selected && max <= selectedCount">
31
+ {{ item.text }}
32
+ </vd-checkbox>
33
+ <vd-icon v-if="types === 'primary' && item.selected" class="vd-dropdown-active-select"
34
+ name="icon_btn_singleslt" color="#1BC47D"></vd-icon>
35
+ </div>
36
+ <div class="vd-dropdown--btn">
37
+ <vd-button block size="small" type="tertiary_grey" @click="resetMenu">{{ resetBtnTxt }}</vd-button>
38
+ <vd-button block size="small" @click="sureMenu">{{ okBtnTxt }}</vd-button>
39
+ </div>
40
+ </template>
41
+
42
+ <div class="vd-dropdown-item" v-if="$slots.custom">
43
+ <slot name="custom">{{ custom }}</slot>
44
+ </div>
45
+ </div>
46
+ </transition>
47
+ </div>
48
+ </template>
49
+
50
+ <script>
51
+ import clickoutside from "../mixins/clickoutside.js";
52
+ import VdIcon from '../icon';
53
+ import VdButton from '../button';
54
+ const prefixCls = 'vd-dropdown';
55
+ export default {
56
+ name: 'vd-dropdown',
57
+ components: {
58
+ VdIcon,
59
+ VdButton
60
+ },
61
+ directives: {
62
+ clickoutside
63
+ },
64
+ props: {
65
+ isAnimation: {
66
+ type: Boolean,
67
+ default: false
68
+ },
69
+ types: {
70
+ type: String,
71
+ default: 'primary',
72
+ validator: value => ['primary', 'secondary', 'state', 'group'].includes(value)
73
+ },
74
+ value: {
75
+ type: Boolean,
76
+ default: false
77
+ },
78
+ disabled: {
79
+ type: Boolean,
80
+ default: false
81
+ },
82
+ isMultiple: {
83
+ type: Boolean,
84
+ default: false
85
+ },
86
+ alignment: {
87
+ type: String,
88
+ default: 'center',
89
+ validator: value => ['start', 'end', 'center'].includes(value)
90
+ },
91
+ col: {
92
+ type: [Number, String],
93
+ default: 1
94
+ },
95
+ max: {
96
+ type: [Number, String],
97
+ default: 5
98
+ },
99
+ custom: {
100
+ type: String,
101
+ default: ''
102
+ },
103
+ list: {
104
+ type: Array,
105
+ default: () => []
106
+ },
107
+ for: {
108
+ type: String,
109
+ default: ''
110
+ },
111
+ },
112
+ data() {
113
+ return {
114
+ datalist: []
115
+ };
116
+ },
117
+ watch: {
118
+ list: {
119
+ immediate: true,
120
+ handler(val) {
121
+ this.datalist = [...val];
122
+ }
123
+ },
124
+ value(val){
125
+ if(!val){
126
+ this.$emit('close')
127
+ }
128
+ }
129
+ },
130
+ computed: {
131
+ isMask() {
132
+ return this.value;
133
+ },
134
+ wrapClasses() {
135
+ return {
136
+ [`${prefixCls}-${this.types}`]: this.types,
137
+ [`${prefixCls}--divided`]: this.types !== 'state',
138
+ [`${prefixCls}-${this.alignment}`]: this.alignment
139
+ };
140
+ },
141
+ okBtnTxt() {
142
+ return '确定';
143
+ },
144
+ resetBtnTxt() {
145
+ return '重置';
146
+ },
147
+ selectedCount() {
148
+ return this.datalist.filter(item => item.selected).length;
149
+ }
150
+ },
151
+ methods: {
152
+ itemClass(item) {
153
+ return {
154
+ [`${prefixCls}--disabled`]: item.disabled,
155
+ [`${prefixCls}--active`]: item.selected
156
+ };
157
+ },
158
+ findParentWithNameAttr(element, nameValue) {
159
+ // 如果当前元素具有 name 属性且与传入的值匹配,返回该元素
160
+ if (element.getAttribute && element.getAttribute('alias-name') === nameValue) {
161
+ return element;
162
+ }
163
+ // 如果已经到达根元素 (document 或 null),停止查找
164
+ if (element.parentElement) {
165
+ return this.findParentWithNameAttr(element.parentElement, nameValue); // 递归查找父元素
166
+ }
167
+ return null; // 没有找到带 name 属性的匹配元素
168
+ },
169
+ clickMenuMask(e) {
170
+ if (this.value) {
171
+ if(this.for){
172
+ const nameElement = this.findParentWithNameAttr(e, this.for)
173
+ // 如果没找到就说明点外面了
174
+ if (!nameElement) {
175
+ this.$emit('input', false);
176
+ }
177
+ }
178
+ }
179
+ },
180
+ selectedItem(item, index) {
181
+ this.$emit('change', item, index); // 通知父组件选中项改变
182
+ },
183
+ resetMenu() {
184
+ this.datalist.forEach(item => (item.selected = false));
185
+ this.$emit('reset', this.datalist);
186
+ },
187
+ sureMenu() {
188
+ this.$emit('close'); // 关闭菜单
189
+ this.$emit('ok', this.datalist); // 确认并返回数据
190
+ }
191
+ }
192
+ };
193
+ </script>
194
+
195
+
196
+ <style lang="less">
197
+ @import './style.less';
198
+
199
+ .vd-dropdown-fade-enter-active,
200
+ .vd-dropdown-fade-leave-active {
201
+ transition: opacity 0.5s;
202
+ }
203
+
204
+ .vd-dropdown-fade-enter,
205
+ .vd-dropdown-fade-leave-to {
206
+ opacity: 0;
207
+ }
208
+
209
+ .vd-dropdown-slide-down-enter-active,
210
+ .vd-dropdown-slide-down-leave-active {
211
+ transition: transform 0.5s;
212
+ }
213
+
214
+ .vd-dropdown-slide-down-enter,
215
+ .vd-dropdown-slide-down-leave-to {
216
+ transform: translateY(-20px);
217
+ }
218
+ </style>
@@ -0,0 +1,432 @@
1
+ .vd-menu-mask {
2
+ position: fixed;
3
+ z-index: 999;
4
+ top: 0;
5
+ right: 0;
6
+ left: 0;
7
+ bottom: 0;
8
+ background-color: rgba(0, 0, 0, 0);
9
+ }
10
+
11
+
12
+ @dropdown-prefix-cls: vd-dropdown;
13
+
14
+
15
+ .@{dropdown-prefix-cls} {
16
+ --translate-x: -50%;
17
+
18
+ position: relative;
19
+ font-size: var(--en-single-f-c-r-fontSize);
20
+
21
+ // 额外加的 btn,token之外的
22
+ &--btn {
23
+ display: flex;
24
+ align-items: center;
25
+ flex-wrap: nowrap;
26
+ flex-direction: row;
27
+ justify-content: space-between;
28
+ padding: 10px 0;
29
+ gap: 10px;
30
+ }
31
+
32
+ &-menu {
33
+ z-index: 1000;
34
+ background: #fff;
35
+ transform-origin: top center;
36
+ position: absolute;
37
+ transition: transform 0.25s ease, opacity 0.25s ease;
38
+ inset-block-start: 100%;
39
+ // 默认 center
40
+ inset-inline-start: 50%;
41
+ transform: translate(var(--translate-x), 2px);
42
+ }
43
+
44
+ &-start {
45
+ .@{dropdown-prefix-cls}-menu {
46
+ inset-inline-start: 0;
47
+ transform: translate(0, 2px);
48
+ }
49
+ }
50
+
51
+ &-end {
52
+ .@{dropdown-prefix-cls}-menu {
53
+ inset-inline-start: inherit;
54
+ inset-inline-end: 0;
55
+ transform: translate(0, 2px);
56
+ }
57
+ }
58
+
59
+ &-center {
60
+ .@{dropdown-prefix-cls}-menu {
61
+ inset-inline-start: 50%;
62
+ transform: translate(var(--translate-x), 2px);
63
+ }
64
+ }
65
+
66
+ &-primary {
67
+ .@{dropdown-prefix-cls}-menu {
68
+ display: inline-block;
69
+ overflow-y: auto;
70
+ min-width: var(--width-dropdown-primary_small);
71
+ max-height: var(--height-dropdown-primary_large);
72
+ background-color: var(--color-dropdown-bg-default);
73
+ padding-block-start: var(--spacing-dropdown-primary-padding_x);
74
+ padding-block-end: var(--spacing-dropdown-primary-padding_x);
75
+ padding-inline-start: var(--spacing-dropdown-primary-padding_y);
76
+ padding-inline-end: var(--spacing-dropdown-primary-padding_y);
77
+ box-shadow: var(--shadow-s2);
78
+ border-radius: var(--radius-dropdown-primary);
79
+ }
80
+
81
+ .@{dropdown-prefix-cls}-item {
82
+ position: relative;
83
+ display: flex;
84
+ justify-content: space-between;
85
+ align-items: center;
86
+ height: var(--height-dropdown-primary_item);
87
+ line-height: var(--height-dropdown-primary_item);
88
+ }
89
+
90
+ .@{dropdown-prefix-cls} {
91
+ &-left {
92
+ display: flex;
93
+ align-items: center;
94
+ }
95
+
96
+ &-text {
97
+ white-space: nowrap;
98
+ color: var(--color-dropdown-primary-text-default);
99
+ font-size: var(--en-single-f-c-r-fontSize);
100
+ font-weight: var(--en-single-f-c-r-fontWeight);
101
+ }
102
+
103
+ &-icon {
104
+ font-size: var(--icon-dropdown-primary);
105
+ margin-inline-end: var(--spacing-dropdown-primary_icon-margin_right);
106
+ }
107
+
108
+ &-active-select {
109
+ font-size: var(--icon-dropdown-primary_select);
110
+ margin-inline-start: var(--spacing-dropdown-primary_icon_select-margin_left);
111
+ transform: scaleX(1) !important;
112
+ direction: ltr;
113
+ }
114
+ }
115
+
116
+ .@{dropdown-prefix-cls}--active {
117
+ .@{dropdown-prefix-cls}-text {
118
+ color: var(--color-dropdown-primary-text-active);
119
+ font-size: var(--en-single-f-c-s-fontSize);
120
+ font-weight: var(--en-single-f-c-s-fontWeight);
121
+ }
122
+ }
123
+
124
+ .@{dropdown-prefix-cls}--disabled {
125
+ pointer-events: none;
126
+ cursor: not-allowed;
127
+
128
+ .@{dropdown-prefix-cls}-text {
129
+ color: var(--color-dropdown-primary-text-disable);
130
+ font-size: var(--en-single-f-c-r-fontSize);
131
+ font-weight: var(--en-single-f-c-r-fontWeight);
132
+ }
133
+
134
+ .@{dropdown-prefix-cls}-icon {
135
+ opacity: var(--opacity-30);
136
+ }
137
+ }
138
+ }
139
+
140
+ &-secondary {
141
+ .@{dropdown-prefix-cls}-menu {
142
+ display: inline-block;
143
+ overflow-y: auto;
144
+ max-height: var(--height-dropdown-secondary_large);
145
+ background-color: var(--color-dropdown-bg-default);
146
+ padding-block-start: var(--spacing-dropdown-secondary-padding_x);
147
+ padding-block-end: var(--spacing-dropdown-secondary-padding_x);
148
+ padding-inline-start: var(--spacing-dropdown-secondary-padding_y);
149
+ padding-inline-end: var(--spacing-dropdown-secondary-padding_y);
150
+ box-shadow: var(--shadow-s2);
151
+ border-radius: var(--radius-dropdown-secondary);
152
+ }
153
+
154
+ .@{dropdown-prefix-cls}-item {
155
+ position: relative;
156
+ display: flex;
157
+ justify-content: space-between;
158
+ align-items: center;
159
+ height: var(--height-dropdown-secondary_item);
160
+ line-height: var(--height-dropdown-secondary_item);
161
+ }
162
+
163
+ .@{dropdown-prefix-cls} {
164
+ &-left {
165
+ display: flex;
166
+ align-items: center;
167
+ }
168
+
169
+ &-text {
170
+ white-space: nowrap;
171
+ color: var(--color-dropdown-secondary-text-default);
172
+ font-size: var(--en-single-f-c-r-fontSize);
173
+ font-weight: var(--en-single-f-c-r-fontWeight);
174
+ }
175
+
176
+ &-icon {
177
+ font-size: var(--icon-dropdown-secondary);
178
+ margin-inline-end: var(--spacing-dropdown-secondary_icon-margin_right);
179
+ }
180
+ }
181
+
182
+ .@{dropdown-prefix-cls}--active {
183
+ .@{dropdown-prefix-cls}-text {
184
+ color: var(--color-dropdown-secondary-text-active);
185
+ font-size: var(--en-single-f-c-s-fontSize);
186
+ font-weight: var(--en-single-f-c-s-fontWeight);
187
+ }
188
+ }
189
+
190
+ .@{dropdown-prefix-cls}--disabled {
191
+ pointer-events: none;
192
+ cursor: not-allowed;
193
+
194
+ .@{dropdown-prefix-cls}-text {
195
+ color: var(--color-dropdown-secondary-text-disable);
196
+ font-size: var(--en-single-f-c-r-fontSize);
197
+ font-weight: var(--en-single-f-c-r-fontWeight);
198
+ }
199
+
200
+ .@{dropdown-prefix-cls}-icon {
201
+ opacity: var(--opacity-30);
202
+ }
203
+ }
204
+ }
205
+
206
+ &-state {
207
+ .@{dropdown-prefix-cls}-menu {
208
+ overflow-y: auto;
209
+ min-width: var(--width-dropdown-state_small);
210
+ max-height: var(--height-dropdown-state_large);
211
+ background-color: var(--color-dropdown-bg-default);
212
+ padding-block-start: var(--spacing-dropdown-state-padding_x);
213
+ padding-block-end: var(--spacing-dropdown-state-padding_x);
214
+ padding-inline-start: var(--spacing-dropdown-state-padding_y);
215
+ padding-inline-end: var(--spacing-dropdown-state-padding_y);
216
+ box-shadow: var(--shadow-s2);
217
+ border-radius: var(--radius-dropdown-state);
218
+ }
219
+
220
+ .@{dropdown-prefix-cls}-item {
221
+ position: relative;
222
+ display: flex;
223
+ justify-content: space-between;
224
+ align-items: center;
225
+ height: var(--height-dropdown-state_item);
226
+ line-height: var(--height-dropdown-state_item);
227
+ padding-inline-start: var(--spacing-dropdown-state_item-padding_y);
228
+ padding-inline-end: var(--spacing-dropdown-state_item-padding_y);
229
+ border-radius: var(--radius-dropdown-state_item);
230
+ }
231
+
232
+ .@{dropdown-prefix-cls} {
233
+ &-left {
234
+ display: flex;
235
+ align-items: center;
236
+ flex: 1;
237
+ overflow: hidden;
238
+ }
239
+
240
+ &-text {
241
+ text-overflow: ellipsis;
242
+ overflow: hidden;
243
+ white-space: nowrap;
244
+ color: var(--color-dropdown-state-text-default);
245
+ font-size: var(--en-single-f-c-r-fontSize);
246
+ font-weight: var(--en-single-f-c-r-fontWeight);
247
+ }
248
+
249
+ &-icon {
250
+ font-size: var(--icon-dropdown-state);
251
+ margin-inline-end: var(--spacing-dropdown-state_icon-margin_right);
252
+ }
253
+
254
+ &-state-text {
255
+ font-size: var(--en-single-f-b-r-fontSize);
256
+ font-weight: var(--en-single-f-b-r-fontWeight);
257
+
258
+ &::before {
259
+ content: '';
260
+ display: inline-block;
261
+ border-radius: 50%;
262
+ width: var(--width-dropdown-state_drop);
263
+ height: var(--width-dropdown-state_drop);
264
+ margin-inline-start: var(--spacing-dropdown-state_drop-margin_left);
265
+ margin-inline-end: var(--spacing-dropdown-state_drop-margin_right);
266
+ background-color: var(--color-dropdown-state-open);
267
+ }
268
+
269
+ &--open {
270
+ color: var(--color-dropdown-state-open);
271
+
272
+ &::before {
273
+ background-color: var(--color-dropdown-state-open);
274
+ }
275
+ }
276
+
277
+ &--preopen {
278
+ color: var(--color-dropdown-state-preopen);
279
+
280
+ &::before {
281
+ background-color: var(--color-dropdown-state-preopen);
282
+ }
283
+ }
284
+
285
+ &--close {
286
+ color: var(--color-dropdown-state-close);
287
+
288
+ &::before {
289
+ background-color: var(--text-color-h3);
290
+ }
291
+ }
292
+
293
+ &--fusing {
294
+ color: var(--color-dropdown-state-fusing);
295
+
296
+ &::before {
297
+ background-color: var(--color-dropdown-state-fusing);
298
+ }
299
+ }
300
+
301
+ &--pre {
302
+ color: var(--color-dropdown-state-pre_market_auction);
303
+
304
+ &::before {
305
+ background-color: var(--color-dropdown-state-pre_market_auction);
306
+ }
307
+ }
308
+
309
+ &--last {
310
+ color: var(--color-dropdown-state-last_trading_session);
311
+
312
+ &::before {
313
+ background-color: var(--color-dropdown-state-last_trading_session);
314
+ }
315
+ }
316
+ }
317
+ }
318
+
319
+ .@{dropdown-prefix-cls}--active {
320
+ background: var(--color-dropdown-state-bg-active);
321
+
322
+ .@{dropdown-prefix-cls}-text {
323
+ color: var(--color-dropdown-state-text-active);
324
+ }
325
+ }
326
+
327
+ .@{dropdown-prefix-cls}--disabled {
328
+ pointer-events: none;
329
+ cursor: not-allowed;
330
+
331
+ .@{dropdown-prefix-cls}-text {
332
+ font-size: var(--en-single-f-c-r-fontSize);
333
+ font-weight: var(--en-single-f-c-r-fontWeight);
334
+ }
335
+
336
+ .@{dropdown-prefix-cls}-icon {
337
+ opacity: var(--opacity-30);
338
+ }
339
+ }
340
+ }
341
+
342
+ &-group {
343
+ .@{dropdown-prefix-cls}-menu {
344
+ overflow-y: auto;
345
+ min-width: var(--width-dropdown-group_default);
346
+ max-height: var(--height-dropdown-group_large);
347
+ background-color: var(--color-dropdown-bg-default);
348
+ padding-block-start: var(--spacing-dropdown-group-padding_x);
349
+ padding-block-end: var(--spacing-dropdown-group-padding_x);
350
+ padding-inline-start: var(--spacing-dropdown-group-padding_y);
351
+ padding-inline-end: var(--spacing-dropdown-group-padding_y);
352
+ box-shadow: var(--shadow-s2);
353
+ border-radius: var(--radius-dropdown-group);
354
+ }
355
+
356
+ .@{dropdown-prefix-cls}-item {
357
+ position: relative;
358
+ display: flex;
359
+ justify-content: space-between;
360
+ align-items: center;
361
+ padding-block-start: var(--spacing-dropdown-group_item-padding_top);
362
+ padding-block-end: var(--spacing-dropdown-group_item-padding_bottom);
363
+ }
364
+
365
+ .@{dropdown-prefix-cls} {
366
+ &-left {
367
+ display: flex;
368
+ align-items: center;
369
+ }
370
+
371
+ &-group-cell {
372
+ display: flex;
373
+ flex-direction: column;
374
+ color: var(--color-dropdown-state-text-default);
375
+ font-size: var(--en-single-f-c-r-fontSize);
376
+ font-weight: var(--en-single-f-c-r-fontWeight);
377
+ }
378
+
379
+ &-text {
380
+ color: var(--color-dropdown-group-title-default);
381
+ font-size: var(--en-single-f-c-r-fontSize);
382
+ font-weight: var(--en-single-f-c-r-fontWeight);
383
+ }
384
+
385
+ &-group-sub {
386
+ display: flex;
387
+ align-items: center;
388
+ margin-block-start: var(--spacing-dropdown-group_text-margin_bottom);
389
+ }
390
+
391
+ &-sub-icon {
392
+ font-size: var(--icon-dropdown-group);
393
+ margin-inline-end: 6px;
394
+ }
395
+
396
+ &-subtext {
397
+ color: var(--color-dropdown-group-text-default);
398
+ font-size: var(--en-single-f-c-s-fontSize);
399
+ font-weight: var(--en-single-f-c-s-fontWeight);
400
+ }
401
+
402
+ &-multext {
403
+ margin-block-start: var(--spacing-dropdown-group_text-margin_bottom);
404
+ }
405
+ }
406
+ }
407
+
408
+ &--divided {
409
+ .@{dropdown-prefix-cls}-item {
410
+ &:not(:last-child)::after {
411
+ position: absolute;
412
+ box-sizing: border-box;
413
+ content: ' ';
414
+ pointer-events: none;
415
+ top: -50%;
416
+ right: -50%;
417
+ bottom: -50%;
418
+ left: -50%;
419
+ border: 0 solid var(--color-dropdown-divider);
420
+ -webkit-transform: scale(0.5);
421
+ transform: scale(0.5);
422
+ border-bottom-width: 1px;
423
+ }
424
+ }
425
+ }
426
+ }
427
+
428
+
429
+
430
+ [dir="rtl"] .@{dropdown-prefix-cls} {
431
+ --translate-x: 50%;
432
+ }
Binary file
@@ -0,0 +1,8 @@
1
+ import Empty from './index.vue';
2
+ import './style.less';
3
+
4
+ Empty.install = function (Vue) {
5
+ Vue.component(Empty.name, Empty);
6
+ };
7
+
8
+ export default Empty;