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.
Files changed (151) hide show
  1. package/components/hy-action-sheet/hy-action-sheet.vue +1 -1
  2. package/components/hy-address-picker/hy-address-picker.vue +1 -1
  3. package/components/hy-avatar/hy-avatar.vue +1 -1
  4. package/components/hy-back-top/hy-back-top.vue +1 -2
  5. package/components/hy-badge/hy-badge.vue +1 -1
  6. package/components/hy-button/hy-button.vue +1 -2
  7. package/components/hy-calendar/hy-calendar.vue +3 -11
  8. package/components/hy-calendar/month.vue +3 -3
  9. package/components/hy-card/hy-card.vue +1 -1
  10. package/components/hy-cell/hy-cell.vue +1 -2
  11. package/components/hy-cell/props.ts +1 -1
  12. package/components/hy-check-button/hy-check-button.vue +2 -2
  13. package/components/hy-checkbox/hy-checkbox.vue +2 -3
  14. package/components/hy-checkbox-group/hy-checkbox-group.vue +1 -1
  15. package/components/hy-checkbox-item/hy-checkbox-item.vue +1 -2
  16. package/components/hy-code-input/hy-code-input.vue +1 -1
  17. package/components/hy-config-provider/hy-config-provider.vue +2 -3
  18. package/components/hy-config-provider/props.ts +1 -1
  19. package/components/hy-count-down/index.ts +1 -1
  20. package/components/hy-count-to/hy-count-to.vue +1 -1
  21. package/components/hy-datetime-picker/hy-datetime-picker.vue +2 -3
  22. package/components/hy-datetime-picker/props.ts +1 -1
  23. package/components/hy-divider/hy-divider.vue +1 -2
  24. package/components/hy-divider/props.ts +1 -1
  25. package/components/hy-dropdown/hy-dropdown.vue +2 -3
  26. package/components/hy-dropdown/props.ts +1 -1
  27. package/components/hy-dropdown-item/hy-dropdown-item.vue +1 -2
  28. package/components/hy-empty/hy-empty.vue +1 -1
  29. package/components/hy-flex/hy-flex.vue +1 -1
  30. package/components/hy-float-button/hy-float-button.vue +1 -2
  31. package/components/hy-float-button/props.ts +14 -14
  32. package/components/hy-folding-panel/hy-folding-panel.vue +2 -3
  33. package/components/hy-folding-panel/props.ts +1 -1
  34. package/components/hy-form/hy-form.vue +1 -1
  35. package/components/hy-form-group/hy-form-group.vue +183 -111
  36. package/components/hy-form-group/typing.d.ts +1 -1
  37. package/components/hy-form-item/hy-form-item.vue +1 -1
  38. package/components/hy-grid/hy-grid.vue +1 -1
  39. package/components/hy-icon/hy-icon.vue +1 -1
  40. package/components/hy-icon/index.scss +1 -1
  41. package/components/hy-image/hy-image.vue +1 -2
  42. package/components/hy-image/props.ts +10 -10
  43. package/components/hy-input/hy-input.vue +1 -2
  44. package/components/hy-line/hy-line.vue +1 -1
  45. package/components/hy-line-progress/hy-line-progress.vue +1 -2
  46. package/components/hy-list/hy-list.vue +7 -5
  47. package/components/hy-loading/hy-loading.vue +11 -9
  48. package/components/hy-loading/index.scss +14 -5
  49. package/components/hy-menu/hy-menu.vue +1 -1
  50. package/components/hy-modal/hy-modal.vue +2 -2
  51. package/components/hy-modal/props.ts +13 -13
  52. package/components/hy-navbar/hy-navbar.vue +63 -60
  53. package/components/hy-navbar/props.ts +1 -1
  54. package/components/hy-notice-bar/hy-column-notice.vue +1 -2
  55. package/components/hy-notice-bar/hy-notice-bar.vue +1 -1
  56. package/components/hy-notice-bar/hy-row-notice.vue +1 -2
  57. package/components/hy-notice-bar/props.ts +1 -1
  58. package/components/hy-notify/hy-notify.vue +1 -2
  59. package/components/hy-number-step/hy-number-step.vue +1 -2
  60. package/components/hy-overlay/hy-overlay.vue +1 -1
  61. package/components/hy-pagination/hy-pagination.vue +1 -1
  62. package/components/hy-picker/hy-picker.vue +1 -2
  63. package/components/hy-popover/hy-popover.vue +9 -3
  64. package/components/hy-popup/hy-popup.vue +2 -3
  65. package/components/hy-price/hy-price.vue +3 -2
  66. package/components/hy-qrcode/hy-qrcode.vue +1 -1
  67. package/components/hy-radio/hy-radio.vue +1 -2
  68. package/components/hy-rate/hy-rate.vue +7 -4
  69. package/components/hy-rate/props.ts +6 -6
  70. package/components/hy-read-more/hy-read-more.vue +1 -2
  71. package/components/hy-scroll-list/hy-scroll-list.vue +1 -1
  72. package/components/hy-scroll-list/props.ts +0 -1
  73. package/components/hy-search/hy-search.vue +4 -4
  74. package/components/hy-search/index.scss +1 -0
  75. package/components/hy-signature/hy-signature.vue +1 -1
  76. package/components/hy-slider/hy-slider.vue +3 -13
  77. package/components/hy-slider/props.ts +1 -1
  78. package/components/hy-status-bar/hy-status-bar.vue +1 -1
  79. package/components/hy-status-bar/props.ts +1 -1
  80. package/components/hy-steps/hy-steps.vue +1 -2
  81. package/components/hy-subsection/hy-subsection.vue +1 -1
  82. package/components/hy-subsection/props.ts +0 -1
  83. package/components/hy-subsection/typing.d.ts +0 -1
  84. package/components/hy-swipe-action/hy-swipe-action.vue +1 -2
  85. package/components/hy-swiper/hy-swiper-indicator.vue +1 -1
  86. package/components/hy-swiper/hy-swiper.vue +2 -3
  87. package/components/hy-swiper/typing.d.ts +35 -36
  88. package/components/hy-switch/hy-switch.vue +2 -2
  89. package/components/hy-switch/typing.d.ts +0 -1
  90. package/components/hy-tabs/hy-tabs.vue +2 -3
  91. package/components/hy-tag/hy-tag.vue +1 -2
  92. package/components/hy-text/hy-text.vue +2 -2
  93. package/components/hy-text/typing.d.ts +26 -26
  94. package/components/hy-textarea/hy-textarea.vue +2 -2
  95. package/components/hy-toast/hy-toast.vue +34 -19
  96. package/components/hy-toast/index.scss +3 -2
  97. package/components/hy-toast/typing.d.ts +1 -1
  98. package/components/hy-tooltip/hy-tooltip.vue +8 -2
  99. package/components/hy-transition/hy-transition.vue +1 -1
  100. package/components/hy-upload/hy-upload.vue +7 -2
  101. package/components/hy-upload/props.ts +1 -1
  102. package/components/hy-warn/hy-warn.vue +1 -2
  103. package/components/hy-warn/typing.d.ts +12 -13
  104. package/components/hy-waterfall/hy-waterfall.vue +1 -1
  105. package/components/hy-watermark/hy-watermark.vue +3 -2
  106. package/components/index.ts +117 -118
  107. package/index.ts +1 -7
  108. package/{api → libs/api}/http.ts +3 -3
  109. package/libs/common/index.ts +2 -0
  110. package/libs/common/queue.ts +28 -0
  111. package/{composables → libs/composables}/index.ts +1 -0
  112. package/{composables → libs/composables}/usePopover.ts +7 -2
  113. package/{common/shakeService.ts → libs/composables/useShakeService.ts} +4 -2
  114. package/{composables → libs/composables}/useShare.ts +3 -0
  115. package/libs/composables/useToast.ts +45 -0
  116. package/{composables → libs/composables}/useTouch.ts +3 -0
  117. package/libs/css/theme.scss +1 -1
  118. package/libs/css/vars.scss +2 -2
  119. package/{global → libs/global}/register-properties.ts +1 -1
  120. package/libs/index.ts +7 -0
  121. package/{typing → libs/typing}/index.ts +0 -1
  122. package/{typing → libs/typing}/modules/form.ts +7 -7
  123. package/{utils → libs/utils}/utils.ts +28 -0
  124. package/package.json +2 -2
  125. package/common/index.ts +0 -3
  126. package/common/queue.ts +0 -34
  127. package/components/hy-form/README.md +0 -301
  128. package/components/hy-text/index.ts +0 -0
  129. package/components/yk-dialog/yk-dialog.vue +0 -129
  130. package/composables/useToast.ts +0 -51
  131. package/typing/modules/dialog.ts +0 -17
  132. /package/{api → libs/api}/index.ts +0 -0
  133. /package/{common → libs/common}/versionControl.ts +0 -0
  134. /package/{composables → libs/composables}/useQueue.ts +0 -0
  135. /package/{config → libs/config}/color.ts +0 -0
  136. /package/{config → libs/config}/icon.ts +0 -0
  137. /package/{config → libs/config}/index.ts +0 -0
  138. /package/{static/font → libs/css}/iconfont.css +0 -0
  139. /package/{global → libs/global}/index.ts +0 -0
  140. /package/{typing → libs/typing}/modules/common.d.ts +0 -0
  141. /package/{typing → libs/typing}/modules/enum.ts +0 -0
  142. /package/{typing → libs/typing}/modules/http.ts +0 -0
  143. /package/{typing → libs/typing}/modules/icon.d.ts +0 -0
  144. /package/{typing → libs/typing}/modules/rect.ts +0 -0
  145. /package/{utils → libs/utils}/address.json +0 -0
  146. /package/{utils → libs/utils}/base64.ts +0 -0
  147. /package/{utils → libs/utils}/calendar.js +0 -0
  148. /package/{utils → libs/utils}/colorGradient.ts +0 -0
  149. /package/{utils → libs/utils}/index.ts +0 -0
  150. /package/{utils → libs/utils}/inside.ts +0 -0
  151. /package/{utils → libs/utils}/inspect.ts +0 -0
