hy-app 0.1.3 → 0.1.5
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-address-picker/hy-address-picker.vue +20 -10
- package/components/hy-address-picker/props.ts +1 -3
- package/components/hy-address-picker/typing.d.ts +4 -11
- package/components/hy-avatar/typing.d.ts +1 -1
- package/components/hy-back-top/hy-back-top.vue +15 -1
- package/components/hy-back-top/props.ts +1 -6
- package/components/hy-back-top/typing.d.ts +4 -7
- package/components/hy-badge/typing.d.ts +1 -1
- package/components/hy-button/hy-button.vue +36 -18
- package/components/hy-button/props.ts +1 -2
- package/components/hy-button/typing.d.ts +5 -8
- package/components/hy-calendar/typing.d.ts +1 -1
- package/components/hy-card/typing.d.ts +1 -1
- package/components/hy-cell/hy-cell.vue +35 -6
- package/components/hy-cell/props.ts +2 -2
- package/components/hy-cell/typing.d.ts +8 -11
- package/components/hy-check-button/typing.d.ts +1 -1
- package/components/hy-checkbox/hy-checkbox.vue +3 -2
- package/components/hy-checkbox/props.ts +1 -1
- package/components/hy-checkbox/typing.d.ts +2 -2
- package/components/hy-count-down/typing.d.ts +1 -1
- package/components/hy-count-to/typing.d.ts +1 -3
- package/components/hy-datetime-picker/hy-datetime-picker.vue +18 -14
- package/components/hy-datetime-picker/props.ts +1 -3
- package/components/hy-datetime-picker/typing.d.ts +6 -13
- package/components/hy-divider/index.scss +1 -0
- package/components/hy-divider/typing.d.ts +1 -1
- package/components/hy-dropdown/typing.d.ts +1 -1
- package/components/hy-dropdown-item/typing.d.ts +1 -3
- package/components/hy-empty/typing.d.ts +1 -1
- package/components/hy-float-button/hy-float-button.vue +19 -3
- package/components/hy-float-button/index.scss +0 -2
- package/components/hy-float-button/typing.d.ts +1 -1
- package/components/hy-folding-panel/typing.d.ts +1 -1
- package/components/hy-form/hy-form.vue +189 -27
- package/components/hy-form/index.scss +1 -1
- package/components/hy-form/props.ts +0 -2
- package/components/hy-form/typing.d.ts +26 -8
- package/components/hy-grid/hy-grid.vue +16 -5
- package/components/hy-grid/props.ts +1 -3
- package/components/hy-grid/typing.d.ts +13 -16
- package/components/hy-icon/hy-icon.vue +6 -10
- package/components/hy-icon/typing.d.ts +1 -1
- package/components/hy-image/hy-image.vue +5 -1
- package/components/hy-image/typing.d.ts +1 -1
- package/components/hy-input/hy-input.vue +27 -16
- package/components/hy-input/props.ts +2 -4
- package/components/hy-input/typing.d.ts +5 -12
- package/components/hy-line/typing.d.ts +1 -1
- package/components/hy-line-progress/typing.d.ts +1 -1
- package/components/hy-list/typing.d.ts +1 -1
- package/components/hy-loading/typing.d.ts +2 -2
- package/components/hy-login/TheUserLogin.vue +5 -73
- package/components/hy-login/hy-login.vue +267 -265
- package/components/hy-login/typing.d.ts +1 -1
- package/components/hy-modal/typing.d.ts +1 -1
- package/components/hy-navbar/typing.d.ts +1 -2
- package/components/hy-notice-bar/hy-row-notice.vue +12 -3
- package/components/hy-notice-bar/typing.d.ts +1 -1
- package/components/hy-number-step/hy-number-step.vue +25 -10
- package/components/hy-number-step/typing.d.ts +8 -3
- package/components/hy-overlay/typing.d.ts +1 -1
- 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-picker/hy-picker.vue +18 -8
- package/components/hy-picker/props.ts +1 -4
- package/components/hy-picker/typing.d.ts +4 -15
- package/components/hy-popup/typing.d.ts +1 -1
- 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 +9 -5
- package/components/hy-qrcode/typing.d.ts +1 -1
- package/components/hy-radio/hy-radio.vue +6 -2
- package/components/hy-radio/props.ts +1 -1
- package/components/hy-radio/typing.d.ts +2 -2
- package/components/hy-rate/typing.d.ts +1 -1
- package/components/hy-read-more/typing.d.ts +1 -1
- package/components/hy-scroll-list/typing.d.ts +1 -1
- package/components/hy-search/hy-search.vue +12 -3
- package/components/hy-search/props.ts +1 -3
- package/components/hy-search/typing.d.ts +6 -13
- package/components/hy-slider/hy-slider.vue +4 -3
- package/components/hy-slider/typing.d.ts +1 -1
- package/components/hy-status-bar/typing.d.ts +1 -1
- package/components/hy-steps/typing.d.ts +1 -1
- 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-subsection/typing.d.ts +1 -1
- package/components/hy-swipe-action/typing.d.ts +1 -1
- package/components/hy-swiper/typing.d.ts +2 -5
- package/components/hy-switch/hy-switch.vue +11 -2
- package/components/hy-switch/props.ts +0 -1
- package/components/hy-switch/typing.d.ts +3 -2
- package/components/hy-tabs/typing.d.ts +1 -1
- package/components/hy-tag/hy-tag.vue +42 -14
- package/components/hy-tag/index.scss +3 -2
- package/components/hy-tag/props.ts +1 -2
- package/components/hy-tag/typing.d.ts +3 -10
- package/components/hy-text/typing.d.ts +2 -2
- package/components/hy-textarea/hy-textarea.vue +1 -1
- package/components/hy-textarea/typing.d.ts +2 -2
- 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-tooltip/typing.d.ts +1 -1
- package/components/hy-transition/typing.d.ts +1 -1
- package/components/hy-upload/typing.d.ts +1 -1
- package/components/hy-warn/hy-warn.vue +2 -21
- package/components/hy-warn/typing.d.ts +1 -1
- 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 +6 -12
- package/components/index.ts +2 -2
- 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 +4 -3
- package/store/userInfo.ts +25 -25
- package/theme.scss +1 -1
- package/typing/index.ts +1 -1
- package/typing/modules/common.d.ts +22 -2
- package/typing/modules/form.ts +29 -14
- package/utils/inspect.ts +50 -1
- package/utils/utils.ts +9 -7
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
|
|
31
31
|
<script setup lang="ts">
|
|
32
32
|
import { computed, type CSSProperties, toRefs } from "vue";
|
|
33
|
-
import { ColorConfig, IconConfig } from "../../config";
|
|
34
33
|
import { addUnit } from "../../utils";
|
|
35
34
|
import defaultProps from "./props";
|
|
36
35
|
import type IProps from "./typing";
|
|
@@ -53,10 +52,11 @@ const {
|
|
|
53
52
|
const emit = defineEmits(["click"]);
|
|
54
53
|
|
|
55
54
|
const uClasses = computed(() => {
|
|
56
|
-
let classes = [
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
let classes: string | string[] = [
|
|
56
|
+
"iconfont",
|
|
57
|
+
`${customPrefix.value}-${name.value}`,
|
|
58
|
+
customPrefix.value,
|
|
59
|
+
];
|
|
60
60
|
if (isRotate.value) classes.push("hy-rotate");
|
|
61
61
|
if (color.value)
|
|
62
62
|
// 主题色,通过类配置
|
|
@@ -77,11 +77,7 @@ const iconStyle = computed<CSSProperties>(() => {
|
|
|
77
77
|
// 某些特殊情况需要设置一个到顶部的距离,才能更好的垂直居中
|
|
78
78
|
top: addUnit(top.value),
|
|
79
79
|
borderRadius: addUnit(round.value),
|
|
80
|
-
color: color.value
|
|
81
|
-
? color.value
|
|
82
|
-
: name.value === IconConfig.LOADING
|
|
83
|
-
? ColorConfig.primary
|
|
84
|
-
: "#606266",
|
|
80
|
+
color: color.value ? color.value : "#606266",
|
|
85
81
|
};
|
|
86
82
|
|
|
87
83
|
return style;
|
|
@@ -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,
|
|
@@ -6,13 +6,22 @@
|
|
|
6
6
|
<view class="hy-input__content">
|
|
7
7
|
<view
|
|
8
8
|
class="hy-input__content__prefix-icon"
|
|
9
|
-
v-if="prefixIcon || $slots.prefix"
|
|
9
|
+
v-if="prefixIcon?.name || $slots.prefix"
|
|
10
10
|
>
|
|
11
11
|
<slot name="prefix">
|
|
12
12
|
<HyIcon
|
|
13
|
-
:name="prefixIcon"
|
|
14
|
-
size="
|
|
15
|
-
:
|
|
13
|
+
:name="prefixIcon?.name"
|
|
14
|
+
:size="prefixIcon?.size"
|
|
15
|
+
:color="prefixIcon?.color"
|
|
16
|
+
:bold="prefixIcon?.bold"
|
|
17
|
+
:customPrefix="prefixIcon?.customPrefix"
|
|
18
|
+
:imgMode="prefixIcon?.imgMode"
|
|
19
|
+
:width="prefixIcon?.width"
|
|
20
|
+
:height="prefixIcon?.height"
|
|
21
|
+
:top="prefixIcon?.top"
|
|
22
|
+
:stop="prefixIcon?.stop"
|
|
23
|
+
:round="prefixIcon?.round"
|
|
24
|
+
:customStyle="prefixIcon?.customStyle"
|
|
16
25
|
></HyIcon>
|
|
17
26
|
</slot>
|
|
18
27
|
</view>
|
|
@@ -65,13 +74,22 @@
|
|
|
65
74
|
</view>
|
|
66
75
|
<view
|
|
67
76
|
class="hy-input__content__subfix-icon"
|
|
68
|
-
v-if="suffixIcon || $slots.suffix"
|
|
77
|
+
v-if="suffixIcon?.name || $slots.suffix"
|
|
69
78
|
>
|
|
70
79
|
<slot name="suffix">
|
|
71
80
|
<HyIcon
|
|
72
|
-
:name="suffixIcon"
|
|
73
|
-
size="
|
|
74
|
-
:
|
|
81
|
+
:name="suffixIcon?.name"
|
|
82
|
+
:size="suffixIcon?.size"
|
|
83
|
+
:color="suffixIcon?.color"
|
|
84
|
+
:bold="suffixIcon?.bold"
|
|
85
|
+
:customPrefix="suffixIcon?.customPrefix"
|
|
86
|
+
:imgMode="suffixIcon?.imgMode"
|
|
87
|
+
:width="suffixIcon?.width"
|
|
88
|
+
:height="suffixIcon?.height"
|
|
89
|
+
:top="suffixIcon?.top"
|
|
90
|
+
:stop="suffixIcon?.stop"
|
|
91
|
+
:round="suffixIcon?.round"
|
|
92
|
+
:customStyle="suffixIcon?.customStyle"
|
|
75
93
|
></HyIcon>
|
|
76
94
|
</slot>
|
|
77
95
|
</view>
|
|
@@ -312,17 +330,10 @@ const onClear = () => {
|
|
|
312
330
|
* 无法触发u-form-item的点击事件,这里通过手动调用u-form-item的方法进行触发
|
|
313
331
|
*/
|
|
314
332
|
const clickHandler = () => {
|
|
333
|
+
// 隐藏键盘
|
|
315
334
|
if (disabled.value || readonly.value) {
|
|
316
335
|
uni.hideKeyboard();
|
|
317
336
|
}
|
|
318
|
-
// #ifdef APP-NVUE
|
|
319
|
-
if (os() === "android") {
|
|
320
|
-
const formItem = $parent.call(this, "u-form-item");
|
|
321
|
-
if (formItem) {
|
|
322
|
-
formItem.clickHandler();
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
// #endif
|
|
326
337
|
};
|
|
327
338
|
</script>
|
|
328
339
|
|
|
@@ -27,10 +27,8 @@ const defaultProps: IProps = {
|
|
|
27
27
|
inputAlign: "left",
|
|
28
28
|
fontSize: "15px",
|
|
29
29
|
color: "#303133",
|
|
30
|
-
prefixIcon:
|
|
31
|
-
|
|
32
|
-
suffixIcon: "",
|
|
33
|
-
suffixIconStyle: {},
|
|
30
|
+
prefixIcon: {},
|
|
31
|
+
suffixIcon: {},
|
|
34
32
|
border: "surround",
|
|
35
33
|
readonly: false,
|
|
36
34
|
shape: "square",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
|
+
import type HyIconProps from "../hy-icon/typing";
|
|
2
3
|
|
|
3
|
-
export default interface
|
|
4
|
+
export default interface HyInputProps {
|
|
4
5
|
/**
|
|
5
6
|
* @description 输入的值
|
|
6
7
|
* */
|
|
@@ -96,7 +97,7 @@ export default interface IProps {
|
|
|
96
97
|
/**
|
|
97
98
|
* @description 输入框内容对齐方式( 默认 'left' )
|
|
98
99
|
* */
|
|
99
|
-
inputAlign?:
|
|
100
|
+
inputAlign?: HyApp.RowCenterType;
|
|
100
101
|
/**
|
|
101
102
|
* @description 输入框字体的大小 ( 默认 '15px' )
|
|
102
103
|
* */
|
|
@@ -108,19 +109,11 @@ export default interface IProps {
|
|
|
108
109
|
/**
|
|
109
110
|
* @description 输入框前置图标
|
|
110
111
|
* */
|
|
111
|
-
prefixIcon?:
|
|
112
|
-
/**
|
|
113
|
-
* @description 前置图标样式,对象或字符串
|
|
114
|
-
* */
|
|
115
|
-
prefixIconStyle?: CSSProperties;
|
|
112
|
+
prefixIcon?: Partial<HyIconProps>;
|
|
116
113
|
/**
|
|
117
114
|
* @description 输入框后置图标
|
|
118
115
|
* */
|
|
119
|
-
suffixIcon?:
|
|
120
|
-
/**
|
|
121
|
-
* @description 后置图标样式,对象或字符串
|
|
122
|
-
* */
|
|
123
|
-
suffixIconStyle?: CSSProperties;
|
|
116
|
+
suffixIcon?: Partial<HyIconProps>;
|
|
124
117
|
/**
|
|
125
118
|
* @description 边框类型,surround-四周边框,bottom-底部边框,none-无边框 ( 默认 'surround' )
|
|
126
119
|
* */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CSSProperties } from "vue";
|
|
2
2
|
|
|
3
|
-
export default interface
|
|
3
|
+
export default interface HyLoadingProps {
|
|
4
4
|
/**
|
|
5
5
|
* @description 是否显示组件 (默认 true)
|
|
6
6
|
* */
|
|
@@ -20,7 +20,7 @@ export default interface IProps {
|
|
|
20
20
|
/**
|
|
21
21
|
* @description 模式选择,见官网说明(默认 'circle' )
|
|
22
22
|
* */
|
|
23
|
-
mode?:
|
|
23
|
+
mode?: HyApp.LoadingMode;
|
|
24
24
|
/**
|
|
25
25
|
* @description 加载图标的大小,单位px (默认 24 )
|
|
26
26
|
* */
|
|
@@ -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
|
// 组件
|