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,159 @@
1
+ <template>
2
+ <label :class="wrapClasses" v-if="!radioButton">
3
+ <span :class="radioClasses">
4
+ <span :class="innerClasses"></span>
5
+ <input type="radio" :class="inputClasses" :disabled="disabled" :checked="currentValue" @change="change">
6
+ </span>
7
+ <div class="vd-radio__label" v-if="$slots.default">
8
+ <p class="vd-radio__text">
9
+ <slot></slot>
10
+ </p>
11
+ <p class="vd-radio__description" v-if="extra">{{ extra }}</p>
12
+ </div>
13
+ </label>
14
+
15
+
16
+ <!-- 传入文字小icon 不传文字大icon -->
17
+ <label class="vd-radio vd-radio-button" :class="radioButtonClasses" v-else>
18
+ <input type="radio" :class="inputClasses" :disabled="disabled" :checked="currentValue" @change="change">
19
+ <span class="vd-radio-button-text">
20
+ <slot></slot>
21
+ </span>
22
+ </label>
23
+ </template>
24
+ <script>
25
+ import { findComponentUpward } from './assist';
26
+ const prefixCls = 'vd-radio';
27
+
28
+ export default {
29
+ name: 'vd-radio',
30
+ props: {
31
+ radioButton: {
32
+ type: Boolean,
33
+ default: false
34
+ },
35
+ disabled: {
36
+ type: Boolean,
37
+ default: false
38
+ },
39
+ extra: {
40
+ type: [String, Number, Boolean],
41
+ },
42
+ value: {
43
+ type: [String, Number, Boolean],
44
+ default: false
45
+ },
46
+ trueValue: {
47
+ type: [String, Number, Boolean],
48
+ default: true
49
+ },
50
+ falseValue: {
51
+ type: [String, Number, Boolean],
52
+ default: false
53
+ },
54
+ name: {
55
+ type: [String, Number, Boolean]
56
+ },
57
+ type: {
58
+ type: String,
59
+ default: ''
60
+ },
61
+ },
62
+ data() {
63
+ return {
64
+ currentValue: this.value,
65
+ group: false,
66
+ parent: findComponentUpward(this, 'vd-radio-group'),
67
+ // parent: this.$parent,
68
+ focusWrapper: false,
69
+ focusInner: false
70
+ };
71
+ },
72
+ computed: {
73
+ wrapClasses() {
74
+ return [
75
+ `${prefixCls}`,
76
+ {
77
+ [`${prefixCls}--checked`]: this.currentValue,
78
+ [`${prefixCls}--disabled`]: this.disabled,
79
+ }
80
+ ];
81
+ },
82
+ radioClasses() {
83
+ return [
84
+ `${prefixCls}__input`,
85
+ ];
86
+ },
87
+ innerClasses() {
88
+ return [
89
+ `${prefixCls}__icon`,
90
+ ];
91
+ },
92
+ inputClasses() {
93
+ return `${prefixCls}__original`;
94
+ },
95
+ radioButtonClasses() {
96
+ return [
97
+ {
98
+ [`${prefixCls}-button--checked`]: this.currentValue,
99
+ [`${prefixCls}-button--${this.type}`]: this.type,
100
+ [`${prefixCls}-button--disabled`]: this.disabled,
101
+ }
102
+ ]
103
+
104
+ }
105
+ },
106
+ mounted() {
107
+ if (this.parent) {
108
+ this.group = true;
109
+ }
110
+
111
+ if (this.group) {
112
+ this.parent.updateValue();
113
+ } else {
114
+ this.updateValue();
115
+ }
116
+ },
117
+ methods: {
118
+ change(event) {
119
+ if (this.disabled) {
120
+ return false;
121
+ }
122
+
123
+ const checked = event.target.checked;
124
+ this.currentValue = checked;
125
+
126
+ const value = checked ? this.trueValue : this.falseValue;
127
+ this.$emit('input', value);
128
+
129
+ if (this.group) {
130
+ if (this.name !== undefined) {
131
+ this.parent.change({
132
+ value: this.name,
133
+ checked: this.value
134
+ });
135
+ }
136
+ } else {
137
+ this.$emit('change', value);
138
+ }
139
+ },
140
+ updateValue() {
141
+ this.currentValue = this.value === this.trueValue;
142
+ },
143
+
144
+ },
145
+ watch: {
146
+ value(val) {
147
+ if (val === this.trueValue || val === this.falseValue) {
148
+ this.updateValue();
149
+ } else {
150
+ throw 'Value should be trueValue or falseValue.';
151
+ }
152
+ }
153
+ }
154
+ };
155
+ </script>
156
+
157
+ <style lang="less">
158
+ @import './style.less';
159
+ </style>
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <div :class="classes">
3
+ <slot></slot>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ import { findComponentsDownward } from '../assist';
8
+
9
+ const prefixCls = 'vd-radio-group';
10
+
11
+ export default {
12
+ name: 'vd-radio-group',
13
+ props: {
14
+ value: {
15
+ type: [String, Number],
16
+ default: ''
17
+ },
18
+ type: {
19
+ type: String,
20
+ default: ''
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.updateValue();
41
+ },
42
+ methods: {
43
+ updateValue() {
44
+ this.childrens = findComponentsDownward(this, 'vd-radio');
45
+ if (this.childrens) {
46
+ this.childrens.forEach(child => {
47
+ child.currentValue = this.currentValue === child.name;
48
+ child.group = true;
49
+ });
50
+ }
51
+ },
52
+ change(data) {
53
+ this.currentValue = data.value;
54
+ this.updateValue();
55
+ this.$emit('input', data.value);
56
+ this.$emit('change', data.value);
57
+ }
58
+ },
59
+ watch: {
60
+ value() {
61
+ if (this.currentValue !== this.value) {
62
+ this.currentValue = this.value;
63
+ this.$nextTick(() => {
64
+ this.updateValue();
65
+ });
66
+ }
67
+ }
68
+ }
69
+ };
70
+ </script>
@@ -0,0 +1,297 @@
1
+ @radio-prefix-cls: vd-radio;
2
+ @radio-button-prefix-cls: vd-radio-button;
3
+ @radio-inner-prefix-cls: ~"@{radio-prefix-cls}__icon";
4
+
5
+ .@{radio-prefix-cls} {
6
+ position: relative;
7
+ cursor: pointer;
8
+ display: flex;
9
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
10
+
11
+ }
12
+
13
+ // 普通状态
14
+ .@{radio-prefix-cls} {
15
+
16
+ &__input{
17
+ position: relative;
18
+ margin-inline-end: calc(var(--spacing-check_radio-icon-margin_right) * 1px);
19
+ width: calc(var(--icon-check_radio-sizing) * 1px);
20
+ height: calc(var(--icon-check_radio-sizing) * 1px);
21
+ }
22
+ &__text {
23
+ color: var(--color-check_radio-text-default);
24
+ font-size: calc(var(--en-single-f-d-r-fontSize) * 1px);
25
+ font-weight: var(--en-single-f-d-r-fontWeight);
26
+ }
27
+
28
+ &__description {
29
+ line-height: 1;
30
+ margin-top: calc(var(--spacing-check_radio-text-margin_top) * 1px);
31
+ color: var(--color-check_radio-text_describe-default);
32
+ font-size: calc(var(--en-single-f-b-r-fontSize) * 1px);
33
+ font-weight: var(--en-single-f-b-r-fontWeight);
34
+ }
35
+
36
+ .@{radio-inner-prefix-cls} {
37
+ display: block;
38
+ width: calc(var(--icon-check_radio-sizing) * 1px);
39
+ height: calc(var(--icon-check_radio-sizing) * 1px);
40
+ position: relative;
41
+
42
+ &::before{
43
+ position: absolute;
44
+ box-sizing: border-box;
45
+ content: ' ';
46
+ pointer-events: none;
47
+ top: -50%;
48
+ right: -50%;
49
+ bottom: -50%;
50
+ left: -50%;
51
+ border: 0 solid var(--color-check_radio-default);
52
+ -webkit-transform: scale(0.5);
53
+ transform: scale(0.5);
54
+ border-width: 3px;
55
+ border-radius: 50%;
56
+ }
57
+
58
+ }
59
+
60
+ &__original {
61
+ width: 100%;
62
+ height: 100%;
63
+ position: absolute;
64
+ top: 0;
65
+ bottom: 0;
66
+ left: 0;
67
+ right: 0;
68
+ z-index: 1;
69
+ cursor: pointer;
70
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
71
+ opacity: 0;
72
+
73
+ }
74
+ }
75
+
76
+ // 选中状态
77
+ .@{radio-prefix-cls}--checked {
78
+ .@{radio-prefix-cls} {
79
+ &__text {
80
+ font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
81
+ font-weight: var(--en-single-f-d-s-fontWeight);
82
+ }
83
+ }
84
+
85
+ .@{radio-inner-prefix-cls} {
86
+
87
+ &::before{
88
+ border: 0 solid var(--color-check_radio-active);
89
+ border-width: 3px;
90
+ }
91
+
92
+ &::after{
93
+ position: absolute;
94
+ width: 8px;
95
+ height: 8px;
96
+ left: 50%;
97
+ top: 50%;
98
+ transform: translate(-50%, -50%);
99
+ border-radius: 50%;
100
+ display: table;
101
+ border-top: 0;
102
+ border-left: 0;
103
+ content: " ";
104
+ background-color: var(--color-check_radio-active);
105
+ // transition: all .2s ease-in-out;
106
+ }
107
+ }
108
+ }
109
+
110
+ // 禁用状态
111
+ .@{radio-prefix-cls}--disabled {
112
+ cursor: not-allowed;
113
+ // opacity: var(--opacity-30);
114
+
115
+ .@{radio-prefix-cls}__text{
116
+ color: var(--color-check_radio-text-disable);
117
+ }
118
+
119
+ .@{radio-prefix-cls}__description{
120
+ color: var(--color-check_radio-text_describe-disable);
121
+ }
122
+
123
+ .@{radio-prefix-cls}__icon {
124
+
125
+ &::before{
126
+ border-color:var(--color-check_radio-disable);
127
+ }
128
+
129
+ }
130
+ }
131
+
132
+ .@{radio-prefix-cls}--checked.@{radio-prefix-cls}--disabled{
133
+ .@{radio-prefix-cls}__icon {
134
+
135
+ &::before{
136
+ border-color:var(--color-check_radio-active-disable);
137
+ }
138
+
139
+ &::after{
140
+ background-color: var(--color-check_radio-active-disable);
141
+ }
142
+
143
+ }
144
+ }
145
+
146
+ .@{radio-prefix-cls}-group {
147
+
148
+ display: flex;
149
+ flex-direction: column;
150
+ gap: calc(var(--spacing-check_radio-group-margin_x)*1px);
151
+ // .vd-radio-wrapper {
152
+ // margin-block-end: calc(var(--spacing-check_radio-group-margin_x)*1px);
153
+ // }
154
+
155
+
156
+ &-card{
157
+ display: flex;
158
+ flex-wrap: wrap;
159
+ flex-direction: row;
160
+ gap: 12px;
161
+
162
+ .vd-radio-button-cell{
163
+ flex: 1;
164
+ }
165
+ }
166
+ }
167
+
168
+
169
+
170
+ .@{radio-button-prefix-cls}{
171
+ position: relative;
172
+ display: inline-flex;
173
+ align-items: center;
174
+ flex-direction: column;
175
+ justify-content: center;
176
+ line-height: 1;
177
+ width: 100%;
178
+
179
+ &::after{
180
+ position: absolute;
181
+ box-sizing: border-box;
182
+ content: ' ';
183
+ pointer-events: none;
184
+ top: -50%;
185
+ right: -50%;
186
+ bottom: -50%;
187
+ left: -50%;
188
+ border: 0 solid var(--color-check_radio-radio_border-default);
189
+ -webkit-transform: scale(0.5);
190
+ transform: scale(0.5);
191
+ border-width: 1px;
192
+ }
193
+
194
+
195
+ &--large {
196
+ height: calc(var(--height-check_radio-radio_button_l) * 1px);
197
+
198
+ .@{radio-button-prefix-cls}-text{
199
+ color: var(--color-check_radio-radio_button_text-default);
200
+ font-size: calc(var(--en-single-f-d-r-fontSize) * 1px);
201
+ font-weight:var(--en-single-f-d-r-fontWeight);
202
+ }
203
+
204
+ &::after{
205
+ border-radius: calc(var(--radius-check_radio-radio_l) * 2px);
206
+ }
207
+ }
208
+
209
+ &--medium {
210
+ height: calc(var(--height-check_radio-radio_button_m) * 1px);
211
+ .@{radio-button-prefix-cls}-text{
212
+ color: var(--color-check_radio-radio_button_text-default);
213
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
214
+ font-weight:var(--en-single-f-c-r-fontWeight);
215
+ }
216
+ &::after{
217
+ border-radius: calc(var(--radius-check_radio-m) * 2px);
218
+ }
219
+ }
220
+
221
+ &--small {
222
+ height: calc(var(--height-check_radio-radio_button_s) * 1px);
223
+
224
+ .@{radio-button-prefix-cls}-text{
225
+ color: var(--color-check_radio-radio_button_text-default);
226
+ font-size: calc(var(--en-single-f-c-r-fontSize) * 1px);
227
+ font-weight:var(--en-single-f-c-r-fontWeight);
228
+ }
229
+ &::after{
230
+ border-radius: calc(var(--radius-check_radio-s) * 2px);
231
+ }
232
+ }
233
+
234
+
235
+ &--checked {
236
+ background-color: var(--color-check_radio-radio_button_bg-active);
237
+
238
+ &::after{
239
+ border-color: var(--color-check_radio-radio_border-active);
240
+ border-width: 2px;
241
+ }
242
+
243
+ .@{radio-button-prefix-cls}-text {
244
+ color: var(--color-check_radio-radio_button_text-active);
245
+ }
246
+
247
+ &.@{radio-button-prefix-cls}--large {
248
+ .@{radio-button-prefix-cls}-text {
249
+ font-size: calc(var(--en-single-f-d-s-fontSize) * 1px);
250
+ font-weight:var(--en-single-f-d-s-fontWeight);
251
+ }
252
+ }
253
+
254
+ &.@{radio-button-prefix-cls}--medium {
255
+ .@{radio-button-prefix-cls}-text {
256
+ font-size: calc(var(--en-single-f-c-s-fontSize) * 1px);
257
+ font-weight:var(--en-single-f-c-s-fontWeight);
258
+ }
259
+ }
260
+
261
+ &.@{radio-button-prefix-cls}--small {
262
+ .@{radio-button-prefix-cls}-text {
263
+ font-size: calc(var(--en-single-f-c-s-fontSize) * 1px);
264
+ font-weight:var(--en-single-f-c-s-fontWeight);
265
+ }
266
+ }
267
+
268
+ }
269
+
270
+
271
+ &--disabled{
272
+ cursor: not-allowed;
273
+
274
+ .@{radio-button-prefix-cls}-text{
275
+ color: var(--color-check_radio-radio_button_text-disable);
276
+ }
277
+ }
278
+
279
+ }
280
+
281
+ .@{radio-prefix-cls}-group {
282
+ display: flex;
283
+ flex-direction: column;
284
+ gap: calc(var(--spacing-check_radio-group-margin_x)*1px);
285
+
286
+ &__card{
287
+ display: flex;
288
+ flex-direction: row;
289
+ flex-wrap: wrap;
290
+ gap: 12px;
291
+
292
+ }
293
+
294
+ .@{radio-button-prefix-cls}{
295
+ flex: 1;
296
+ }
297
+ }
Binary file
@@ -0,0 +1,8 @@
1
+ import Result from './index.vue';
2
+ import './style.less';
3
+
4
+ Result.install = function (Vue) {
5
+ Vue.component(Result.name, Result);
6
+ };
7
+
8
+ export default Result;
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <div class="vd-result">
3
+ <div class="vd-result-img" v-if="currentImg"><img :src="currentImg" alt="img"></div>
4
+ <div class="vd-result-title" v-if="title">{{ title }}</div>
5
+ <p class="vd-result-txt" v-if="text">{{ text }}</p>
6
+ <div class="vd-result-footer">
7
+ <slot name="btnp"></slot>
8
+
9
+ <div class="vd-result-footer-btnx" v-if="$slots.btnt">
10
+ <slot name="btnt"></slot>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+
18
+ import { themeMixin } from '@p/components/mixins/themeMixin';
19
+
20
+
21
+ export default {
22
+ name: 'vd-result',
23
+ mixins: [themeMixin], // 引入混入
24
+ props: {
25
+ imgs: String,
26
+ text: String,
27
+ title: String,
28
+ state: {
29
+ type: String,
30
+ default: '' // 默认类型
31
+ },
32
+ },
33
+ data() {
34
+ return {
35
+ defaultImgs: {
36
+ completed: {
37
+ light: require('./completed.png'),
38
+ dark: require('./completed-dark.png')
39
+ },
40
+ waiting: {
41
+ light: require('./wait.png'),
42
+ dark: require('./wait-dark.png')
43
+ },
44
+ error: {
45
+ light: require('./error.png'),
46
+ dark: require('./error-dark.png')
47
+ }
48
+ }
49
+ }
50
+ },
51
+ computed:{
52
+ currentImg() {
53
+ if (this.imgs) return this.imgs;
54
+ return this.defaultImgs[this.state][this.theme];
55
+ },
56
+ },
57
+ methods: {
58
+ preloadImages() {
59
+ Object.values(this.defaultImgs).forEach((modes) => {
60
+ Object.values(modes).forEach((src) => {
61
+ const img = new Image();
62
+ img.src = src;
63
+ });
64
+ });
65
+ }
66
+ },
67
+ mounted() {
68
+ this.preloadImages();
69
+ },
70
+ }
71
+ </script>
72
+
73
+ <style lang="less">
74
+ @import './style.less';
75
+ </style>
@@ -0,0 +1,42 @@
1
+ .vd-result{
2
+ height: 100%;
3
+ margin: 0 auto;
4
+ text-align: center;
5
+ padding: 0 20px 40px;
6
+ display: flex;
7
+ flex-direction: column;
8
+ justify-content: center;
9
+
10
+ &-img{
11
+ margin: 0 auto;
12
+ width: 160px;
13
+ img{
14
+ max-width: 100%;
15
+ }
16
+ }
17
+
18
+ &-title{
19
+ margin-block-start: calc(var(--spacing-result-title-margin_top) * 1px);
20
+ font-size: calc(var(--en-single-f-f-b-fontSize) * 1px);
21
+ font-weight: var(--en-single-f-f-b-fontWeight);
22
+ color:var(--color-result-title)
23
+ }
24
+ &-txt{
25
+ margin-block-start: calc(var(--spacing-result-text-margin_top) * 1px);
26
+ font-size: calc(var(--en-multi-f-d-r-fontSize) * 1px);
27
+ font-weight: var(--en-multi-f-d-r-fontWeight);
28
+ color:var(--color-result-text);
29
+ line-height: calc(var(--en-multi-f-d-r-lineHeight) * 1px);
30
+ }
31
+ &-footer{
32
+ margin-block-start: calc(var(--spacing-result-text-margin_bottom) * 1px);
33
+ padding-inline-start: calc(var(--spacing-result-button-margin_y) * 1px - 20px);
34
+ padding-inline-end: calc(var(--spacing-result-button-margin_y) * 1px - 20px);
35
+
36
+ &-btnx{
37
+ display: flex;
38
+ justify-content: center;
39
+ margin-block-start: calc(var(--spacing-result-text_button-margin_top) * 1px);
40
+ }
41
+ }
42
+ }
Binary file
@@ -0,0 +1,8 @@
1
+ import VSelector from "./index.vue";
2
+ import './style.less';
3
+
4
+ VSelector.install = function (Vue) {
5
+ Vue.component(VSelector.name, VSelector);
6
+ };
7
+
8
+ export default VSelector;