chore: rename vModel to v-model (#8150)

This commit is contained in:
neverland 2021-02-14 11:05:13 +08:00 committed by GitHub
parent d67b6e1184
commit fa8b494f0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View File

@ -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')}

View File

@ -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>

View File

@ -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'}

View File

@ -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({