hy-app 0.1.4 → 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 +29 -12
- package/components/hy-button/props.ts +1 -2
- package/components/hy-button/typing.d.ts +4 -7
- 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/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/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 +25 -7
- 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/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 +1 -2
- 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/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/typing.d.ts +1 -1
- 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/typing.d.ts +1 -1
- 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/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/typing.d.ts +1 -1
- 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 +25 -15
- package/components/hy-tag/props.ts +1 -2
- package/components/hy-tag/typing.d.ts +3 -10
- package/components/hy-text/typing.d.ts +1 -1
- 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 +1 -1
- package/components/hy-toast/typing.d.ts +1 -1
- 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/typing.d.ts +1 -1
- package/components/hy-waterfall/typing.d.ts +1 -3
- package/components/index.ts +2 -2
- package/package.json +3 -3
- package/store/userInfo.ts +25 -25
- package/theme.scss +1 -1
- package/typing/modules/common.d.ts +1 -1
- package/typing/modules/form.ts +29 -14
|
@@ -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
|
* */
|