@@ -3,7 +3,7 @@
3
3
  ref="hyVirtualContainer"
4
4
  @scroll="onScroll"
5
5
  @scrolltolower="scrollToLower"
6
- :lower-threshold="showDivider ? 40 : 10"
6
+ :lower-threshold="showDivider ? 100 : 50"
7
7
  :scroll-y="true"
8
8
  scroll-with-animation
9
9
  class="hy-virtual-container"
@@ -60,7 +60,8 @@
60
60
  </template>
61
61
  <!--加载更多样式-->
62
62
  </view>
63
- <!-- <HyDivider :text="load" v-if="showDivider"></HyDivider>-->
63
+ <slot v-if="$slots.footer" name="footer"></slot>
64
+ <hy-divider :text="load" v-else-if="showDivider"></hy-divider>
64
65
  </scroll-view>
65
66
  </template>
66
67
 
@@ -81,15 +82,16 @@ import {
81
82
  getCurrentInstance,
82
83
  nextTick,
83
84
  onMounted,
84
- type PropType,
85
85
  reactive,
86
86
  ref,
87
87
  useSlots,
88
88
  watch,
89
89
  } from "vue";
90
- import type { CSSProperties } from "vue";
91
- import { addUnit, getPx, getRect } from "../../utils";
90
+ import type { CSSProperties, PropType } from "vue";
91
+ import { addUnit, getPx, getRect } from "../../libs";
92
92
  import type { IListEmits } from "./typing";
