vdesign-ui 0.2.5 → 0.2.6

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/package.json +1 -1
  2. package/dist/components/actionbar/index.js +0 -8
  3. package/dist/components/actionbar/index.vue +0 -39
  4. package/dist/components/actionbar/style.less +0 -44
  5. package/dist/components/actionbar-cell/index.js +0 -7
  6. package/dist/components/actionbar-cell/index.vue +0 -38
  7. package/dist/components/actions/index.js +0 -7
  8. package/dist/components/actions/index.vue +0 -76
  9. package/dist/components/actions/style.less +0 -109
  10. package/dist/components/actions-cell/index.js +0 -7
  11. package/dist/components/actions-cell/index.vue +0 -94
  12. package/dist/components/actions-cell/style.less +0 -39
  13. package/dist/components/activityviews/index.js +0 -8
  14. package/dist/components/activityviews/index.vue +0 -192
  15. package/dist/components/activityviews/style.less +0 -152
  16. package/dist/components/badge/index.js +0 -8
  17. package/dist/components/badge/index.vue +0 -49
  18. package/dist/components/badge/style.less +0 -54
  19. package/dist/components/button/index.js +0 -8
  20. package/dist/components/button/index.vue +0 -93
  21. package/dist/components/button/style.less +0 -558
  22. package/dist/components/calendar/end.png +0 -0
  23. package/dist/components/calendar/index-element.vue +0 -84
  24. package/dist/components/calendar/index.js +0 -8
  25. package/dist/components/calendar/index.vue +0 -52
  26. package/dist/components/calendar/start.png +0 -0
  27. package/dist/components/calendar/style.less +0 -138
  28. package/dist/components/checkbox/index.js +0 -8
  29. package/dist/components/checkbox/index.vue +0 -161
  30. package/dist/components/checkbox/style.less +0 -289
  31. package/dist/components/checkbox-group/index.js +0 -7
  32. package/dist/components/checkbox-group/index.vue +0 -69
  33. package/dist/components/common/state/index.vue +0 -33
  34. package/dist/components/common/state/style.less +0 -48
  35. package/dist/components/data-list/index.js +0 -10
  36. package/dist/components/data-list/index.vue +0 -19
  37. package/dist/components/data-list/style.less +0 -623
  38. package/dist/components/datetime-picker/index.js +0 -8
  39. package/dist/components/datetime-picker/index.vue +0 -37
  40. package/dist/components/datetime-picker/style.less +0 -24
  41. package/dist/components/dialog/index.js +0 -8
  42. package/dist/components/dialog/index.vue +0 -164
  43. package/dist/components/dialog/overlay-manager.js +0 -18
  44. package/dist/components/dialog/style.less +0 -139
  45. package/dist/components/divider/index.js +0 -8
  46. package/dist/components/divider/index.vue +0 -54
  47. package/dist/components/divider/style.less +0 -92
  48. package/dist/components/dropdown/index.js +0 -8
  49. package/dist/components/dropdown/index.vue +0 -218
  50. package/dist/components/dropdown/style.less +0 -432
  51. package/dist/components/empty/404-dark.png +0 -0
  52. package/dist/components/empty/404.png +0 -0
  53. package/dist/components/empty/index.js +0 -8
  54. package/dist/components/empty/index.vue +0 -138
  55. package/dist/components/empty/network-dark.png +0 -0
  56. package/dist/components/empty/network.png +0 -0
  57. package/dist/components/empty/nocoupons-dark.png +0 -0
  58. package/dist/components/empty/nocoupons.png +0 -0
  59. package/dist/components/empty/nodata-dark.png +0 -0
  60. package/dist/components/empty/nodata.png +0 -0
  61. package/dist/components/empty/nomargin-dark.png +0 -0
  62. package/dist/components/empty/nomargin.png +0 -0
  63. package/dist/components/empty/nonotice-dark.png +0 -0
  64. package/dist/components/empty/nonotice.png +0 -0
  65. package/dist/components/empty/noocomments-dark.png +0 -0
  66. package/dist/components/empty/noocomments.png +0 -0
  67. package/dist/components/empty/noorders-dark.png +0 -0
  68. package/dist/components/empty/noorders.png +0 -0
  69. package/dist/components/empty/noposition-dark.png +0 -0
  70. package/dist/components/empty/noposition.png +0 -0
  71. package/dist/components/empty/nosearch-dark.png +0 -0
  72. package/dist/components/empty/nosearch.png +0 -0
  73. package/dist/components/empty/style.less +0 -61
  74. package/dist/components/footer/index.js +0 -7
  75. package/dist/components/footer/index.vue +0 -33
  76. package/dist/components/footer/style.less +0 -21
  77. package/dist/components/footnav/index.js +0 -7
  78. package/dist/components/footnav/index.vue +0 -93
  79. package/dist/components/footnav/style.less +0 -23
  80. package/dist/components/footnav-item/index.js +0 -7
  81. package/dist/components/footnav-item/index.vue +0 -50
  82. package/dist/components/footnav-item/style.less +0 -39
  83. package/dist/components/form/index.js +0 -7
  84. package/dist/components/form/index.vue +0 -12
  85. package/dist/components/headnav/index.js +0 -7
  86. package/dist/components/headnav/index.vue +0 -185
  87. package/dist/components/headnav/style.less +0 -232
  88. package/dist/components/icon/font/iconfont.css +0 -163
  89. package/dist/components/icon/font/iconfont.js +0 -6
  90. package/dist/components/icon/index.js +0 -9
  91. package/dist/components/icon/index.vue +0 -96
  92. package/dist/components/icon/style.less +0 -44
  93. package/dist/components/input/calcTextareaHeight.js +0 -162
  94. package/dist/components/input/index.js +0 -8
  95. package/dist/components/input/index.vue +0 -345
  96. package/dist/components/input/style.less +0 -471
  97. package/dist/components/list/index.js +0 -8
  98. package/dist/components/list/index.vue +0 -152
  99. package/dist/components/list/style.less +0 -213
  100. package/dist/components/loading/index.js +0 -7
  101. package/dist/components/loading/index.vue +0 -68
  102. package/dist/components/loading/style.less +0 -54
  103. package/dist/components/mixins/clickoutside.js +0 -81
  104. package/dist/components/mixins/dom.js +0 -41
  105. package/dist/components/mixins/languageMixin.js +0 -41
  106. package/dist/components/mixins/outlineConfigPlugin.js +0 -45
  107. package/dist/components/mixins/router-link.js +0 -23
  108. package/dist/components/mixins/themeMixin.js +0 -43
  109. package/dist/components/noticebar/index.js +0 -8
  110. package/dist/components/noticebar/index.vue +0 -258
  111. package/dist/components/noticebar/style.less +0 -328
  112. package/dist/components/overlay/index.js +0 -8
  113. package/dist/components/overlay/index.vue +0 -184
  114. package/dist/components/overlay/style.less +0 -23
  115. package/dist/components/pagebreak/index.js +0 -7
  116. package/dist/components/pagebreak/index.vue +0 -67
  117. package/dist/components/pagebreak/style.less +0 -42
  118. package/dist/components/password/index.js +0 -8
  119. package/dist/components/password/index.vue +0 -60
  120. package/dist/components/popover/index.js +0 -8
  121. package/dist/components/popover/index.vue +0 -100
  122. package/dist/components/popover/style.less +0 -346
  123. package/dist/components/popover/vue-popover.vue +0 -314
  124. package/dist/components/popup/index.js +0 -7
  125. package/dist/components/popup/index.vue +0 -243
  126. package/dist/components/radio/index.js +0 -8
  127. package/dist/components/radio/index.vue +0 -184
  128. package/dist/components/radio/style.less +0 -294
  129. package/dist/components/radio-group/index.js +0 -6
  130. package/dist/components/radio-group/index.vue +0 -58
  131. package/dist/components/result/completed-dark.png +0 -0
  132. package/dist/components/result/completed.png +0 -0
  133. package/dist/components/result/error-dark.png +0 -0
  134. package/dist/components/result/error.png +0 -0
  135. package/dist/components/result/index.js +0 -8
  136. package/dist/components/result/index.vue +0 -73
  137. package/dist/components/result/style.less +0 -44
  138. package/dist/components/result/wait-dark.png +0 -0
  139. package/dist/components/result/wait.png +0 -0
  140. package/dist/components/search/index.js +0 -8
  141. package/dist/components/search/index.vue +0 -66
  142. package/dist/components/selector/index.js +0 -8
  143. package/dist/components/selector/index.vue +0 -161
  144. package/dist/components/selector/style.less +0 -484
  145. package/dist/components/skeleton/index.js +0 -7
  146. package/dist/components/skeleton/index.vue +0 -206
  147. package/dist/components/skeleton/style.less +0 -197
  148. package/dist/components/slider/draggable.js +0 -49
  149. package/dist/components/slider/index.js +0 -7
  150. package/dist/components/slider/index.vue +0 -167
  151. package/dist/components/slider/style.less +0 -100
  152. package/dist/components/slider/utils.js +0 -60
  153. package/dist/components/step/index.js +0 -7
  154. package/dist/components/step/index.vue +0 -48
  155. package/dist/components/step/style.less +0 -58
  156. package/dist/components/step-item/index.js +0 -7
  157. package/dist/components/step-item/index.vue +0 -126
  158. package/dist/components/step-item/style.less +0 -362
  159. package/dist/components/stepper/index.js +0 -8
  160. package/dist/components/stepper/index.vue +0 -146
  161. package/dist/components/style/index.vue +0 -42
  162. package/dist/components/switch/index.js +0 -8
  163. package/dist/components/switch/index.vue +0 -72
  164. package/dist/components/switch/style.less +0 -56
  165. package/dist/components/tab/index.js +0 -7
  166. package/dist/components/tab/index.vue +0 -53
  167. package/dist/components/tabs/index.js +0 -8
  168. package/dist/components/tabs/index.vue +0 -172
  169. package/dist/components/tabs/style.less +0 -377
  170. package/dist/components/tag/index.js +0 -7
  171. package/dist/components/tag/index.vue +0 -64
  172. package/dist/components/tag/style.less +0 -211
  173. package/dist/components/title/index.js +0 -8
  174. package/dist/components/title/index.vue +0 -99
  175. package/dist/components/title/style.less +0 -188
  176. package/dist/components/toast/index.js +0 -94
  177. package/dist/components/toast/index.vue +0 -49
  178. package/dist/components/toast/style.less +0 -55
  179. package/dist/components/transition/index.js +0 -8
  180. package/dist/components/transition/index.vue +0 -13
  181. package/dist/components/transition/style.less +0 -208
  182. package/dist/components/upload/index.js +0 -7
  183. package/dist/components/upload/index.vue +0 -106
  184. package/dist/components/upload/style.less +0 -147
  185. package/dist/components/utils/assist.js +0 -34
  186. package/dist/components/utils/env.js +0 -2
  187. package/dist/demo.html +0 -10
  188. package/dist/locale/ar.js +0 -98
  189. package/dist/locale/en.js +0 -98
  190. package/dist/locale/zh.js +0 -98
  191. package/dist/token.css +0 -2990
  192. package/dist/vdesign-ui.common.js +0 -27486
  193. package/dist/vdesign-ui.css +0 -1
  194. package/dist/vdesign-ui.umd.js +0 -27496
  195. package/dist/vdesign-ui.umd.min.js +0 -32
