hy-app 0.4.0 → 0.4.2
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/README.md +2 -1
- package/components/hy-config-provider/hy-config-provider.vue +1 -1
- package/components/hy-input/hy-input.vue +1 -2
- package/components/hy-input/index.scss +8 -4
- package/components/hy-menu/hy-menu.vue +19 -17
- package/components/hy-slider/hy-slider.vue +12 -6
- package/global.d.ts +0 -1
- package/index.ts +0 -2
- package/package.json +2 -2
- package/utils/utils.ts +1 -1
- package/web-types.json +1 -1
- package/components/hy-login/ThePhoneLogin.vue +0 -106
- package/components/hy-login/TheUserLogin.vue +0 -271
- package/components/hy-login/hy-login.vue +0 -288
- package/components/hy-login/props.ts +0 -32
- package/components/hy-login/typing.d.ts +0 -65
- package/store/index.ts +0 -9
- package/store/userInfo.ts +0 -26
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
## 在线使用文档地址
|
|
2
2
|
[华玥组件库文档(需要翻墙)](https://hy-component-docs.vercel.app/)
|
|
3
|
-
[华玥组件库文档(
|
|
3
|
+
[华玥组件库文档(国内旧地址,2025-11-12之后域名过期)](https://www.gxh151.top)
|
|
4
|
+
[华玥组件库文档(国内新地址)](https://www.hy-design-uni.top)
|
|
4
5
|
|
|
5
6
|
## H5测试页面地址
|
|
6
7
|
[华玥组件库dome(需要翻墙)](https://hy-design-uni.vercel.app/#/)
|
|
@@ -17,7 +17,7 @@ export default {
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<script setup lang="ts">
|
|
20
|
-
import { computed } from "vue";
|
|
20
|
+
import { computed, toRefs, watch } from "vue";
|
|
21
21
|
import type { CSSProperties, PropType } from "vue";
|
|
22
22
|
import { addUnit, colorGradient } from "../../utils";
|
|
23
23
|
import { ColorConfig } from "../../config";
|
|
@@ -353,7 +353,7 @@ watch(
|
|
|
353
353
|
* */
|
|
354
354
|
const isShowClear = computed(() => {
|
|
355
355
|
const { clearable, readonly } = props;
|
|
356
|
-
return clearable && !readonly &&
|
|
356
|
+
return clearable && !readonly && innerValue.value !== "";
|
|
357
357
|
});
|
|
358
358
|
/**
|
|
359
359
|
* @description 组件的类名
|
|
@@ -485,7 +485,6 @@ const valueChange = (value: string | number, isOut = false) => {
|
|
|
485
485
|
* @description 点击清除控件
|
|
486
486
|
*/
|
|
487
487
|
const onClear = () => {
|
|
488
|
-
debugger;
|
|
489
488
|
clearInput.value = true;
|
|
490
489
|
innerValue.value = "";
|
|
491
490
|
nextTick(() => {
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
@include m(field-wrapper) {
|
|
38
38
|
position: relative;
|
|
39
39
|
@include flex(row);
|
|
40
|
-
margin: 0;
|
|
41
40
|
flex: 1;
|
|
41
|
+
margin-right: $hy-border-margin-padding-base;
|
|
42
42
|
|
|
43
43
|
@include e(field) {
|
|
44
44
|
background: transparent;
|
|
@@ -48,6 +48,11 @@
|
|
|
48
48
|
font-size: 15px;
|
|
49
49
|
flex: 1;
|
|
50
50
|
color: $hy-text-color;
|
|
51
|
+
caret-color: $hy-text-color;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:deep(.input-placeholder) {
|
|
55
|
+
color: $hy-text-color--placeholder;
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
|
|
@@ -60,15 +65,14 @@
|
|
|
60
65
|
align-items: center;
|
|
61
66
|
justify-content: center;
|
|
62
67
|
transform: scale(0.82);
|
|
63
|
-
margin-left: 4px;
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
@include m(subfix-icon) {
|
|
67
|
-
margin-left:
|
|
71
|
+
margin-left: $hy-border-margin-padding-sm;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
@include m(prefix-icon) {
|
|
71
|
-
margin-right:
|
|
75
|
+
margin-right: $hy-border-margin-padding-sm;
|
|
72
76
|
}
|
|
73
77
|
}
|
|
74
78
|
}
|
|
@@ -6,23 +6,25 @@
|
|
|
6
6
|
:class="menuItemClass(item, i)"
|
|
7
7
|
:style="customStyle"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
<template v-if="item.icon">
|
|
10
|
+
<slot v-if="$slots.icon" name="icon" :value="item.icon"></slot>
|
|
11
|
+
<hy-icon
|
|
12
|
+
v-else
|
|
13
|
+
class="hy-menu__item__icon"
|
|
14
|
+
:name="item.icon"
|
|
15
|
+
:color="current === i ? color || 'var(--hy-theme-color)' : ''"
|
|
16
|
+
:size="icon?.size || 16"
|
|
17
|
+
:bold="icon?.bold"
|
|
18
|
+
:customPrefix="icon?.customPrefix"
|
|
19
|
+
:imgMode="icon?.imgMode"
|
|
20
|
+
:width="icon?.width"
|
|
21
|
+
:height="icon?.height"
|
|
22
|
+
:top="icon?.top"
|
|
23
|
+
:stop="icon?.stop"
|
|
24
|
+
:round="icon?.round"
|
|
25
|
+
:customStyle="icon?.customStyle || { marginRight: '2px' }"
|
|
26
|
+
></hy-icon>
|
|
27
|
+
</template>
|
|
26
28
|
<slot v-if="$slots.default"></slot>
|
|
27
29
|
<text v-else class="hy-menu__item--title">{{ item.title }}</text>
|
|
28
30
|
<hy-badge
|
|
@@ -429,13 +429,19 @@ const onTouchEnd2 = (e: TouchEvent, index = 1) => {
|
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
431
|
const onClick = (e: TouchEvent) => {
|
|
432
|
-
// if (props.isRange) return;
|
|
433
432
|
if (props.disabled) return;
|
|
434
433
|
// 直接点击滑块的情况,计算方式与onTouchMove方法相同
|
|
435
|
-
// console.log('click', event)
|
|
436
434
|
// #ifndef APP-NVUE
|
|
437
|
-
|
|
438
|
-
let
|
|
435
|
+
|
|
436
|
+
let x;
|
|
437
|
+
// #ifdef MP-ALIPAY
|
|
438
|
+
x = e.detail.clientX;
|
|
439
|
+
// #endif
|
|
440
|
+
// #ifndef MP-ALIPAY
|
|
441
|
+
x = e.detail.x;
|
|
442
|
+
// #endif
|
|
443
|
+
|
|
444
|
+
const clientX = x - sliderRect.value.left!;
|
|
439
445
|
newValue.value =
|
|
440
446
|
(clientX / sliderRect.value.width!) * (props.max - props.min) + props.min;
|
|
441
447
|
updateValue(newValue.value, false, 1);
|
|
@@ -453,12 +459,12 @@ const updateValue = (
|
|
|
453
459
|
valueFormat = props.max;
|
|
454
460
|
}
|
|
455
461
|
// 设置移动的距离,不能用百分比,因为NVUE不支持。
|
|
456
|
-
|
|
462
|
+
const width = Math.min(
|
|
457
463
|
((valueFormat - props.min) / (props.max - props.min)) *
|
|
458
464
|
sliderRect.value.width!,
|
|
459
465
|
sliderRect.value.width!,
|
|
460
466
|
);
|
|
461
|
-
|
|
467
|
+
const barStyle_1: CSSProperties = {
|
|
462
468
|
width: width + "px",
|
|
463
469
|
};
|
|
464
470
|
// 移动期间无需过渡动画
|
package/global.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ declare module "vue" {
|
|
|
38
38
|
HyLineProgress: (typeof import("./components/hy-line-progress/hy-line-progress.vue"))["default"];
|
|
39
39
|
HyList: (typeof import("./components/hy-list/hy-list.vue"))["default"];
|
|
40
40
|
HyLoading: (typeof import("./components/hy-loading/hy-loading.vue"))["default"];
|
|
41
|
-
HyLogin: (typeof import("./components/hy-login/hy-login.vue"))["default"];
|
|
42
41
|
HyMenu: (typeof import("./components/hy-menu/hy-menu.vue"))["default"];
|
|
43
42
|
HyModal: (typeof import("./components/hy-modal/hy-modal.vue"))["default"];
|
|
44
43
|
HyNavbar: (typeof import("./components/hy-navbar/hy-navbar.vue"))["default"];
|
package/index.ts
CHANGED
package/package.json
CHANGED
package/utils/utils.ts
CHANGED