93
+ // 组件
94
+ import HyDivider from "@/package/components/hy-divider/hy-divider.vue";
93
95
 
94
96
  /**
95
97
  * 实现只展示可视内容的dom,减少dom创建,优化滚动性能
@@ -1,9 +1,8 @@
1
1
  <template>
2
2
  <view
3
- class="hy-loading-icon"
4
- :style="customStyle"
5
- :class="[vertical && 'hy-loading-icon__vertical']"
6
3
  v-if="show"
4
+ :style="customStyle"
5
+ :class="['hy-loading-icon', `hy-loading-icon__${direction}`]"
7
6
  >
8
7
  <view
9
8
  v-if="!webviewHide"
@@ -34,7 +33,7 @@
34
33
  </view>
35
34
  <text
36
35
  v-if="text"
37
- class="hy-loading-icon__text"
36
+ :class="['hy-loading-icon__text', `hy-loading-icon__${direction}--text`]"
38
37
  :style="{
39
38
  fontSize: addUnit(textSize),
40
39
  color: textColor,
@@ -59,7 +58,7 @@ export default {
59
58
  <script setup lang="ts">
60
59
  import { ref, computed } from "vue";
61
60
  import type { CSSProperties, PropType } from "vue";
62
- import { addUnit, colorGradient } from "../../utils";
61
+ import { addUnit, colorGradient } from "../../libs";
63
62
 
64
63
  /**
65
64
  * 目前用在华玥的loadMore加载更多等组件的正在加载状态场景。
@@ -84,10 +83,13 @@ const props = defineProps({
84
83
  type: String,
85
84
  default: "#909399",
86
85
  },
87
- /** 文字和图标是否垂直排列 */
88
- vertical: {
89
- type: Boolean,
90
- default: false,
86
+ /**
87
+ * 文字和图标是否垂直排列
88
+ * @values row,column
89
+ * */
90
+ direction: {
91
+ type: String as PropType<HyApp.DirectionType>,
92
+ default: "row",
91
93
  },
92
94
  /** 模式选择,见官网说明 */
93
95
  mode: {
@@ -3,13 +3,11 @@
3
3
 
4
4
 
5
5
  @include b(loading-icon) {
6
- @include flex(row);
7
6
  align-items: center;
8
7
  justify-content: center;
9
8
  color: #c8c9cc;
10
9
 
11
10
  @include e(text) {
12
- margin-left: 4px;
13
11
  color: $hy-text-color--grey;
14
12
  font-size: 14px;
15
13
  line-height: 20px;
@@ -37,8 +35,20 @@
37
35
  }
38
36
  }
39
37
 
40
- @include m(vertical) {
41
- flex-direction: column;
38
+ @include e(row) {
39
+ @include flex(row);
40
+
41
+ @include m(text) {
42
+ margin-left: $hy-border-margin-padding-base;
43
+ }
44
+ }
45
+
46
+ @include e(column) {
47
+ @include flex(column);
48
+
49
+ @include m(text) {
50
+ margin-top: $hy-border-margin-padding-base;
51
+ }
42
52
  }
43
53
  }
44
54
 
@@ -60,7 +70,6 @@
60
70
  }
61
71
 
62
72
  @include e(vertical, text) {
63
- margin: 6px 0 0;
64
73
  color: $hy-text-color--grey;
65
74
  }
66
75
 
@@ -62,7 +62,7 @@ export default {
62
62
  import { computed, ref, watch } from "vue";
63
63
  import type { CSSProperties, PropType } from "vue";
64
64
  import type { IMenuEmits, MenusType, ModelValueVo } from "./typing";
65
- import { addUnit } from "../../utils";
65
+ import { addUnit } from "../../libs";
66
66
  import type HyBadgeProps from "../hy-badge/typing";
67
67
  import type HyIconProps from "../hy-icon/typing";
68
68
  // 组件
@@ -104,9 +104,9 @@ export default {
104
104
  </script>
105
105
 
106
106
  <script setup lang="ts">
107
- import { ref, toRefs, watch } from "vue";
107
+ import { ref, watch } from "vue";
108
108
  import type { IModalEmits } from "./typing";
109
- import { addUnit, sleep } from "../../utils";
109
+ import { addUnit, sleep } from "../../libs";
110
110
  // 组件
111
111
  import HyPopup from "../hy-popup/hy-popup.vue";
112
112
  import HyLoading from "../hy-loading/hy-loading.vue";
@@ -1,25 +1,25 @@
1
- import type IProps from './typing'
2
- import { ColorConfig } from '../../config'
1
+ import type IProps from "./typing";
2
+ import { ColorConfig } from "../../libs";
3
3
 
4
4
  const defaultProps: IProps = {
5
5
  modelValue: false,
6
- title: '',
7
- content: '',
8
- confirmText: '确认',
9
- cancelText: '取消',
6
+ title: "",
7
+ content: "",
8
+ confirmText: "确认",
9
+ cancelText: "取消",
10
10
  showConfirmButton: true,
11
11
  showCancelButton: false,
12
- confirmColor: '',
13
- cancelColor: '',
12
+ confirmColor: "",
13
+ cancelColor: "",
14
14
  buttonReverse: false,
15
15
  zoom: true,
16
16
  round: 16,
17
17
  asyncClose: false,
18
18
  closeOnClickOverlay: false,
19
19
  negativeTop: 0,
20
- width: '550rpx',
21
- confirmButtonShape: '',
22
- contentTextAlign: 'left',
23
- }
20
+ width: "550rpx",
21
+ confirmButtonShape: "",
22
+ contentTextAlign: "left",
23
+ };
24
24
 
25
- export default defaultProps
25
+ export default defaultProps;
@@ -7,79 +7,83 @@
7
7
  height: addUnit(getPx(height) + statusBarHeight),
8
8
  }"
9
9
  ></view>
10
- <view :class="[fixed && 'hy-navbar__fixed']">
10
+ <view
11
+ :class="[fixed && 'hy-navbar__fixed']"
12
+ :style="{ backgroundColor: bgColor }"
13
+ >
11
14
  <HyStatusBar v-if="safeAreaInsetTop" :bgColor="bgColor"></HyStatusBar>
12
15
  <view
13
16
  :class="[border && 'hy-border__bottom', 'hy-navbar__content']"
14
17
  :style="{
15
18
  height: addUnit(height),
16
- backgroundColor: bgColor,
17
19
  }"
