hy-app 0.6.8 → 0.7.0

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 (109) hide show
  1. package/attributes.json +1 -1
  2. package/components/hy-action-sheet/index.scss +2 -2
  3. package/components/hy-avatar/hy-avatar.vue +12 -5
  4. package/components/hy-avatar/index.scss +2 -2
  5. package/components/hy-avatar/props.ts +4 -2
  6. package/components/hy-avatar/typing.d.ts +8 -1
  7. package/components/hy-calendar/hy-calendar.vue +1 -0
  8. package/components/hy-calendar/month.vue +25 -5
  9. package/components/hy-calendar/props.ts +1 -1
  10. package/components/hy-cascader/hy-cascader.vue +503 -0
  11. package/components/hy-cascader/index.scss +84 -0
  12. package/components/hy-cascader/props.ts +88 -0
  13. package/components/hy-cascader/typing.d.ts +34 -0
  14. package/components/hy-cell-item/index.scss +8 -9
  15. package/components/hy-check-button/typing.d.ts +12 -7
  16. package/components/hy-code-input/hy-code-input.vue +33 -11
  17. package/components/hy-code-input/index.scss +2 -2
  18. package/components/hy-code-input/typing.d.ts +4 -0
  19. package/components/hy-config-provider/hy-config-provider.vue +58 -53
  20. package/components/hy-config-provider/props.ts +1 -1
  21. package/components/hy-datetime-picker/props.ts +1 -1
  22. package/components/hy-datetime-picker/typing.d.ts +1 -1
  23. package/components/hy-dropdown/typing.d.ts +5 -0
  24. package/components/hy-float-button/index.scss +1 -1
  25. package/components/hy-form/typing.d.ts +6 -0
  26. package/components/hy-form-item/typing.d.ts +1 -1
  27. package/components/hy-grid/hy-grid.vue +12 -12
  28. package/components/hy-grid/index.scss +1 -2
  29. package/components/hy-grid/props.ts +7 -2
  30. package/components/hy-grid/typing.d.ts +1 -1
  31. package/components/hy-icon/typing.d.ts +52 -9
  32. package/components/hy-index-bar/index.scss +1 -1
  33. package/components/hy-keyboard/constants.ts +83 -0
  34. package/components/hy-keyboard/hy-keyboard.vue +375 -0
  35. package/components/hy-keyboard/index.scss +73 -0
  36. package/components/hy-keyboard/key/index.scss +79 -0
  37. package/components/hy-keyboard/key/index.vue +91 -0
  38. package/components/hy-keyboard/key/types.ts +1 -0
  39. package/components/hy-keyboard/props.ts +108 -0
  40. package/components/hy-keyboard/typing.d.ts +18 -0
  41. package/components/hy-line-progress/index.scss +3 -3
  42. package/components/hy-menu/index.scss +1 -1
  43. package/components/hy-modal/index.scss +2 -2
  44. package/components/hy-modal/typing.d.ts +2 -2
  45. package/components/hy-notice-bar/hy-column-notice.vue +54 -94
  46. package/components/hy-notice-bar/hy-notice-bar.vue +128 -96
  47. package/components/hy-notice-bar/hy-row-notice.vue +89 -121
  48. package/components/hy-notice-bar/index.scss +1 -1
  49. package/components/hy-notice-bar/props.ts +86 -85
  50. package/components/hy-notify/hy-notify.vue +9 -9
  51. package/components/hy-notify/typing.d.ts +22 -0
  52. package/components/hy-picker/hy-picker.vue +126 -149
  53. package/components/hy-picker/props.ts +4 -1
  54. package/components/hy-picker/typing.d.ts +22 -0
  55. package/components/hy-popover/index.scss +6 -6
  56. package/components/hy-popup/index.scss +6 -5
  57. package/components/hy-price/hy-price.vue +52 -23
  58. package/components/hy-price/props.ts +54 -54
  59. package/components/hy-radio/props.ts +1 -1
  60. package/components/hy-radio/typing.d.ts +5 -1
  61. package/components/hy-rolling-num/typing.d.ts +1 -0
  62. package/components/hy-scroll-list/index.scss +2 -2
  63. package/components/hy-search/index.scss +1 -1
  64. package/components/hy-signature/index.scss +1 -1
  65. package/components/hy-skeleton/index.scss +21 -4
  66. package/components/hy-slider/index.scss +3 -3
  67. package/components/hy-steps/hy-steps.vue +1 -1
  68. package/components/hy-steps/index.scss +3 -3
  69. package/components/hy-submit-bar/typing.d.ts +3 -3
  70. package/components/hy-subsection/index.scss +8 -8
  71. package/components/hy-swipe-action/hy-swipe-action.vue +34 -15
  72. package/components/hy-swipe-action/index.scss +0 -1
  73. package/components/hy-swiper/index.scss +2 -2
  74. package/components/hy-switch/index.scss +3 -3
  75. package/components/hy-switch/typing.d.ts +4 -0
  76. package/components/hy-tabbar/props.ts +2 -1
  77. package/components/hy-tabbar/typing.d.ts +5 -4
  78. package/components/hy-tabbar-group/index.scss +2 -2
  79. package/components/hy-tabs/hy-tabs.vue +338 -336
  80. package/components/hy-tabs/index.scss +7 -7
  81. package/components/hy-tabs/typing.d.ts +41 -33
  82. package/components/hy-tag/index.scss +1 -1
  83. package/components/hy-textarea/hy-textarea.vue +2 -2
  84. package/components/hy-textarea/index.scss +4 -4
  85. package/components/hy-textarea/typing.d.ts +4 -0
  86. package/components/hy-toast/hy-toast.vue +14 -6
  87. package/components/hy-toast/index.scss +1 -1
  88. package/components/hy-toast/typing.d.ts +42 -36
  89. package/components/hy-tooltip/hy-tooltip.vue +1 -1
  90. package/components/hy-tooltip/index.scss +7 -6
  91. package/components/hy-tooltip/props.ts +1 -1
  92. package/components/hy-upload/hy-upload.vue +16 -1
  93. package/components/hy-upload/index.scss +149 -144
  94. package/components/hy-warn/index.scss +1 -1
  95. package/components/index.ts +6 -0
  96. package/global.d.ts +2 -0
  97. package/libs/config/icon.ts +442 -430
  98. package/libs/css/_function.scss +7 -13
  99. package/libs/css/_mixin.scss +3 -3
  100. package/libs/css/common.scss +1 -1
  101. package/libs/css/iconfont.css +445 -441
  102. package/libs/css/theme.scss +54 -25
  103. package/libs/locale/lang/en-US.ts +4 -0
  104. package/libs/locale/lang/zh-CN.ts +4 -0
  105. package/libs/typing/index.ts +80 -0
  106. package/package.json +5 -2
  107. package/tags.json +1 -1
  108. package/web-types.json +1 -1
  109. package/components/hy-qrcode/qrcode.js.bak +0 -1434
