hy-app 0.3.8 → 0.3.9

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.
@@ -7,6 +7,7 @@
7
7
  position: relative;
8
8
  align-items: center;
9
9
  justify-content: center;
10
+ background: transparent;
10
11
  margin: 0;
11
12
  @include flex;
12
13
  /* #ifndef APP-NVUE */
@@ -84,9 +85,4 @@
84
85
  @include m(hairline) {
85
86
  border-width: 0.5px;
86
87
  }
87
- }
88
-
89
- /* 去掉背景色 */
90
- button {
91
- background: transparent;
92
88
  }
@@ -9,10 +9,10 @@
9
9
  class="hy-price__text"
10
10
  :style="[{ 'font-size': addUnit(getPx(size) * ratio) }]"
11
11
  >
12
- {{ priceOne[0] }}
12
+ {{ priceOne?.[0] }}
13
13
  </text>
14
14
  <text class="hy-price__decimal">
15
- {{ "." + priceOne[1].slice(0, num) }}
15
+ {{ "." + priceOne?.[1].slice(0, num) }}
16
16
  </text>
17
17
  </text>
18
18
  </template>
@@ -31,7 +31,7 @@ export default {
31
31
  <script setup lang="ts">
32
32
  import { computed, toRefs } from "vue";
33
33
  import type { CSSProperties, PropType } from "vue";
34
- import { addUnit, getPx } from "../../utils";
34
+ import { addUnit, getPx, error } from "../../utils";
35
35
 
36
36
  /**
37
37
  * 业务组件,突出金额小数点前大,小数点后小
@@ -42,7 +42,7 @@ defineOptions({});
42
42
  // const props = withDefaults(defineProps<IProps>(), defaultProps)
43
43
  const props = defineProps({
44
44
  /** 传入金额值 */
45
- text: String,
45
+ text: [String, Number] as PropType<string | number>,
46
46
  /** 金额符号 */
47
47
  symbol: {
48
48
  type: String,
@@ -65,7 +65,7 @@ const props = defineProps({
65
65
  },
66
66
  /** 字体大小 */
67
67
  size: {
68
- type: Number,
68
+ type: [Number, String],
69
69
  default: 12,
70
70
  },
71
71
  /** 字体粗细 */
@@ -107,11 +107,14 @@ const priceStyle = computed<CSSProperties>(() => {
107
107
  * @description 价格处理
108
108
  * */
109
109
  const priceOne = computed(() => {
110
+ if (props.text === undefined) return error("值为空");
111
+
110
112
  let value = "";
111
- if (typeof text.value !== "string") {
112
- value = text.value.toString();
113
+ const price = props.text;
114
+ if (typeof price !== "string") {
115
+ value = price.toString();
113
116
  } else {
114
- value = text.value;
117
+ value = price;
115
118
  }
116
119
  if (/\./g.test(value)) {
117
120
  if (Number(value)) {
package/config/icon.ts CHANGED
@@ -1,376 +1,408 @@
1
1
  export const IconConfig = {
2
2
  /**
3
- * @description 加载动画
3
+ * 加载动画
4
4
  * */
5
5
  LOADING: "loading",
6
6
  /**
7
- * @description 关闭
7
+ * 关闭
8
8
  * */
9
9
  CLOSE: "close",
10
10
  /**
11
- * @description 空星
11
+ * 空星
12
12
  * */
13
13
  STAR: "collect",
14
14
  /**
15
- * @description 实星
15
+ * 实星
16
16
  * */
17
17
  STAR_FILL: "collect-fill",
18
18
  /**
19
- * @description 微笑
19
+ * 微笑
20
20
  * */
21
21
  SMILE: "smile",
22
22
  /**
23
- * @description 微笑-实心
23
+ * 微笑-实心
24
24
  * */
25
25
  SMILE_FILL: "smile-fill",
26
26
  /**
27
- * @description 难过-实心
27
+ * 难过-实心
28
28
  * */
29
29
  CRY_FILL: "cry-fill",
30
30
  /**
31
- * @description 打勾,勾选
31
+ * 打勾,勾选
32
32
  * */
33
33
  CHECK_MASK: "check-mask",
34
34
  /**
35
- * @description 编辑
35
+ * 编辑
36
36
  * */
37
37
  EDIT: "edit",
38
38
  /**
39
- * @description 商城
39
+ * 商城
40
40
  * */
41
41
  SHOP: "shop",
42
42
  /**
43
- * @description 实心锁
43
+ * 实心锁
44
44
  * */
45
45
  LOCK_FILL: "lock-fill",
46
46
  /**
47
- * @description 打开实心锁
47
+ * 打开实心锁
48
48
  * */
49
49
  LOCK_OPEN_FILL: "lock-open-fill",
50
50
  /**
51
- * @description 空心锁
51
+ * 空心锁
52
52
  * */
53
53
  LOCK: "lock",
54
54
  /**
55
- * @description 地点
55
+ * 地点
56
56
  * */
57
57
  MAP: "map",
58
58
  /**
59
- * @description 地点-实心
59
+ * 地点-实心
60
60
  * */
61
61
  MAP_FILL: "map-fill",
62
62
  /**
63
- * @description 购物车
63
+ * 购物车
64
64
  * */
65
65
  SHOPPING_CART: "shopping-cart",
66
66
  /**
67
- * @description 购物车-实心
67
+ * 购物车-实心
68
68
  * */
69
69
  SHOPPING_CART_FILL: "shopping-cart-fill",
70
70
  /**
71
- * @description 添加购物车
71
+ * 添加购物车
72
72
  * */
73
73
  SHOPPING_CART_ADD: "shopping-cart-add",
74
74
  /**
75
- * @description 购物袋
75
+ * 购物袋
76
76
  * */
77
77
  SHOPPING_BAG: "shopping-bag",
78
78
  /**
79
- * @description 刷新
79
+ * 刷新
80
80
  * */
81
81
  REFRESH: "refresh",
82
82
  /**
83
- * @description 任务
83
+ * 任务
84
84
  * */
85
85
  TASK: "task",
86
86
  /**
87
- * @description 标签
87
+ * 标签
88
88
  * */
89
89
  TAG: "tag",
90
90
  /**
91
- * @description
91
+ * 左
92
92
  * */
93
93
  LEFT: "left",
94
94
  /**
95
- * @description
95
+ * 右
96
96
  * */
97
97
  RIGHT: "right",
98
98
  /**
99
- * @description
99
+ * 上
100
100
  * */
101
101
  UP: "up",
102
102
  /**
103
- * @description
103
+ * 下
104
104
  * */
105
105
  DOWN: "down",
106
106
  /**
107
- * @description 向上-实心
107
+ * 向上-实心
108
108
  * */
109
109
  ARROW_UP_FILL: "arrow-up-fill",
110
110
  /**
111
- * @description 向下-实心
111
+ * 向下-实心
112
112
  * */
113
113
  ARROW_DOWN_FILL: "arrow-down-fill",
114
114
  /**
115
- * @description 向左-实心
115
+ * 向左-实心
116
116
  * */
117
117
  ARROW_LEFT_FILL: "arrow-left-fill",
118
118
  /**
119
- * @description 向右-实心
119
+ * 向右-实心
120
120
  * */
121
121
  ARROW_RIGHT_FILL: "arrow-right-fill",
122
122
  /**
123
- * @description 向左双箭头
123
+ * 向左双箭头
124
124
  * */
125
125
  ARROW_DOUBLE_LEFT: "arrow-double-left",
126
126
  /**
127
- * @description 向右双箭头
127
+ * 向右双箭头
128
128
  * */
129
129
  ARROW_DOUBLE_RIGHT: "arrow-double-right",
130
130
  /**
131
- * @description 箭头向左
131
+ * 箭头向左
132
132
  * */
133
133
  ARROW_LEFTWARD: "arrow-leftward",
134
134
  /**
135
- * @description 箭头向右
135
+ * 箭头向右
136
136
  * */
137
137
  ARROW_RIGHTWARD: "arrow-rightward",
138
138
  /**
139
- * @description 历史
139
+ * 历史
140
140
  * */
141
141
  HISTORY: "history",
142
142
  /**
143
- * @description 时间
143
+ * 时间
144
144
  * */
145
145
  TIME: "time",
146
146
  /**
147
- * @description 网络
147
+ * 网络
148
148
  * */
149
149
  NETWORK: "network",
150
150
  /**
151
- * @description 列表
151
+ * 列表
152
152
  * */
153
153
  LIST_DOT: "list-dot",
154
154
  /**
155
- * @description 菜单
155
+ * 菜单
156
156
  * */
157
157
  MENU: "menu",
158
158
  /**
159
- * @description 搜索
159
+ * 搜索
160
160
  * */
161
161
  SEARCH: "search",
162
162
  /**
163
- * @description
163
+ * 加
164
164
  * */
165
165
  PLUS: "plus",
166
166
  /**
167
- * @description
167
+ * 减
168
168
  * */
169
169
  MINUS: "minus",
170
170
  /**
171
- * @description 提醒
171
+ * 提醒
172
172
  * */
173
173
  REMIND: "remind",
174
174
  /**
175
- * @description 警告
175
+ * 提醒-实心
176
+ * */
177
+ REMIND_FILL: "remind-fill",
178
+ /**
179
+ * 警告
176
180
  * */
177
181
  WARNING: "warning",
178
182
  /**
179
- * @description 警告-实心
183
+ * 警告-实心
180
184
  * */
181
185
  WARNING_FILL: "warning-fill",
182
186
  /**
183
- * @description 删除
187
+ * 删除
184
188
  * */
185
189
  DELETE: "delete",
186
190
  /**
187
- * @description 删除-实心
191
+ * 删除-实心
188
192
  * */
189
193
  DELETE_FILL: "delete-fill",
190
194
  /**
191
- * @description 筛选
195
+ * 筛选
192
196
  * */
193
197
  SCREEN: "screen",
194
198
  /**
195
- * @description 分类
199
+ * 分类
196
200
  * */
197
201
  CLASS: "class",
198
202
  /**
199
- * @description 应用
203
+ * 应用
200
204
  * */
201
205
  CLASS_FILL: "class-fill",
202
206
  /**
203
- * @description 首页
207
+ * 首页
204
208
  * */
205
209
  HOME: "home",
206
210
  /**
207
- * @description 首页-实心
211
+ * 首页-实心
208
212
  * */
209
213
  HOME_FILL: "home-fill",
210
214
  /**
211
- * @description 我的
215
+ * 我的
212
216
  * */
213
217
  MINE: "mine",
214
218
  /**
215
- * @description 我的-实心
219
+ * 我的-实心
216
220
  * */
217
221
  MINE_FILL: "mine-fill",
218
222
  /**
219
- * @description 设置
223
+ * 设置
220
224
  * */
221
225
  SETTING: "setting",
222
226
  /**
223
- * @description 关闭-圈
227
+ * 设置-实心
228
+ * */
229
+ SETTING_FILL: "setting-fill",
230
+ /**
231
+ * 关闭-圈
224
232
  * */
225
233
  CLOSE_CIRCLE: "close-circle",
226
234
  /**
227
- * @description 关闭-圈-实心
235
+ * 关闭-圈-实心
228
236
  * */
229
237
  CLOSE_CIRCLE_FILL: "close-circle-fill",
230
238
  /**
231
- * @description 注意
239
+ * 注意
232
240
  * */
233
241
  NOTICE: "notice",
234
242
  /**
235
- * @description 注意-实心
243
+ * 注意-实心
236
244
  * */
237
245
  NOTICE_FILL: "notice-fill",
238
246
  /**
239
- * @description 成功
247
+ * 成功
240
248
  * */
241
249
  SUCCESS: "success",
242
250
  /**
243
- * @description 成功-实心
251
+ * 成功-实心
244
252
  * */
245
253
  SUCCESS_FILL: "success-fill",
246
254
  /**
247
- * @description 帮助
255
+ * 帮助
248
256
  * */
249
257
  HELP: "help",
250
258
  /**
251
- * @description 帮助-实心
259
+ * 帮助-实心
252
260
  * */
253
261
  HELP_FILL: "help-fill",
254
262
  /**
255
- * @description 上传
263
+ * 上传
256
264
  * */
257
265
  UPLOAD: "upload",
258
266
  /**
259
- * @description 转换
267
+ * 转换
260
268
  * */
261
269
  SWITCH: "switch",
262
270
  /**
263
- * @description 下载
271
+ * 下载
264
272
  * */
265
273
  DOWNLOAD: "download",
266
274
  /**
267
- * @description 保护
275
+ * 保护
268
276
  * */
269
277
  SECURITY: "security",
270
278
  /**
271
- * @description 扫码
279
+ * 扫码
272
280
  * */
273
281
  SCAN: "scan",
274
282
  /**
275
- * @description 保存
283
+ * 保存
276
284
  * */
277
285
  SAVE: "save",
278
286
  /**
279
- * @description 图片
287
+ * 图片
280
288
  * */
281
289
  PHOTO: "picture",
282
290
  /**
283
- * @description pdf
291
+ * 图片-实体
292
+ * */
293
+ PHOTO_FILL: "picture-fill",
294
+ /**
295
+ * pdf
284
296
  * */
285
297
  PDF: "pdf",
286
298
  /**
287
- * @description 导航
299
+ * 导航
288
300
  * */
289
301
  NAVIGATION: "navigation",
290
302
  /**
291
- * @description 打印
303
+ * 打印
292
304
  * */
293
305
  PRINT: "print",
294
306
  /**
295
- * @description layers
307
+ * layers
296
308
  * */
297
309
  LAYERS: "layers",
298
310
  /**
299
- * @description 链接
311
+ * 链接
300
312
  * */
301
313
  LINK: "link",
302
314
  /**
303
- * @description 导出
315
+ * 导出
304
316
  * */
305
317
  EXPORT: "export",
306
318
  /**
307
- * @description 省略号
319
+ * 省略号
308
320
  * */
309
321
  ELLIPSIS: "ellipsis",
310
322
  /**
311
- * @description 客服
323
+ * 客服
312
324
  * */
313
325
  CUSTOMER_SERVICE: "customer-service",
314
326
  /**
315
- * @description 信息
327
+ * 信息
316
328
  * */
317
329
  COMMENT: "comment",
318
330
  /**
319
- * @description 附件
331
+ * 附件
320
332
  * */
321
333
  ATTACHMENT: "attachment",
322
334
  /**
323
- * @description 相机
335
+ * 相机
324
336
  * */
325
337
  CAMERA: "camera",
326
338
  /**
327
- * @description 眼睛
339
+ * 眼睛
328
340
  * */
329
341
  EYE: "eye",
330
342
  /**
331
- * @description 眼睛-关闭
343
+ * 眼睛-关闭
332
344
  * */
333
345
  EYE_CLOSE: "eye-close",
334
346
  /**
335
- * @description 日历
347
+ * 密码隐藏
348
+ * */
349
+ HIDE: "hide",
350
+ /**
351
+ * 日历
336
352
  * */
337
353
  CALENDAR: "calendar",
338
354
  /**
339
- * @description 复制
355
+ * 复制
340
356
  * */
341
357
  COPY: "copy",
342
358
  /**
343
- * @description 订单
359
+ * 订单
344
360
  * */
345
361
  ORDER: "order",
346
362
  /**
347
- * @description 消息
363
+ * 消息
348
364
  * */
349
365
  MESSAGE: "message",
350
366
  /**
351
- * @description 消息-实心
367
+ * 消息-实心
352
368
  * */
353
369
  MESSAGE_FILL: "message-fill",
354
370
  /**
355
- * @description 通知
371
+ * 通知
356
372
  * */
357
373
  NOTIFICATION_FILL: "systemprompt_fill",
358
374
  /**
359
- * @description 发送
375
+ * 发送
360
376
  * */
361
377
  SEND: "send",
362
378
  /**
363
- * @description 分享
379
+ * 分享
364
380
  * */
365
381
  SHARE: "share",
366
382
  /**
367
- * @description 分享-实心
383
+ * 分享-实心
368
384
  * */
369
385
  SHARE_FILL: "share-fill",
386
+ /**
387
+ * 打出电话
388
+ * */
389
+ TELEPHONE_OUT: "telephone-out",
390
+ /**
391
+ * 电话
392
+ * */
393
+ TELEPHONE: "telephone",
394
+ /**
395
+ * 电话-实心
396
+ * */
397
+ TELEPHONE_FILL: "telephone-fill",
398
+ /**
399
+ * 话筒
400
+ * */
401
+ MIC: "mic",
370
402
  };
371
403
 
372
404
  /**
373
- * @description 不同主题对应不同的图标
405
+ * 不同主题对应不同的图标
374
406
  * */
375
407
  export const iconName = (type: string) => {
376
408
  switch (type) {
@@ -24,6 +24,24 @@
24
24
  overflow: auto;
25
25
  }
26
26
 
27
+ .hy-title {
28
+ padding: $hy-border-margin-padding-base;
29
+ color: $hy-text-color;
30
+ position: relative;
31
+
32
+ &::after {
33
+ content: "";
34
+ position: absolute;
35
+ left: 0;
36
+ top: 50%;
37
+ transform: translateY(-50%);
38
+ width: 4px;
39
+ height: 18px;
40
+ background: $hy-primary;
41
+ border-radius: $hy-border-radius-semicircle;
42
+ }
43
+ }
44
+
27
45
  /* 解决滚动时候出现滚动条 */
28
46
  ::-webkit-scrollbar{
29
47
  width: 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "hy-app",
3
- "version": "0.3.8",
4
- "description": "修改主题是暗色时候,轮播图背景色还是白色",
3
+ "version": "0.3.9",
4
+ "description": "新增icon图标",
5
5
  "main": "./index.ts",
6
6
  "private": false,
7
7
  "scripts": {},
@@ -1,8 +1,8 @@
1
1
  @font-face {
2
- font-family: 'iconfont'; /* Project id 4305932 */
3
- src: url('https://at.alicdn.com/t/c/font_4305932_jcbef3d08o8.woff2?t=1747792820979') format('woff2'),
4
- url('https://at.alicdn.com/t/c/font_4305932_jcbef3d08o8.woff?t=1747792820979') format('woff'),
5
- url('https://at.alicdn.com/t/c/font_4305932_jcbef3d08o8.ttf?t=1747792820979') format('truetype');
2
+ font-family: "iconfont"; /* Project id 4305932 */
3
+ src: url('iconfont.woff2?t=1757404519817') format('woff2'),
4
+ url('iconfont.woff?t=1757404519817') format('woff'),
5
+ url('iconfont.ttf?t=1757404519817') format('truetype');
6
6
  }
7
7
 
8
8
  .iconfont {
@@ -13,6 +13,62 @@
13
13
  -moz-osx-font-smoothing: grayscale;
14
14
  }
15
15
 
16
+ .hy-icon-telephone-fill:before {
17
+ content: "\e66d";
18
+ }
19
+
20
+ .hy-icon-dot:before {
21
+ content: "\ec1e";
22
+ }
23
+
24
+ .hy-icon-shujuzhanbi:before {
25
+ content: "\e60c";
26
+ }
27
+
28
+ .hy-icon-shujushitu:before {
29
+ content: "\e60d";
30
+ }
31
+
32
+ .hy-icon-picture-fill:before {
33
+ content: "\e60e";
34
+ }
35
+
36
+ .hy-icon-a-xiangshang3:before {
37
+ content: "\e60f";
38
+ }
39
+
40
+ .hy-icon-remind-fill:before {
41
+ content: "\e610";
42
+ }
43
+
44
+ .hy-icon-a-xiangxia3:before {
45
+ content: "\e612";
46
+ }
47
+
48
+ .hy-icon-setting-fill:before {
49
+ content: "\e613";
50
+ }
51
+
52
+ .hy-icon-eye-close:before {
53
+ content: "\e671";
54
+ }
55
+
56
+ .hy-icon-hide:before {
57
+ content: "\e673";
58
+ }
59
+
60
+ .hy-icon-mic:before {
61
+ content: "\e678";
62
+ }
63
+
64
+ .hy-icon-telephone-out:before {
65
+ content: "\e68e";
66
+ }
67
+
68
+ .hy-icon-telephone:before {
69
+ content: "\e68f";
70
+ }
71
+
16
72
  .hy-icon-close-circle-fill:before {
17
73
  content: "\e6f2";
18
74
  }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file