hy-app 0.1.2 → 0.1.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/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 +17 -128
- package/components/hy-button/index.scss +116 -0
- package/components/hy-button/typing.d.ts +1 -1
- 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 +26 -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 +217 -0
- package/components/hy-float-button/index.scss +67 -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 +216 -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 +53 -0
- package/components/hy-login/TheUserLogin.vue +20 -88
- 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 +16 -58
- 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-parse/hy-parse.vue +499 -0
- package/components/hy-parse/index.scss +9 -0
- package/components/hy-parse/node/node.vue +584 -0
- package/components/hy-parse/parser.js +1337 -0
- package/components/hy-parse/props.ts +19 -0
- package/components/hy-parse/typing.d.ts +68 -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 +7 -19
- package/components/hy-price/index.scss +11 -0
- package/components/hy-price/props.ts +4 -3
- package/components/hy-price/typing.d.ts +8 -4
- 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 +18 -95
- 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-submitBar/Index.vue +17 -0
- package/components/hy-submitBar/hy-submitBar.vue +216 -0
- package/components/hy-submitBar/index.scss +9 -0
- package/components/hy-submitBar/props.ts +22 -0
- package/components/hy-submitBar/typing.d.ts +88 -0
- 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 +25 -220
- package/components/hy-tag/index.scss +205 -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-toast/hy-toast.vue +175 -0
- package/components/hy-toast/index.scss +77 -0
- package/components/hy-toast/props.ts +3 -0
- package/components/hy-toast/typing.d.ts +38 -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 +17 -144
- 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/hy-waterfall.vue +168 -38
- package/components/hy-waterfall/index.scss +16 -0
- package/components/hy-waterfall/props.ts +4 -5
- package/components/hy-waterfall/typing.d.ts +5 -9
- package/components/index.ts +25 -1
- package/components/message/index.ts +54 -54
- package/composables/index.ts +1 -0
- package/composables/useShare.ts +27 -0
- package/config/color.ts +3 -2
- package/config/icon.ts +21 -1
- package/global/index.ts +6 -6
- package/global/register-properties.ts +2 -2
- package/index.scss +2 -1
- package/index.ts +9 -8
- package/libs/css/common.scss +14 -2
- package/package.json +3 -2
- package/{libs/css → public/font}/iconfont.css +4 -4
- package/theme.scss +6 -4
- package/typing/index.ts +1 -1
- package/typing/modules/common.d.ts +36 -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 +115 -0
- package/utils/utils.ts +20 -19
- 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
package/components/index.ts
CHANGED
|
@@ -14,17 +14,24 @@ import HyCard from "./hy-card/hy-card.vue";
|
|
|
14
14
|
import HyCell from "./hy-cell/hy-cell.vue";
|
|
15
15
|
import HyCheckButton from "./hy-check-button/hy-check-button.vue";
|
|
16
16
|
import HyCheckbox from "./hy-checkbox/hy-checkbox.vue";
|
|
17
|
+
import HyCountDown from "./hy-count-down/hy-count-down.vue";
|
|
18
|
+
import HyCountTo from "./hy-count-to/hy-count-to.vue";
|
|
17
19
|
import HyDatetimePicker from "./hy-datetime-picker/hy-datetime-picker.vue";
|
|
18
20
|
import HyDivider from "./hy-divider/hy-divider.vue";
|
|
21
|
+
import HyDropdown from "./hy-dropdown/hy-dropdown.vue";
|
|
22
|
+
import HyDropdownItem from "./hy-dropdown-item/hy-dropdown-item.vue";
|
|
19
23
|
import YkEmpty from "./hy-empty/hy-empty.vue";
|
|
24
|
+
import YkFloatButton from "./hy-float-button/hy-float-button.vue";
|
|
20
25
|
import HyFoldingPanel from "./hy-folding-panel/hy-folding-panel.vue";
|
|
21
26
|
import HyForm from "./hy-form/hy-form.vue";
|
|
22
27
|
import HyGrid from "./hy-grid/hy-grid.vue";
|
|
23
28
|
import HyIcon from "./hy-icon/hy-icon.vue";
|
|
29
|
+
import HyImage from "./hy-image/hy-image.vue";
|
|
24
30
|
import HyInput from "./hy-input/hy-input.vue";
|
|
25
31
|
import HyLine from "./hy-line/hy-line.vue";
|
|
26
32
|
import HyLineProgress from "./hy-line-progress/hy-line-progress.vue";
|
|
27
33
|
import HyList from "./hy-list/hy-list.vue";
|
|
34
|
+
import HyLoading from "./hy-loading/hy-loading.vue";
|
|
28
35
|
import YkLogin from "./hy-login/hy-login.vue";
|
|
29
36
|
import HyModal from "./hy-modal/hy-modal.vue";
|
|
30
37
|
import HyNavbar from "./hy-navbar/hy-navbar.vue";
|
|
@@ -42,6 +49,7 @@ import HyReadMore from "./hy-read-more/hy-read-more.vue";
|
|
|
42
49
|
import HyScrollList from "./hy-scroll-list/hy-scroll-list.vue";
|
|
43
50
|
import HySearch from "./hy-search/hy-search.vue";
|
|
44
51
|
import HySlider from "./hy-slider/hy-slider.vue";
|
|
52
|
+
import HyStatusBar from "./hy-status-bar/hy-status-bar.vue";
|
|
45
53
|
import HySteps from "./hy-steps/hy-steps.vue";
|
|
46
54
|
import HySubsection from "./hy-subsection/hy-subsection.vue";
|
|
47
55
|
import HySwiper from "./hy-swiper/hy-swiper.vue";
|
|
@@ -66,17 +74,24 @@ const install = (Vue: any) => {
|
|
|
66
74
|
Vue.component("HyCell", HyCell);
|
|
67
75
|
Vue.component("HyCheckButton", HyCheckButton);
|
|
68
76
|
Vue.component("HyCheckbox", HyCheckbox);
|
|
77
|
+
Vue.component("HyCountDown", HyCountDown);
|
|
78
|
+
Vue.component("HyCountTo", HyCountTo);
|
|
69
79
|
Vue.component("HyDatetimePicker", HyDatetimePicker);
|
|
70
80
|
Vue.component("HyDivider", HyDivider);
|
|
81
|
+
Vue.component("HyDropdown", HyDropdown);
|
|
82
|
+
Vue.component("HyDropdownItem", HyDropdownItem);
|
|
71
83
|
Vue.component("YkEmpty", YkEmpty);
|
|
84
|
+
Vue.component("YkFloatButton", YkFloatButton);
|
|
72
85
|
Vue.component("HyFoldingPanel", HyFoldingPanel);
|
|
73
86
|
Vue.component("HyForm", HyForm);
|
|
74
87
|
Vue.component("HyGrid", HyGrid);
|
|
75
88
|
Vue.component("HyIcon", HyIcon);
|
|
89
|
+
Vue.component("HyImage", HyImage);
|
|
76
90
|
Vue.component("HyInput", HyInput);
|
|
77
91
|
Vue.component("HyLine", HyLine);
|
|
78
92
|
Vue.component("HyLineProgress", HyLineProgress);
|
|
79
93
|
Vue.component("HyList", HyList);
|
|
94
|
+
Vue.component("HyLoading", HyLoading);
|
|
80
95
|
Vue.component("YkLogin", YkLogin);
|
|
81
96
|
Vue.component("HyModal", HyModal);
|
|
82
97
|
Vue.component("HyNavbar", HyNavbar);
|
|
@@ -93,6 +108,7 @@ const install = (Vue: any) => {
|
|
|
93
108
|
Vue.component("HyScrollList", HyScrollList);
|
|
94
109
|
Vue.component("HySearch", HySearch);
|
|
95
110
|
Vue.component("HySlider", HySlider);
|
|
111
|
+
Vue.component("HyStatusBar", HyStatusBar);
|
|
96
112
|
Vue.component("HySteps", HySteps);
|
|
97
113
|
Vue.component("HySubsection", HySubsection);
|
|
98
114
|
Vue.component("HySwiper", HySwiper);
|
|
@@ -121,17 +137,24 @@ export {
|
|
|
121
137
|
HyCell,
|
|
122
138
|
HyCheckButton,
|
|
123
139
|
HyCheckbox,
|
|
140
|
+
HyCountDown,
|
|
141
|
+
HyCountTo,
|
|
124
142
|
HyDatetimePicker,
|
|
125
143
|
HyDivider,
|
|
144
|
+
HyDropdown,
|
|
145
|
+
HyDropdownItem,
|
|
126
146
|
YkEmpty,
|
|
147
|
+
YkFloatButton,
|
|
127
148
|
HyFoldingPanel,
|
|
128
149
|
HyForm,
|
|
129
150
|
HyGrid,
|
|
130
151
|
HyIcon,
|
|
152
|
+
HyImage,
|
|
131
153
|
HyInput,
|
|
132
154
|
HyLine,
|
|
133
155
|
HyLineProgress,
|
|
134
156
|
HyList,
|
|
157
|
+
HyLoading,
|
|
135
158
|
YkLogin,
|
|
136
159
|
HyModal,
|
|
137
160
|
HyNavbar,
|
|
@@ -148,6 +171,7 @@ export {
|
|
|
148
171
|
HyScrollList,
|
|
149
172
|
HySearch,
|
|
150
173
|
HySlider,
|
|
174
|
+
HyStatusBar,
|
|
151
175
|
HySteps,
|
|
152
176
|
HySubsection,
|
|
153
177
|
HySwiper,
|
|
@@ -158,5 +182,5 @@ export {
|
|
|
158
182
|
HyTooltip,
|
|
159
183
|
HyTransition,
|
|
160
184
|
HyUpload,
|
|
161
|
-
HyWarn
|
|
185
|
+
HyWarn,
|
|
162
186
|
};
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { createVNode, render } from "vue";
|
|
2
|
-
import Dialog, { DialogParam } from "./TheMessage.vue";
|
|
3
|
-
|
|
4
|
-
let instance: any = null;
|
|
5
|
-
|
|
6
|
-
const successIcon = "https://pic1.imgdb.cn/item/67a74cbdd0e0a243d4fd160b.png";
|
|
7
|
-
const errorIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9078.png";
|
|
8
|
-
const warningIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9079.png";
|
|
9
|
-
/**
|
|
10
|
-
* @description 创建div添加dialog组件
|
|
11
|
-
* */
|
|
12
|
-
const mountDialog = () => {
|
|
13
|
-
if (!instance) {
|
|
14
|
-
const container = document.createElement("div");
|
|
15
|
-
document.body.appendChild(container); // 先添加到 body
|
|
16
|
-
instance = createVNode(Dialog);
|
|
17
|
-
render(instance, container);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* @description 打开传参
|
|
22
|
-
* */
|
|
23
|
-
const openParams = (options: DialogParam, icon: string) => {
|
|
24
|
-
instance.component.exposed.open(
|
|
25
|
-
Object.assign(
|
|
26
|
-
{
|
|
27
|
-
icon
|
|
28
|
-
},
|
|
29
|
-
options
|
|
30
|
-
)
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const DialogService = {
|
|
35
|
-
success(options: DialogParam) {
|
|
36
|
-
mountDialog();
|
|
37
|
-
openParams(options, successIcon);
|
|
38
|
-
},
|
|
39
|
-
error(options: DialogParam) {
|
|
40
|
-
mountDialog();
|
|
41
|
-
openParams(options, errorIcon);
|
|
42
|
-
},
|
|
43
|
-
warning(options: DialogParam) {
|
|
44
|
-
mountDialog();
|
|
45
|
-
openParams(options, warningIcon);
|
|
46
|
-
},
|
|
47
|
-
close() {
|
|
48
|
-
if (instance) {
|
|
49
|
-
instance.component.exposed.close();
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export default DialogService;
|
|
1
|
+
import { createVNode, render } from "vue";
|
|
2
|
+
import Dialog, { type DialogParam } from "./TheMessage.vue";
|
|
3
|
+
|
|
4
|
+
let instance: any = null;
|
|
5
|
+
|
|
6
|
+
const successIcon = "https://pic1.imgdb.cn/item/67a74cbdd0e0a243d4fd160b.png";
|
|
7
|
+
const errorIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9078.png";
|
|
8
|
+
const warningIcon = "https://pic1.imgdb.cn/item/67b03ba3d0e0a243d4ff9079.png";
|
|
9
|
+
/**
|
|
10
|
+
* @description 创建div添加dialog组件
|
|
11
|
+
* */
|
|
12
|
+
const mountDialog = () => {
|
|
13
|
+
if (!instance) {
|
|
14
|
+
const container = document.createElement("div");
|
|
15
|
+
document.body.appendChild(container); // 先添加到 body
|
|
16
|
+
instance = createVNode(Dialog);
|
|
17
|
+
render(instance, container);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @description 打开传参
|
|
22
|
+
* */
|
|
23
|
+
const openParams = (options: DialogParam, icon: string) => {
|
|
24
|
+
instance.component.exposed.open(
|
|
25
|
+
Object.assign(
|
|
26
|
+
{
|
|
27
|
+
icon,
|
|
28
|
+
},
|
|
29
|
+
options,
|
|
30
|
+
),
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const DialogService = {
|
|
35
|
+
success(options: DialogParam) {
|
|
36
|
+
mountDialog();
|
|
37
|
+
openParams(options, successIcon);
|
|
38
|
+
},
|
|
39
|
+
error(options: DialogParam) {
|
|
40
|
+
mountDialog();
|
|
41
|
+
openParams(options, errorIcon);
|
|
42
|
+
},
|
|
43
|
+
warning(options: DialogParam) {
|
|
44
|
+
mountDialog();
|
|
45
|
+
openParams(options, warningIcon);
|
|
46
|
+
},
|
|
47
|
+
close() {
|
|
48
|
+
if (instance) {
|
|
49
|
+
instance.component.exposed.close();
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default DialogService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./useShare";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface ShareConfig {
|
|
2
|
+
title?: string;
|
|
3
|
+
path?: string;
|
|
4
|
+
friendImageUrl?: string;
|
|
5
|
+
timelineImageUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const useShare = (config: ShareConfig = {}) => {
|
|
9
|
+
return {
|
|
10
|
+
//分享给好友的处理函数
|
|
11
|
+
onShareAppMessage() {
|
|
12
|
+
return {
|
|
13
|
+
title: config.title,
|
|
14
|
+
path: config.path,
|
|
15
|
+
imageUrl: config.friendImageUrl,
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
//分享到朋友圈的处理函数
|
|
20
|
+
onShareTimeline() {
|
|
21
|
+
return {
|
|
22
|
+
title: config.title,
|
|
23
|
+
imageUrl: config.timelineImageUrl,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
};
|
package/config/color.ts
CHANGED
package/config/icon.ts
CHANGED
|
@@ -362,5 +362,25 @@ export const IconConfig = {
|
|
|
362
362
|
/**
|
|
363
363
|
* @description 分享-实心
|
|
364
364
|
* */
|
|
365
|
-
SHARE_FILL: "share-fill"
|
|
365
|
+
SHARE_FILL: "share-fill",
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* @description 不同主题对应不同的图标
|
|
370
|
+
* */
|
|
371
|
+
export const iconName = (type: string) => {
|
|
372
|
+
switch (type) {
|
|
373
|
+
case "success":
|
|
374
|
+
return IconConfig.SUCCESS_FILL;
|
|
375
|
+
case "error":
|
|
376
|
+
return IconConfig.CLOSE_CIRCLE_FILL;
|
|
377
|
+
case "warning":
|
|
378
|
+
return IconConfig.NOTICE_FILL;
|
|
379
|
+
case "info":
|
|
380
|
+
return IconConfig.HELP_FILL;
|
|
381
|
+
case "primary":
|
|
382
|
+
return IconConfig.MESSAGE_FILL;
|
|
383
|
+
default:
|
|
384
|
+
return IconConfig.CLOSE_CIRCLE_FILL;
|
|
385
|
+
}
|
|
366
386
|
};
|
package/global/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { App } from "vue";
|
|
2
|
-
import registerProperties from "./register-properties";
|
|
3
|
-
|
|
4
|
-
export const globalRegister = (app: App): void => {
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
import type { App } from "vue";
|
|
2
|
+
import registerProperties from "./register-properties";
|
|
3
|
+
|
|
4
|
+
export const globalRegister = (app: App): void => {
|
|
5
|
+
app.use(registerProperties);
|
|
6
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { App } from "vue";
|
|
1
|
+
import type { App } from "vue";
|
|
2
2
|
import { addUnit, bytesToSize, formatTime, random } from "../utils";
|
|
3
3
|
export default function registerProperties(app: App) {
|
|
4
4
|
app.config.globalProperties.$hy = {
|
|
@@ -32,6 +32,6 @@ export default function registerProperties(app: App) {
|
|
|
32
32
|
* @param {Number} bytes 字节
|
|
33
33
|
* @returns {String} 返回单位大小
|
|
34
34
|
* */
|
|
35
|
-
bytesToSize: (bytes: number): string => bytesToSize(bytes)
|
|
35
|
+
bytesToSize: (bytes: number): string => bytesToSize(bytes),
|
|
36
36
|
};
|
|
37
37
|
}
|
package/index.scss
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "./libs/css/common.scss";
|
|
2
|
+
//@use "./libs/css/mixin.scss" as HyMixin;
|
package/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
export * from "./common";
|
|
2
|
-
export * from "./utils";
|
|
3
|
-
export * from "./store";
|
|
4
|
-
export * from "./components";
|
|
5
|
-
export * from "./global";
|
|
6
|
-
export * from "./typing";
|
|
7
|
-
export * from "./api";
|
|
8
|
-
export * from "./config";
|
|
1
|
+
export * from "./common";
|
|
2
|
+
export * from "./utils";
|
|
3
|
+
export * from "./store";
|
|
4
|
+
export * from "./components";
|
|
5
|
+
export * from "./global";
|
|
6
|
+
export * from "./typing";
|
|
7
|
+
export * from "./api";
|
|
8
|
+
export * from "./config";
|
|
9
|
+
export * from "./composables";
|
package/libs/css/common.scss
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
@
|
|
2
|
-
.hy-
|
|
1
|
+
@use "../../theme.scss" as *;
|
|
2
|
+
.hy-border__bottom {
|
|
3
3
|
border-bottom: $hy-border-line;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.hy-border {
|
|
7
|
+
border: $hy-border-line;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.hy-border__top {
|
|
11
|
+
border-top: $hy-border-line;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.hy-page {
|
|
15
|
+
padding: $hy-border-margin-padding-base;
|
|
4
16
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hy-app",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "瀑布流组件",
|
|
5
5
|
"main": "./index.ts",
|
|
6
6
|
"private": false,
|
|
7
7
|
"scripts": {},
|
|
8
8
|
"files": [
|
|
9
9
|
"common/",
|
|
10
10
|
"components/",
|
|
11
|
+
"composables/",
|
|
11
12
|
"global/",
|
|
12
13
|
"public/",
|
|
13
14
|
"store/",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@font-face {
|
|
2
|
-
font-family:
|
|
3
|
-
src: url('
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
font-family: 'iconfont'; /* Project id 4305932 */
|
|
3
|
+
src: url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.woff2?t=1745506339367') format('woff2'),
|
|
4
|
+
url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.woff?t=1745506339367') format('woff'),
|
|
5
|
+
url('https://at.alicdn.com/t/c/font_4305932_vbkygv82jrg.ttf?t=1745506339367') format('truetype');
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.iconfont {
|
package/theme.scss
CHANGED
|
@@ -80,15 +80,17 @@ $hy-avatar-size-lg: 120rpx;
|
|
|
80
80
|
$hy-opacity-disabled: 0.3; // 组件禁用态的透明度
|
|
81
81
|
|
|
82
82
|
/* 盒子的圆角 */
|
|
83
|
-
$hy-border-radius-
|
|
84
|
-
$hy-border-radius-
|
|
85
|
-
$hy-border-radius-
|
|
83
|
+
$hy-border-radius-no: 0;
|
|
84
|
+
$hy-border-radius-sm: 8rpx;
|
|
85
|
+
$hy-border-radius-base: 20rpx;
|
|
86
|
+
$hy-border-radius-lg: 32rpx;
|
|
86
87
|
$hy-border-radius-circle: 50%;
|
|
88
|
+
$hy-border-radius-semicircle: 100px;
|
|
87
89
|
/* 盒子阴影 */
|
|
88
90
|
$hy-box-shadow: 0 0 10rpx 4rpx rgba(0, 0, 0, 0.16);
|
|
89
91
|
/* 盒内盒外间距 */
|
|
90
92
|
$hy-border-margin-padding-sm: 10rpx;
|
|
91
93
|
$hy-border-margin-padding-base: 20rpx;
|
|
92
|
-
$hy-border-margin-padding-lg:
|
|
94
|
+
$hy-border-margin-padding-lg: 30rpx;
|
|
93
95
|
/* 底部线条 */
|
|
94
96
|
$hy-border-line: 1px solid #dadbde;
|
package/typing/index.ts
CHANGED
|
@@ -27,7 +27,7 @@ declare namespace HyApp {
|
|
|
27
27
|
/**
|
|
28
28
|
* @description 排列方式,row-横向,column-纵向
|
|
29
29
|
* */
|
|
30
|
-
type
|
|
30
|
+
type DirectionType = "row" | "column";
|
|
31
31
|
/**
|
|
32
32
|
* @description 布局方式;left-左,right-右,top-上,bottom-下,center-中
|
|
33
33
|
* */
|
|
@@ -36,10 +36,22 @@ declare namespace HyApp {
|
|
|
36
36
|
* @description 布局方式:left-左,right-右
|
|
37
37
|
* */
|
|
38
38
|
type LeftRightType = "left" | "right";
|
|
39
|
+
/**
|
|
40
|
+
* @description 布局方式:left-左,right-右,center-中间
|
|
41
|
+
* */
|
|
42
|
+
type RowCenterType = LeftRightType | "center";
|
|
43
|
+
/**
|
|
44
|
+
* @description 布局方式:top-上,bottom-下,center-中间
|
|
45
|
+
* */
|
|
46
|
+
type ColumnCenterType = TopBottomType | "center";
|
|
39
47
|
/**
|
|
40
48
|
* @description 布局方式:top-上,bottom-下
|
|
41
49
|
* */
|
|
42
50
|
type TopBottomType = "top" | "bottom";
|
|
51
|
+
/**
|
|
52
|
+
* @description 主题亮度:light-亮色,dark-暗色
|
|
53
|
+
* */
|
|
54
|
+
type ThemeVo = "light" | "dark";
|
|
43
55
|
/**
|
|
44
56
|
* @description 边框:surround-四周有边框,bottom-底部有边框,none-无边框
|
|
45
57
|
* */
|
|
@@ -83,7 +95,30 @@ declare namespace HyApp {
|
|
|
83
95
|
* @description 旋转方向
|
|
84
96
|
* */
|
|
85
97
|
type RotateType = "left" | "up" | "down";
|
|
98
|
+
/**
|
|
99
|
+
* @description 上传类型
|
|
100
|
+
* */
|
|
86
101
|
type FileType = "video" | "media" | "all" | "file" | "image";
|
|
102
|
+
/**
|
|
103
|
+
* @description 加载模式:circle-圆圈,spinner-经典花,semicircle-半圆
|
|
104
|
+
* */
|
|
105
|
+
type LoadingMode = "spinner" | "circle" | "semicircle";
|
|
106
|
+
/**
|
|
107
|
+
* @description 动画类型
|
|
108
|
+
* */
|
|
109
|
+
type TransitionMode =
|
|
110
|
+
| "fade"
|
|
111
|
+
| "fade-up"
|
|
112
|
+
| "fade-down"
|
|
113
|
+
| "fade-left"
|
|
114
|
+
| "fade-right"
|
|
115
|
+
| "fade-zoom"
|
|
116
|
+
| "slide-up"
|
|
117
|
+
| "slide-down"
|
|
118
|
+
| "slide-left"
|
|
119
|
+
| "slide-right"
|
|
120
|
+
| "zoom-in"
|
|
121
|
+
| "zoom-out";
|
|
87
122
|
interface IFieldNames {
|
|
88
123
|
/**
|
|
89
124
|
* @description 自定义columns的文本键
|