@@ -62,17 +62,17 @@
62
62
  width: 30px;
63
63
  position: absolute;
64
64
  bottom: 2px;
65
- border-radius: $hy-border-radius-semicircle;
65
+ border-radius: $hy-radius-semicircle;
66
66
  transition-property: transform;
67
67
  transition-duration: 300ms;
68
68
  }
69
69
  }
70
70
  }
71
+ }
71
72
 
72
- .swiper-item {
73
- width: 100%;
74
- height: 100%;
75
- @include flex(column);
76
- box-sizing: border-box;
77
- }
73
+ .swiper-item {
74
+ width: 100%;
75
+ height: 100%;
76
+ @include flex(column);
77
+ box-sizing: border-box;
78
78
  }
@@ -1,33 +1,41 @@
1
- import BadgeProps from '../hy-badge/typing'
2
- export interface TabsItemVo extends AnyObject {
3
- /**
4
- * @description tab名称
5
- * */
6
- name: string
7
- /**
8
- * @description 徽标接收的props
9
- * */
10
- badge?: BadgeProps
11
- /**
12
- * @description 是否禁用
13
- * */
14
- disabled?: boolean
15
- /**
16
- * @description swiper内容值
17
- * */
18
- content?: any
19
- }
20
-
21
- export interface TabsParamsVo extends TabsParamsVo {
22
- index: number
23
- }
24
- export interface ITabsEmits {
25
- /** 点击标签时触发 */
26
- (e: 'click', params: TabsParamsVo): void
27
- /** 标签索引改变时触发 */
28
- (e: 'change', item: TabsItemVo, index: number): void
29
- /** 长按标签时触发 */
30
- (e: 'longPress', params: TabsParamsVo): void
31
- /** 标签索引改变时触发 */
32
- (e: 'update:current', index: number): void
33
- }
1
+ import type { HyBadgeProps } from '../../index'
2
+ export interface TabsItemVo {
3
+ /**
4
+ * tab名称
5
+ * */
6
+ name: string
7
+ /**
8
+ * 徽标接收的props
9
+ * */
10
+ badge?: HyBadgeProps
11
+ /**
12
+ * 是否禁用
13
+ * */
14
+ disabled?: boolean
15
+ /**
16
+ * swiper内容值
17
+ * */
18
+ content?: any
19
+ [key: string]: any
20
+ }
21
+
22
+ export interface ITabsExpose {
23
+ /**
24
+ * 计算滑块距离左边距离
25
+ * */
26
+ resize: () => void
27
+ }
28
+
29
+ export interface TabsParamsVo extends TabsParamsVo {
30
+ index: number
31
+ }
32
+ export interface ITabsEmits {
33
+ /** 点击标签时触发 */
34
+ (e: 'click', params: TabsParamsVo): void
35
+ /** 标签索引改变时触发 */
36
+ (e: 'change', item: TabsItemVo, index: number): void
37
+ /** 长按标签时触发 */
38
+ (e: 'longPress', params: TabsParamsVo): void
39
+ /** 标签索引改变时触发 */
40
+ (e: 'update:current', index: number): void
41
+ }
@@ -88,7 +88,7 @@ $hy-background--disabled);
88
88
 
