hy-app 0.3.3 → 0.3.5
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.
- package/components/hy-action-sheet/index.scss +1 -1
- package/components/hy-avatar/index.scss +1 -1
- package/components/hy-back-top/index.scss +1 -1
- package/components/hy-badge/index.scss +1 -1
- package/components/hy-button/index.scss +1 -1
- package/components/hy-calendar/index.scss +1 -1
- package/components/hy-card/index.scss +1 -1
- package/components/hy-cell/index.scss +1 -1
- package/components/hy-checkbox/index.scss +2 -2
- package/components/hy-code-input/hy-code-input.vue +314 -314
- package/components/hy-code-input/index.scss +1 -1
- package/components/hy-config-provider/index.scss +3 -2
- package/components/hy-count-down/index.scss +1 -1
- package/components/hy-count-to/index.scss +1 -1
- package/components/hy-divider/index.scss +1 -1
- package/components/hy-dropdown/index.scss +1 -1
- package/components/hy-dropdown-item/index.scss +1 -1
- package/components/hy-empty/index.scss +1 -1
- package/components/hy-float-button/index.scss +1 -1
- package/components/hy-folding-panel/index.scss +1 -1
- package/components/hy-form/hy-form.vue +3 -2
- package/components/hy-form-group/index.scss +1 -1
- package/components/hy-form-item/index.scss +41 -41
- package/components/hy-grid/index.scss +1 -1
- package/components/hy-icon/index.scss +1 -1
- package/components/hy-image/index.scss +1 -1
- package/components/hy-input/hy-input.vue +2 -2
- package/components/hy-input/index.scss +1 -1
- package/components/hy-line/index.scss +1 -1
- package/components/hy-line-progress/index.scss +1 -1
- package/components/hy-list/index.scss +1 -1
- package/components/hy-loading/index.scss +1 -1
- package/components/hy-menu/index.scss +1 -1
- package/components/hy-modal/index.scss +1 -1
- package/components/hy-navbar/index.scss +1 -1
- package/components/hy-notice-bar/index.scss +1 -1
- package/components/hy-notify/index.scss +1 -1
- package/components/hy-number-step/index.scss +1 -1
- package/components/hy-overlay/index.scss +1 -1
- package/components/hy-pagination/index.scss +1 -1
- package/components/hy-picker/index.scss +1 -1
- package/components/hy-popover/index.scss +1 -1
- package/components/hy-popup/index.scss +1 -1
- package/components/hy-price/index.scss +1 -1
- package/components/hy-qrcode/index.scss +1 -1
- package/components/hy-radio/index.scss +1 -1
- package/components/hy-read-more/index.scss +1 -1
- package/components/hy-scroll-list/index.scss +1 -1
- package/components/hy-search/index.scss +1 -1
- package/components/hy-signature/index.scss +1 -1
- package/components/hy-slider/index.scss +1 -1
- package/components/hy-steps/index.scss +1 -1
- package/components/hy-submit-bar/index.scss +1 -1
- package/components/hy-subsection/index.scss +1 -1
- package/components/hy-swipe-action/index.scss +1 -1
- package/components/hy-swiper/index.scss +1 -1
- package/components/hy-switch/index.scss +1 -1
- package/components/hy-tabBar/index.scss +1 -1
- package/components/hy-tabs/index.scss +1 -1
- package/components/hy-tag/hy-tag.vue +2 -2
- package/components/hy-tag/index.scss +13 -1
- package/components/hy-text/hy-text.vue +5 -2
- package/components/hy-text/index.scss +1 -1
- package/components/hy-textarea/index.scss +7 -1
- package/components/hy-toast/index.scss +1 -1
- package/components/hy-tooltip/index.scss +1 -1
- package/components/hy-upload/index.scss +1 -1
- package/components/hy-warn/index.scss +1 -1
- package/components/hy-watermark/index.scss +1 -1
- package/index.scss +3 -2
- package/libs/css/common.scss +1 -1
- package/libs/css/mixin.scss +12 -12
- package/{theme.scss → libs/css/theme.scss} +1 -0
- package/package.json +6 -3
- package/typing/modules/common.d.ts +2 -0
- package/web-types.json +1 -1
- /package/libs/css/{vars.css → vars.scss} +0 -0
|
@@ -20,6 +20,7 @@ import { provide, reactive, ref } from "vue";
|
|
|
20
20
|
import type { PropType } from "vue";
|
|
21
21
|
import type { FormItemRule } from "./typing";
|
|
22
22
|
import { clearVal, isArray } from "../../utils";
|
|
23
|
+
import type { AppType } from "vite";
|
|
23
24
|
|
|
24
25
|
/**
|
|
25
26
|
* 表单组件父组件,需要搭配hy-form-item
|
|
@@ -47,7 +48,7 @@ const props = defineProps({
|
|
|
47
48
|
* @values left,top
|
|
48
49
|
* */
|
|
49
50
|
labelPosition: {
|
|
50
|
-
type: String
|
|
51
|
+
type: String as PropType<HyApp.LabelPosition>,
|
|
51
52
|
default: "left",
|
|
52
53
|
},
|
|
53
54
|
/**
|
|
@@ -55,7 +56,7 @@ const props = defineProps({
|
|
|
55
56
|
* @values left,center,right
|
|
56
57
|
* */
|
|
57
58
|
labelAlign: {
|
|
58
|
-
type: String
|
|
59
|
+
type: String as PropType<HyApp.ColumnCenterType>,
|
|
59
60
|
default: "left",
|
|
60
61
|
},
|
|
61
62
|
});
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
@use "../../theme
|
|
2
|
-
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
-
|
|
4
|
-
@include b(form-item) {
|
|
5
|
-
display: flex;
|
|
6
|
-
margin-bottom: 16px;
|
|
7
|
-
|
|
8
|
-
@include m(left) {
|
|
9
|
-
flex-direction: row;
|
|
10
|
-
align-items: flex-start;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@include m(top) {
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@include e(label) {
|
|
18
|
-
position: relative;
|
|
19
|
-
padding-right: 8px;
|
|
20
|
-
font-size: 14px;
|
|
21
|
-
color: $hy-text-color;
|
|
22
|
-
line-height: 2.5;
|
|
23
|
-
|
|
24
|
-
@include m(required) {
|
|
25
|
-
color: #ff4d4f;
|
|
26
|
-
margin-right: 2px;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@include e(content) {
|
|
31
|
-
flex: 1;
|
|
32
|
-
min-width: 0;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@include e(error) {
|
|
36
|
-
margin-top: 4px;
|
|
37
|
-
font-size: 12px;
|
|
38
|
-
color: #ff4d4f;
|
|
39
|
-
line-height: 1.5;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
1
|
+
@use "../../libs/css/theme" as *;
|
|
2
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
+
|
|
4
|
+
@include b(form-item) {
|
|
5
|
+
display: flex;
|
|
6
|
+
margin-bottom: 16px;
|
|
7
|
+
|
|
8
|
+
@include m(left) {
|
|
9
|
+
flex-direction: row;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@include m(top) {
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@include e(label) {
|
|
18
|
+
position: relative;
|
|
19
|
+
padding-right: 8px;
|
|
20
|
+
font-size: 14px;
|
|
21
|
+
color: $hy-text-color;
|
|
22
|
+
line-height: 2.5;
|
|
23
|
+
|
|
24
|
+
@include m(required) {
|
|
25
|
+
color: #ff4d4f;
|
|
26
|
+
margin-right: 2px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include e(content) {
|
|
31
|
+
flex: 1;
|
|
32
|
+
min-width: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@include e(error) {
|
|
36
|
+
margin-top: 4px;
|
|
37
|
+
font-size: 12px;
|
|
38
|
+
color: #ff4d4f;
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -291,7 +291,7 @@ const props = defineProps({
|
|
|
291
291
|
* @values surround,bottom,none
|
|
292
292
|
* */
|
|
293
293
|
border: {
|
|
294
|
-
type: String
|
|
294
|
+
type: String as PropType<HyApp.BorderType>,
|
|
295
295
|
default: "surround",
|
|
296
296
|
},
|
|
297
297
|
/** 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会 */
|
|
@@ -304,7 +304,7 @@ const props = defineProps({
|
|
|
304
304
|
* @values circle,square
|
|
305
305
|
* */
|
|
306
306
|
shape: {
|
|
307
|
-
type: String
|
|
307
|
+
type: String as PropType<HyApp.ShapeType>,
|
|
308
308
|
default: "square",
|
|
309
309
|
},
|
|
310
310
|
/** 是否忽略组件内对文本合成系统事件的处理 */
|
|
@@ -55,7 +55,7 @@ export default {
|
|
|
55
55
|
</script>
|
|
56
56
|
|
|
57
57
|
<script setup lang="ts">
|
|
58
|
-
import { computed
|
|
58
|
+
import { computed } from "vue";
|
|
59
59
|
import type { CSSProperties, PropType } from "vue";
|
|
60
60
|
import type { ITagEmits } from "./typing";
|
|
61
61
|
import { IconConfig } from "../../config";
|
|
@@ -93,7 +93,7 @@ const props = defineProps({
|
|
|
93
93
|
},
|
|
94
94
|
/**
|
|
95
95
|
* 标签的大小
|
|
96
|
-
* @values large,medium,small
|
|
96
|
+
* @values large,medium,small,mini
|
|
97
97
|
* */
|
|
98
98
|
size: {
|
|
99
99
|
type: String,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../../theme
|
|
1
|
+
@use "../../libs/css/theme" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
4
|
|
|
@@ -26,6 +26,12 @@ $hy-background--disabled);
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
@include e(text) {
|
|
29
|
+
|
|
30
|
+
@include m(mini) {
|
|
31
|
+
font-size: 20rpx;
|
|
32
|
+
line-height: 20rpx;
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
@include m(small) {
|
|
30
36
|
font-size: $hy-font-size-sm;
|
|
31
37
|
line-height: $hy-font-size-sm;
|
|
@@ -42,6 +48,12 @@ $hy-background--disabled);
|
|
|
42
48
|
}
|
|
43
49
|
}
|
|
44
50
|
|
|
51
|
+
@include m(mini) {
|
|
52
|
+
height: 17px;
|
|
53
|
+
line-height: 17px;
|
|
54
|
+
padding: 0 $hy-border-margin-padding-sm;
|
|
55
|
+
}
|
|
56
|
+
|
|
45
57
|
@include m(small) {
|
|
46
58
|
height: 22px;
|
|
47
59
|
line-height: 22px;
|
|
@@ -98,8 +98,11 @@ const props = defineProps({
|
|
|
98
98
|
default: "",
|
|
99
99
|
required: true,
|
|
100
100
|
},
|
|
101
|
-
/**
|
|
102
|
-
|
|
101
|
+
/**
|
|
102
|
+
* 主题颜色
|
|
103
|
+
* @values primary,success,error,warning,info
|
|
104
|
+
* */
|
|
105
|
+
type: String as PropType<HyApp.ThemeType>,
|
|
103
106
|
/** 是否显示 */
|
|
104
107
|
show: {
|
|
105
108
|
type: Boolean,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use "../../theme
|
|
1
|
+
@use "../../libs/css/theme" as *;
|
|
2
2
|
@use "../../libs/css/mixin.scss" as *;
|
|
3
3
|
|
|
4
4
|
@include b(textarea) {
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
flex: 1;
|
|
31
31
|
font-size: 15px;
|
|
32
32
|
width: 100%;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
border: none;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
@include m(count) {
|
|
@@ -42,3 +44,7 @@
|
|
|
42
44
|
border-radius: $hy-border-radius-sm;
|
|
43
45
|
}
|
|
44
46
|
}
|
|
47
|
+
textarea {
|
|
48
|
+
background-color: transparent;
|
|
49
|
+
border: none;
|
|
50
|
+
}
|
package/index.scss
CHANGED
package/libs/css/common.scss
CHANGED
package/libs/css/mixin.scss
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@use "
|
|
2
|
-
@
|
|
3
|
-
@
|
|
1
|
+
@use "theme";
|
|
2
|
+
@use "config";
|
|
3
|
+
@use "function";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
@mixin b($block) {
|
|
7
|
-
$B:
|
|
7
|
+
$B: config.$namespace + '-' + $block !global;
|
|
8
8
|
|
|
9
9
|
.#{$B} {
|
|
10
10
|
@content;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
@each $unit in $modifier {
|
|
19
19
|
$currentSelector: #{$currentSelector +
|
|
20
20
|
$selector +
|
|
21
|
-
|
|
21
|
+
config.$modifier-separator +
|
|
22
22
|
$unit +
|
|
23
23
|
','};
|
|
24
24
|
}
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
$selector: &;
|
|
36
36
|
$selectors: "";
|
|
37
37
|
|
|
38
|
-
@if containsPseudo($selector) {
|
|
38
|
+
@if function.containsPseudo($selector) {
|
|
39
39
|
@each $item in $element {
|
|
40
|
-
$selectors: #{$selectors + "." + $B +
|
|
40
|
+
$selectors: #{$selectors + "." + $B + config.$element-separator + $item + ","};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
@at-root {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
@else {
|
|
53
53
|
@each $item in $element {
|
|
54
|
-
$selectors: #{$selectors + $selector +
|
|
54
|
+
$selectors: #{$selectors + $selector + config.$element-separator + $item + ","};
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
@at-root {
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
$selector: &;
|
|
69
69
|
$selectors: "";
|
|
70
70
|
|
|
71
|
-
@if containsPseudo($selector) {
|
|
71
|
+
@if function.containsPseudo($selector) {
|
|
72
72
|
@each $item in $element {
|
|
73
|
-
$selectors: #{$selectors + "." + $B +
|
|
73
|
+
$selectors: #{$selectors + "." + $B + config.$element-separator + $item + ","};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
@at-root {
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
|
|
87
87
|
@else {
|
|
88
88
|
@each $item in $element {
|
|
89
|
-
$selectors: #{$selectors + $selector +
|
|
89
|
+
$selectors: #{$selectors + $selector + config.$element-separator + $item + ","};
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
@at-root {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
@mixin is($states...) {
|
|
104
104
|
@at-root {
|
|
105
105
|
@each $state in $states {
|
|
106
|
-
&.#{
|
|
106
|
+
&.#{config.$state-prefix + $state} {
|
|
107
107
|
@content;
|
|
108
108
|
}
|
|
109
109
|
}
|