hy-app 0.5.2 → 0.5.3

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 (39) hide show
  1. package/components/hy-action-sheet/index.scss +0 -5
  2. package/components/hy-back-top/hy-back-top.vue +10 -9
  3. package/components/hy-back-top/props.ts +5 -3
  4. package/components/hy-badge/hy-badge.vue +2 -1
  5. package/components/hy-badge/props.ts +5 -3
  6. package/components/hy-button/hy-button.vue +5 -5
  7. package/components/hy-button/index.scss +9 -0
  8. package/components/hy-button/props.ts +11 -6
  9. package/components/hy-coupon/hy-coupon.vue +159 -167
  10. package/components/hy-coupon/index.scss +130 -516
  11. package/components/hy-coupon/props.ts +98 -127
  12. package/components/hy-coupon/typing.d.ts +147 -146
  13. package/components/hy-folding-panel-item/hy-folding-panel-item.vue +1 -3
  14. package/components/hy-folding-panel-item/index.scss +0 -8
  15. package/components/hy-form-group/hy-form-group.vue +308 -511
  16. package/components/hy-form-group/index.scss +0 -33
  17. package/components/hy-form-group/props.ts +103 -13
  18. package/components/hy-form-group/typing.d.ts +0 -77
  19. package/components/hy-form-item/hy-form-item.vue +3 -3
  20. package/components/hy-input/hy-input.vue +16 -10
  21. package/components/hy-input/index.scss +4 -0
  22. package/components/hy-input/props.ts +2 -2
  23. package/components/hy-notice-bar/hy-column-notice.vue +63 -70
  24. package/components/hy-notice-bar/hy-row-notice.vue +92 -110
  25. package/components/hy-notice-bar/index.scss +2 -4
  26. package/components/hy-notice-bar/props.ts +4 -1
  27. package/components/hy-qrcode/hy-qrcode.vue +1 -1
  28. package/components/hy-qrcode/index.scss +1 -0
  29. package/components/hy-qrcode/qrcode.js +1208 -1402
  30. package/components/hy-rate/hy-rate.vue +0 -1
  31. package/components/hy-read-more/hy-read-more.vue +1 -1
  32. package/components/hy-textarea/hy-textarea.vue +1 -1
  33. package/components/hy-textarea/index.scss +8 -7
  34. package/components/hy-toast/index.scss +2 -7
  35. package/libs/css/common.scss +0 -5
  36. package/libs/typing/modules/form.ts +159 -163
  37. package/package.json +2 -2
  38. package/web-types.json +1 -1
  39. package/components/hy-coupon/README.md +0 -133
@@ -1,133 +0,0 @@
1
- # HyCoupon 优惠券组件
2
-
3
- 市场上常用的优惠券组件,支持多种状态展示和丰富的功能配置。
4
-
5
- ## 引入方式
6
-
7
- ```js
8
- // 全局引入
9
- import { createApp } from 'vue'
10
- import HyDesignUni from '@/package'
11
- import App from './App.vue'
12
-
13
- const app = createApp(App)
14
- app.use(HyDesignUni)
15
- app.mount('#app')
16
-
17
- // 局部引入
18
- import { HyCoupon } from '@/package'
19
-
20
- export default {
21
- components: {
22
- HyCoupon
23
- }
24
- }
25
- ```
26
-
27
- ## 基本用法
28
-
29
- ```html
30
- <hy-coupon
31
- amount="50"
32
- title="新人专享优惠券"
33
- subtitle="全场通用,无门槛使用"
34
- validity="2023.10.01-2023.12.31"
35
- @click="onCouponClick"
36
- />
37
- ```
38
-
39
- ## 状态展示
40
-
41
- ```html
42
- <!-- 已使用状态 -->
43
- <hy-coupon
44
- amount="30"
45
- title="已使用优惠券"
46
- status="used"
47
- used-date="2023-10-15 14:30"
48
- />
49
-
50
- <!-- 已过期状态 -->
51
- <hy-coupon
52
- amount="15"
53
- title="已过期优惠券"
54
- status="expired"
55
- expire-date="2023-10-01"
56
- />
57
-
58
- <!-- 已禁用状态 -->
59
- <hy-coupon
60
- amount="25"
61
- title="已禁用优惠券"
62
- status="disabled"
63
- disabled-reason="账户等级不足"
64
- />
65
- ```
66
-
67
- ## 增强功能
68
-
69
- ```html
70
- <!-- 专属优惠券 -->
71
- <hy-coupon
72
- amount="40"
73
- title="专属优惠券"
74
- is-exclusive
75
- limit-per-user="1"
76
- />
77
-
78
- <!-- 显示操作按钮 -->
79
- <hy-coupon
80
- amount="60"
81
- title="限时优惠券"
82
- show-action-button
83
- @receive="onCouponReceive"
84
- />
85
-
86
- <!-- 自定义按钮文本 -->
87
- <hy-coupon
88
- amount="100"
89
- title="大额优惠券"
90
- show-action-button
91
- custom-button-text="立即兑换"
92
- />
93
- ```
94
-
95
- ## Props
96
-
97
- | 属性名 | 类型 | 默认值 | 说明 |
98
- |-------|------|-------|------|
99
- | amount | string/number | - | 优惠券金额 |
100
- | title | string | - | 优惠券标题 |
101
- | subtitle | string | '' | 优惠券副标题 |
102
- | status | string | 'normal' | 优惠券状态:normal/disabled/used/expired |
103
- | minSpend | string/number | 0 | 最低消费金额 |
104
- | validity | string | '' | 有效期文本 |
105
- | customStyle | Object | {} | 自定义样式 |
106
- | showRightBorder | boolean | true | 是否显示右侧边框装饰 |
107
- | tooltip | string | '' | 提示文本 |
108
- | showActionButton | boolean | false | 是否显示操作按钮 |
109
- | customButtonText | string | '' | 自定义按钮文本 |
110
- | isExclusive | boolean | false | 是否为专属优惠券 |
111
- | limitPerUser | number | 0 | 每用户限领数量 |
112
- | usedDate | string | '' | 使用日期(已使用状态时显示) |
113
- | expireDate | string | '' | 过期日期(已过期状态时显示) |
114
- | disabledReason | string | '' | 禁用原因(已禁用状态时显示) |
115
- | triggerReceiveOnClick | boolean | true | 点击时是否触发receive事件 |
116
-
117
- ## Events
118
-
119
- | 事件名 | 说明 | 回调参数 |
120
- |-------|------|--------|
121
- | click | 点击优惠券时触发(仅正常状态) | event: { status: CouponStatus } |
122
- | receive | 领取优惠券时触发 | - |
123
- | hover | 鼠标悬停状态改变时触发 | value: boolean |
124
-
125
- ## 示例页面
126
-
127
- 请查看 `pages/coupon-demo/index.vue` 了解更多使用示例。
128
-
129
- ## 注意事项
130
-
131
- 1. 在移动端环境下,`hover` 相关效果可能表现不同,请根据实际情况调整。
132
- 2. 当优惠券金额较大时,建议使用 `customStyle` 调整字体大小以保证显示效果。
133
- 3. 在小屏幕设备上,长文本可能会被截断,建议优化文本内容或调整组件宽度。