89
89
  /* 关闭按钮 */
90
90
  @include e(close) {
91
- border-radius: $hy-border-radius-semicircle;
91
+ border-radius: $hy-radius-semicircle;
92
92
  background-color: #C6C7CB;
93
93
  margin-left: $hy-border-margin-padding-sm;
94
94
  @include flex(row);
@@ -125,7 +125,7 @@ const textareaStyle = computed(() => {
125
125
  return Object.assign(style, props.customStyle)
126
126
  })
127
127
  /**
128
- * @description 边框颜色
128
+ * 边框颜色
129
129
  * */
130
130
  const borderStyle = computed(() => {
131
131
  return (isFocus: boolean) => {
@@ -173,7 +173,7 @@ const onInput = (e: any) => {
173
173
  })
174
174
  }
175
175
  /**
176
- * @description 内容发生变化,进行处理
176
+ * 内容发生变化,进行处理
177
177
  * */
178
178
  const valueChange = () => {
179
179
  const value = innerValue.value
@@ -2,7 +2,7 @@
2
2
  @use "../../libs/css/mixin" as *;
3
3
 
4
4
  @include b(textarea) {
5
- border-radius: $hy-border-radius-sm;
5
+ border-radius: $hy-radius-sm;
6
6
  position: relative;
7
7
  @include flex;
8
8
  flex: 1;
@@ -13,11 +13,11 @@
13
13
  }
14
14
 
15
15
  @include e(radius) {
16
- border-radius: $hy-border-radius-sm;
16
+ border-radius: $hy-radius-sm;
17
17
  }
18
18
 
19
19
  @include e(no-radius) {
20
- border-radius: $hy-border-radius-no;
20
+ border-radius: $hy-radius-no;
21
21
  }
22
22
 
23
23
  @include e(disabled) {
@@ -48,6 +48,6 @@
48
48
  font-size: 12px;
49
49
  background-color: $hy-background--3;
50
50
  padding: 1px 4px;
51
- border-radius: $hy-border-radius-sm;
51
+ border-radius: $hy-radius-sm;
52
52
  }
53
53
  }
@@ -3,6 +3,10 @@ import type {
3
3
  InputOnConfirmEvent,
4
4
  InputOnFocusEvent
5
5
  } from '@uni-helper/uni-types'
6
+ import type { ExtractPropTypes } from 'vue'
7
+ import type textareaProps from './props'
8
+
9
+ export interface HyTextareaProps extends ExtractPropTypes<typeof textareaProps> {}
6
10
 
7
11
  export interface ITextareaEmits {
8
12
  /** 输入框失去焦点时触发 */
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <hy-overlay
3
3
  :show="isShow"
4
- :zIndex="tmpConfig.overlay ? 10070 : -1"
5
- :LockScroll="false"
4
+ :LockScroll="!tmpConfig.overlay"
5
+ :opacity="tmpConfig.cover ? 0.5 : 0"
6
6
  :custom-style="overlayStyle"
7
7
  >
8
8
  <view :style="[contentStyle]" :class="contentClass">
@@ -18,7 +18,13 @@
18
18
  v-else-if="iconNameCom"
19
19
  :class="['hy-toast__content--icon', `hy-toast__content--icon__${tmpConfig.type}`]"
20
20
  >
21
- <hy-icon :name="iconNameCom" size="17" color="#FFFFFF"></hy-icon>
21
+ <hy-icon
22
+ :name="iconNameCom"
23
+ :size="(typeof tmpConfig.icon === 'object' && tmpConfig.icon?.size) || 17"
24
+ :color="
25
+ (typeof tmpConfig.icon === 'object' && tmpConfig.icon?.color) || '#FFFFFF'
26
+ "
27
+ ></hy-icon>
22
28
  </view>
23
29
  <text
24
30
  :class="[
@@ -85,8 +91,6 @@ const overlayStyle = computed(() => {
85
91
  display: 'flex',
86
92
  flexDirection: 'column'
87
93
  }
88
- // 将遮罩设置为100%透明度,避免出现灰色背景
89
- style.backgroundColor = 'rgba(0, 0, 0, 0)'
90
94
  return style
91
95
  })
92
96
 
@@ -102,7 +106,11 @@ const iconNameCom = computed(() => {
102
106
  return ''
103
107
  }
104
108
  } else {
105
- return tmpConfig.value.icon
109
+ const icon = tmpConfig.value.icon
110
+ if (typeof icon === 'string') {
111
+ return icon
112
+ }
113
+ return icon?.name
106
114
  }
107
115
  })
