Skip to content

Commit 483af9e

Browse files
authored
fix(button): modify mobile problem (#2660)
1 parent d149b9a commit 483af9e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/mobile/components/button/src/button.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import type { ComputedRef, ExtractPropTypes } from 'vue'
1313
import type { ISharedRenderlessFunctionParams, ISharedRenderlessParamUtils } from '../../../types/shared.type'
1414
import type { clearTimer, handleClick } from './renderless'
15+
1516
export type { ISharedRenderlessParamHooks } from '../../../types/shared.type'
1617

1718
export const buttonProps = {
@@ -29,7 +30,7 @@ export const buttonProps = {
2930
default: ''
3031
},
3132
resetTime: {
32-
type: Number,
33+
type: [Number, String],
3334
default: 1000
3435
},
3536
nativeType: {

packages/mobile/components/button/src/renderless/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ export const handleClick =
1616
({ emit, props, state }: Pick<IButtonRenderlessParams, 'emit' | 'props' | 'state'>) =>
1717
(event: MouseEvent): void => {
1818
const urlHref = xss.filterUrl(props.href)
19-
19+
let reset = Number(props.resetTime)
2020
if (urlHref) {
2121
location.href = urlHref
22-
} else if (props.nativeType === 'button' && props.resetTime > 0) {
22+
} else if (props.nativeType === 'button' && reset > 0) {
2323
state.disabled = true
2424

2525
state.timer = window.setTimeout(() => {
2626
state.disabled = false
27-
}, props.resetTime)
27+
}, reset)
2828
}
2929

3030
emit('click', event)

packages/mobile/components/input/src/input.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ export const inputProps = {
5858
type: Object,
5959
default: () => $constants
6060
},
61-
title: String,
6261
name: String,
6362
size: String,
6463
form: String,

0 commit comments

Comments
 (0)