hy-app 0.1.2 → 0.1.3
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/README.md +1 -1
- package/api/http.ts +8 -8
- package/components/dialog/index.ts +2 -2
- package/components/hy-address-picker/hy-address-picker.vue +3 -29
- package/components/hy-address-picker/index.scss +27 -0
- package/components/hy-avatar/hy-avatar.vue +1 -45
- package/components/hy-avatar/index.scss +45 -0
- package/components/hy-avatar/typing.d.ts +1 -1
- package/components/hy-back-top/hy-back-top.vue +7 -22
- package/components/hy-back-top/index.scss +16 -0
- package/components/hy-back-top/props.ts +4 -4
- package/components/hy-back-top/typing.d.ts +2 -3
- package/components/hy-badge/hy-badge.vue +1 -72
- package/components/hy-badge/index.scss +72 -0
- package/components/hy-button/hy-button.vue +12 -124
- package/components/hy-button/index.scss +116 -0
- package/components/hy-calendar/header.vue +76 -0
- package/components/hy-calendar/hy-calendar.vue +366 -0
- package/components/hy-calendar/index.scss +171 -0
- package/components/hy-calendar/month.vue +524 -0
- package/components/hy-calendar/props.ts +37 -0
- package/components/hy-calendar/typing.d.ts +126 -0
- package/components/hy-card/hy-card.vue +21 -84
- package/components/hy-card/index.scss +57 -0
- package/components/hy-card/props.ts +2 -2
- package/components/hy-card/typing.d.ts +1 -1
- package/components/hy-cell/hy-cell.vue +1 -137
- package/components/hy-cell/index.scss +137 -0
- package/components/hy-check-button/hy-check-button.vue +1 -0
- package/components/hy-check-button/index.scss +5 -0
- package/components/hy-checkbox/hy-checkbox.vue +2 -95
- package/components/hy-checkbox/index.scss +94 -0
- package/components/hy-checkbox/typing.d.ts +1 -2
- package/components/hy-count-down/hy-count-down.vue +150 -0
- package/components/hy-count-down/index.scss +6 -0
- package/components/hy-count-down/index.ts +52 -0
- package/components/hy-count-down/props.ts +10 -0
- package/components/hy-count-down/typing.d.ts +20 -0
- package/components/hy-count-to/hy-count-to.vue +213 -0
- package/components/hy-count-to/index.scss +6 -0
- package/components/hy-count-to/props.ts +17 -0
- package/components/hy-count-to/typing.d.ts +48 -0
- package/components/hy-datetime-picker/hy-datetime-picker.vue +2 -28
- package/components/hy-datetime-picker/index.scss +28 -0
- package/components/hy-divider/hy-divider.vue +24 -49
- package/components/hy-divider/index.scss +25 -0
- package/components/hy-divider/props.ts +2 -2
- package/components/hy-divider/typing.d.ts +1 -1
- package/components/hy-dropdown/hy-dropdown.vue +43 -0
- package/components/hy-dropdown/index.scss +17 -0
- package/components/hy-dropdown/props.ts +17 -0
- package/components/hy-dropdown/typing.d.ts +48 -0
- package/components/hy-dropdown-item/hy-dropdown-item.vue +194 -0
- package/components/hy-dropdown-item/index.scss +96 -0
- package/components/hy-dropdown-item/props.ts +10 -0
- package/components/hy-dropdown-item/typing.d.ts +31 -0
- package/components/hy-empty/hy-empty.vue +8 -26
- package/components/hy-empty/index.scss +19 -0
- package/components/hy-empty/props.ts +2 -2
- package/components/hy-empty/typing.d.ts +1 -1
- package/components/hy-float-button/hy-float-button.vue +201 -0
- package/components/hy-float-button/index.scss +69 -0
- package/components/hy-float-button/props.ts +25 -0
- package/components/hy-float-button/typing.d.ts +93 -0
- package/components/hy-folding-panel/hy-folding-panel.vue +9 -12
- package/components/hy-folding-panel/index.scss +6 -0
- package/components/hy-folding-panel/props.ts +2 -2
- package/components/hy-folding-panel/typing.d.ts +2 -2
- package/components/hy-form/hy-form.vue +17 -34
- package/components/hy-form/index.scss +30 -0
- package/components/hy-form/props.ts +2 -0
- package/components/hy-form/typing.d.ts +9 -1
- package/components/hy-grid/hy-grid.vue +1 -43
- package/components/hy-grid/index.scss +40 -0
- package/components/hy-icon/hy-icon.vue +1 -93
- package/components/hy-icon/index.scss +84 -0
- package/components/hy-image/hy-image.vue +212 -0
- package/components/hy-image/index.scss +26 -0
- package/components/hy-image/props.ts +24 -0
- package/components/hy-image/typing.d.ts +76 -0
- package/components/hy-input/hy-input.vue +2 -72
- package/components/hy-input/index.scss +65 -0
- package/components/hy-line/hy-line.vue +4 -8
- package/components/hy-line/index.scss +5 -0
- package/components/hy-line/props.ts +3 -3
- package/components/hy-line/typing.d.ts +2 -2
- package/components/hy-line-progress/hy-line-progress.vue +15 -44
- package/components/hy-line-progress/index.scss +38 -0
- package/components/hy-line-progress/props.ts +2 -2
- package/components/hy-line-progress/typing.d.ts +1 -1
- package/components/hy-list/hy-list.vue +11 -41
- package/components/hy-list/index.scss +32 -0
- package/components/hy-list/props.ts +2 -2
- package/components/hy-loading/hy-loading.vue +95 -0
- package/components/hy-loading/index.scss +103 -0
- package/components/hy-loading/props.ts +17 -0
- package/components/hy-loading/typing.d.ts +52 -0
- package/components/hy-login/TheUserLogin.vue +16 -16
- package/components/hy-login/hy-login.vue +9 -9
- package/components/hy-login/props.ts +4 -4
- package/components/hy-modal/hy-modal.vue +11 -89
- package/components/hy-modal/index.scss +77 -0
- package/components/hy-modal/props.ts +2 -2
- package/components/hy-modal/typing.d.ts +1 -1
- package/components/hy-navbar/hy-navbar.vue +20 -92
- package/components/hy-navbar/index.scss +67 -0
- package/components/hy-navbar/props.ts +2 -2
- package/components/hy-navbar/typing.d.ts +1 -1
- package/components/hy-notice-bar/hy-column-notice.vue +11 -39
- package/components/hy-notice-bar/hy-notice-bar.vue +10 -12
- package/components/hy-notice-bar/hy-row-notice.vue +5 -56
- package/components/hy-notice-bar/index.scss +93 -0
- package/components/hy-notice-bar/props.ts +4 -2
- package/components/hy-notice-bar/typing.d.ts +13 -3
- package/components/hy-number-step/hy-number-step.vue +1 -70
- package/components/hy-number-step/index.scss +71 -0
- package/components/hy-overlay/hy-overlay.vue +2 -14
- package/components/hy-overlay/index.scss +9 -0
- package/components/hy-picker/hy-picker.vue +1 -68
- package/components/hy-picker/index.scss +68 -0
- package/components/hy-popup/hy-popup.vue +1 -74
- package/components/hy-popup/index.scss +60 -0
- package/components/hy-price/hy-price.vue +1 -11
- package/components/hy-price/index.scss +11 -0
- package/components/hy-qrcode/hy-qrcode.vue +15 -37
- package/components/hy-qrcode/index.scss +23 -0
- package/components/hy-qrcode/props.ts +2 -2
- package/components/hy-qrcode/typing.d.ts +2 -2
- package/components/hy-radio/hy-radio.vue +2 -101
- package/components/hy-radio/index.scss +93 -0
- package/components/hy-radio/typing.d.ts +1 -2
- package/components/hy-rate/hy-rate.vue +1 -33
- package/components/hy-rate/index.scss +33 -0
- package/components/hy-read-more/hy-read-more.vue +7 -30
- package/components/hy-read-more/index.scss +25 -0
- package/components/hy-read-more/props.ts +3 -3
- package/components/hy-read-more/typing.d.ts +1 -1
- package/components/hy-safe-bottom/hy-safe-bottom.vue +5 -9
- package/components/hy-safe-bottom/index.scss +5 -0
- package/components/hy-scroll-list/hy-scroll-list.vue +13 -43
- package/components/hy-scroll-list/index.scss +34 -0
- package/components/hy-scroll-list/props.ts +2 -2
- package/components/hy-scroll-list/typing.d.ts +1 -1
- package/components/hy-search/hy-search.vue +1 -83
- package/components/hy-search/index.scss +83 -0
- package/components/hy-slider/hy-slider.vue +14 -92
- package/components/hy-slider/index.scss +77 -0
- package/components/hy-status-bar/hy-status-bar.vue +41 -0
- package/components/hy-status-bar/index.scss +6 -0
- package/components/hy-status-bar/props.ts +8 -0
- package/components/hy-status-bar/typing.d.ts +12 -0
- package/components/hy-steps/hy-steps.vue +36 -163
- package/components/hy-steps/index.scss +131 -0
- package/components/hy-steps/props.ts +2 -2
- package/components/hy-steps/typing.d.ts +2 -2
- package/components/hy-subsection/hy-subsection.vue +40 -132
- package/components/hy-subsection/index.scss +82 -0
- package/components/hy-subsection/props.ts +1 -0
- package/components/hy-subsection/typing.d.ts +13 -4
- package/components/hy-swipe-action/hy-swipe-action.vue +294 -0
- package/components/hy-swipe-action/index.scss +9 -0
- package/components/hy-swipe-action/index.wxs +235 -0
- package/components/hy-swipe-action/props.ts +16 -0
- package/components/hy-swipe-action/typing.d.ts +55 -0
- package/components/hy-swipe-action/wxs.js +15 -0
- package/components/hy-swiper/hy-swiper-indicator.vue +5 -35
- package/components/hy-swiper/hy-swiper.vue +1 -54
- package/components/hy-swiper/index.scss +82 -0
- package/components/hy-switch/hy-switch.vue +62 -72
- package/components/hy-switch/index.scss +46 -0
- package/components/hy-switch/props.ts +4 -1
- package/components/hy-switch/typing.d.ts +14 -1
- package/components/hy-tabs/hy-tabs.vue +22 -81
- package/components/hy-tabs/index.scss +63 -0
- package/components/hy-tabs/props.ts +5 -5
- package/components/hy-tabs/typing.d.ts +1 -1
- package/components/hy-tag/hy-tag.vue +1 -214
- package/components/hy-tag/index.scss +204 -0
- package/components/hy-text/hy-text.vue +238 -0
- package/components/hy-text/index.scss +70 -0
- package/components/hy-text/index.ts +0 -0
- package/components/hy-text/props.ts +30 -0
- package/components/hy-text/typing.d.ts +98 -0
- package/components/hy-textarea/hy-textarea.vue +1 -46
- package/components/hy-textarea/index.scss +40 -0
- package/components/hy-tooltip/hy-tooltip.vue +42 -95
- package/components/hy-tooltip/index.scss +64 -0
- package/components/hy-tooltip/props.ts +2 -2
- package/components/hy-tooltip/typing.d.ts +1 -1
- package/components/hy-transition/hy-transition.vue +4 -2
- package/components/hy-transition/typing.d.ts +1 -13
- package/components/hy-upload/hy-upload.vue +37 -182
- package/components/hy-upload/index.scss +147 -0
- package/components/hy-upload/props.ts +2 -2
- package/components/hy-upload/typing.d.ts +11 -11
- package/components/hy-warn/hy-warn.vue +15 -123
- package/components/hy-warn/index.scss +109 -0
- package/components/hy-warn/props.ts +3 -3
- package/components/hy-warn/typing.d.ts +4 -3
- package/components/hy-waterfall/index.scss +82 -0
- package/components/index.ts +25 -1
- package/components/message/index.ts +54 -54
- package/config/color.ts +2 -1
- package/global/index.ts +6 -6
- package/global/register-properties.ts +2 -2
- package/index.scss +2 -1
- package/libs/css/common.scss +14 -2
- package/package.json +2 -2
- package/{libs/css → public/font}/iconfont.css +4 -4
- package/theme.scss +6 -4
- package/typing/modules/common.d.ts +16 -1
- package/utils/calendar.js +1021 -0
- package/utils/colorGradient.ts +112 -0
- package/utils/index.ts +2 -0
- package/utils/inside.ts +80 -34
- package/utils/inspect.ts +66 -0
- package/utils/utils.ts +11 -12
- package/libs/css/download.zip +0 -0
- /package/{libs/css → public/font}/iconfont.ttf +0 -0
- /package/{libs/css → public/font}/iconfont.woff +0 -0
- /package/{libs/css → public/font}/iconfont.woff2 +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@use "../../theme.scss" as *;
|
|
2
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
+
|
|
4
|
+
$u-numberBox-hover-bgColor: #e6e6e6 !default;
|
|
5
|
+
$u-numberBox-disabled-color: #c8c9cc !default;
|
|
6
|
+
$u-numberBox-disabled-bgColor: #f7f8fa !default;
|
|
7
|
+
$u-numberBox-plus-radius: 4px !default;
|
|
8
|
+
$u-numberBox-minus-radius: 4px !default;
|
|
9
|
+
$u-numberBox-input-text-align: center !default;
|
|
10
|
+
$u-numberBox-input-font-size: 15px !default;
|
|
11
|
+
$u-numberBox-input-padding: 0 !default;
|
|
12
|
+
$u-numberBox-input-margin: 0 2px !default;
|
|
13
|
+
$u-numberBox-input-disabled-color: #c8c9cc !default;
|
|
14
|
+
$u-numberBox-input-disabled-bgColor: #f2f3f5 !default;
|
|
15
|
+
|
|
16
|
+
.hy-number-box {
|
|
17
|
+
@include flex(row);
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
20
|
+
&__slot {
|
|
21
|
+
/* #ifndef APP-NVUE */
|
|
22
|
+
touch-action: none;
|
|
23
|
+
/* #endif */
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&__plus,
|
|
27
|
+
&__minus {
|
|
28
|
+
width: 35px;
|
|
29
|
+
@include flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
/* #ifndef APP-NVUE */
|
|
33
|
+
touch-action: none;
|
|
34
|
+
/* #endif */
|
|
35
|
+
|
|
36
|
+
&--hover {
|
|
37
|
+
background-color: $u-numberBox-hover-bgColor !important;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&--disabled {
|
|
41
|
+
color: $u-numberBox-disabled-color;
|
|
42
|
+
background-color: $u-numberBox-disabled-bgColor;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&__plus {
|
|
47
|
+
border-top-right-radius: $u-numberBox-plus-radius;
|
|
48
|
+
border-bottom-right-radius: $u-numberBox-plus-radius;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&__minus {
|
|
52
|
+
border-top-left-radius: $u-numberBox-minus-radius;
|
|
53
|
+
border-bottom-left-radius: $u-numberBox-minus-radius;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&__input {
|
|
57
|
+
position: relative;
|
|
58
|
+
text-align: $u-numberBox-input-text-align;
|
|
59
|
+
font-size: $u-numberBox-input-font-size;
|
|
60
|
+
padding: $u-numberBox-input-padding;
|
|
61
|
+
margin: $u-numberBox-input-margin;
|
|
62
|
+
@include flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
|
|
66
|
+
&--disabled {
|
|
67
|
+
color: $u-numberBox-input-disabled-color;
|
|
68
|
+
background-color: $u-numberBox-input-disabled-bgColor;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<HyTransition
|
|
3
3
|
:show="show"
|
|
4
|
-
custom-class="
|
|
4
|
+
custom-class="hy-overlay"
|
|
5
5
|
:duration="duration"
|
|
6
6
|
:custom-style="overlayStyle"
|
|
7
7
|
@click="clickHandler"
|
|
@@ -38,17 +38,5 @@ const clickHandler = () => {
|
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
40
|
<style lang="scss" scoped>
|
|
41
|
-
|
|
42
|
-
$u-overlay-left: 0 !default;
|
|
43
|
-
$u-overlay-width: 100% !default;
|
|
44
|
-
$u-overlay-height: 100% !default;
|
|
45
|
-
$u-overlay-background-color: rgba(0, 0, 0, 0.7) !default;
|
|
46
|
-
.u-overlay {
|
|
47
|
-
position: fixed;
|
|
48
|
-
top: $u-overlay-top;
|
|
49
|
-
left: $u-overlay-left;
|
|
50
|
-
width: $u-overlay-width;
|
|
51
|
-
height: $u-overlay-height;
|
|
52
|
-
background-color: $u-overlay-background-color;
|
|
53
|
-
}
|
|
41
|
+
@import "./index.scss";
|
|
54
42
|
</style>
|
|
@@ -429,72 +429,5 @@ defineExpose({
|
|
|
429
429
|
</script>
|
|
430
430
|
|
|
431
431
|
<style lang="scss" scoped>
|
|
432
|
-
@import "
|
|
433
|
-
@import "../../theme.scss";
|
|
434
|
-
|
|
435
|
-
.hy-picker {
|
|
436
|
-
position: relative;
|
|
437
|
-
&-input {
|
|
438
|
-
position: relative;
|
|
439
|
-
.input-cover {
|
|
440
|
-
opacity: 0;
|
|
441
|
-
position: absolute;
|
|
442
|
-
top: 0;
|
|
443
|
-
bottom: 0;
|
|
444
|
-
left: 0;
|
|
445
|
-
right: 0;
|
|
446
|
-
z-index: 1;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
&__title {
|
|
451
|
-
@include flex();
|
|
452
|
-
justify-content: space-between;
|
|
453
|
-
padding: $hy-border-margin-padding-lg;
|
|
454
|
-
&--center {
|
|
455
|
-
font-size: $hy-font-size-subtitle;
|
|
456
|
-
color: $hy-color-subtitle;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
&__view {
|
|
461
|
-
&__column {
|
|
462
|
-
@include flex;
|
|
463
|
-
flex: 1;
|
|
464
|
-
justify-content: center;
|
|
465
|
-
|
|
466
|
-
&__item {
|
|
467
|
-
@include flex;
|
|
468
|
-
justify-content: center;
|
|
469
|
-
align-items: center;
|
|
470
|
-
font-size: 16px;
|
|
471
|
-
text-align: center;
|
|
472
|
-
/* #ifndef APP-NVUE */
|
|
473
|
-
display: block;
|
|
474
|
-
/* #endif */
|
|
475
|
-
color: #303133ff;
|
|
476
|
-
|
|
477
|
-
&--disabled {
|
|
478
|
-
/* #ifndef APP-NVUE */
|
|
479
|
-
cursor: not-allowed;
|
|
480
|
-
/* #endif */
|
|
481
|
-
opacity: 0.35;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
&--loading {
|
|
488
|
-
position: absolute;
|
|
489
|
-
top: 0;
|
|
490
|
-
right: 0;
|
|
491
|
-
left: 0;
|
|
492
|
-
bottom: 0;
|
|
493
|
-
@include flex;
|
|
494
|
-
justify-content: center;
|
|
495
|
-
align-items: center;
|
|
496
|
-
background-color: rgba(255, 255, 255, 0.87);
|
|
497
|
-
z-index: 1000;
|
|
498
|
-
}
|
|
499
|
-
}
|
|
432
|
+
@import "./index.scss";
|
|
500
433
|
</style>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use "../../theme.scss" as *;
|
|
2
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
+
|
|
4
|
+
.hy-picker {
|
|
5
|
+
position: relative;
|
|
6
|
+
&-input {
|
|
7
|
+
position: relative;
|
|
8
|
+
.input-cover {
|
|
9
|
+
opacity: 0;
|
|
10
|
+
position: absolute;
|
|
11
|
+
top: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
left: 0;
|
|
14
|
+
right: 0;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&__title {
|
|
20
|
+
@include flex();
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
padding: $hy-border-margin-padding-lg;
|
|
23
|
+
&--center {
|
|
24
|
+
font-size: $hy-font-size-subtitle;
|
|
25
|
+
color: $hy-color-subtitle;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&__view {
|
|
30
|
+
&__column {
|
|
31
|
+
@include flex;
|
|
32
|
+
flex: 1;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
|
|
35
|
+
&__item {
|
|
36
|
+
@include flex;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
align-items: center;
|
|
39
|
+
font-size: 16px;
|
|
40
|
+
text-align: center;
|
|
41
|
+
/* #ifndef APP-NVUE */
|
|
42
|
+
display: block;
|
|
43
|
+
/* #endif */
|
|
44
|
+
color: #303133ff;
|
|
45
|
+
|
|
46
|
+
&--disabled {
|
|
47
|
+
/* #ifndef APP-NVUE */
|
|
48
|
+
cursor: not-allowed;
|
|
49
|
+
/* #endif */
|
|
50
|
+
opacity: 0.35;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--loading {
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
right: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
bottom: 0;
|
|
62
|
+
@include flex;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
background-color: rgba(255, 255, 255, 0.87);
|
|
66
|
+
z-index: 1000;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -192,78 +192,5 @@ const clickHandler = () => {
|
|
|
192
192
|
</script>
|
|
193
193
|
|
|
194
194
|
<style lang="scss" scoped>
|
|
195
|
-
|
|
196
|
-
$u-popup-content-background-color: #fff !default;
|
|
197
|
-
|
|
198
|
-
.hy-popup {
|
|
199
|
-
flex: $u-popup-flex;
|
|
200
|
-
|
|
201
|
-
&__content {
|
|
202
|
-
background-color: $u-popup-content-background-color;
|
|
203
|
-
position: relative;
|
|
204
|
-
|
|
205
|
-
&--round-top {
|
|
206
|
-
border-top-left-radius: 0;
|
|
207
|
-
border-top-right-radius: 0;
|
|
208
|
-
border-bottom-left-radius: 10px;
|
|
209
|
-
border-bottom-right-radius: 10px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
&--round-left {
|
|
213
|
-
border-top-left-radius: 0;
|
|
214
|
-
border-top-right-radius: 10px;
|
|
215
|
-
border-bottom-left-radius: 0;
|
|
216
|
-
border-bottom-right-radius: 10px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
&--round-right {
|
|
220
|
-
border-top-left-radius: 10px;
|
|
221
|
-
border-top-right-radius: 0;
|
|
222
|
-
border-bottom-left-radius: 10px;
|
|
223
|
-
border-bottom-right-radius: 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
&--round-bottom {
|
|
227
|
-
border-top-left-radius: 10px;
|
|
228
|
-
border-top-right-radius: 10px;
|
|
229
|
-
border-bottom-left-radius: 0;
|
|
230
|
-
border-bottom-right-radius: 0;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
&--round-center {
|
|
234
|
-
border-top-left-radius: 10px;
|
|
235
|
-
border-top-right-radius: 10px;
|
|
236
|
-
border-bottom-left-radius: 10px;
|
|
237
|
-
border-bottom-right-radius: 10px;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
&__close {
|
|
241
|
-
position: absolute;
|
|
242
|
-
|
|
243
|
-
&--hover {
|
|
244
|
-
opacity: 0.4;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
&__close--top-left {
|
|
249
|
-
top: 15px;
|
|
250
|
-
left: 15px;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
&__close--top-right {
|
|
254
|
-
top: 15px;
|
|
255
|
-
right: 15px;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
&__close--bottom-left {
|
|
259
|
-
bottom: 15px;
|
|
260
|
-
left: 15px;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
&__close--bottom-right {
|
|
264
|
-
right: 15px;
|
|
265
|
-
bottom: 15px;
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
}
|
|
195
|
+
@import "./index.scss";
|
|
269
196
|
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
@use "../../theme.scss" as *;
|
|
2
|
+
@use "../../libs/css/mixin.scss" as *;
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
.hy-popup {
|
|
6
|
+
flex: 1;
|
|
7
|
+
|
|
8
|
+
&__content {
|
|
9
|
+
background-color: #fff;
|
|
10
|
+
position: relative;
|
|
11
|
+
|
|
12
|
+
&--round-top {
|
|
13
|
+
border-radius: 0 0 $hy-border-radius-lg $hy-border-radius-lg;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&--round-left {
|
|
17
|
+
border-radius: 0 $hy-border-radius-lg $hy-border-radius-lg 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--round-right {
|
|
21
|
+
border-radius: $hy-border-radius-lg 0 0 $hy-border-radius-lg;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&--round-bottom {
|
|
25
|
+
border-radius: $hy-border-radius-lg $hy-border-radius-lg 0 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--round-center {
|
|
29
|
+
border-radius: $hy-border-radius-lg;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__close {
|
|
33
|
+
position: absolute;
|
|
34
|
+
|
|
35
|
+
&--hover {
|
|
36
|
+
opacity: 0.4;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&__close--top-left {
|
|
41
|
+
top: $hy-border-margin-padding-lg;
|
|
42
|
+
left: $hy-border-margin-padding-lg;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&__close--top-right {
|
|
46
|
+
top: $hy-border-margin-padding-lg;
|
|
47
|
+
right: $hy-border-margin-padding-lg;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&__close--bottom-left {
|
|
51
|
+
bottom: $hy-border-margin-padding-lg;
|
|
52
|
+
left: $hy-border-margin-padding-lg;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&__close--bottom-right {
|
|
56
|
+
right: $hy-border-margin-padding-lg;
|
|
57
|
+
bottom: $hy-border-margin-padding-lg;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -72,15 +72,5 @@ const handleClick = () => {
|
|
|
72
72
|
</script>
|
|
73
73
|
|
|
74
74
|
<style lang="scss" scoped>
|
|
75
|
-
.
|
|
76
|
-
font-size: 32rpx;
|
|
77
|
-
font-weight: 500;
|
|
78
|
-
margin-top: 5px;
|
|
79
|
-
&__prefix {
|
|
80
|
-
font-size: 24rpx;
|
|
81
|
-
}
|
|
82
|
-
&__decimal {
|
|
83
|
-
font-size: 24rpx;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
75
|
+
@import "./index.scss";
|
|
86
76
|
</style>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
class="hy-qrcode__loading"
|
|
15
15
|
:style="{ width: addUnit(size), height: addUnit(size) }"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
17
|
+
<HyLoading></HyLoading>
|
|
18
18
|
</view>
|
|
19
19
|
</view>
|
|
20
20
|
</view>
|
|
@@ -23,11 +23,14 @@
|
|
|
23
23
|
<script setup lang="ts">
|
|
24
24
|
import { getCurrentInstance, toRefs, ref, onMounted } from "vue";
|
|
25
25
|
import defaultProps from "./props";
|
|
26
|
-
import IProps from "./typing";
|
|
26
|
+
import type IProps from "./typing";
|
|
27
27
|
import QRCode from "./qrcode.js";
|
|
28
|
-
import { addUnit } from "../../utils";
|
|
28
|
+
import { addUnit, error } from "../../utils";
|
|
29
29
|
import { IconConfig } from "../../config";
|
|
30
|
+
|
|
31
|
+
// 组件
|
|
30
32
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
33
|
+
import HyLoading from "../hy-loading/hy-loading.vue";
|
|
31
34
|
|
|
32
35
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
33
36
|
const { text, allowPreview } = toRefs(props);
|
|
@@ -39,12 +42,13 @@ const qrcode = ref("");
|
|
|
39
42
|
const result = ref("");
|
|
40
43
|
|
|
41
44
|
onMounted(() => {
|
|
45
|
+
console.log(111);
|
|
42
46
|
initQrCode();
|
|
43
47
|
});
|
|
44
48
|
|
|
45
49
|
const initQrCode = () => {
|
|
46
50
|
if (text.value) {
|
|
47
|
-
loading.value;
|
|
51
|
+
loading.value = true;
|
|
48
52
|
qrcode.value = new QRCode({
|
|
49
53
|
context: instance, // 上下文环境
|
|
50
54
|
canvasId: props.cid, // canvas-id
|
|
@@ -62,14 +66,10 @@ const initQrCode = () => {
|
|
|
62
66
|
cbResult: function (res: any) {
|
|
63
67
|
// 生成二维码的回调
|
|
64
68
|
_result(res);
|
|
65
|
-
}
|
|
69
|
+
},
|
|
66
70
|
});
|
|
67
71
|
} else {
|
|
68
|
-
|
|
69
|
-
title: "二维码内容不能为空",
|
|
70
|
-
icon: "none",
|
|
71
|
-
duration: 2000
|
|
72
|
-
});
|
|
72
|
+
error("二维码内容不能为空");
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
|
|
@@ -87,9 +87,9 @@ const _saveCode = () => {
|
|
|
87
87
|
uni.showToast({
|
|
88
88
|
title: "二维码保存成功",
|
|
89
89
|
icon: "success",
|
|
90
|
-
duration: 2000
|
|
90
|
+
duration: 2000,
|
|
91
91
|
});
|
|
92
|
-
}
|
|
92
|
+
},
|
|
93
93
|
});
|
|
94
94
|
}
|
|
95
95
|
};
|
|
@@ -114,8 +114,8 @@ const preview = (e) => {
|
|
|
114
114
|
},
|
|
115
115
|
fail: function (err) {
|
|
116
116
|
console.error(err.errMsg);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
emit("preview", result.value, e);
|
|
@@ -127,27 +127,5 @@ const onLongPress = () => {
|
|
|
127
127
|
</script>
|
|
128
128
|
|
|
129
129
|
<style lang="scss" scoped>
|
|
130
|
-
.
|
|
131
|
-
&__loading {
|
|
132
|
-
display: flex;
|
|
133
|
-
justify-content: center;
|
|
134
|
-
align-items: center;
|
|
135
|
-
background-color: #f7f7f7;
|
|
136
|
-
position: absolute;
|
|
137
|
-
top: 0;
|
|
138
|
-
bottom: 0;
|
|
139
|
-
left: 0;
|
|
140
|
-
right: 0;
|
|
141
|
-
}
|
|
142
|
-
&__content {
|
|
143
|
-
position: relative;
|
|
144
|
-
|
|
145
|
-
&__canvas {
|
|
146
|
-
position: fixed;
|
|
147
|
-
top: -99999rpx;
|
|
148
|
-
left: -99999rpx;
|
|
149
|
-
z-index: -99999;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
130
|
+
@import "./index.scss";
|
|
153
131
|
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.hy-qrcode {
|
|
2
|
+
&__loading {
|
|
3
|
+
display: flex;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
background-color: #f7f7f7;
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
}
|
|
13
|
+
&__content {
|
|
14
|
+
position: relative;
|
|
15
|
+
|
|
16
|
+
&__canvas {
|
|
17
|
+
position: fixed;
|
|
18
|
+
top: -99999rpx;
|
|
19
|
+
left: -99999rpx;
|
|
20
|
+
z-index: -99999;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import IProps from "./typing";
|
|
1
|
+
import type IProps from "./typing";
|
|
2
2
|
|
|
3
3
|
const defaultProps: IProps = {
|
|
4
4
|
cid: "hy-qrcode-canvas" + Math.random().toString(),
|
|
@@ -14,7 +14,7 @@ const defaultProps: IProps = {
|
|
|
14
14
|
iconSize: 40,
|
|
15
15
|
showLoading: true,
|
|
16
16
|
loadingText: "二维码生成中",
|
|
17
|
-
allowPreview: false
|
|
17
|
+
allowPreview: false,
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export default defaultProps;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:style="radioStyle"
|
|
8
8
|
:class="[
|
|
9
9
|
`hy-radio-label--${iconPlacement}`,
|
|
10
|
-
borderBottom && placement === 'column' && 'hy-
|
|
10
|
+
borderBottom && placement === 'column' && 'hy-border__bottom',
|
|
11
11
|
]"
|
|
12
12
|
>
|
|
13
13
|
<view
|
|
@@ -229,104 +229,5 @@ const setRadioCheckedStatus = (temp: CheckboxColumnsVo) => {
|
|
|
229
229
|
</script>
|
|
230
230
|
|
|
231
231
|
<style lang="scss" scoped>
|
|
232
|
-
@import "
|
|
233
|
-
@import "../../theme.scss";
|
|
234
|
-
|
|
235
|
-
.hy-radio {
|
|
236
|
-
/* #ifndef APP-NVUE */
|
|
237
|
-
@include flex(row);
|
|
238
|
-
/* #endif */
|
|
239
|
-
overflow: hidden;
|
|
240
|
-
flex-direction: row;
|
|
241
|
-
align-items: center;
|
|
242
|
-
margin-bottom: 5px;
|
|
243
|
-
margin-top: 5px;
|
|
244
|
-
|
|
245
|
-
&-group {
|
|
246
|
-
flex: 1;
|
|
247
|
-
|
|
248
|
-
&--row {
|
|
249
|
-
/* #ifndef APP-NVUE */
|
|
250
|
-
display: flex;
|
|
251
|
-
/* #endif */
|
|
252
|
-
flex-flow: row wrap;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
&--column {
|
|
256
|
-
@include flex(column);
|
|
257
|
-
margin: $hy-border-margin-padding-lg 0;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
&-label--left {
|
|
262
|
-
flex-direction: row;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
&-label--right {
|
|
266
|
-
flex-direction: row-reverse;
|
|
267
|
-
justify-content: space-between;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
&__icon-wrap {
|
|
271
|
-
/* #ifndef APP-NVUE */
|
|
272
|
-
box-sizing: border-box;
|
|
273
|
-
// nvue下,border-color过渡有问题
|
|
274
|
-
transition-property: border-color, background-color, color;
|
|
275
|
-
transition-duration: 0.2s;
|
|
276
|
-
/* #endif */
|
|
277
|
-
@include flex;
|
|
278
|
-
align-items: center;
|
|
279
|
-
justify-content: center;
|
|
280
|
-
color: transparent;
|
|
281
|
-
text-align: center;
|
|
282
|
-
margin-right: $hy-border-margin-padding-sm;
|
|
283
|
-
border: $hy-border-line;
|
|
284
|
-
|
|
285
|
-
/* #ifdef MP-TOUTIAO */
|
|
286
|
-
// 头条小程序兼容性问题,需要设置行高为0,否则图标偏下
|
|
287
|
-
&__icon {
|
|
288
|
-
line-height: 0;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/* #endif */
|
|
292
|
-
|
|
293
|
-
&--circle {
|
|
294
|
-
border-radius: 50%;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
&--square {
|
|
298
|
-
border-radius: 3px;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
&--checked {
|
|
302
|
-
color: $hy-text-color-inverse;
|
|
303
|
-
background-color: $hy-primary;
|
|
304
|
-
border-color: $hy-primary;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
&--disabled {
|
|
308
|
-
background-color: $hy-color-disable-bg !important;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
&--disabled--checked {
|
|
312
|
-
color: $hy-color-disable-icon !important;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
&__label-wrap {
|
|
317
|
-
/* #ifndef APP-NVUE */
|
|
318
|
-
word-wrap: break-word;
|
|
319
|
-
/* #endif */
|
|
320
|
-
color: $hy-text-color;
|
|
321
|
-
font-size: $hy-font-size-base;
|
|
322
|
-
margin-right: $hy-border-margin-padding-sm;
|
|
323
|
-
|
|
324
|
-
&--disabled {
|
|
325
|
-
color: $hy-text-color-disable;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
.hy-border-bottom {
|
|
330
|
-
border-bottom: $hy-border-line;
|
|
331
|
-
}
|
|
232
|
+
@import "./index.scss";
|
|
332
233
|
</style>
|