108
116
 
@@ -23,7 +23,7 @@
23
23
  @include m(icon) {
24
24
  width: 60rpx;
25
25
  height: 60rpx;
26
- border-radius: $hy-border-radius-semicircle;
26
+ border-radius: $hy-radius-semicircle;
27
27
  box-sizing: border-box;
28
28
  margin-right: $hy-border-margin-padding-base;
29
29
  display: flex;
@@ -1,38 +1,44 @@
1
+ import type { HyIconProps } from '../hy-icon/typing'
2
+
1
3
  export default interface ToastOptions {
2
- /**
3
- * @description 显示文本
4
- * */
5
- message?: string;
6
- /**
7
- * @description 主题类型,primary,success,error,warning,info
8
- * */
9
- type?: HyApp.ThemeType | "";
10
- /**
11
- * @description toast出现的位置
12
- * */
13
- position?: HyApp.ColumnCenterType;
14
- /**
15
- * @description 显示的图标
16
- * */
17
- icon?: boolean | string;
18
- /**
19
- * @description 是否防止触摸穿透
20
- * */
21
- overlay?: boolean;
22
- /**
23
- * @description 是否加载中状态
24
- * */
25
- loading?: boolean;
26
- /**
27
- * @description 加载状态
28
- * */
29
- loadMode?: HyApp.LoadingMode;
30
- /**
31
- * @description 显示的时间,毫秒
32
- * */
33
- duration?: number;
34
- /**
35
- * @description 执行完后的回调函数
36
- * */
37
- complete?: Function | null;
4
+ /**
5
+ * 显示文本
6
+ * */
7
+ message?: string
8
+ /**
9
+ * 主题类型,primary,success,error,warning,info
10
+ * */
11
+ type?: HyApp.ThemeType | ''
12
+ /**
13
+ * toast出现的位置
14
+ * */
15
+ position?: HyApp.ColumnCenterType
16
+ /**
17
+ * 显示的图标
18
+ * */
19
+ icon?: boolean | string | HyIconProps
20
+ /**
21
+ * 是否防止触摸穿透
22
+ * */
23
+ overlay?: boolean
24
+ /**
25
+ * 是否显示透明遮罩层
26
+ * */
27
+ cover?: boolean
28
+ /**
29
+ * 是否加载中状态
30
+ * */
31
+ loading?: boolean
32
+ /**
33
+ * 加载状态
34
+ * */
35
+ loadMode?: HyApp.LoadingMode
36
+ /**
37
+ * 显示的时间,毫秒
38
+ * */
39
+ duration?: number
40
+ /**
41
+ * 执行完后的回调函数
42
+ * */
43
+ complete?: Function | null
38
44
  }
@@ -2,7 +2,7 @@
2
2
  <view class="hy-tooltip">
3
3
  <hy-overlay
4
4
  :show="showTooltip && tooltipTop !== -10000 && overlay"
5
- :customStyle="{ backgroundColor: 'rgba(0, 0, 0, 0)' }"
5
+ :opacity="0"
6
6
  @click="closeHandler"
7
7
  ></hy-overlay>
8
8
  <!-- 文本内容区域 -->
@@ -8,7 +8,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
8
8
  position: relative;
9
9
  @include flex;
10
10
 
11
- @include squareArrow(6px, $hy-tooltip--background-color, -1, $hy-box-shadow);
11
+ @include squareArrow(6px, $hy-tooltip--background-color, -1, $hy-shadow-base);
12
12
 
13
13
  @include edeep(popup) {
14
14
  position: absolute;
@@ -17,8 +17,8 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
17
17
  text-align: center;
18
18
  min-height: 36px;
19
19
  transition: opacity 0.2s;
20
- box-shadow: $hy-box-shadow;
21
- border-radius: $hy-border-radius-sm;
20
+ box-shadow: $hy-shadow-base;
21
+ border-radius: $hy-radius-sm;
22
22
  }
23
23
 
24
24
 
@@ -29,7 +29,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
29
29
 
30
30
  @include e(container) {
31
31
  position: relative;
32
- border-radius: $hy-border-radius-sm;
32
+ border-radius: $hy-radius-sm;
33
33
  }
34
34
 
35
35
  @include e(inner) {
@@ -37,7 +37,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
37
37
  padding: $hy-border-margin-padding-base;
38
38
  line-height: 22px;
39
39
  z-index: $hy-tooltip--z-index;
40
- border-radius: $hy-border-radius-sm;
40
+ border-radius: $hy-radius-sm;
41
41
  box-sizing: content-box;
42
42
  width: 200px;
43
43
  }
@@ -58,7 +58,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
58
58
  background-color: $hy-tooltip--background-color;
59
59
  position: relative;
60
60
  flex: 1;
61
- border-radius: $hy-border-radius-sm;
61
+ border-radius: $hy-radius-sm;
62
62
  padding: 0;
63
63
  @include flex(row);
64
64
  align-items: center;
@@ -76,6 +76,7 @@ $hy-tooltip--background-color: rgb(50, 50, 51);
76
76
  @include m(text) {
77
77
  font-size: 13px;
78
78
  color: #ffffff;
79
+ white-space: nowrap;
79
80
  }
80
81
  }
