hy-app 0.4.3 → 0.4.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/hy-action-sheet.vue +1 -1
- package/components/hy-address-picker/hy-address-picker.vue +1 -1
- package/components/hy-avatar/hy-avatar.vue +1 -1
- package/components/hy-back-top/hy-back-top.vue +1 -2
- package/components/hy-badge/hy-badge.vue +1 -1
- package/components/hy-button/hy-button.vue +1 -2
- package/components/hy-calendar/hy-calendar.vue +3 -11
- package/components/hy-calendar/month.vue +1 -1
- package/components/hy-card/hy-card.vue +1 -1
- package/components/hy-cell/hy-cell.vue +1 -2
- package/components/hy-cell/props.ts +1 -1
- package/components/hy-check-button/hy-check-button.vue +2 -2
- package/components/hy-checkbox/hy-checkbox.vue +2 -3
- package/components/hy-checkbox-group/hy-checkbox-group.vue +1 -1
- package/components/hy-checkbox-item/hy-checkbox-item.vue +1 -2
- package/components/hy-code-input/hy-code-input.vue +1 -1
- package/components/hy-config-provider/hy-config-provider.vue +2 -3
- package/components/hy-config-provider/props.ts +1 -1
- package/components/hy-count-down/index.ts +1 -1
- package/components/hy-count-to/hy-count-to.vue +1 -1
- package/components/hy-datetime-picker/hy-datetime-picker.vue +2 -3
- package/components/hy-datetime-picker/props.ts +1 -1
- package/components/hy-divider/hy-divider.vue +1 -2
- package/components/hy-divider/props.ts +1 -1
- package/components/hy-dropdown/hy-dropdown.vue +2 -3
- package/components/hy-dropdown/props.ts +1 -1
- package/components/hy-dropdown-item/hy-dropdown-item.vue +1 -2
- package/components/hy-empty/hy-empty.vue +1 -1
- package/components/hy-flex/hy-flex.vue +1 -1
- package/components/hy-float-button/hy-float-button.vue +1 -2
- package/components/hy-float-button/props.ts +14 -14
- package/components/hy-folding-panel/hy-folding-panel.vue +2 -3
- package/components/hy-folding-panel/props.ts +1 -1
- package/components/hy-form/hy-form.vue +1 -1
- package/components/hy-form-group/hy-form-group.vue +183 -111
- package/components/hy-form-group/typing.d.ts +1 -1
- package/components/hy-form-item/hy-form-item.vue +1 -1
- package/components/hy-grid/hy-grid.vue +1 -1
- package/components/hy-icon/hy-icon.vue +1 -1
- package/components/hy-icon/index.scss +1 -1
- package/components/hy-image/hy-image.vue +1 -2
- package/components/hy-image/props.ts +10 -10
- package/components/hy-input/hy-input.vue +1 -2
- package/components/hy-line/hy-line.vue +1 -1
- package/components/hy-line-progress/hy-line-progress.vue +1 -2
- package/components/hy-list/hy-list.vue +1 -1
- package/components/hy-loading/hy-loading.vue +1 -1
- package/components/hy-menu/hy-menu.vue +1 -1
- package/components/hy-modal/hy-modal.vue +2 -2
- package/components/hy-modal/props.ts +13 -13
- package/components/hy-navbar/hy-navbar.vue +1 -2
- package/components/hy-navbar/props.ts +1 -1
- package/components/hy-notice-bar/hy-column-notice.vue +1 -2
- package/components/hy-notice-bar/hy-notice-bar.vue +1 -1
- package/components/hy-notice-bar/hy-row-notice.vue +1 -2
- package/components/hy-notice-bar/props.ts +1 -1
- package/components/hy-notify/hy-notify.vue +1 -2
- package/components/hy-number-step/hy-number-step.vue +1 -2
- package/components/hy-overlay/hy-overlay.vue +1 -1
- package/components/hy-pagination/hy-pagination.vue +1 -1
- package/components/hy-picker/hy-picker.vue +1 -2
- package/components/hy-popover/hy-popover.vue +9 -3
- package/components/hy-popup/hy-popup.vue +2 -3
- package/components/hy-price/hy-price.vue +3 -2
- package/components/hy-qrcode/hy-qrcode.vue +1 -1
- package/components/hy-radio/hy-radio.vue +1 -2
- package/components/hy-rate/hy-rate.vue +6 -4
- package/components/hy-rate/props.ts +6 -6
- package/components/hy-read-more/hy-read-more.vue +1 -2
- package/components/hy-scroll-list/hy-scroll-list.vue +1 -1
- package/components/hy-scroll-list/props.ts +0 -1
- package/components/hy-search/hy-search.vue +3 -3
- package/components/hy-signature/hy-signature.vue +1 -1
- package/components/hy-slider/hy-slider.vue +3 -13
- package/components/hy-slider/props.ts +1 -1
- package/components/hy-status-bar/hy-status-bar.vue +1 -1
- package/components/hy-status-bar/props.ts +1 -1
- package/components/hy-steps/hy-steps.vue +1 -2
- package/components/hy-subsection/hy-subsection.vue +1 -1
- package/components/hy-subsection/props.ts +0 -1
- package/components/hy-subsection/typing.d.ts +0 -1
- package/components/hy-swipe-action/hy-swipe-action.vue +1 -2
- package/components/hy-swiper/hy-swiper-indicator.vue +1 -1
- package/components/hy-swiper/hy-swiper.vue +2 -3
- package/components/hy-swiper/typing.d.ts +35 -36
- package/components/hy-switch/hy-switch.vue +2 -2
- package/components/hy-switch/typing.d.ts +0 -1
- package/components/hy-tabs/hy-tabs.vue +2 -3
- package/components/hy-tag/hy-tag.vue +1 -2
- package/components/hy-text/hy-text.vue +2 -2
- package/components/hy-text/typing.d.ts +26 -26
- package/components/hy-textarea/hy-textarea.vue +2 -2
- package/components/hy-toast/hy-toast.vue +33 -19
- package/components/hy-toast/index.scss +3 -2
- package/components/hy-toast/typing.d.ts +1 -1
- package/components/hy-tooltip/hy-tooltip.vue +8 -2
- package/components/hy-transition/hy-transition.vue +1 -1
- package/components/hy-upload/hy-upload.vue +7 -2
- package/components/hy-upload/props.ts +1 -1
- package/components/hy-warn/hy-warn.vue +1 -2
- package/components/hy-warn/typing.d.ts +12 -13
- package/components/hy-waterfall/hy-waterfall.vue +1 -1
- package/components/hy-watermark/hy-watermark.vue +1 -1
- package/components/index.ts +117 -118
- package/index.ts +1 -7
- package/{api → libs/api}/http.ts +2 -2
- package/libs/common/index.ts +2 -0
- package/libs/common/queue.ts +28 -0
- package/{composables → libs/composables}/index.ts +1 -0
- package/{composables → libs/composables}/usePopover.ts +7 -2
- package/{common/shakeService.ts → libs/composables/useShakeService.ts} +4 -2
- package/{composables → libs/composables}/useShare.ts +3 -0
- package/libs/composables/useToast.ts +45 -0
- package/{composables → libs/composables}/useTouch.ts +3 -0
- package/{global → libs/global}/register-properties.ts +1 -1
- package/libs/index.ts +7 -0
- package/{typing → libs/typing}/index.ts +0 -1
- package/{typing → libs/typing}/modules/form.ts +7 -7
- package/{utils → libs/utils}/utils.ts +1 -0
- package/package.json +2 -2
- package/common/index.ts +0 -3
- package/common/queue.ts +0 -34
- package/components/hy-form/README.md +0 -301
- package/components/hy-text/index.ts +0 -0
- package/components/yk-dialog/yk-dialog.vue +0 -129
- package/composables/useToast.ts +0 -51
- package/typing/modules/dialog.ts +0 -17
- /package/{api → libs/api}/index.ts +0 -0
- /package/{common → libs/common}/versionControl.ts +0 -0
- /package/{composables → libs/composables}/useQueue.ts +0 -0
- /package/{config → libs/config}/color.ts +0 -0
- /package/{config → libs/config}/icon.ts +0 -0
- /package/{config → libs/config}/index.ts +0 -0
- /package/{static/font → libs/css}/iconfont.css +0 -0
- /package/{global → libs/global}/index.ts +0 -0
- /package/{typing → libs/typing}/modules/common.d.ts +0 -0
- /package/{typing → libs/typing}/modules/enum.ts +0 -0
- /package/{typing → libs/typing}/modules/http.ts +0 -0
- /package/{typing → libs/typing}/modules/icon.d.ts +0 -0
- /package/{typing → libs/typing}/modules/rect.ts +0 -0
- /package/{utils → libs/utils}/address.json +0 -0
- /package/{utils → libs/utils}/base64.ts +0 -0
- /package/{utils → libs/utils}/calendar.js +0 -0
- /package/{utils → libs/utils}/colorGradient.ts +0 -0
- /package/{utils → libs/utils}/index.ts +0 -0
- /package/{utils → libs/utils}/inside.ts +0 -0
- /package/{utils → libs/utils}/inspect.ts +0 -0
package/components/index.ts
CHANGED
|
@@ -1,127 +1,126 @@
|
|
|
1
|
-
import HyTabBr from
|
|
2
|
-
import Dialog from './dialog'
|
|
1
|
+
import HyTabBr from "./hy-tabBar/hy-tabBar.vue";
|
|
3
2
|
// 组件库
|
|
4
|
-
import HyAddressPicker from
|
|
5
|
-
import HyAvatar from
|
|
6
|
-
import HyBackTop from
|
|
7
|
-
import HyBadge from
|
|
8
|
-
import HyButton from
|
|
9
|
-
import HyCard from
|
|
10
|
-
import HyCell from
|
|
11
|
-
import HyCheckButton from
|
|
12
|
-
import HyCheckbox from
|
|
13
|
-
import HyCountDown from
|
|
14
|
-
import HyCountTo from
|
|
15
|
-
import HyDatetimePicker from
|
|
16
|
-
import HyDivider from
|
|
17
|
-
import HyDropdown from
|
|
18
|
-
import HyDropdownItem from
|
|
19
|
-
import YkEmpty from
|
|
20
|
-
import YkFloatButton from
|
|
21
|
-
import HyFoldingPanel from
|
|
22
|
-
import HyForm from
|
|
23
|
-
import HyFormSimple from
|
|
24
|
-
import HyFormItem from
|
|
25
|
-
import HyGrid from
|
|
26
|
-
import HyIcon from
|
|
27
|
-
import HyImage from
|
|
28
|
-
import HyInput from
|
|
29
|
-
import HyLine from
|
|
30
|
-
import HyLineProgress from
|
|
31
|
-
import HyList from
|
|
32
|
-
import HyLoading from
|
|
33
|
-
import YkLogin from
|
|
34
|
-
import HyModal from
|
|
35
|
-
import HyNavbar from
|
|
36
|
-
import HyNoticeBar from
|
|
37
|
-
import HyNumberStep from
|
|
38
|
-
import HyOverlay from
|
|
39
|
-
import YkPrice from
|
|
40
|
-
import HyPicker from
|
|
41
|
-
import HyPopup from
|
|
42
|
-
import HyQrcode from
|
|
43
|
-
import HyRadio from
|
|
44
|
-
import HyRate from
|
|
45
|
-
import HyReadMore from
|
|
3
|
+
import HyAddressPicker from "./hy-address-picker/hy-address-picker.vue";
|
|
4
|
+
import HyAvatar from "./hy-avatar/hy-avatar.vue";
|
|
5
|
+
import HyBackTop from "./hy-back-top/hy-back-top.vue";
|
|
6
|
+
import HyBadge from "./hy-badge/hy-badge.vue";
|
|
7
|
+
import HyButton from "./hy-button/hy-button.vue";
|
|
8
|
+
import HyCard from "./hy-card/hy-card.vue";
|
|
9
|
+
import HyCell from "./hy-cell/hy-cell.vue";
|
|
10
|
+
import HyCheckButton from "./hy-check-button/hy-check-button.vue";
|
|
11
|
+
import HyCheckbox from "./hy-checkbox/hy-checkbox.vue";
|
|
12
|
+
import HyCountDown from "./hy-count-down/hy-count-down.vue";
|
|
13
|
+
import HyCountTo from "./hy-count-to/hy-count-to.vue";
|
|
14
|
+
import HyDatetimePicker from "./hy-datetime-picker/hy-datetime-picker.vue";
|
|
15
|
+
import HyDivider from "./hy-divider/hy-divider.vue";
|
|
16
|
+
import HyDropdown from "./hy-dropdown/hy-dropdown.vue";
|
|
17
|
+
import HyDropdownItem from "./hy-dropdown-item/hy-dropdown-item.vue";
|
|
18
|
+
import YkEmpty from "./hy-empty/hy-empty.vue";
|
|
19
|
+
import YkFloatButton from "./hy-float-button/hy-float-button.vue";
|
|
20
|
+
import HyFoldingPanel from "@/package/components/hy-folding-panel/hy-folding-panel.vue";
|
|
21
|
+
import HyForm from "@/package/components/hy-form-group/hy-form.vue";
|
|
22
|
+
import HyFormSimple from "@/package/components/hy-form/hy-form-simple.vue";
|
|
23
|
+
import HyFormItem from "./hy-form-item/hy-form-item.vue";
|
|
24
|
+
import HyGrid from "./hy-grid/hy-grid.vue";
|
|
25
|
+
import HyIcon from "./hy-icon/hy-icon.vue";
|
|
26
|
+
import HyImage from "./hy-image/hy-image.vue";
|
|
27
|
+
import HyInput from "./hy-input/hy-input.vue";
|
|
28
|
+
import HyLine from "./hy-line/hy-line.vue";
|
|
29
|
+
import HyLineProgress from "./hy-line-progress/hy-line-progress.vue";
|
|
30
|
+
import HyList from "./hy-list/hy-list.vue";
|
|
31
|
+
import HyLoading from "./hy-loading/hy-loading.vue";
|
|
32
|
+
import YkLogin from "./hy-login/hy-login.vue";
|
|
33
|
+
import HyModal from "./hy-modal/hy-modal.vue";
|
|
34
|
+
import HyNavbar from "./hy-navbar/hy-navbar.vue";
|
|
35
|
+
import HyNoticeBar from "./hy-notice-bar/hy-notice-bar.vue";
|
|
36
|
+
import HyNumberStep from "./hy-number-step/hy-number-step.vue";
|
|
37
|
+
import HyOverlay from "./hy-overlay/hy-overlay.vue";
|
|
38
|
+
import YkPrice from "./hy-price/hy-price.vue";
|
|
39
|
+
import HyPicker from "./hy-picker/hy-picker.vue";
|
|
40
|
+
import HyPopup from "./hy-popup/hy-popup.vue";
|
|
41
|
+
import HyQrcode from "./hy-qrcode/hy-qrcode.vue";
|
|
42
|
+
import HyRadio from "./hy-radio/hy-radio.vue";
|
|
43
|
+
import HyRate from "./hy-rate/hy-rate.vue";
|
|
44
|
+
import HyReadMore from "./hy-read-more/hy-read-more.vue";
|
|
46
45
|
// import HySafeBottom from "./hy-safe-bottom/hy-safe-bottom.vue";
|
|
47
|
-
import HyScrollList from
|
|
48
|
-
import HySearch from
|
|
49
|
-
import HySlider from
|
|
50
|
-
import HyStatusBar from
|
|
51
|
-
import HySteps from
|
|
52
|
-
import HySubsection from
|
|
53
|
-
import HySwiper from
|
|
54
|
-
import HySwitch from
|
|
55
|
-
import HyTabs from
|
|
56
|
-
import HyTag from
|
|
57
|
-
import HyTextarea from
|
|
58
|
-
import HyTooltip from
|
|
59
|
-
import HyTransition from
|
|
60
|
-
import HyUpload from
|
|
61
|
-
import HyWarn from
|
|
46
|
+
import HyScrollList from "./hy-scroll-list/hy-scroll-list.vue";
|
|
47
|
+
import HySearch from "./hy-search/hy-search.vue";
|
|
48
|
+
import HySlider from "./hy-slider/hy-slider.vue";
|
|
49
|
+
import HyStatusBar from "./hy-status-bar/hy-status-bar.vue";
|
|
50
|
+
import HySteps from "./hy-steps/hy-steps.vue";
|
|
51
|
+
import HySubsection from "./hy-subsection/hy-subsection.vue";
|
|
52
|
+
import HySwiper from "./hy-swiper/hy-swiper.vue";
|
|
53
|
+
import HySwitch from "./hy-switch/hy-switch.vue";
|
|
54
|
+
import HyTabs from "./hy-tabs/hy-tabs.vue";
|
|
55
|
+
import HyTag from "./hy-tag/hy-tag.vue";
|
|
56
|
+
import HyTextarea from "./hy-textarea/hy-textarea.vue";
|
|
57
|
+
import HyTooltip from "./hy-tooltip/hy-tooltip.vue";
|
|
58
|
+
import HyTransition from "./hy-transition/hy-transition.vue";
|
|
59
|
+
import HyUpload from "./hy-upload/hy-upload.vue";
|
|
60
|
+
import HyWarn from "./hy-warn/hy-warn.vue";
|
|
62
61
|
|
|
63
62
|
const install = (Vue: any) => {
|
|
64
|
-
Vue.component(
|
|
63
|
+
Vue.component("hy-tabBar", HyTabBr);
|
|
65
64
|
|
|
66
|
-
Vue.component(
|
|
67
|
-
Vue.component(
|
|
68
|
-
Vue.component(
|
|
69
|
-
Vue.component(
|
|
70
|
-
Vue.component(
|
|
71
|
-
Vue.component(
|
|
72
|
-
Vue.component(
|
|
73
|
-
Vue.component(
|
|
74
|
-
Vue.component(
|
|
75
|
-
Vue.component(
|
|
76
|
-
Vue.component(
|
|
77
|
-
Vue.component(
|
|
78
|
-
Vue.component(
|
|
79
|
-
Vue.component(
|
|
80
|
-
Vue.component(
|
|
81
|
-
Vue.component(
|
|
82
|
-
Vue.component(
|
|
83
|
-
Vue.component(
|
|
84
|
-
Vue.component(
|
|
85
|
-
Vue.component(
|
|
86
|
-
Vue.component(
|
|
87
|
-
Vue.component(
|
|
88
|
-
Vue.component(
|
|
89
|
-
Vue.component(
|
|
90
|
-
Vue.component(
|
|
91
|
-
Vue.component(
|
|
92
|
-
Vue.component(
|
|
93
|
-
Vue.component(
|
|
94
|
-
Vue.component(
|
|
65
|
+
Vue.component("HyAddressPicker", HyAddressPicker);
|
|
66
|
+
Vue.component("HyAvatar", HyAvatar);
|
|
67
|
+
Vue.component("HyBackTop", HyBackTop);
|
|
68
|
+
Vue.component("HyBadge", HyBadge);
|
|
69
|
+
Vue.component("HyButton", HyButton);
|
|
70
|
+
Vue.component("HyCard", HyCard);
|
|
71
|
+
Vue.component("HyCell", HyCell);
|
|
72
|
+
Vue.component("HyCheckButton", HyCheckButton);
|
|
73
|
+
Vue.component("HyCheckbox", HyCheckbox);
|
|
74
|
+
Vue.component("HyCountDown", HyCountDown);
|
|
75
|
+
Vue.component("HyCountTo", HyCountTo);
|
|
76
|
+
Vue.component("HyDatetimePicker", HyDatetimePicker);
|
|
77
|
+
Vue.component("HyDivider", HyDivider);
|
|
78
|
+
Vue.component("HyDropdown", HyDropdown);
|
|
79
|
+
Vue.component("HyDropdownItem", HyDropdownItem);
|
|
80
|
+
Vue.component("YkEmpty", YkEmpty);
|
|
81
|
+
Vue.component("YkFloatButton", YkFloatButton);
|
|
82
|
+
Vue.component("HyFoldingPanel", HyFoldingPanel);
|
|
83
|
+
Vue.component("HyForm", HyForm);
|
|
84
|
+
Vue.component("HyFormSimple", HyFormSimple);
|
|
85
|
+
Vue.component("HyFormItem", HyFormItem);
|
|
86
|
+
Vue.component("HyGrid", HyGrid);
|
|
87
|
+
Vue.component("HyIcon", HyIcon);
|
|
88
|
+
Vue.component("HyImage", HyImage);
|
|
89
|
+
Vue.component("HyInput", HyInput);
|
|
90
|
+
Vue.component("HyLine", HyLine);
|
|
91
|
+
Vue.component("HyLineProgress", HyLineProgress);
|
|
92
|
+
Vue.component("HyList", HyList);
|
|
93
|
+
Vue.component("HyLoading", HyLoading);
|
|
95
94
|
// Vue.component("YkLogin", YkLogin);
|
|
96
|
-
Vue.component(
|
|
97
|
-
Vue.component(
|
|
98
|
-
Vue.component(
|
|
99
|
-
Vue.component(
|
|
100
|
-
Vue.component(
|
|
101
|
-
Vue.component(
|
|
102
|
-
Vue.component(
|
|
103
|
-
Vue.component(
|
|
104
|
-
Vue.component(
|
|
105
|
-
Vue.component(
|
|
106
|
-
Vue.component(
|
|
107
|
-
Vue.component(
|
|
108
|
-
Vue.component(
|
|
109
|
-
Vue.component(
|
|
110
|
-
Vue.component(
|
|
111
|
-
Vue.component(
|
|
112
|
-
Vue.component(
|
|
113
|
-
Vue.component(
|
|
114
|
-
Vue.component(
|
|
115
|
-
Vue.component(
|
|
116
|
-
Vue.component(
|
|
117
|
-
Vue.component(
|
|
118
|
-
Vue.component(
|
|
119
|
-
Vue.component(
|
|
120
|
-
Vue.component(
|
|
121
|
-
Vue.component(
|
|
122
|
-
Vue.component(
|
|
95
|
+
Vue.component("HyModal", HyModal);
|
|
96
|
+
Vue.component("HyNavbar", HyNavbar);
|
|
97
|
+
Vue.component("HyNoticeBar", HyNoticeBar);
|
|
98
|
+
Vue.component("HyNumberStep", HyNumberStep);
|
|
99
|
+
Vue.component("HyOverlay", HyOverlay);
|
|
100
|
+
Vue.component("YkPrice", YkPrice);
|
|
101
|
+
Vue.component("HyPicker", HyPicker);
|
|
102
|
+
Vue.component("HyPopup", HyPopup);
|
|
103
|
+
Vue.component("HyQrcode", HyQrcode);
|
|
104
|
+
Vue.component("HyRadio", HyRadio);
|
|
105
|
+
Vue.component("HyRate", HyRate);
|
|
106
|
+
Vue.component("HyReadMore", HyReadMore);
|
|
107
|
+
Vue.component("HyScrollList", HyScrollList);
|
|
108
|
+
Vue.component("HySearch", HySearch);
|
|
109
|
+
Vue.component("HySlider", HySlider);
|
|
110
|
+
Vue.component("HyStatusBar", HyStatusBar);
|
|
111
|
+
Vue.component("HySteps", HySteps);
|
|
112
|
+
Vue.component("HySubsection", HySubsection);
|
|
113
|
+
Vue.component("HySwiper", HySwiper);
|
|
114
|
+
Vue.component("HySwitch", HySwitch);
|
|
115
|
+
Vue.component("HyTabs", HyTabs);
|
|
116
|
+
Vue.component("HyTag", HyTag);
|
|
117
|
+
Vue.component("HyTextarea", HyTextarea);
|
|
118
|
+
Vue.component("HyTooltip", HyTooltip);
|
|
119
|
+
Vue.component("HyTransition", HyTransition);
|
|
120
|
+
Vue.component("HyUpload", HyUpload);
|
|
121
|
+
Vue.component("HyWarn", HyWarn);
|
|
123
122
|
// Vue.config.globalProperties.$dialog = myDialog;
|
|
124
|
-
}
|
|
123
|
+
};
|
|
125
124
|
export {
|
|
126
125
|
install,
|
|
127
126
|
HyAddressPicker,
|
|
@@ -181,4 +180,4 @@ export {
|
|
|
181
180
|
HyTransition,
|
|
182
181
|
HyUpload,
|
|
183
182
|
HyWarn,
|
|
184
|
-
}
|
|
183
|
+
};
|
package/index.ts
CHANGED
package/{api → libs/api}/http.ts
RENAMED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 互相关闭
|
|
3
|
+
* */
|
|
4
|
+
let queue: any[] = [];
|
|
5
|
+
|
|
6
|
+
export function pushToQueue(comp: any) {
|
|
7
|
+
queue.push(comp);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function removeFromQueue(comp: any) {
|
|
11
|
+
queue = queue.filter((item) => {
|
|
12
|
+
return item.$.uid !== comp.$.uid;
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export function closeOther(comp: any) {
|
|
17
|
+
queue.forEach((item) => {
|
|
18
|
+
if (item.$.uid !== comp.$.uid) {
|
|
19
|
+
item.$.exposed.close();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function closeOutside() {
|
|
25
|
+
queue.forEach((item) => {
|
|
26
|
+
item.$.exposed.close();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 气泡组件hooks
|
|
3
|
+
* */
|
|
4
|
+
|
|
1
5
|
import { getCurrentInstance, ref } from "vue";
|
|
2
6
|
import type { CSSProperties } from "vue";
|
|
3
|
-
import { getRect, isObject } from "
|
|
4
|
-
import type { IOffset, IPlacementVo } from "
|
|
7
|
+
import { getRect, isObject } from "../../libs";
|
|
8
|
+
import type { IOffset, IPlacementVo } from "../../components/hy-popover/typing";
|
|
5
9
|
|
|
6
10
|
export function usePopover(visibleArrow = true) {
|
|
7
11
|
const instance = getCurrentInstance();
|
|
@@ -89,6 +93,7 @@ export function usePopover(visibleArrow = true) {
|
|
|
89
93
|
(horizontalY - 17 > 0 ? 0 : horizontalY - 25) +
|
|
90
94
|
(offset[1] ? offset[1] : offset[0]);
|
|
91
95
|
} else if (isObject(offset)) {
|
|
96
|
+
offset = offset as Record<"x" | "y", number>;
|
|
92
97
|
offsetX = (verticalX - 17 > 0 ? 0 : verticalX - 25) + offset.x;
|
|
93
98
|
offsetY = (horizontalY - 17 > 0 ? 0 : horizontalY - 25) + offset.y;
|
|
94
99
|
} else {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 消息提示hooks
|
|
3
|
+
* */
|
|
4
|
+
|
|
5
|
+
import type ToastOptions from "../../components/hy-toast/typing";
|
|
6
|
+
import { error } from "../../libs";
|
|
7
|
+
|
|
8
|
+
// 用于缓存全局唯一实例
|
|
9
|
+
let toastInstance: any = null;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* useToast 适用于任意页面直接调用 toast
|
|
13
|
+
* 兼容 H5 + 微信小程序 + App
|
|
14
|
+
*/
|
|
15
|
+
export const useToast = () => {
|
|
16
|
+
const show = (msg: string, opt?: ToastOptions) =>
|
|
17
|
+
openToast({ message: msg, icon: false, ...opt });
|
|
18
|
+
const info = (msg: string, opt?: ToastOptions) =>
|
|
19
|
+
openToast({ message: msg, type: "info", ...opt });
|
|
20
|
+
const success = (msg: string, opt?: ToastOptions) =>
|
|
21
|
+
openToast({ message: msg, type: "success", ...opt });
|
|
22
|
+
const error = (msg: string, opt?: ToastOptions) =>
|
|
23
|
+
openToast({ message: msg, type: "error", ...opt });
|
|
24
|
+
const warning = (msg: string, opt?: ToastOptions) =>
|
|
25
|
+
openToast({ message: msg, type: "warning", ...opt });
|
|
26
|
+
const primary = (msg: string, opt?: ToastOptions) =>
|
|
27
|
+
openToast({ message: msg, type: "primary", ...opt });
|
|
28
|
+
const loading = (msg: string = "加载中...", opt?: ToastOptions) =>
|
|
29
|
+
openToast({ message: msg, loading: true, ...opt });
|
|
30
|
+
const close = (all?: boolean) => closeToast();
|
|
31
|
+
|
|
32
|
+
return { show, info, success, error, warning, primary, loading, close };
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* ✅ 实现
|
|
37
|
+
* 页面创建总事件,调用方法实现
|
|
38
|
+
*/
|
|
39
|
+
const openToast = (opt: ToastOptions) => {
|
|
40
|
+
uni.$emit("__hy_toast_open__", opt);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const closeToast = () => {
|
|
44
|
+
uni.$emit("__hy_toast_close__");
|
|
45
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { App } from "vue";
|
|
2
|
-
import { addUnit, bytesToSize, formatTime, random } from "
|
|
2
|
+
import { addUnit, bytesToSize, formatTime, random } from "../../libs";
|
|
3
3
|
export default function registerProperties(app: App) {
|
|
4
4
|
app.config.globalProperties.$hy = {
|
|
5
5
|
/**
|
package/libs/index.ts
ADDED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DateModeEnum } from "./enum";
|
|
2
|
-
import type { CheckboxColumnsVo } from "
|
|
3
|
-
import type HyInputProps from "
|
|
4
|
-
import type HyTextareaProps from "
|
|
5
|
-
import type HySwitchProps from "
|
|
6
|
-
import type HyPickerProps from "
|
|
7
|
-
import type HyRadioProps from "
|
|
8
|
-
import type HyCheckButtonProps from "
|
|
2
|
+
import type { CheckboxColumnsVo } from "../../../components/hy-check-button/typing";
|
|
3
|
+
import type HyInputProps from "../../../components/hy-input/typing";
|
|
4
|
+
import type HyTextareaProps from "../../../components/hy-textarea/typing";
|
|
5
|
+
import type HySwitchProps from "../../../components/hy-switch/typing";
|
|
6
|
+
import type HyPickerProps from "../../../components/hy-picker/typing";
|
|
7
|
+
import type HyRadioProps from "../../../components/hy-radio/typing";
|
|
8
|
+
import type HyCheckButtonProps from "../../../components/hy-check-button/typing";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* 类型
|
|
@@ -74,6 +74,7 @@ const padZero = (value: string | number): string => {
|
|
|
74
74
|
* @returns {String}
|
|
75
75
|
*/
|
|
76
76
|
const addZero = (value: string | number, length: number): string => {
|
|
77
|
+
if (value === undefined || value === null) return "";
|
|
77
78
|
let val = value.toString();
|
|
78
79
|
if (length > val.length) {
|
|
79
80
|
val += "0".repeat(length - val.length);
|
package/package.json
CHANGED
package/common/index.ts
DELETED
package/common/queue.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: weisheng
|
|
3
|
-
* @Date: 2023-07-02 22:51:06
|
|
4
|
-
* @LastEditTime: 2024-03-16 19:59:07
|
|
5
|
-
* @LastEditors: weisheng
|
|
6
|
-
* @Description:
|
|
7
|
-
* @FilePath: /wot-design-uni/src/uni_modules/wot-design-uni/components/common/clickoutside.ts
|
|
8
|
-
* 记得注释
|
|
9
|
-
*/
|
|
10
|
-
let queue: any[] = []
|
|
11
|
-
|
|
12
|
-
export function pushToQueue(comp: any) {
|
|
13
|
-
queue.push(comp)
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function removeFromQueue(comp: any) {
|
|
17
|
-
queue = queue.filter((item) => {
|
|
18
|
-
return item.$.uid !== comp.$.uid
|
|
19
|
-
})
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function closeOther(comp: any) {
|
|
23
|
-
queue.forEach((item) => {
|
|
24
|
-
if (item.$.uid !== comp.$.uid) {
|
|
25
|
-
item.$.exposed.close()
|
|
26
|
-
}
|
|
27
|
-
})
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function closeOutside() {
|
|
31
|
-
queue.forEach((item) => {
|
|
32
|
-
item.$.exposed.close()
|
|
33
|
-
})
|
|
34
|
-
}
|