18
20
  >
21
+ <!-- 左边 -->
22
+ <slot v-if="$slots.left" name="left"></slot>
19
23
  <view
24
+ v-else
20
25
  class="hy-navbar__content__left"
21
26
  hover-class="hy-navbar__content__left--hover"
22
27
  hover-start-time="150"
23
28
  @tap="leftClick"
24
29
  >
25
- <slot name="left">
26
- <HyIcon
27
- v-if="leftIcon"
28
- :name="leftIcon"
29
- :size="leftIconSize"
30
- :color="leftIconColor"
31
- ></HyIcon>
32
- <text
33
- v-if="leftText"
34
- :style="{
35
- color: leftIconColor,
36
- }"
37
- class="hy-navbar__content__left--text"
38
- >
39
- {{ leftText }}
40
- </text>
41
- </slot>
30
+ <HyIcon
31
+ v-if="leftIcon"
32
+ :name="leftIcon"
33
+ :size="leftIconSize"
34
+ :color="leftIconColor"
35
+ ></HyIcon>
36
+ <text
37
+ v-if="leftText"
38
+ :style="{
39
+ color: leftIconColor,
40
+ }"
41
+ class="hy-navbar__content__left--text"
42
+ >
43
+ {{ leftText }}
44
+ </text>
42
45
  </view>