81
82
  }
@@ -21,7 +21,7 @@ const tooltipProps = {
21
21
  },
22
22
  /**
23
23
  * 指定 popover 的放置位置
24
- * @values top,top-start,top-end,bottom,bottom-start,bottom-end,left,left-start,left-end,right,right-start,right-end
24
+ * @values top,bottom,left,right
25
25
  * */
26
26
  placement: {
27
27
  type: String,
@@ -68,7 +68,10 @@
68
68
  <!-- 删除图片图标 -->
69
69
 
70
70
  <!-- 上传成功图标 -->
71
- <view class="hy-upload__success" v-if="item.status === 'success'">
71
+ <view
72
+ class="hy-upload__status hy-upload__success"
73
+ v-if="item.status === 'success'"
74
+ >
72
75
  <view class="hy-upload__success--icon">
73
76
  <hy-icon
74
77
  :name="IconConfig.CHECK_MASK"
@@ -77,6 +80,18 @@
77
80
  ></hy-icon>
78
81
  </view>
79
82
  </view>
83
+ <view
84
+ class="hy-upload__status hy-upload__error"
85
+ v-if="item.status === 'failed'"
86
+ >
87
+ <view class="hy-upload__success--icon">
88
+ <hy-icon
89
+ :name="IconConfig.CLOSE_CIRCLE"
90
+ color="#ffffff"
91
+ size="12"
92
+ ></hy-icon>
93
+ </view>
94
+ </view>
80
95
  <!-- 上传成功图标 -->
81
96
  </view>
82
97
  </template>