hy-app 0.5.7 → 0.5.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.
- package/components/hy-action-sheet/index.scss +1 -1
- package/components/hy-address-picker/index.scss +1 -1
- package/components/hy-avatar/index.scss +1 -1
- package/components/hy-back-top/index.scss +1 -1
- package/components/hy-badge/index.scss +1 -1
- package/components/hy-button/index.scss +1 -1
- package/components/hy-calendar/index.scss +1 -1
- package/components/hy-card/hy-card.vue +1 -1
- package/components/hy-card/index.scss +1 -1
- package/components/hy-cell-item/hy-cell-item.vue +1 -0
- package/components/hy-cell-item/index.scss +1 -1
- package/components/hy-check-button/hy-check-button.vue +1 -1
- package/components/hy-checkbox/index.scss +1 -1
- package/components/hy-checkbox-group/index.scss +1 -1
- package/components/hy-checkbox-item/index.scss +1 -1
- package/components/hy-code-input/hy-code-input.vue +1 -1
- package/components/hy-code-input/index.scss +1 -1
- package/components/hy-config-provider/hy-config-provider.vue +4 -2
- package/components/hy-config-provider/index.scss +1 -1
- package/components/hy-count-down/index.scss +1 -1
- package/components/hy-count-to/index.scss +1 -1
- package/components/hy-coupon/index.scss +1 -1
- package/components/hy-datetime-picker/index.scss +1 -1
- package/components/hy-divider/index.scss +1 -1
- package/components/hy-dropdown/index.scss +1 -1
- package/components/hy-dropdown-item/index.scss +1 -1
- package/components/hy-empty/index.scss +1 -1
- package/components/hy-flex/index.scss +1 -1
- package/components/hy-float-button/hy-float-button.vue +10 -11
- package/components/hy-float-button/index.scss +13 -13
- package/components/hy-folding-panel-item/index.scss +1 -1
- package/components/hy-form-item/index.scss +1 -1
- package/components/hy-grid/index.scss +1 -1
- package/components/hy-icon/index.scss +1 -1
- package/components/hy-image/index.scss +1 -1
- package/components/hy-input/hy-input.vue +0 -1
- package/components/hy-input/index.scss +1 -1
- package/components/hy-input/props.ts +1 -1
- package/components/hy-input/typing.d.ts +4 -0
- package/components/hy-line/index.scss +1 -1
- package/components/hy-line-progress/index.scss +1 -1
- package/components/hy-list/index.scss +1 -1
- package/components/hy-loading/index.scss +1 -1
- package/components/hy-menu/index.scss +1 -1
- package/components/hy-modal/index.scss +1 -1
- package/components/hy-navbar/hy-navbar.vue +26 -23
- package/components/hy-navbar/index.scss +2 -2
- package/components/hy-notice-bar/index.scss +1 -1
- package/components/hy-notify/index.scss +1 -1
- package/components/hy-number-step/index.scss +1 -1
- package/components/hy-overlay/index.scss +1 -1
- package/components/hy-pagination/index.scss +1 -1
- package/components/hy-picker/hy-picker.vue +92 -87
- package/components/hy-picker/index.scss +2 -2
- package/components/hy-picker/props.ts +1 -1
- package/components/hy-popover/index.scss +1 -1
- package/components/hy-popup/hy-popup.vue +3 -3
- package/components/hy-popup/index.scss +2 -1
- package/components/hy-price/index.scss +1 -1
- package/components/hy-qrcode/index.scss +1 -1
- package/components/hy-radio/index.scss +1 -1
- package/components/hy-rate/index.scss +1 -1
- package/components/hy-read-more/index.scss +2 -2
- package/components/hy-rolling-num/hy-rolling-num.vue +188 -0
- package/components/hy-rolling-num/index.scss +34 -0
- package/components/hy-rolling-num/props.ts +68 -0
- package/components/hy-rolling-num/typing.d.ts +0 -0
- package/components/hy-scroll-list/index.scss +1 -1
- package/components/hy-search/index.scss +1 -1
- package/components/hy-signature/index.scss +1 -1
- package/components/hy-slider/index.scss +1 -1
- package/components/hy-status-bar/index.scss +1 -1
- package/components/hy-steps/index.scss +1 -1
- package/components/hy-sticky/hy-sticky.vue +5 -5
- package/components/hy-sticky/index.scss +1 -1
- package/components/hy-submit-bar/index.scss +1 -1
- package/components/hy-subsection/index.scss +1 -1
- package/components/hy-swipe-action/index.scss +1 -1
- package/components/hy-swiper/index.scss +2 -2
- package/components/hy-switch/index.scss +1 -1
- package/components/hy-tabbar/hy-tabbar.vue +0 -1
- package/components/hy-tabbar/index.scss +1 -1
- package/components/hy-tabbar-group/index.scss +1 -1
- package/components/hy-tabbar-item/index.scss +1 -1
- package/components/hy-table/hy-table.vue +358 -0
- package/components/hy-table/index.scss +197 -0
- package/components/hy-table/props.ts +47 -0
- package/components/hy-table/typing.d.ts +34 -0
- package/components/hy-tabs/hy-tabs.vue +21 -23
- package/components/hy-tabs/index.scss +1 -1
- package/components/hy-tag/index.scss +1 -1
- package/components/hy-text/hy-text.vue +1 -1
- package/components/hy-text/index.scss +1 -1
- package/components/hy-textarea/index.scss +1 -1
- package/components/hy-toast/index.scss +2 -1
- package/components/hy-tooltip/index.scss +2 -2
- package/components/hy-upload/index.scss +1 -1
- package/components/hy-warn/hy-warn.vue +2 -2
- package/components/hy-warn/index.scss +1 -1
- package/components/hy-waterfall/index.scss +1 -1
- package/components/hy-watermark/index.scss +1 -1
- package/global.d.ts +1 -0
- package/index.scss +1 -1
- package/libs/css/{mixin.scss → _mixin.scss} +27 -13
- package/libs/css/theme.scss +4 -1
- package/libs/css/vars.scss +6 -0
- package/package.json +2 -2
|
@@ -209,7 +209,7 @@ const inputHandler = (e: InputOnInputEvent) => {
|
|
|
209
209
|
|
|
210
210
|
<style scoped lang="scss">
|
|
211
211
|
@import './index.scss';
|
|
212
|
-
@import '../../libs/css/mixin
|
|
212
|
+
@import '../../libs/css/mixin';
|
|
213
213
|
@import '../../libs/css/theme';
|
|
214
214
|
@include b(code-input) {
|
|
215
215
|
@include m(item) {
|
|
@@ -27,7 +27,6 @@ import configProviderProps from './props'
|
|
|
27
27
|
*/
|
|
28
28
|
defineOptions({})
|
|
29
29
|
|
|
30
|
-
// const props = withDefaults(defineProps<IProps>(), defaultProps);
|
|
31
30
|
const props = defineProps(configProviderProps)
|
|
32
31
|
|
|
33
32
|
const themeClass = computed(() => {
|
|
@@ -38,7 +37,10 @@ const themeStyle = computed(() => {
|
|
|
38
37
|
return [
|
|
39
38
|
{
|
|
40
39
|
'--hy-theme-color': props.themeColor,
|
|
41
|
-
'--hy-theme--light':
|
|
40
|
+
'--hy-theme--light':
|
|
41
|
+
props.theme === 'light'
|
|
42
|
+
? colorGradient(props.themeColor)[80]
|
|
43
|
+
: colorGradient(props.themeColor, '#000')[60],
|
|
42
44
|
padding: addUnit(props.padding)
|
|
43
45
|
},
|
|
44
46
|
props.customStyle
|
|
@@ -79,7 +79,7 @@ import { computed, getCurrentInstance, onMounted, ref, reactive, watch } from 'v
|
|
|
79
79
|
import type { CSSProperties } from 'vue'
|
|
80
80
|
import type { IFloatButtonEmits } from './typing'
|
|
81
81
|
import type { MenusType } from './typing'
|
|
82
|
-
import { addUnit, getPx, getRect, guid, isH5 } from '../../libs'
|
|
82
|
+
import { addUnit, debounce, getPx, getRect, guid, isH5, throttle } from '../../libs'
|
|
83
83
|
import floatButtonProps from './props'
|
|
84
84
|
// 组件
|
|
85
85
|
import HyIcon from '../hy-icon/hy-icon.vue'
|
|
@@ -133,7 +133,7 @@ watch(
|
|
|
133
133
|
)
|
|
134
134
|
|
|
135
135
|
/**
|
|
136
|
-
*
|
|
136
|
+
* 初始化距离
|
|
137
137
|
* */
|
|
138
138
|
const initPosition = () => {
|
|
139
139
|
const { minLeft, minTop, maxLeft, maxTop } = bounding
|
|
@@ -193,7 +193,7 @@ const initPosition = () => {
|
|
|
193
193
|
}
|
|
194
194
|
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
196
|
+
* 获取组件大小
|
|
197
197
|
* */
|
|
198
198
|
const getFloatBtnSize = computed(() => {
|
|
199
199
|
if (typeof props.size === 'string' && Object.keys(btnSize).includes(props.size)) {
|
|
@@ -204,16 +204,15 @@ const getFloatBtnSize = computed(() => {
|
|
|
204
204
|
})
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
|
-
*
|
|
207
|
+
* 悬浮按钮样式
|
|
208
208
|
* */
|
|
209
209
|
const FloatButtonStyle = computed(() => {
|
|
210
210
|
const style: CSSProperties = {
|
|
211
|
-
top: currentCoordinate.top
|
|
212
|
-
left: currentCoordinate.left
|
|
211
|
+
top: `${currentCoordinate.top}px`,
|
|
212
|
+
left: `${currentCoordinate.left}px`,
|
|
213
213
|
backgroundColor: props.bgColor,
|
|
214
214
|
zIndex: props.zIndex,
|
|
215
|
-
color: props.textColor
|
|
216
|
-
transition: 'all ease 0.3s'
|
|
215
|
+
color: props.textColor
|
|
217
216
|
}
|
|
218
217
|
if (props.fixed) style.position = 'fixed'
|
|
219
218
|
|
|
@@ -267,7 +266,7 @@ const menusStyle = computed(() => {
|
|
|
267
266
|
})
|
|
268
267
|
|
|
269
268
|
/**
|
|
270
|
-
*
|
|
269
|
+
* 获取悬浮按钮大小
|
|
271
270
|
* */
|
|
272
271
|
const getFatRect = () => {
|
|
273
272
|
return new Promise((resolve, reject) => {
|
|
@@ -285,7 +284,7 @@ const getFatRect = () => {
|
|
|
285
284
|
}
|
|
286
285
|
|
|
287
286
|
/**
|
|
288
|
-
*
|
|
287
|
+
* 点击悬浮按钮
|
|
289
288
|
* */
|
|
290
289
|
const handleClick = () => {
|
|
291
290
|
emit('click')
|
|
@@ -295,7 +294,7 @@ const handleClick = () => {
|
|
|
295
294
|
}
|
|
296
295
|
|
|
297
296
|
/**
|
|
298
|
-
*
|
|
297
|
+
* 点击单条菜单栏
|
|
299
298
|
* */
|
|
300
299
|
const handleMenuItemClick = (temp: MenusType, index: number) => {
|
|
301
300
|
emit('clickItem', temp, index)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../../libs/css/theme" as *;
|
|
2
|
-
@use "../../libs/css/mixin
|
|
2
|
+
@use "../../libs/css/mixin" as *;
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
@include b(float-button) {
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
box-shadow: $hy-box-shadow;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
17
|
+
//@include e(animation) {
|
|
18
|
+
// animation: floatAnimation 2s ease-in-out infinite;
|
|
19
|
+
// @keyframes floatAnimation {
|
|
20
|
+
// 0%,
|
|
21
|
+
// 100% {
|
|
22
|
+
// transform: translateY(0); /* 初始位置 */
|
|
23
|
+
// }
|
|
24
|
+
// 50% {
|
|
25
|
+
// transform: translateY(-20px); /* 上浮20像素 */
|
|
26
|
+
// }
|
|
27
|
+
// }
|
|
28
|
+
//}
|
|
29
29
|
|
|
30
30
|
@include e(container) {
|
|
31
31
|
border-radius: 50%;
|
|
@@ -4,6 +4,10 @@ import type {
|
|
|
4
4
|
InputOnFocusEvent,
|
|
5
5
|
InputOnKeyboardheightchange
|
|
6
6
|
} from '@uni-helper/uni-types'
|
|
7
|
+
import type { ExtractPropTypes } from 'vue'
|
|
8
|
+
import type inputProps from './props'
|
|
9
|
+
|
|
10
|
+
export interface HyInputProps extends ExtractPropTypes<typeof inputProps> {}
|
|
7
11
|
|
|
8
12
|
export interface IInputEmits {
|
|
9
13
|
/** 输入框失去焦点时触发 */
|
|
@@ -17,29 +17,30 @@
|
|
|
17
17
|
}"
|
|
18
18
|
>
|
|
19
19
|
<!-- 左边 -->
|
|
20
|
-
<slot v-if="$slots.left" name="left"></slot>
|
|
21
20
|
<view
|
|
22
|
-
v-else
|
|
23
21
|
class="hy-navbar__content__left"
|
|
24
22
|
hover-class="hy-navbar__content__left--hover"
|
|
25
23
|
hover-start-time="150"
|
|
26
24
|
@tap="leftClick"
|
|
27
25
|
>
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
26
|
+
<slot v-if="$slots.left" name="left"></slot>
|
|
27
|
+
<template v-else>
|
|
28
|
+
<hy-icon
|
|
29
|
+
v-if="leftIcon"
|
|
30
|
+
:name="leftIcon"
|
|
31
|
+
:size="leftIconSize"
|
|
32
|
+
:color="leftIconColor"
|
|
33
|
+
></hy-icon>
|
|
34
|
+
<text
|
|
35
|
+
v-if="leftText"
|
|
36
|
+
:style="{
|
|
37
|
+
color: leftIconColor
|
|
38
|
+
}"
|
|
39
|
+
class="hy-navbar__content__left--text"
|
|
40
|
+
>
|
|
41
|
+
{{ leftText }}
|
|
42
|
+
</text>
|
|
43
|
+
</template>
|
|
43
44
|
</view>
|
|
44
45
|
<!-- 左边 -->
|
|
45
46
|
|
|
@@ -74,12 +75,14 @@
|
|
|
74
75
|
<!-- 中间 -->
|
|
75
76
|
|
|
76
77
|
<!-- 右边 -->
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
rightText
|
|
82
|
-
|
|
78
|
+
<view class="hy-navbar__content__right" @tap="rightClick">
|
|
79
|
+
<slot v-if="$slots.right" name="right"></slot>
|
|
80
|
+
<template v-else>
|
|
81
|
+
<hy-icon v-if="rightIcon" :name="rightIcon" size="20"></hy-icon>
|
|
82
|
+
<text v-if="rightText" class="hy-navbar__content__right--text">{{
|
|
83
|
+
rightText
|
|
84
|
+
}}</text>
|
|
85
|
+
</template>
|
|
83
86
|
</view>
|
|
84
87
|
<!-- 右边 -->
|
|
85
88
|
</view>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use "../../libs/css/theme" as *;
|
|
2
|
-
@use "../../libs/css/mixin
|
|
2
|
+
@use "../../libs/css/mixin" as *;
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
@include b(navbar) {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@include flex(row);
|
|
16
16
|
align-items: center;
|
|
17
17
|
height: 44px;
|
|
18
|
-
background-color: $hy-background;
|
|
18
|
+
background-color: $hy-background--container;
|
|
19
19
|
position: relative;
|
|
20
20
|
justify-content: center;
|
|
21
21
|
|