43
- <slot name="center">
44
- <view class="hy-navbar__content__center">
45
- <text
46
- class="hy-navbar__content__center--title"
47
- :style="[
48
- {
49
- width: addUnit(titleWidth),
50
- color: titleColor,
51
- },
52
- titleStyle,
53
- ]"
54
- >
55
- {{ title }}
56
- </text>
57
- <text
58
- class="hy-navbar__content__center--sub"
59
- :style="[
60
- {
61
- width: addUnit(titleWidth),
62
- color: titleColor,
63
- },
64
- titleStyle,
65
- ]"
66
- >
67
- {{ sub }}
68
- </text>
69
- </view>
70
- </slot>
71
- <view
72
- class="hy-navbar__content__right"
73
- v-if="$slots.right || rightIcon || rightText"
74
- @tap="rightClick"
75
- >
76
- <slot name="right">
77
- <HyIcon v-if="rightIcon" :name="rightIcon" size="20"></HyIcon>
78
- <text v-if="rightText" class="hy-navbar__content__right--text">{{
79
- rightText
80
- }}</text>
81
- </slot>
46
+ <!-- 左边 -->
47
+
48
+ <!-- 中间 -->
49
+ <slot v-if="$slots.center" name="center"></slot>
50
+ <view v-else class="hy-navbar__content__center">
51
+ <text
52
+ class="hy-navbar__content__center--title"
53
+ :style="[
54
+ {
55
+ width: addUnit(titleWidth),
56
+ color: titleColor,
57
+ },
58
+ titleStyle,
59
+ ]"
60
+ >
61
+ {{ title }}
62
+ </text>
63
+ <text
64
+ class="hy-navbar__content__center--sub"
65
+ :style="[
66
+ {
67
+ width: addUnit(titleWidth),
68
+ color: titleColor,
69
+ },
70
+ titleStyle,
71
+ ]"
72
+ >
73
+ {{ sub }}
74
+ </text>
75
+ </view>
76
+ <!-- 中间 -->
77
+
78
+ <!-- 右边 -->
79
+ <slot v-if="$slots.right" name="right"></slot>
80
+ <view class="hy-navbar__content__right" v-else @tap="rightClick">
81
+ <HyIcon v-if="rightIcon" :name="rightIcon" size="20"></HyIcon>
82
+ <text v-if="rightText" class="hy-navbar__content__right--text">{{
83
+ rightText
84
+ }}</text>
82
85
  </view>
86
+ <!-- 右边 -->
83
87
  </view>
84
88
  </view>
85
89
  </view>