@@ -1,138 +0,0 @@
1
- .van-calendar__header {
2
- box-shadow: none;
3
- }
4
-
5
- .van-calendar__header-subtitle {
6
- height: var(--height-datepicker-title-month_year);
7
- line-height: var(--height-datepicker-title-month_year);
8
- color: var(--color-datepicker-title-month_year);
9
- font-size: var(--en-single-f-d-s-fontSize);
10
- font-weight: var(--en-single-f-d-s-fontWeight);
11
- }
12
-
13
- .van-calendar__weekdays {
14
- padding: 0 20px;
15
- height: var(--height-datepicker-week);
16
- color: var(--color-datepicker-text-week);
17
- }
18
-
19
- .van-calendar__weekday {
20
- line-height: var(--height-datepicker-week);
21
- font-size: var(--en-single-f-b-r-fontSize);
22
- font-weight: var(--en-single-f-b-r-fontWeight);
23
- }
24
-
25
- .van-calendar__days {
26
- display: flex;
27
- padding: 0 20px;
28
- }
29
-
30
- .van-calendar__day {
31
- height: var(--height-datepicker-date);
32
- font-size: var(--en-single-f-d-s-fontSize);
33
- font-weight: var(--en-single-f-d-s-fontWeight);
34
- color: var(--color-datepicker-date-text-default);
35
- background-color: var(--color-datepicker-date-bg-default);
36
- margin-block-start: var(--spacing-datepicker-date-margin_top);
37
- margin-block-end: var(--spacing-datepicker-date-margin_bottom);
38
-
39
- &--disabled {
40
- color: var(--color-datepicker-date-text-disable);
41
- background-color: var(--color-datepicker-date-bg-disable);
42
- }
43
-
44
- &--start {
45
- font-size: var(--en-single-f-d-s-fontSize);
46
- font-weight: var(--en-single-f-d-s-fontWeight);
47
- color: var(--color-datepicker-date-text-active);
48
- border-radius: 0;
49
- background-image: url(./start.png) !important;
50
- background-position: center center !important;
51
- background-repeat: no-repeat !important;
52
- background-size: cover !important;
53
- }
54
-
55
- &--middle {
56
- color: var(--color-datepicker-date-text-default) !important;
57
- background-color: var(--color-datepicker-date_mask-bg-active);
58
-
59
- &::after {
60
- background-color: transparent;
61
- opacity: 1;
62
- }
63
- }
64
-
65
- &--end {
66
- font-size: var(--en-single-f-d-s-fontSize);
67
- font-weight: var(--en-single-f-d-s-fontWeight);
68
- color: var(--color-datepicker-date-text-active);
69
- background-color: var(--color-datepicker-date-bg-active);
70
- border-radius: 0;
71
- background-image: url(./end.png) !important;
72
- background-position: center center !important;
73
- background-repeat: no-repeat !important;
74
- background-size: cover !important;
75
- }
76
- }
77
-
78
- .van-calendar__selected-day {
79
- background-color: var(--color-datepicker-date-bg-active);
80
- }
81
-
82
- .van-calendar__bottom-info {
83
- bottom: -14px;
84
- color: #1BC47D;
85
- font-size: 12px;
86
- font-weight: normal;
87
- }
88
-
89
- .van-calendar__top-info {
90
- top: auto;
91
- bottom: -14px;
92
- color: var(--color-datepicker-today_dot);
93
- font-size: 18px;
94
- }
95
-
96
- .vd-calendar-input {
97
- padding-block-start: var(--spacing-datepicker-range_picker-margin_top);
98
- padding-block-end: var(--spacing-datepicker-range_picker-margin_bottom);
99
- padding-inline-start: var(--spacing-datepicker-padding_y);
100
- padding-inline-end: var(--spacing-datepicker-padding_y);
101
-
102
- &-inner {
103
- display: flex;
104
- align-items: center;
105
- border-radius: var(--radius-datepicker-range_picker_bg);
106
- background-color: var(--color-datepicker-range_picker-bg);
107
- }
108
-
109
- &__inputs {
110
- width: 100%;
111
- text-align: center;
112
- background-color: transparent;
113
- height: var(--height-datepicker-range_picker_bg);
114
- line-height: var(--height-datepicker-range_picker_bg);
115
- font-size: var(--en-single-f-d-r-fontSize);
116
- font-weight: var(--en-single-f-d-r-fontWeight);
117
- color: var(--color-datepicker-range_picker-text-active);
118
-
119
- ::-webkit-input-placeholder {
120
- color: var(--color-datepicker-range_picker-text-default);
121
- }
122
- }
123
-
124
- &__line {
125
- width: var(--width-datepicker-range_picker_divider);
126
- height: var(--height-datepicker-range_picker_divider);
127
- background-color: var(--color-datepicker-range_picker_divider);
128
- }
129
- }
130
-
131
- .van-hairline-unset--top-bottom::after {
132
- border-width: 0;
133
- }
134
-
135
- .van-picker__frame {
136
- left: var(--spacing-datepicker-padding_y);
137
- right: var(--spacing-datepicker-padding_y);
138
- }
@@ -1,8 +0,0 @@
1
- import Checkbox from './index.vue';
2
- import './style.less';
3
-
4
- Checkbox.install = function (Vue) {
5
- Vue.component(Checkbox.name, Checkbox);
6
- };
7
-
8
- export default Checkbox;
@@ -1,161 +0,0 @@
1
- <template>
2
- <label :class="wrapClasses" v-if="!checkboxButton">
3
- <span :class="checkboxClasses">
4
- <!-- 处理分组和单个情况的输入元素 -->
5
- <span :class="innerClasses"></span>
6
- <!-- 处理分组和单个情况的输入元素 -->
7
- <input v-if="group" type="checkbox" :class="inputClasses" :disabled="disabled" :value="name" v-model="model"
8
- @change="change" />
9
- <input v-else type="checkbox" :class="inputClasses" :disabled="disabled" :checked="currentValue"
10
- @change="change" />
11
- </span>
12
- <!-- 标签和可选的描述 -->
13
- <div class="vd-checkbox__label" v-if="$slots.default">
14
- <p class="vd-checkbox__text">
15
- <slot></slot>
16
- </p>
17
- <p class="vd-checkbox__description" v-if="extra">{{ extra }}</p>
18
- </div>
19
- </label>
20
-
21
- <!-- 复选框按钮变体 -->
22
- <label class="vd-checkbox vd-checkbox-button" :class="checkboxButtonClasses" v-else>
23
- <input type="checkbox" :class="inputClasses" :disabled="disabled" :checked="currentValue" @change="change" />
24
- <template v-if="type === 'small'">
25
- <vd-icon v-if="icon" :name="icon" class="vd-checkbox-button__icon--small"></vd-icon>
26
- <span class="vd-checkbox-button__text">
27
- <slot></slot>
28
- </span>
29
- </template>
30
-
31
- <template v-if="type === 'medium'">
32
- <span class="vd-checkbox-button__text">
33
- <slot></slot>
34
- </span>
35
- <span class="vd-checkbox-button__description" v-if="extra">{{ extra }}</span>
36
- </template>
37
-
38
- <template v-if="type === 'large'">
39
- <vd-icon v-if="icon" :name="icon" class="vd-checkbox-button__icon--large"></vd-icon>
40
- <span class="vd-checkbox-button__text">
41
- <slot></slot>
42
- </span>
43
- </template>
44
- </label>
45
- </template>
46
- <script>
47
- import { findComponentUpward } from "../utils/assist";
48
- import VdIcon from '../icon';
49
- const prefixCls = "vd-checkbox";
50
-
51
- export default {
52
- name: "vd-checkbox",
53
- components: {
54
- VdIcon
55
- },
56
- props: {
57
- value: [String, Number, Boolean], // 复选框的当前值
58
- checkboxButton: Boolean, // 是否为复选框按钮
59
- disabled: Boolean, // 是否禁用
60
- extra: String, // 额外的描述文本
61
- trueValue: {
62
- type: [String, Number, Boolean],
63
- default: true, // 复选框被选中时的值
64
- },
65
- falseValue: {
66
- type: [String, Number, Boolean],
67
- default: false, // 复选框未被选中时的值
68
- },
69
- name: null, //复选框的 name 属性
70
- indeterminate: Boolean, // 复选框的不确定状态
71
- icon: String, // 使用复选框按钮时显示的图标
72
- type: String, // 复选框按钮的尺寸类型('small','medium','large')
73
- },
74
- data() {
75
- return {
76
- model: [], // 复选框组的模型值
77
- currentValue: this.value, // 复选框的当前值
78
- group: false, // 是否为复选框组
79
- parent: null, // 对父级复选框组组件的引用
80
- };
81
- },
82
- computed: {
83
- wrapClasses() {
84
- return [
85
- `${prefixCls}`,
86
- {
87
- [`${prefixCls}--checked`]: this.currentValue,
88
- [`${prefixCls}--disabled`]: this.disabled,
89
- },
90
- ];
91
- },
92
- checkboxClasses() {
93
- return [
94
- `${prefixCls}__input`,
95
- {
96
- [`${prefixCls}--indeterminate`]: this.indeterminate,
97
- },
98
- ];
99
- },
100
- innerClasses() {
101
- return [`${prefixCls}__icon`];
102
- },
103
- inputClasses() {
104
- return `${prefixCls}__original`;
105
- },
106
- checkboxButtonClasses() {
107
- return [
108
- {
109
- [`${prefixCls}-button--checked`]: this.currentValue,
110
- [`${prefixCls}-button--${this.type}`]: this.type,
111
- [`${prefixCls}-button--disabled`]: this.disabled,
112
- },
113
- ];
114
- },
115
- },
116
- mounted() {
117
- this.parent = findComponentUpward(this, "vd-checkbox-group");
118
- if (this.parent) {
119
- this.isGroup = true;
120
- this.parent.updateModel(true);
121
- } else {
122
- this.updateModel();
123
- }
124
- },
125
- methods: {
126
- change(event) {
127
- if (this.disabled) {
128
- return false;
129
- }
130
-
131
- const checked = event.target.checked;
132
- this.currentValue = checked;
133
-
134
- const value = checked ? this.trueValue : this.falseValue;
135
- this.$emit("input", value);
136
-
137
- if (this.group) {
138
- this.parent.change(this.model);
139
- } else {
140
- this.$emit("change", value);
141
- }
142
- },
143
- updateModel() {
144
- this.currentValue = this.value === this.trueValue;
145
- },
146
- },
147
- watch: {
148
- value(val) {
149
- if (val === this.trueValue || val === this.falseValue) {
150
- this.updateModel();
151
- } else {
152
- throw "Value should be trueValue or falseValue.";
153
- }
154
- },
155
- },
156
- };
157
- </script>
158
-
159
- <style lang="less">
160
- @import "./style.less";
161
- </style>
@@ -1,289 +0,0 @@
1
- @checkbox-prefix-cls: vd-checkbox;
2
- @checkbox-button-prefix-cls: vd-checkbox-button;
3
- @checkbox-icon-prefix-cls: ~"@{checkbox-prefix-cls}__icon";
4
-
5
- .@{checkbox-prefix-cls} {
6
- cursor: pointer;
7
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
8
- display: flex;
9
- -webkit-tap-highlight-color: transparent;
10
- }
11
-
12
- // 普通状态
13
- .@{checkbox-prefix-cls} {
14
-
15
- &__input {
16
- position: relative;
17
- margin-inline-end: var(--spacing-check_radio-icon-margin_right);
18
- width: var(--icon-check_radio-sizing);
19
- height: var(--icon-check_radio-sizing);
20
- }
21
-
22
- &__text {
23
- color: var(--color-check_radio-text-default);
24
- font-size: var(--en-single-f-d-r-fontSize);
25
- font-weight: var(--en-single-f-d-r-fontWeight);
26
- }
27
-
28
- &__description {
29
- line-height: 1;
30
- margin-top: var(--spacing-check_radio-text-margin_top);
31
- color: var(--color-check_radio-text_describe-default);
32
- font-size: var(--en-single-f-b-r-fontSize);
33
- font-weight: var(--en-single-f-b-r-fontWeight);
34
- }
35
-
36
- .@{checkbox-icon-prefix-cls} {
37
- display: block;
38
- width: var(--icon-check_radio-sizing);
39
- height: var(--icon-check_radio-sizing);
40
- position: relative;
41
- top: 0;
42
- left: 0;
43
-
44
- &::before {
45
- position: absolute;
46
- box-sizing: border-box;
47
- content: ' ';
48
- pointer-events: none;
49
- top: -50%;
50
- right: -50%;
51
- bottom: -50%;
52
- left: -50%;
53
- border: 3px solid var(--color-check_radio-default);
54
- -webkit-transform: scale(0.5);
55
- transform: scale(0.5);
56
- }
57
- }
58
-
59
- &__original {
60
- width: 100%;
61
- height: 100%;
62
- position: absolute;
63
- top: 0;
64
- bottom: 0;
65
- left: 0;
66
- right: 0;
67
- z-index: 1;
68
- cursor: pointer;
69
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
70
- opacity: 0;
71
- }
72
- }
73
-
74
-
75
- // 选中状态
76
- .@{checkbox-prefix-cls}--checked {
77
-
78
- .@{checkbox-prefix-cls} {
79
- &__text {
80
- font-size: var(--en-single-f-d-s-fontSize);
81
- font-weight: var(--en-single-f-d-s-fontWeight);
82
- }
83
- }
84
-
85
- .@{checkbox-icon-prefix-cls} {
86
- background: var(--color-check_radio-active);
87
- border-radius: 2px;
88
- border: 0;
89
- &::after{
90
- content: "";
91
- box-sizing: content-box;
92
- display: table;
93
- width: 4px;
94
- height: 8px;
95
- position: absolute;
96
- top: 2px;
97
- left: 5px;
98
- border: 2px solid var(--bg-color-1);
99
- border-top: 0;
100
- border-left: 0;
101
- transform: rotate(45deg) scale(1);
102
- }
103
- &::before{
104
- display: none;
105
- }
106
- }
107
- }
108
-
109
-
110
- // 禁用
111
- .@{checkbox-prefix-cls}--disabled {
112
- cursor: not-allowed;
113
- // opacity: var(--opacity-30);
114
-
115
- .@{checkbox-icon-prefix-cls} {
116
- &::before{
117
- border-color: var(--color-check_radio-disable);
118
- }
119
- }
120
-
121
- .@{checkbox-prefix-cls}__text{
122
- color: var(--color-check_radio-text-disable);
123
- }
124
-
125
- .@{checkbox-prefix-cls}__description{
126
- color: var(--color-check_radio-text_describe-disable);
127
- }
128
-
129
- }
130
-
131
- .@{checkbox-prefix-cls}--checked.@{checkbox-prefix-cls}--disabled{
132
- .@{checkbox-icon-prefix-cls} {
133
- background: var(--color-check_radio-active-disable);
134
- }
135
- }
136
-
137
- // 半选状态
138
- .@{checkbox-prefix-cls}--indeterminate {
139
-
140
- & + .@{checkbox-prefix-cls}__label {
141
- .@{checkbox-prefix-cls}__text {
142
- font-size: var(--en-single-f-d-s-fontSize);
143
- font-weight: var(--en-single-f-d-s-fontWeight);
144
- }
145
- }
146
-
147
- .@{checkbox-icon-prefix-cls} {
148
- background: #1BC47D;
149
- border-radius: 2px;
150
- border: 0;
151
- &::after{
152
- content: "";
153
- width: 9px;
154
- height: 2px;
155
- position: absolute;
156
- left: 50%;
157
- top: 50%;
158
- transform: translate(-50%, -50%);
159
- border: 0;
160
- background-color: var(--bg-color-1);
161
- }
162
-
163
- &::before{
164
- display: none;
165
- }
166
- }
167
-
168
- }
169
-
170
-
171
-
172
-
173
-
174
- .@{checkbox-button-prefix-cls}{
175
- position: relative;
176
- display: inline-flex;
177
- align-items: center;
178
- flex-direction: column;
179
- justify-content: center;
180
- line-height: 1;
181
- width: 100%;
182
- -webkit-tap-highlight-color: transparent;
183
- background-color: var(--color-check_radio-check_bg-default);
184
-
185
- &--large {
186
- height: var(--height-check_radio-check_button_l);
187
- border-radius: var(--radius-check_radio-check_l);
188
-
189
- .@{checkbox-button-prefix-cls}__text {
190
- margin-block-start: var(--spacing-check_radio-check_icon-margin_bottom);
191
- font-size: 12px;
192
- color: var(--color-check_radio-radio_button_text-default);
193
- }
194
-
195
- }
196
-
197
- &--medium {
198
- height: var(--height-check_radio-check_button_m);
199
- border-radius: var(--radius-check_radio-m);
200
-
201
- .@{checkbox-button-prefix-cls}{
202
- &__description {
203
- margin-block-start: var(--spacing-check_radio-check_describe-margin_top);
204
- font-size: 11px;
205
- color: var(--color-check_radio-check_button_text_describe-default);
206
- }
207
- }
208
- }
209
-
210
- &--small {
211
- display: flex;
212
- flex-direction: row;
213
- height: var(--height-check_radio-check_button_s);
214
- border-radius: var(--radius-check_radio-s);
215
- }
216
-
217
-
218
- &__icon--large {
219
- color: var(--color-check_radio-check_button_icon-default);
220
- font-size: var(--icon-check_radio-check_l);
221
- }
222
-
223
- &__icon--small {
224
- font-size: var(--icon-check_radio-check_s);
225
- color: var(--text-color-h2);
226
- margin-inline-end: var(--spacing-check_radio-check_icon-margin_right);
227
- }
228
-
229
- &__text {
230
- color: var(--color-check_radio-radio_button_text-default);
231
- font-size: var(--en-single-f-c-r-fontSize);
232
- font-weight: var(--en-single-f-c-r-fontWeight);
233
- }
234
-
235
- &--checked {
236
- background-color: var(--color-check_radio-check_bg-active);
237
- border-color: var(--color-check_radio-radio_border-active);
238
-
239
- .@{checkbox-button-prefix-cls}__text {
240
- color: var(--color-check_radio-radio_button_text-active);
241
- font-size: var(--en-single-f-c-s-fontSize);
242
- font-weight: var(--en-single-f-c-s-fontWeight);
243
- }
244
-
245
- .@{checkbox-button-prefix-cls}__icon--large,
246
- .@{checkbox-button-prefix-cls}__icon--small,
247
- .@{checkbox-button-prefix-cls}__description {
248
- color: var(--color-check_radio-check_button_icon-active);
249
- }
250
-
251
- &.@{checkbox-button-prefix-cls}{
252
- &--large{
253
- .@{checkbox-button-prefix-cls}__text {
254
- font-size: 12px;
255
- }
256
- }
257
-
258
- }
259
- }
260
-
261
- &--disabled{
262
- cursor: not-allowed;
263
- .@{checkbox-button-prefix-cls}__text {
264
- color: var(--color-check_radio-radio_button_text-disable);
265
- }
266
- .@{checkbox-button-prefix-cls}__icon--large,
267
- .@{checkbox-button-prefix-cls}__icon--small,
268
- .@{checkbox-button-prefix-cls}__description{
269
- color: var(--color-check_radio-check_button_icon-disable);
270
- }
271
- }
272
- }
273
-
274
- .@{checkbox-prefix-cls}-group {
275
- display: flex;
276
- flex-direction: column;
277
- gap: var(--spacing-check_radio-group-margin_x);
278
-
279
- &__card{
280
- display: flex;
281
- flex-wrap: wrap;
282
- flex-direction: row;
283
- gap: 12px;
284
- }
285
-
286
- .@{checkbox-button-prefix-cls}{
287
- flex: 1;
288
- }
289
- }
@@ -1,7 +0,0 @@
1
- import CheckboxGroup from './index.vue';
2
-
3
- CheckboxGroup.install = function (Vue) {
4
- Vue.component(CheckboxGroup.name, CheckboxGroup);
5
- };
6
-
7
- export default CheckboxGroup;
@@ -1,69 +0,0 @@
1
- <template>
2
- <div :class="classes">
3
- <slot></slot>
4
- </div>
5
- </template>
6
- <script>
7
- import { findComponentsDownward } from "../utils/assist";
8
-
9
- const prefixCls = 'vd-checkbox-group';
10
-
11
- export default {
12
- name: 'vd-checkbox-group',
13
- props: {
14
- value: {
15
- type: Array,
16
- default() {
17
- return [];
18
- }
19
- },
20
- type: String, // 类型card
21
-
22
- },
23
- data() {
24
- return {
25
- currentValue: this.value,
26
- childrens: []
27
- };
28
- },
29
- computed: {
30
- classes() {
31
- return [
32
- `${prefixCls}`,
33
- {
34
- [`${prefixCls}__${this.type}`]: this.type,
35
- }
36
- ];
37
- }
38
- },
39
- mounted() {
40
- this.updateModel(true);
41
- },
42
- methods: {
43
- updateModel(update) {
44
- this.childrens = findComponentsDownward(this, 'vd-checkbox', 'vd-checkbox-group');
45
- if (this.childrens) {
46
- const { value } = this;
47
- this.childrens.forEach(child => {
48
- child.model = value;
49
-
50
- if (update) {
51
- child.currentValue = value.indexOf(child.name) >= 0;
52
- child.group = true;
53
- }
54
- });
55
- }
56
- },
57
- change(data) {
58
- this.currentValue = data;
59
- this.$emit('input', data);
60
- this.$emit('change', data);
61
- }
62
- },
63
- watch: {
64
- value() {
65
- this.updateModel(true);
66
- }
67
- }
68
- };
69
- </script>
@@ -1,33 +0,0 @@
1
- <template>
2
- <div class="vd-market-state" :class="stateClasses" v-if="state">
3
- <slot></slot>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- const prefixCls = 'vd-market-state';
9
-
10
- export default {
11
- name: 'vd-market-state',
12
- props: {
13
- state: {
14
- type: String,
15
- default: 'open'
16
- }
17
- },
18
- computed: {
19
- stateClasses() {
20
- return [
21
- {
22
- [`${prefixCls}--${this.state}`]: this.state,
23
-
24
- }
25
- ]
26
- },
27
- }
28
- }
29
- </script>
30
-
31
- <style lang="less">
32
- @import 'style.less';
33
- </style>