hy-app 0.3.2 → 0.3.4
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-address-picker/index.scss +1 -1
- package/components/hy-avatar/hy-avatar.vue +10 -13
- package/components/hy-avatar/index.scss +2 -2
- package/components/hy-back-top/index.scss +2 -2
- package/components/hy-badge/index.scss +1 -1
- package/components/hy-button/index.scss +3 -3
- package/components/hy-calendar/header.vue +11 -11
- package/components/hy-calendar/index.scss +26 -26
- package/components/hy-calendar/month.vue +18 -19
- package/components/hy-card/hy-card.vue +10 -12
- package/components/hy-card/index.scss +12 -10
- package/components/hy-cell/hy-cell.vue +13 -13
- package/components/hy-cell/index.scss +16 -16
- package/components/hy-checkbox/hy-checkbox.vue +10 -10
- package/components/hy-checkbox/index.scss +25 -24
- 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/hy-empty.vue +15 -12
- package/components/hy-empty/icon.ts +32 -58
- package/components/hy-empty/index.scss +3 -3
- package/components/hy-empty/typing.d.ts +48 -35
- 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/hy-column-notice.vue +2 -2
- package/components/hy-notice-bar/hy-row-notice.vue +1 -1
- package/components/hy-notice-bar/index.scss +7 -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 +4 -4
- 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/hy-search.vue +2 -9
- package/components/hy-search/index.scss +1 -1
- package/components/hy-signature/index.scss +1 -1
- package/components/hy-slider/hy-slider.vue +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 +14 -13
- 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/hy-upload.vue +5 -12
- package/components/hy-upload/index.scss +1 -1
- package/components/hy-upload/typing.d.ts +21 -0
- 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 +16 -13
- package/{theme.scss → libs/css/theme.scss} +2 -0
- package/libs/css/{vars.css → vars.scss} +2 -0
- package/package.json +6 -3
- package/typing/modules/common.d.ts +2 -0
- package/web-types.json +1 -1
- package/components/avatar.zip +0 -0
|
@@ -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
|
$z-index: 998;
|
|
@@ -31,7 +31,7 @@ $z-index: 998;
|
|
|
31
31
|
white-space: nowrap;
|
|
32
32
|
z-index: $z-index;
|
|
33
33
|
position: relative;
|
|
34
|
-
background-color: $hy-background--
|
|
34
|
+
background-color: $hy-background--box;
|
|
35
35
|
border-radius: $hy-border-radius-sm;
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -63,7 +63,7 @@ $z-index: 998;
|
|
|
63
63
|
padding: $hy-border-margin-padding-base;
|
|
64
64
|
line-height: 22px;
|
|
65
65
|
z-index: $z-index;
|
|
66
|
-
background-color: $hy-background--
|
|
66
|
+
background-color: $hy-background--box;
|
|
67
67
|
border-radius: $hy-border-radius-sm;
|
|
68
68
|
box-sizing: content-box;
|
|
69
69
|
width: 200px;
|
|
@@ -79,5 +79,5 @@ $z-index: 998;
|
|
|
79
79
|
z-index: $z-index;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
@include squareArrow(6px, $hy-background--
|
|
82
|
+
@include squareArrow(6px, $hy-background--box, $z-index, $hy-box-shadow);
|
|
83
83
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
borderColor: borderColor,
|
|
18
18
|
}"
|
|
19
19
|
>
|
|
20
|
-
<template v-if="$slots.label || label
|
|
20
|
+
<template v-if="$slots.label || label">
|
|
21
21
|
<slot name="label">
|
|
22
22
|
<text class="hy-search__content__label">{{ label }}</text>
|
|
23
23
|
</slot>
|
|
@@ -72,14 +72,7 @@
|
|
|
72
72
|
v-if="keyword && clear && focused"
|
|
73
73
|
@click="clear"
|
|
74
74
|
>
|
|
75
|
-
<HyIcon
|
|
76
|
-
:name="IconConfig.CLOSE"
|
|
77
|
-
size="11"
|
|
78
|
-
color="#ffffff"
|
|
79
|
-
:customStyle="{
|
|
80
|
-
lineHeight: '12px',
|
|
81
|
-
}"
|
|
82
|
-
></HyIcon>
|
|
75
|
+
<HyIcon :name="IconConfig.CLOSE" color="#ffffff"></HyIcon>
|
|
83
76
|
</view>
|
|
84
77
|
</view>
|
|
85
78
|
<text
|
|
@@ -101,7 +101,7 @@ const props = defineProps({
|
|
|
101
101
|
},
|
|
102
102
|
/**
|
|
103
103
|
* tag的形状
|
|
104
|
-
* @values circle,square
|
|
104
|
+
* @values circle,square,opposite
|
|
105
105
|
* */
|
|
106
106
|
shape: {
|
|
107
107
|
type: String,
|
|
@@ -143,7 +143,7 @@ const props = defineProps({
|
|
|
143
143
|
/** 定义需要用到的外部样式 */
|
|
144
144
|
customStyle: {
|
|
145
145
|
type: Object as PropType<CSSProperties>,
|
|
146
|
-
default:
|
|
146
|
+
default: () => {},
|
|
147
147
|
},
|
|
148
148
|
/** 自定义外部类名 */
|
|
149
149
|
customClass: {
|
|
@@ -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
|
|
|
@@ -19,41 +19,42 @@ $hy-background--disabled);
|
|
|
19
19
|
/*圆角*/
|
|
20
20
|
@include borderRadio(circle);
|
|
21
21
|
@include borderRadio(square);
|
|
22
|
+
@include borderRadio(opposite);
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
@include e(icon) {
|
|
24
25
|
margin-right: $hy-border-margin-padding-sm;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
@include e(text) {
|
|
29
|
+
@include m(small) {
|
|
29
30
|
font-size: $hy-font-size-sm;
|
|
30
31
|
line-height: $hy-font-size-sm;
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
@include m(medium) {
|
|
34
35
|
font-size: $hy-font-size-base;
|
|
35
36
|
line-height: $hy-font-size-base;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
+
@include m(large) {
|
|
39
40
|
font-size: $hy-font-size-lg;
|
|
40
41
|
line-height: $hy-font-size-lg;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
|
|
45
|
+
@include m(small) {
|
|
45
46
|
height: 22px;
|
|
46
47
|
line-height: 22px;
|
|
47
48
|
padding: 0 $hy-border-margin-padding-sm;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
@include m(medium) {
|
|
51
52
|
height: 26px;
|
|
52
53
|
line-height: 26px;
|
|
53
54
|
padding: 0 $hy-border-margin-padding-base;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
@include m(large) {
|
|
57
58
|
height: 32px;
|
|
58
59
|
line-height: 32px;
|
|
59
60
|
padding: 0 15px;
|
|
@@ -82,7 +83,7 @@ $hy-background--disabled);
|
|
|
82
83
|
@include themeColor(info--plain__fill, $hy-info-light, $hy-info, $hy-info);
|
|
83
84
|
|
|
84
85
|
/* 关闭按钮 */
|
|
85
|
-
|
|
86
|
+
@include e(close) {
|
|
86
87
|
position: absolute;
|
|
87
88
|
z-index: 999;
|
|
88
89
|
top: 10px;
|
|
@@ -99,17 +100,17 @@ $hy-background--disabled);
|
|
|
99
100
|
transform: scale(0.6) translate(50%, -50%);
|
|
100
101
|
/* #endif */
|
|
101
102
|
|
|
102
|
-
|
|
103
|
+
@include m(small) {
|
|
103
104
|
width: 18px;
|
|
104
105
|
height: 18px;
|
|
105
106
|
}
|
|
106
107
|
|
|
107
|
-
|
|
108
|
+
@include m(medium) {
|
|
108
109
|
width: 22px;
|
|
109
110
|
height: 22px;
|
|
110
111
|
}
|
|
111
112
|
|
|
112
|
-
|
|
113
|
+
@include m(large) {
|
|
113
114
|
width: 25px;
|
|
114
115
|
height: 25px;
|
|
115
116
|
}
|
|
@@ -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
|
+
}
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
class="hy-upload__wrap__preview__other"
|
|
26
26
|
@tap="onClickPreview(item, index)"
|
|
27
27
|
>
|
|
28
|
-
<
|
|
28
|
+
<HyIcon
|
|
29
29
|
color="#80CBF9"
|
|
30
30
|
size="26"
|
|
31
31
|
:name="
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
? 'movie'
|
|
34
34
|
: 'folder'
|
|
35
35
|
"
|
|
36
|
-
></
|
|
36
|
+
></HyIcon>
|
|
37
37
|
<text class="hy-upload__wrap__preview__other__text">
|
|
38
38
|
{{
|
|
39
39
|
item.isVideo || (item.type && item.type === "video")
|
|
@@ -139,8 +139,8 @@ export default {
|
|
|
139
139
|
<script setup lang="ts">
|
|
140
140
|
import { ref, watch } from "vue";
|
|
141
141
|
import type { PropType, CSSProperties } from "vue";
|
|
142
|
-
import type { FileVo, ReadFunctionVo } from "./typing";
|
|
143
|
-
import { addUnit, chooseFile, isArray } from "../../utils";
|
|
142
|
+
import type { FileVo, IUploadEmits, ReadFunctionVo } from "./typing";
|
|
143
|
+
import { addUnit, bytesToSize, chooseFile, isArray } from "../../utils";
|
|
144
144
|
import { IconConfig } from "../../config";
|
|
145
145
|
// 组件
|
|
146
146
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
@@ -278,14 +278,7 @@ const props = defineProps({
|
|
|
278
278
|
type: Object as PropType<CSSProperties>,
|
|
279
279
|
},
|
|
280
280
|
});
|
|
281
|
-
const emit = defineEmits(
|
|
282
|
-
"clickPreview",
|
|
283
|
-
"beforeRead",
|
|
284
|
-
"error",
|
|
285
|
-
"delete",
|
|
286
|
-
"afterRead",
|
|
287
|
-
"oversize",
|
|
288
|
-
]);
|
|
281
|
+
const emit = defineEmits<IUploadEmits>();
|
|
289
282
|
|
|
290
283
|
const lists = ref<FileVo[]>([]);
|
|
291
284
|
// 上传按钮
|
|
@@ -150,3 +150,24 @@ export default interface HyUploadProps {
|
|
|
150
150
|
* */
|
|
151
151
|
customStyle?: CSSProperties;
|
|
152
152
|
}
|
|
153
|
+
|
|
154
|
+
export interface UploadFileParams {
|
|
155
|
+
file: FileVo | FileVo[];
|
|
156
|
+
name: string;
|
|
157
|
+
index: number;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface IUploadEmits {
|
|
161
|
+
/** 点击预览大图触发 */
|
|
162
|
+
(e: "clickPreview", params: UploadFileParams): void;
|
|
163
|
+
/** 上传前触发 */
|
|
164
|
+
(e: "beforeRead", params: UploadFileParams): void;
|
|
165
|
+
/** 上传错误触发 */
|
|
166
|
+
(e: "error", error: any): void;
|
|
167
|
+
/** 删除触发 */
|
|
168
|
+
(e: "delete", params: UploadFileParams): void;
|
|
169
|
+
/** 上传完成触发 */
|
|
170
|
+
(e: "afterRead", params: UploadFileParams): void;
|
|
171
|
+
/** 超出最大值 */
|
|
172
|
+
(e: "oversize", params: UploadFileParams): void;
|
|
173
|
+
}
|
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
|
}
|
|
@@ -139,9 +139,12 @@
|
|
|
139
139
|
@if $shape == circle {
|
|
140
140
|
border-radius: theme.$hy-border-radius-semicircle;
|
|
141
141
|
}
|
|
142
|
-
@else {
|
|
142
|
+
@else if($shape == square) {
|
|
143
143
|
border-radius: theme.$hy-border-radius-sm;
|
|
144
144
|
}
|
|
145
|
+
@else {
|
|
146
|
+
border-radius: 28rpx theme.$hy-border-radius-sm;
|
|
147
|
+
}
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
150
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use "vars" as *;
|
|
1
2
|
/* 主题是相关颜色 */
|
|
2
3
|
$hy-primary: var(--hy-theme-color, #2979ff) !default;
|
|
3
4
|
$hy-primary-dark: var(--hy-theme--dark, #2b85e4) !default;
|
|
@@ -49,6 +50,7 @@ $hy-background--hover: var(--hy-background--hover, rgba(0,0,0,0.05)) !default; /
|
|
|
49
50
|
$hy-light-background-mask: var(--hy-light-background-mask, rgba(0, 0, 0, 0.5)); //遮罩颜色
|
|
50
51
|
$hy-background--active: var(--hy-background--active, #FFFFFF); // 选中背景色
|
|
51
52
|
$hy-background--close: var(--hy-background--close, #f0f0f0); // 选中背景色
|
|
53
|
+
$hy-background--box: var(--hy-background--box, #FFFFFF); // 选中背景色
|
|
52
54
|
|
|
53
55
|
/* 文字尺寸 */
|
|
54
56
|
$hy-font-size-sm: 24rpx; // 提示文字大小
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
--hy-background--hover: rgba(0,0,0,0.05);
|
|
21
21
|
--hy-background--active: #FFFFFF;
|
|
22
22
|
--hy-background--close: #f0f0f0;
|
|
23
|
+
--hy-background--box: #FFFFFF;
|
|
23
24
|
|
|
24
25
|
--hy-border-line: 1rpx solid #e8e8e8;
|
|
25
26
|
--hy-border-color: #c2c2c4;
|
|
@@ -52,6 +53,7 @@
|
|
|
52
53
|
--hy-background--hover: rgba(255,255,255,0.2);
|
|
53
54
|
--hy-background--active: #000000;
|
|
54
55
|
--hy-background--close: #323233;
|
|
56
|
+
--hy-background--box: #4b4c4d;
|
|
55
57
|
|
|
56
58
|
--hy-border-line: 1rpx solid #3c3f44;
|
|
57
59
|
--hy-border-color: #3c3f44;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hy-app",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.4",
|
|
4
|
+
"description": "修改微信小程序适配",
|
|
5
5
|
"main": "./index.ts",
|
|
6
6
|
"private": false,
|
|
7
7
|
"scripts": {},
|
|
@@ -12,5 +12,8 @@
|
|
|
12
12
|
],
|
|
13
13
|
"web-types": "./web-types.json",
|
|
14
14
|
"author": "gaoxianhua",
|
|
15
|
-
"license": "MIT"
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"hy-app": "0.3.*"
|
|
18
|
+
}
|
|
16
19
|
}
|