hy-app 0.1.3 → 0.1.4
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/components/hy-button/hy-button.vue +7 -6
- package/components/hy-button/typing.d.ts +1 -1
- package/components/hy-divider/index.scss +1 -0
- package/components/hy-float-button/hy-float-button.vue +19 -3
- package/components/hy-float-button/index.scss +0 -2
- package/components/hy-form/typing.d.ts +1 -1
- package/components/hy-image/hy-image.vue +5 -1
- package/components/hy-loading/typing.d.ts +2 -1
- package/components/hy-login/TheUserLogin.vue +5 -73
- package/components/hy-notice-bar/hy-row-notice.vue +12 -3
- package/components/hy-parse/hy-parse.vue +499 -0
- package/components/hy-parse/index.scss +9 -0
- package/components/hy-parse/node/node.vue +584 -0
- package/components/hy-parse/parser.js +1337 -0
- package/components/hy-parse/props.ts +19 -0
- package/components/hy-parse/typing.d.ts +68 -0
- package/components/hy-price/hy-price.vue +6 -8
- package/components/hy-price/index.scss +6 -6
- package/components/hy-price/props.ts +4 -3
- package/components/hy-price/typing.d.ts +8 -4
- package/components/hy-slider/hy-slider.vue +4 -3
- package/components/hy-submitBar/Index.vue +17 -0
- package/components/hy-submitBar/hy-submitBar.vue +216 -0
- package/components/hy-submitBar/index.scss +9 -0
- package/components/hy-submitBar/props.ts +22 -0
- package/components/hy-submitBar/typing.d.ts +88 -0
- package/components/hy-tag/hy-tag.vue +24 -6
- package/components/hy-tag/index.scss +3 -2
- package/components/hy-text/typing.d.ts +1 -1
- package/components/hy-toast/hy-toast.vue +175 -0
- package/components/hy-toast/index.scss +77 -0
- package/components/hy-toast/props.ts +3 -0
- package/components/hy-toast/typing.d.ts +38 -0
- package/components/hy-warn/hy-warn.vue +2 -21
- package/components/hy-waterfall/hy-waterfall.vue +168 -38
- package/components/hy-waterfall/index.scss +9 -75
- package/components/hy-waterfall/props.ts +4 -5
- package/components/hy-waterfall/typing.d.ts +5 -9
- package/composables/index.ts +1 -0
- package/composables/useShare.ts +27 -0
- package/config/color.ts +1 -1
- package/config/icon.ts +21 -1
- package/index.ts +9 -8
- package/package.json +3 -2
- package/typing/index.ts +1 -1
- package/typing/modules/common.d.ts +21 -1
- package/utils/inspect.ts +50 -1
- package/utils/utils.ts +9 -7
|
@@ -27,13 +27,11 @@
|
|
|
27
27
|
:class="bemClass"
|
|
28
28
|
>
|
|
29
29
|
<template v-if="loading">
|
|
30
|
-
<
|
|
30
|
+
<HyLoading
|
|
31
31
|
:mode="loadingMode"
|
|
32
|
-
:is-rotate="true"
|
|
33
|
-
:name="IconConfig.LOADING"
|
|
34
32
|
:size="loadingSize"
|
|
35
33
|
:color="loadingColor"
|
|
36
|
-
></
|
|
34
|
+
></HyLoading>
|
|
37
35
|
<text
|
|
38
36
|
class="hy-button__loading-text"
|
|
39
37
|
:style="[{ fontSize: textSize + 'px' }]"
|
|
@@ -115,10 +113,13 @@
|
|
|
115
113
|
import { computed, type CSSProperties, toRefs } from "vue";
|
|
116
114
|
import { bem, throttle } from "../../utils";
|
|
117
115
|
import defaultProps from "./props";
|
|
118
|
-
import { ColorConfig
|
|
119
|
-
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
116
|
+
import { ColorConfig } from "../../config";
|
|
120
117
|
import type IProps from "./typing";
|
|
121
118
|
|
|
119
|
+
// 组件
|
|
120
|
+
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
121
|
+
import HyLoading from "../hy-loading/hy-loading.vue";
|
|
122
|
+
|
|
122
123
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
123
124
|
const {
|
|
124
125
|
disabled,
|
|
@@ -58,7 +58,14 @@
|
|
|
58
58
|
</template>
|
|
59
59
|
|
|
60
60
|
<script lang="ts" setup>
|
|
61
|
-
import {
|
|
61
|
+
import {
|
|
62
|
+
computed,
|
|
63
|
+
type CSSProperties,
|
|
64
|
+
getCurrentInstance,
|
|
65
|
+
onMounted,
|
|
66
|
+
ref,
|
|
67
|
+
toRefs,
|
|
68
|
+
} from "vue";
|
|
62
69
|
import type IProps from "./typing";
|
|
63
70
|
import type { MenusType } from "./typing";
|
|
64
71
|
import defaultProps from "./props";
|
|
@@ -81,10 +88,10 @@ const {
|
|
|
81
88
|
size,
|
|
82
89
|
fixed,
|
|
83
90
|
direction,
|
|
84
|
-
opacity,
|
|
85
91
|
} = toRefs(props);
|
|
86
92
|
const emit = defineEmits(["click", "clickItem"]);
|
|
87
93
|
|
|
94
|
+
const instance = getCurrentInstance();
|
|
88
95
|
const btnSize: AnyObject = {
|
|
89
96
|
small: "50px",
|
|
90
97
|
medium: "60px",
|
|
@@ -168,7 +175,7 @@ const menusStyle = computed(() => {
|
|
|
168
175
|
|
|
169
176
|
onMounted(() => {
|
|
170
177
|
const { windowWidth } = getWindowInfo();
|
|
171
|
-
getRect(`#${soleId}
|
|
178
|
+
getRect(`#${soleId}`, false, instance).then((rect) => {
|
|
172
179
|
const { left } = rect as UniApp.NodeInfo;
|
|
173
180
|
if (left && left > windowWidth / 2) showLeft.value = true;
|
|
174
181
|
});
|
|
@@ -198,4 +205,13 @@ const handleMenuItemClick = (temp: MenusType, index: number) => {
|
|
|
198
205
|
|
|
199
206
|
<style scoped lang="scss">
|
|
200
207
|
@import "./index.scss";
|
|
208
|
+
.hy-float-button {
|
|
209
|
+
&__container {
|
|
210
|
+
rotate: v-bind(rotate);
|
|
211
|
+
}
|
|
212
|
+
&__menus {
|
|
213
|
+
display: flex;
|
|
214
|
+
flex-direction: v-bind(direction);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
201
217
|
</style>
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
@include flex(column);
|
|
38
38
|
justify-content: center;
|
|
39
39
|
align-items: center;
|
|
40
|
-
rotate: v-bind(rotate);
|
|
41
40
|
transition: 0.4s ease;
|
|
42
41
|
}
|
|
43
42
|
|
|
@@ -45,7 +44,6 @@
|
|
|
45
44
|
position: absolute;
|
|
46
45
|
z-index: -1;
|
|
47
46
|
overflow: hidden;
|
|
48
|
-
@include flex(v-bind(direction));
|
|
49
47
|
max-height: 250px;
|
|
50
48
|
box-sizing: border-box;
|
|
51
49
|
&--item {
|
|
@@ -65,9 +65,13 @@ import {
|
|
|
65
65
|
} from "vue";
|
|
66
66
|
import defaultProps from "./props";
|
|
67
67
|
import type IProps from "./typing";
|
|
68
|
-
import HyTransition from "../hy-transition/hy-transition.vue";
|
|
69
68
|
import { addUnit, getPx } from "../../utils";
|
|
70
69
|
|
|
70
|
+
// 组件
|
|
71
|
+
|
|
72
|
+
import HyTransition from "../hy-transition/hy-transition.vue";
|
|
73
|
+
import HyIcon from "../hy-icon/hy-icon.vue";
|
|
74
|
+
|
|
71
75
|
const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
72
76
|
const {
|
|
73
77
|
customStyle,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
|
+
import type { LoadingMode } from "@/package/typing/modules/common";
|
|
2
3
|
|
|
3
4
|
export default interface IProps {
|
|
4
5
|
/**
|
|
@@ -20,7 +21,7 @@ export default interface IProps {
|
|
|
20
21
|
/**
|
|
21
22
|
* @description 模式选择,见官网说明(默认 'circle' )
|
|
22
23
|
* */
|
|
23
|
-
mode?:
|
|
24
|
+
mode?: HyApp.LoadingMode;
|
|
24
25
|
/**
|
|
25
26
|
* @description 加载图标的大小,单位px (默认 24 )
|
|
26
27
|
* */
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
:clearable="true"
|
|
48
48
|
border="bottom"
|
|
49
49
|
:password-icon="false"
|
|
50
|
+
@change="handleChange($event, record)"
|
|
51
|
+
@blur="handleBlur($event, record)"
|
|
50
52
|
>
|
|
51
53
|
<!-- #ifndef APP-PLUS-NVUE -->
|
|
52
54
|
<template #prefix>
|
|
@@ -64,84 +66,13 @@
|
|
|
64
66
|
</HyInput>
|
|
65
67
|
</template>
|
|
66
68
|
</HyForm>
|
|
67
|
-
<!-- <u-form-->
|
|
68
|
-
<!-- :model="userForm"-->
|
|
69
|
-
<!-- ref="form_1Ref"-->
|
|
70
|
-
<!-- :rules="userRules"-->
|
|
71
|
-
<!-- labelWidth="30"-->
|
|
72
|
-
<!-- >-->
|
|
73
|
-
<!-- <!–账户输入–>-->
|
|
74
|
-
<!-- <u-form-item prop="name">-->
|
|
75
|
-
<!-- <u-input-->
|
|
76
|
-
<!-- v-model="userForm.name"-->
|
|
77
|
-
<!-- :placeholder="userPlaceholder"-->
|
|
78
|
-
<!-- :clearable="true"-->
|
|
79
|
-
<!-- border="bottom"-->
|
|
80
|
-
<!-- >-->
|
|
81
|
-
<!-- <!– #ifndef APP-PLUS-NVUE –>-->
|
|
82
|
-
<!-- <template #prefix>-->
|
|
83
|
-
<!-- <u-icon name="account" :color="themeColor"></u-icon>-->
|
|
84
|
-
<!-- </template>-->
|
|
85
|
-
<!-- <template #suffix>-->
|
|
86
|
-
<!-- <u-icon-->
|
|
87
|
-
<!-- :name="!showChoice ? 'arrow-down-fill' : 'arrow-up-fill'"-->
|
|
88
|
-
<!-- @tap="showChoice = !showChoice"-->
|
|
89
|
-
<!-- :color="themeColor"-->
|
|
90
|
-
<!-- ></u-icon>-->
|
|
91
|
-
<!-- <view class="dialog-view" v-if="showChoice && choiceList.length">-->
|
|
92
|
-
<!-- <view-->
|
|
93
|
-
<!-- class="dialog-title"-->
|
|
94
|
-
<!-- v-for="(item, index) in choiceList"-->
|
|
95
|
-
<!-- :key="index"-->
|
|
96
|
-
<!-- @click="btnChoiceClick(index)"-->
|
|
97
|
-
<!-- >-->
|
|
98
|
-
<!-- {{ item.user }}-->
|
|
99
|
-
<!-- </view>-->
|
|
100
|
-
<!-- </view>-->
|
|
101
|
-
<!-- </template>-->
|
|
102
|
-
<!-- <!– #endif –>-->
|
|
103
|
-
<!-- </u-input>-->
|
|
104
|
-
<!-- </u-form-item>-->
|
|
105
69
|
|
|
106
|
-
<!-- <!–密码输入–>-->
|
|
107
|
-
<!-- <u-form-item prop="pwd">-->
|
|
108
|
-
<!-- <u-input-->
|
|
109
|
-
<!-- :type="showPwd ? 'input' : 'password'"-->
|
|
110
|
-
<!-- v-model="userForm.pwd"-->
|
|
111
|
-
<!-- :placeholder="pwdPlaceholder"-->
|
|
112
|
-
<!-- :clearable="true"-->
|
|
113
|
-
<!-- border="bottom"-->
|
|
114
|
-
<!-- :password-icon="false"-->
|
|
115
|
-
<!-- >-->
|
|
116
|
-
<!-- <!– #ifndef APP-PLUS-NVUE –>-->
|
|
117
|
-
<!-- <template #prefix>-->
|
|
118
|
-
<!-- <u-icon name="lock" :color="themeColor"></u-icon>-->
|
|
119
|
-
<!-- </template>-->
|
|
120
|
-
<!-- <template v-if="isShowPwd" #suffix>-->
|
|
121
|
-
<!-- <u-icon-->
|
|
122
|
-
<!-- size="16"-->
|
|
123
|
-
<!-- @click="showPasswordFn"-->
|
|
124
|
-
<!-- color="#c8c9cc"-->
|
|
125
|
-
<!-- :name="showPwd ? 'eye-fill' : 'eye-off'"-->
|
|
126
|
-
<!-- ></u-icon>-->
|
|
127
|
-
<!-- </template>-->
|
|
128
|
-
<!-- <!– #endif –>-->
|
|
129
|
-
<!-- </u-input>-->
|
|
130
|
-
<!-- </u-form-item>-->
|
|
131
|
-
<!-- </u-form>-->
|
|
132
70
|
<!-- 记住密码 -->
|
|
133
71
|
<view class="mui-input-row mui-checkbox">
|
|
134
|
-
<!-- <u-checkbox-group v-model="rememberPassword" @change="checkboxChange">-->
|
|
135
|
-
<!-- <u-checkbox-->
|
|
136
|
-
<!-- label="记住密码"-->
|
|
137
|
-
<!-- name="1"-->
|
|
138
|
-
<!-- :active-color="themeColor"-->
|
|
139
|
-
<!-- ></u-checkbox>-->
|
|
140
|
-
<!-- </u-checkbox-group>-->
|
|
141
|
-
|
|
142
72
|
<HyCheckbox
|
|
143
73
|
:columns="rememberList"
|
|
144
74
|
shape="square"
|
|
75
|
+
:active-color="themeColor"
|
|
145
76
|
v-model="rememberPassword"
|
|
146
77
|
@change="checkboxChange"
|
|
147
78
|
></HyCheckbox>
|
|
@@ -155,7 +86,8 @@ import { onHide } from "@dcloudio/uni-app";
|
|
|
155
86
|
import { storeToRefs } from "pinia";
|
|
156
87
|
import { useUserInfo } from "../../store";
|
|
157
88
|
import { decryptData, encryptData } from "../../utils";
|
|
158
|
-
import type { FormColumnsType
|
|
89
|
+
import type { FormColumnsType } from "../../typing";
|
|
90
|
+
import { FormTypeEnum } from "../../typing";
|
|
159
91
|
import { IconConfig } from "../../config";
|
|
160
92
|
|
|
161
93
|
// 组件
|
|
@@ -41,7 +41,14 @@
|
|
|
41
41
|
</template>
|
|
42
42
|
|
|
43
43
|
<script setup lang="ts">
|
|
44
|
-
import {
|
|
44
|
+
import {
|
|
45
|
+
ref,
|
|
46
|
+
watch,
|
|
47
|
+
toRefs,
|
|
48
|
+
computed,
|
|
49
|
+
type CSSProperties,
|
|
50
|
+
getCurrentInstance,
|
|
51
|
+
} from "vue";
|
|
45
52
|
import type IProps from "./typing";
|
|
46
53
|
import defaultProps from "./props";
|
|
47
54
|
import { addUnit, getRect, sleep } from "../../utils";
|
|
@@ -53,6 +60,7 @@ const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
|
53
60
|
const { text, speed, fontSize, color } = toRefs(props);
|
|
54
61
|
const emit = defineEmits(["click", "close"]);
|
|
55
62
|
|
|
63
|
+
const instance = getCurrentInstance();
|
|
56
64
|
const animationDuration = ref<string>("0"); // 动画执行时间
|
|
57
65
|
const animationPlayState = ref<string>("paused"); // 动画的开始和结束执行
|
|
58
66
|
const initValue = ref<string>("");
|
|
@@ -66,8 +74,9 @@ watch(
|
|
|
66
74
|
// 进行一定的延时
|
|
67
75
|
await sleep();
|
|
68
76
|
// 查询盒子和文字的宽度
|
|
69
|
-
textWidth = (await getRect(".hy-notice__content__text"))
|
|
70
|
-
|
|
77
|
+
textWidth = (await getRect(".hy-notice__content__text", false, instance))
|
|
78
|
+
.width;
|
|
79
|
+
boxWidth = (await getRect(".hy-notice__content", false, instance)).width;
|
|
71
80
|
// 根据t=s/v(时间=路程/速度),这里为何不需要加上#u-notice-box的宽度,因为中设置了.u-notice-content样式中设置了padding-left: 100%
|
|
72
81
|
// 恰巧计算出来的结果中已经包含了#u-notice-box的宽度
|
|
73
82
|
animationDuration.value = `${textWidth / speed.value}s`;
|