mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-08-29 20:29:46 +08:00
chore: using string arguments on directives (#9659)
This commit is contained in:
parent
2008982ff9
commit
f30185e642
@ -402,7 +402,7 @@ export default defineComponent({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Popup
|
<Popup
|
||||||
v-model={[state.showAreaPopup, 'show']}
|
v-model:show={state.showAreaPopup}
|
||||||
round
|
round
|
||||||
teleport="body"
|
teleport="body"
|
||||||
position="bottom"
|
position="bottom"
|
||||||
|
@ -280,7 +280,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const renderTabs = () => (
|
const renderTabs = () => (
|
||||||
<Tabs
|
<Tabs
|
||||||
v-model={[state.activeTab, 'active']}
|
v-model:active={state.activeTab}
|
||||||
animated
|
animated
|
||||||
class={bem('tabs')}
|
class={bem('tabs')}
|
||||||
color={props.activeColor}
|
color={props.activeColor}
|
||||||
|
@ -200,7 +200,7 @@ export default defineComponent({
|
|||||||
return () => (
|
return () => (
|
||||||
<div class={bem()}>
|
<div class={bem()}>
|
||||||
{renderExchangeBar()}
|
{renderExchangeBar()}
|
||||||
<Tabs v-model={[state.tab, 'active']} class={bem('tab')} border={false}>
|
<Tabs v-model:active={state.tab} class={bem('tab')} border={false}>
|
||||||
{renderCouponTab()}
|
{renderCouponTab()}
|
||||||
{renderDisabledTab()}
|
{renderDisabledTab()}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
@ -174,7 +174,7 @@ export default defineComponent({
|
|||||||
onClick={onClickWrapper}
|
onClick={onClickWrapper}
|
||||||
>
|
>
|
||||||
<Popup
|
<Popup
|
||||||
v-model={[state.showPopup, 'show']}
|
v-model:show={state.showPopup}
|
||||||
class={bem('content')}
|
class={bem('content')}
|
||||||
overlay={overlay}
|
overlay={overlay}
|
||||||
position={direction === 'down' ? 'top' : 'bottom'}
|
position={direction === 'down' ? 'top' : 'bottom'}
|
||||||
|
@ -7,7 +7,7 @@ test('should render correctly after inserting a tab', async () => {
|
|||||||
const wrapper = mount({
|
const wrapper = mount({
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Tabs v-model={[this.active, 'active']}>
|
<Tabs v-model:active={this.active}>
|
||||||
<Tab title="1">1</Tab>
|
<Tab title="1">1</Tab>
|
||||||
{this.insert && (
|
{this.insert && (
|
||||||
<div>
|
<div>
|
||||||
@ -37,7 +37,7 @@ test('should render correctly after inserting a tab with name', async () => {
|
|||||||
const wrapper = mount({
|
const wrapper = mount({
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<Tabs v-model={[this.active, 'active']} onChange={onChange}>
|
<Tabs v-model:active={this.active} onChange={onChange}>
|
||||||
{this.insert && (
|
{this.insert && (
|
||||||
<Tab title="bar" name="bar">
|
<Tab title="bar" name="bar">
|
||||||
bar
|
bar
|
||||||
|
@ -371,9 +371,7 @@ export default defineComponent({
|
|||||||
renderTitle={item.$slots.title}
|
renderTitle={item.$slots.title}
|
||||||
activeColor={props.titleActiveColor}
|
activeColor={props.titleActiveColor}
|
||||||
inactiveColor={props.titleInactiveColor}
|
inactiveColor={props.titleInactiveColor}
|
||||||
onClick={(event: MouseEvent) => {
|
onClick={(event: MouseEvent) => onClickTab(item, index, event)}
|
||||||
onClickTab(item, index, event);
|
|
||||||
}}
|
|
||||||
{...pick(item, [
|
{...pick(item, [
|
||||||
'dot',
|
'dot',
|
||||||
'badge',
|
'badge',
|
||||||
|
@ -151,7 +151,7 @@ test('should allow to select multiple items when activeId is array', async () =>
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<TreeSelect
|
<TreeSelect
|
||||||
v-model={[this.activeId, 'activeId']}
|
v-model:activeId={this.activeId}
|
||||||
items={this.items}
|
items={this.items}
|
||||||
mainActiveIndex={0}
|
mainActiveIndex={0}
|
||||||
/>
|
/>
|
||||||
@ -185,7 +185,7 @@ test('should limit the selected item number when using max prop', async () => {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<TreeSelect
|
<TreeSelect
|
||||||
v-model={[this.activeId, 'activeId']}
|
v-model:activeId={this.activeId}
|
||||||
max={1}
|
max={1}
|
||||||
items={this.items}
|
items={this.items}
|
||||||
mainActiveIndex={0}
|
mainActiveIndex={0}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user