mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore: rename vModel to v-model (#8150)
This commit is contained in:
parent
d67b6e1184
commit
fa8b494f0e
@ -334,7 +334,7 @@ export default createComponent({
|
||||
<div class={bem()}>
|
||||
<div class={bem('fields')}>
|
||||
<Field
|
||||
vModel={data.name}
|
||||
v-model={data.name}
|
||||
clearable
|
||||
label={t('name')}
|
||||
placeholder={t('namePlaceholder')}
|
||||
@ -342,7 +342,7 @@ export default createComponent({
|
||||
onFocus={() => onFocus('name')}
|
||||
/>
|
||||
<Field
|
||||
vModel={data.tel}
|
||||
v-model={data.tel}
|
||||
clearable
|
||||
type="tel"
|
||||
label={t('tel')}
|
||||
@ -356,7 +356,7 @@ export default createComponent({
|
||||
readonly
|
||||
label={t('area')}
|
||||
clickable={!disableArea}
|
||||
rightIcon={!disableArea ? 'arrow' : null}
|
||||
rightIcon={!disableArea ? 'arrow' : undefined}
|
||||
modelValue={areaText.value}
|
||||
placeholder={props.areaPlaceholder || t('areaPlaceholder')}
|
||||
errorMessage={errorInfo.areaCode}
|
||||
@ -385,7 +385,7 @@ export default createComponent({
|
||||
{props.showPostal && (
|
||||
<Field
|
||||
v-show={!hideBottomFields.value}
|
||||
vModel={data.postalCode}
|
||||
v-model={data.postalCode}
|
||||
type="tel"
|
||||
maxlength="6"
|
||||
label={t('postal')}
|
||||
|
@ -99,7 +99,7 @@ export default createComponent({
|
||||
const onExchange = () => {
|
||||
emit('exchange', state.code);
|
||||
|
||||
// auto clear currentCode when not use vModel
|
||||
// auto clear currentCode when not use v-model
|
||||
if (!props.code) {
|
||||
state.code = '';
|
||||
}
|
||||
@ -125,7 +125,7 @@ export default createComponent({
|
||||
return (
|
||||
<div class={bem('exchange-bar')}>
|
||||
<Field
|
||||
vModel={state.code}
|
||||
v-model={state.code}
|
||||
clearable
|
||||
border={false}
|
||||
class={bem('field')}
|
||||
@ -221,7 +221,7 @@ export default createComponent({
|
||||
return () => (
|
||||
<div class={bem()}>
|
||||
{renderExchangeBar()}
|
||||
<Tabs vModel={state.tab} class={bem('tab')} border={false}>
|
||||
<Tabs v-model={state.tab} class={bem('tab')} border={false}>
|
||||
{renderCouponTab()}
|
||||
{renderDisabledTab()}
|
||||
</Tabs>
|
||||
|
@ -144,7 +144,7 @@ export default createComponent({
|
||||
onClick={onClickWrapper}
|
||||
>
|
||||
<Popup
|
||||
vModel={[state.showPopup, 'show']}
|
||||
v-model={[state.showPopup, 'show']}
|
||||
class={bem('content')}
|
||||
overlay={overlay}
|
||||
position={direction === 'down' ? 'top' : 'bottom'}
|
||||
|
@ -1,10 +1,10 @@
|
||||
import {
|
||||
ref,
|
||||
Ref,
|
||||
watch,
|
||||
reactive,
|
||||
computed,
|
||||
onMounted,
|
||||
ComputedRef,
|
||||
onActivated,
|
||||
onDeactivated,
|
||||
onBeforeUnmount,
|
||||
@ -40,9 +40,9 @@ export type SwipeProvide = {
|
||||
vertical?: boolean;
|
||||
lazyRender?: boolean;
|
||||
};
|
||||
size: Ref<number>;
|
||||
count: Ref<number>;
|
||||
activeIndicator: Ref<number>;
|
||||
size: ComputedRef<number>;
|
||||
count: ComputedRef<number>;
|
||||
activeIndicator: ComputedRef<number>;
|
||||
};
|
||||
|
||||
export default createComponent({
|
||||
|
Loading…
x
Reference in New Issue
Block a user