hy-app 0.4.4 → 0.4.6
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 +3 -3
- 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 +7 -5
- package/components/hy-loading/hy-loading.vue +11 -9
- package/components/hy-loading/index.scss +14 -5
- 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 +63 -60
- 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 +7 -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 +4 -4
- package/components/hy-search/index.scss +1 -0
- 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 +34 -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 +3 -2
- package/components/index.ts +117 -118
- package/index.ts +1 -7
- package/{api → libs/api}/http.ts +3 -3
- 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/libs/css/theme.scss +1 -1
- package/libs/css/vars.scss +2 -2
- 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 +28 -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
|
@@ -25,7 +25,7 @@ export default {
|
|
|
25
25
|
<script setup lang="ts">
|
|
26
26
|
import { computed, ref, watch, nextTick } from "vue";
|
|
27
27
|
import type { CSSProperties, PropType } from "vue";
|
|
28
|
-
import { sleep } from "../../
|
|
28
|
+
import { sleep } from "../../libs";
|
|
29
29
|
import type { ITransitionEmits } from "./typing";
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -145,8 +145,13 @@ export default {
|
|
|
145
145
|
import { ref, watch } from "vue";
|
|
146
146
|
import type { PropType, CSSProperties } from "vue";
|
|
147
147
|
import type { FileVo, IUploadEmits, ReadFunctionVo } from "./typing";
|
|
148
|
-
import {
|
|
149
|
-
|
|
148
|
+
import {
|
|
149
|
+
addUnit,
|
|
150
|
+
bytesToSize,
|
|
151
|
+
chooseFile,
|
|
152
|
+
isArray,
|
|
153
|
+
IconConfig,
|
|
154
|
+
} from "../../libs";
|
|
150
155
|
// 组件
|
|
151
156
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
152
157
|
|
|
@@ -76,8 +76,7 @@ export default {
|
|
|
76
76
|
import { computed, ref } from "vue";
|
|
77
77
|
import type { CSSProperties, PropType } from "vue";
|
|
78
78
|
import type { IWarnEmits } from "./typing";
|
|
79
|
-
import { addUnit } from "../../
|
|
80
|
-
import { IconConfig, iconName } from "../../config";
|
|
79
|
+
import { addUnit, IconConfig, iconName } from "../../libs";
|
|
81
80
|
// 组件
|
|
82
81
|
import HyTransition from "../hy-transition/hy-transition.vue";
|
|
83
82
|
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
import type { CSSProperties } from
|
|
2
|
-
import { HyApp, type ThemeVo } from '@/package/typing/modules/common'
|
|
1
|
+
import type { CSSProperties } from "vue";
|
|
3
2
|
|
|
4
3
|
export default interface HyWarnProps {
|
|
5
4
|
/**
|
|
6
5
|
* @description 显示的文字
|
|
7
6
|
* */
|
|
8
|
-
title: string
|
|
7
|
+
title: string;
|
|
9
8
|
/**
|
|
10
9
|
* @description 使用预设的颜色 (默认 'warning' )
|
|
11
10
|
* */
|
|
12
|
-
type?: HyApp.ThemeType
|
|
11
|
+
type?: HyApp.ThemeType;
|
|
13
12
|
/**
|
|
14
13
|
* @description 辅助性文字,颜色比title浅一点,字号也小一点,可选
|
|
15
14
|
* */
|
|
16
|
-
description?: string
|
|
15
|
+
description?: string;
|
|
17
16
|
/**
|
|
18
17
|
* @description 关闭按钮(默认为叉号icon图标) (默认 false )
|
|
19
18
|
* */
|
|
20
|
-
closable?: boolean
|
|
19
|
+
closable?: boolean;
|
|
21
20
|
/**
|
|
22
21
|
* @description 是否显示左边的辅助图标 ( 默认 false )
|
|
23
22
|
* */
|
|
24
|
-
showIcon?: boolean
|
|
23
|
+
showIcon?: boolean;
|
|
25
24
|
/**
|
|
26
25
|
* @description 显示的暗色或者亮色 (默认 'light' )
|
|
27
26
|
* */
|
|
28
|
-
theme?: HyApp.ThemeVo
|
|
27
|
+
theme?: HyApp.ThemeVo;
|
|
29
28
|
/**
|
|
30
29
|
* @description 文字是否居中 (默认 false )
|
|
31
30
|
* */
|
|
32
|
-
center?: boolean
|
|
31
|
+
center?: boolean;
|
|
33
32
|
/**
|
|
34
33
|
* @description 字体大小 (默认 14 )
|
|
35
34
|
* */
|
|
36
|
-
fontSize?: number
|
|
35
|
+
fontSize?: number;
|
|
37
36
|
/**
|
|
38
37
|
* @description 定义需要用到的外部样式
|
|
39
38
|
* */
|
|
40
|
-
customStyle?: CSSProperties
|
|
39
|
+
customStyle?: CSSProperties;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
export interface IWarnEmits {
|
|
44
43
|
/** 点击触发 */
|
|
45
|
-
(e:
|
|
44
|
+
(e: "click"): void;
|
|
46
45
|
/** 关闭触发 */
|
|
47
|
-
(e:
|
|
46
|
+
(e: "close"): void;
|
|
48
47
|
}
|
|
@@ -31,7 +31,7 @@ export default {
|
|
|
31
31
|
<script setup lang="ts">
|
|
32
32
|
import { computed, getCurrentInstance, ref, watch } from "vue";
|
|
33
33
|
import type { PropType } from "vue";
|
|
34
|
-
import { getRect, isArray } from "../../
|
|
34
|
+
import { getRect, isArray } from "../../libs";
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* 这是一个瀑布流形式的组件,内容分为左右两列,结合uview的懒加载组件效果更佳。
|
|
@@ -28,7 +28,7 @@ export default {
|
|
|
28
28
|
<script lang="ts" setup>
|
|
29
29
|
import { computed, onMounted, ref, watch, nextTick } from "vue";
|
|
30
30
|
import type { CSSProperties } from "vue";
|
|
31
|
-
import { addUnit, guid } from "../../
|
|
31
|
+
import { addUnit, guid } from "../../libs";
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* 在页面或组件上添加指定的图片或文字,可用于版权保护、品牌宣传等场景。
|
|
@@ -532,11 +532,12 @@ function drawTextOffScreen(
|
|
|
532
532
|
color: string,
|
|
533
533
|
canvas: HTMLCanvasElement,
|
|
534
534
|
) {
|
|
535
|
+
console.log(fontSize, "离屏");
|
|
535
536
|
ctx.textBaseline = "middle";
|
|
536
537
|
ctx.textAlign = "center";
|
|
537
538
|
ctx.translate(contentWidth / 2, contentWidth / 2);
|
|
538
539
|
ctx.rotate((Math.PI / 180) * rotate);
|
|
539
|
-
ctx.font = `${fontStyle} normal ${fontWeight} ${fontSize}px ${fontFamily}`;
|
|
540
|
+
ctx.font = `${fontStyle} normal ${fontWeight} ${fontSize}px/${contentHeight}px ${fontFamily}`;
|
|
540
541
|
ctx.fillStyle = color;
|
|
541
542
|
ctx.fillText(content, 0, 0);
|
|
542
543
|
ctx.restore();
|
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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { HttpRequestConfig } from "
|
|
2
|
-
import { objectToUrlParams } from "
|
|
1
|
+
import type { HttpRequestConfig } from "../../libs/typing";
|
|
2
|
+
import { objectToUrlParams } from "../../libs";
|
|
3
3
|
|
|
4
|
-
export
|
|
4
|
+
export class Http {
|
|
5
5
|
/**
|
|
6
6
|
* 默认请求配置
|
|
7
7
|
*/
|
|
@@ -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, type: "", ...opt });
|
|
18
|
+
const info = (msg: string, opt?: ToastOptions) =>
|
|
19
|
+
openToast({ message: msg, type: "info", icon: true, ...opt });
|
|
20
|
+
const success = (msg: string, opt?: ToastOptions) =>
|
|
21
|
+
openToast({ message: msg, type: "success", icon: true, ...opt });
|
|
22
|
+
const error = (msg: string, opt?: ToastOptions) =>
|
|
23
|
+
openToast({ message: msg, type: "error", icon: true, ...opt });
|
|
24
|
+
const warning = (msg: string, opt?: ToastOptions) =>
|
|
25
|
+
openToast({ message: msg, type: "warning", icon: true, ...opt });
|
|
26
|
+
const primary = (msg: string, opt?: ToastOptions) =>
|
|
27
|
+
openToast({ message: msg, type: "primary", icon: true, ...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
|
+
};
|
package/libs/css/theme.scss
CHANGED
|
@@ -32,7 +32,7 @@ $hy-text-color--3: var(--hy-text-color--3, #929295) !default; // 一般用于浅
|
|
|
32
32
|
$hy-text-color--4: var(--hy-text-color--4, rgba(0, 0, 0, 0.1)) !default; // 一般用于浅色
|
|
33
33
|
$hy-icon-color: var(--hy-icon-color, #606266) !default; // 一般用于icon
|
|
34
34
|
$hy-text-color--grey: var(--hy-text-color--grey, #999) !default; // 辅助灰色,如加载更多的提示信息
|
|
35
|
-
$hy-text-color--placeholder: var(--hy-text-color--placeholder, #
|
|
35
|
+
$hy-text-color--placeholder: var(--hy-text-color--placeholder, #909399) !default; // 输入框提示颜色
|
|
36
36
|
$hy-text-color--disabled: var(--hy-text-color--disabled, #c0c0c0) !default; // 禁用文字颜色
|
|
37
37
|
$hy-border-color: var(--hy-border-color, #c0c0c0) !default; // 边框颜色
|
|
38
38
|
$hy-text-color--hover: var(--hy-text-color--hover, #58595b)!default; // 点击状态文字颜色
|
package/libs/css/vars.scss
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
--hy-text-color--4: rgba(0, 0, 0, 0.1);
|
|
8
8
|
--hy-icon-color: #999;
|
|
9
9
|
--hy-text-color--grey: #67676c;
|
|
10
|
-
--hy-text-color--placeholder:
|
|
10
|
+
--hy-text-color--placeholder: #909399;
|
|
11
11
|
--hy-text-color--disabled: rgba(0, 0, 0, 0.25);
|
|
12
12
|
|
|
13
13
|
--hy-background: #f8f8f8;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
--hy-text-color--4: rgba(255, 255, 255, 0.1);
|
|
41
41
|
--hy-icon-color: #FFFFFF;
|
|
42
42
|
--hy-text-color--grey: #98989f;
|
|
43
|
-
--hy-text-color--placeholder:
|
|
43
|
+
--hy-text-color--placeholder: #909399;
|
|
44
44
|
--hy-text-color--disabled: rgba(255, 255, 255, 0.25);
|
|
45
45
|
|
|
46
46
|
--hy-background: #1b1b1f;
|
|
@@ -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
|
* 类型
|