@@ -99,8 +103,7 @@ export default {
99
103
  <script setup lang="ts">
100
104
  import type { CSSProperties, PropType } from "vue";
101
105
  import type { INavbarEmits } from "./typing";
102
- import { addUnit, getPx, getWindowInfo } from "../../utils";
103
- import { IconConfig } from "../../config";
106
+ import { addUnit, getPx, getWindowInfo, IconConfig } from "../../libs";
104
107
  // 组件
105
108
  import HyIcon from "../hy-icon/hy-icon.vue";
106
109
  import HyStatusBar from "../hy-status-bar/hy-status-bar.vue";
@@ -1,5 +1,5 @@
1
1
  import type IProps from "./typing";
2
- import { IconConfig } from "../../config";
2
+ import { IconConfig } from "../../libs/config";
3
3
 
4
4
  const defaultProps: IProps = {
5
5
  safeAreaInsetTop: true,
@@ -51,8 +51,7 @@
51
51
  import { type CSSProperties, toRefs, computed, ref, watch } from "vue";
52
52
  import type IProps from "./typing";
53
53
  import defaultProps from "./props";
54
- import { addUnit, error } from "../../utils";
55
- import { IconConfig } from "../../config";
54
+ import { addUnit, error, IconConfig } from "../../libs";
56
55
 
57
56
  // 组件
58
57
  import HyIcon from "../hy-icon/hy-icon.vue";
@@ -58,7 +58,7 @@ export default {
58
58
  import { ref } from "vue";
59
59
  import type { PropType, CSSProperties } from "vue";
60
60
  import type { INoticeBarEmits, NoticeBarModeVo } from "./typing";
61
- import { IconConfig } from "../../config";
61
+ import { IconConfig } from "../../libs";
62
62
  // 组件
63
63
  import HyRowNotice from "./hy-row-notice.vue";
64
64
  import HyColumnNotice from "./hy-column-notice.vue";
@@ -51,8 +51,7 @@ import {
51
51
  } from "vue";
52
52
  import type IProps from "./typing";
53
53
  import defaultProps from "./props";
54
- import { addUnit, getRect, sleep } from "../../utils";
55
- import { IconConfig } from "../../config";
54
+ import { addUnit, getRect, sleep, IconConfig } from "../../libs";
56
55
  // 组件
57
56
  import HyIcon from "../hy-icon/hy-icon.vue";
58
57
 
@@ -1,5 +1,5 @@
1
1
  import type IProps from "./typing";
2
- import { IconConfig } from "../../config";
2
+ import { IconConfig } from "../../libs";
3
3
 
4
4
  const defaultProps: IProps = {
5
5
  text: [],
@@ -47,8 +47,7 @@ export default {
47
47
  import type IProps from "./typing";
48
48
  import { computed, ref } from "vue";
49
49
  import type { CSSProperties, PropType } from "vue";
50
- import { IconConfig } from "../../config";
51
- import { addUnit } from "../../utils";
50
+ import { addUnit, IconConfig } from "../../libs";
52
51
  // 组件
53
52
  import HyTransition from "../hy-transition/hy-transition.vue";
54
53
  import HyStatusBar from "../hy-status-bar/hy-status-bar.vue";
@@ -139,8 +139,7 @@ export default {
139
139
  <script setup lang="ts">
140
140
  import { computed, ref, watch, onMounted, nextTick } from "vue";
141
141
  import type { CSSProperties, PropType } from "vue";
142
- import { addUnit } from "../../utils";
143
- import { IconConfig } from "../../config";
142
+ import { addUnit, IconConfig } from "../../libs";
144
143
  import type HyIconProps from "../hy-icon/typing";
145
144
  import type { INumberStepEmits } from "./typing";
146
145
  // 组件
@@ -22,7 +22,7 @@ export default {
22
22
  </script>
23
23
 
24
24
  <script setup lang="ts">
25
- import { computed, toRefs } from "vue";
25
+ import { computed } from "vue";
26
26
  import type { CSSProperties, PropType } from "vue";
27
27
  import type { IOverlayEmits } from "./typing";
28
28
  import HyTransition from "../hy-transition/hy-transition.vue";
@@ -73,7 +73,7 @@ export default {
73
73
  import { ref, watch } from "vue";
74
74
  import type { CSSProperties, PropType } from "vue";
75
75
  import type { IPaginationEmits } from "./typing";
76
- import { IconConfig } from "../../config";
76
+ import { IconConfig } from "../../libs";
77
77
  // 组件
78
78
  import HyIcon from "../hy-icon/hy-icon.vue";
79
79
  import HyButton from "../hy-button/hy-button.vue";
@@ -125,8 +125,7 @@ export default {
125
125
  <script setup lang="ts">
126
126
  import { computed, ref, watch } from "vue";
127
127
  import type { PropType } from "vue";
128
- import { deepClone, sleep, addUnit, isArray } from "../../utils";
129
- import { IconConfig } from "../../config";
128
+ import { deepClone, sleep, addUnit, isArray, IconConfig } from "../../libs";
130
129
  import type { IPickerEmits, PickerColumnVo } from "./typing";
131
130
  import type HyInputProps from "../hy-input/typing";
132
131
  // 组件
@@ -130,9 +130,15 @@ import type {
130
130
  IPopoverEmits,
131
131
  PopoverExpose,
132
132
  } from "./typing";
133
- import { isArray } from "../../utils";
134
- import { type Queue, queueKey, usePopover } from "../../composables";
135
- import { closeOther, pushToQueue, removeFromQueue } from "../../common";
133
+ import {
134
+ type Queue,
135
+ queueKey,
136
+ usePopover,
137
+ closeOther,
138
+ pushToQueue,
139
+ removeFromQueue,
140
+ isArray,
141
+ } from "../../libs";
136
142
  // 组件
137
143
  import HyIcon from "../hy-icon/hy-icon.vue";
138
144
  import HyTransition from "../hy-transition/hy-transition.vue";
@@ -56,11 +56,10 @@ export default {
56
56
  </script>
57
57
 
58
58
  <script setup lang="ts">
59
- import { computed, ref, toRefs, watch } from "vue";
59
+ import { computed, ref, watch } from "vue";
60
60
  import type { CSSProperties, PropType } from "vue";
61
61
  import type { IPopupEmits } from "./typing";
62
- import { addUnit, getWindowInfo } from "../../utils";
63
- import { IconConfig } from "../../config";
62
+ import { addUnit, getWindowInfo, IconConfig } from "../../libs";
64
63
 
65
64
  // 组件
66
65
  import HyTransition from "../hy-transition/hy-transition.vue";
@@ -31,7 +31,7 @@ export default {
31
31
  <script setup lang="ts">
32
32
  import { computed } from "vue";
33
33
  import type { CSSProperties, PropType } from "vue";
34
- import { addUnit, getPx, error, addZero } from "../../utils";
34
+ import { addUnit, getPx, error, addZero } from "../../libs";
35
35
 
36
36
  /**
37
37
  * 业务组件,突出金额小数点前大,小数点后小
@@ -106,7 +106,8 @@ const priceStyle = computed<CSSProperties>(() => {
106
106
  * @description 价格处理
107
107
  * */
108
108
  const priceOne = computed(() => {
109
- if (props.text === undefined) return error("text值不能为空");
109
+ if (props.text === undefined || props.text === null)
110
+ return error("text值不能为空");
110
111
 
111
112
  let value =
112
113
  typeof props.text === "string" ? props.text : props.text.toString();
@@ -35,7 +35,7 @@ export default {
35
35
  import { getCurrentInstance, ref, onMounted } from "vue";
36
36
  import type { IQrcodeEmits } from "./typing";
37
37
  import QRCode from "./qrcode.js";
38
- import { addUnit, error } from "../../utils";
38
+ import { addUnit, error } from "../../libs";
39
39
  // 组件
40
40
  import HyLoading from "../hy-loading/hy-loading.vue";
41
41
 
@@ -73,8 +73,7 @@ import { computed, reactive, ref, watch } from "vue";
73
73
  import type { CSSProperties, PropType } from "vue";
74
74
  import type { IRadioEmits } from "./typing";
75
75
  import type { CheckboxColumnsVo, IFieldNames } from "../hy-check-button/typing";
76
- import { addUnit, bem, error } from "../../utils";
77
- import { IconConfig } from "../../config";
76
+ import { addUnit, bem, error, IconConfig } from "../../libs";
78
77
  // 组件
79
78
  import HyIcon from "../hy-icon/hy-icon.vue";
80
79
 
@@ -74,11 +74,10 @@ export default {
74
74
  </script>
75
75
 
76
76
  <script setup lang="ts">
77
- import { addUnit, getRect, guid, range, sleep } from "../../utils";
78
77
  import { ref, watch, onMounted, getCurrentInstance } from "vue";
79
78
  import type { CSSProperties, PropType } from "vue";
80
79
  import type { IRateEmits } from "./typing";
81
- import { IconConfig } from "../../config";
80
+ import { addUnit, getRect, guid, range, sleep, IconConfig } from "../../libs";
82
81
  // 组件
83
82
  import HyIcon from "../hy-icon/hy-icon.vue";
84
83
 
@@ -253,9 +252,13 @@ const clickHandler = (e: TouchEvent) => {
253
252
  // return;
254
253
  // }
255
254
  e.stopPropagation();
255
+ console.log(e, "微信");
256
256
  let x = 0;
257
- // #ifndef APP-NVUE
258
- x = e.changedTouches[0].pageX;
257
+ // #ifndef APP-NVUE || MP-ALIPAY
258
+ x = e.detail.x;
259
+ // #endif
260
+ // #ifdef MP-ALIPAY
261
+ x = e.detail.pageX;
259
262
  // #endif
260
263
  getActiveIndex(x, true);
261
264
  };
@@ -1,5 +1,5 @@
1
- import { ColorConfig, IconConfig } from '../../config'
2
- import type IProps from './typing'
1
+ import { ColorConfig, IconConfig } from "../../libs/config";
2
+ import type IProps from "./typing";
3
3
 
4
4
  const defaultProps: IProps = {
5
5
  modelValue: 1,
@@ -7,13 +7,13 @@ const defaultProps: IProps = {
7
7
  disabled: false,
8
8
  readonly: false,
9
9
  size: 18,
10
- inactiveColor: '#b2b2b2',
11
- activeColor: '#FFF00D',
10
+ inactiveColor: "#b2b2b2",
11
+ activeColor: "#FFF00D",
12
12
  gutter: 4,
13
13
  minCount: 1,
14
14
  allowHalf: false,
15
15
  activeIcon: IconConfig.STAR_FILL,
16
16
  inactiveIcon: IconConfig.STAR,
17
17
  touchable: true,
18
- }
19
- export default defaultProps
18
+ };
19
+ export default defaultProps;
@@ -65,8 +65,7 @@ export default {
65
65
  import { computed, ref, onMounted, getCurrentInstance } from "vue";
66
66
  import type { CSSProperties, PropType } from "vue";
67
67
  import type { IReadMoreEmits } from "./typing";
68
- import { addUnit, getRect, guid, sleep } from "../../utils";
69
- import { IconConfig } from "../../config";
68
+ import { addUnit, getRect, guid, sleep, IconConfig } from "../../libs";
70
69
  // 组件
71
70
  import HyIcon from "../hy-icon/hy-icon.vue";
72
71
 
@@ -43,7 +43,7 @@ export default {
43
43
  import { computed, ref, onMounted, getCurrentInstance } from "vue";
44
44
  import type { CSSProperties } from "vue";
45
45
  import type { IScrollListEmits } from "./typing";
46
- import { addUnit, colorGradient, getRect, sleep } from "../../utils";
46
+ import { addUnit, colorGradient, getRect, sleep } from "../../libs";
47
47
 
48
48
  /**
49
49
  * 该组件一般用于同时展示多个商品、分类的场景,也可以完成左右滑动的列表。
@@ -1,5 +1,4 @@
1
1
  import type IProps from "./typing";
2
- import { ColorConfig } from "../../config";
3
2
 
4
3
  const defaultProps: IProps = {
5
4
  indicatorWidth: 50,
@@ -102,9 +102,7 @@ export default {
102
102
  import { computed, nextTick, ref, watch } from "vue";
103
103
  import type { PropType, CSSProperties } from "vue";
104
104
  import type { ISearchEmits } from "./typing";
105
- import { addUnit } from "../../utils";
106
- import { IconConfig } from "../../config";
107
- import HyIcon from "../hy-icon/hy-icon.vue";
105
+ import { addUnit, IconConfig } from "../../libs";
108
106
  import type HyIconProps from "../hy-icon/typing";
109
107
  import type {
110
108
  InputOnBlurEvent,
@@ -113,6 +111,8 @@ import type {
113
111
  InputOnInputEvent,
114
112
  InputConfirmType,
115
113
  } from "@uni-helper/uni-types";
114
+ // 组件
115
+ import HyIcon from "../hy-icon/hy-icon.vue";
116
116
 
117
117
  /**
118
118
  * 搜索组件,集成了常见搜索框所需功能,用户可以一键引入,开箱即用。
@@ -210,7 +210,7 @@ const props = defineProps({
210
210
  /** placeholder的颜色 */
211
211
  placeholderColor: {
212
212
  type: String,
213
- default: "#909399",
213
+ default: "",
214
214
  },
215
215
  /** 输入框左边的图标属性集合,可以为图标名称或图片路径 */
216
216
  searchIcon: [Boolean, Object] as PropType<HyIconProps | boolean>,
@@ -62,6 +62,7 @@ $hy-search-close-size: 20px !default;
62
62
  @include m(placeholder) {
63
63
  font-size: 25rpx;
64
64
  color: $hy-text-color--placeholder;
65
+ line-height: 30rpx;
65
66
  }
66
67
  }
67
68
  }