Skip to content

Vant Weapp

vue-helper to enhance the efficiency improvement of the Elemet Plus framework is mainly concentrated in four parts.

  • component tag code block generation
  • property hints
  • property value hints
  • document viewing and access to the official website of the framework

Code Block

van-button

html
<van-button type="primary">$1</van-button>

van-button:plain

html
<van-button plain type="primary">$1</van-button>

van-button:hairline

html
<van-button plain hairline type="primary">$1</van-button>

van-button:block

html
<van-button type="primary" block>$1</van-button>

van-cell

html
<van-cell title="$1" value="$2">$3</van-cell>

van-cell:is-link

html
<van-cell title="$1" is-link value="$2">$3</van-cell>

van-cell:title[slot]

html
<view slot="title">$1</view>

van-cell:label[slot]

html
<view slot="label">$1</view>

van-cell:icon[slot]

html
<view slot="icon">$1</view>

van-cell:right-icon[slot]

html
<view slot="right-icon">$1</view>

van-cell-group

html
<van-cell-group>$1</van-cell-group>

van-cell-group:cell

html
<van-cell-group title="$1">
    <van-cell title="$2" value="$3"></van-cell>
</van-cell-group>

van-icon

html
<van-icon name="close" />

van-icon:dot

html
<van-icon name="$1" dot />

van-icon:info

html
<van-icon name="$1" info="$2" />

van-image

html
<van-image width="$1" height="$2" src="$3" />

van-image:fit

html
<van-image width="$1" height="$2" fit="contain" src="$3" />

van-image:round

html
<van-image round width="$1" height="$2" src="$3" />

van-image:lazy-load

html
<van-image width="$1" height="$2" lazy-load src="$3" />

van-col

html
<van-col span="$1">$2</van-col>

van-row

html
<van-row>
    <van-col span="$1">$2</van-col>$3
</van-row>

van-popup

html
<van-popup show="{{ show }}" bind:close="onClose">$1</van-popup>

van-popup:position

html
<van-popup show="{{ show }}" bind:close="onClose" position="top" custom-style="height: 20%;">$1</van-popup>

van-popup:closeable

html
<van-popup show="{{ show }}" closeable bind:close="onClose" position="bottom" custom-style="height: 20%;">$1</van-popup>

van-popup:round

html
<van-popup show="{{ show }}" round bind:close="onClose" position="bottom" custom-style="height: 20%;">$1</van-popup>

van-toast

html
<van-toast id="van-toast" />

van-transition

html
<van-transition show="{{ show }}" custom-class="block">$1</van-transition>

van-calendar

html
<van-calendar show="{{ show }}" bind:close="onClose" bind:confirm="onConfirm" />

van-calendar:multiple

html
<van-calendar show="{{ show }}" type="multiple" bind:close="onClose" bind:confirm="onConfirm" />

van-calendar:range

html
<van-calendar show="{{ show }}" type="range" bind:close="onClose" bind:confirm="onConfirm" />

van-cascader

html
<van-cascader value="{{ $1 }}" title="$2" options="{{ options }}" bind:close="onClose" bind:finish="onFinish" />

van-checkbox

html
<van-checkbox value="{{ ${1:checked} }}" bind:change="${2:onChange}">$3</van-checkbox>

van-checkboxshape

html
<van-checkbox value="{{ ${1:checked} }}" shape="square" bind:change="${2:onChange}">$3</van-checkbox>

van-checkbox--group

html
<van-checkbox-group value="{{ $1 }}" bind:change="$2">
    <van-checkbox name="$3">$4</van-checkbox>$5
</van-checkbox-group>

van-datetime-picker

html
<van-datetime-picker type="datetime" value="{{ ${1:currentDate} }}" min-date="{{ ${2:minDate} }}" max-date="{{ ${3:maxDate} }}" bind:input="${4:onInput}" />

van-datetime-picker:filter

html
<van-datetime-picker type="${1:time}" value="{{ ${2:currentDate} }}" filter="{{ ${3:filter} }}" />

van-field

html
<van-field value="{{ $1 }}" placeholder="$2" border="{{ false }}" bind:change="$3" />

van-field:model

html
<van-field model:value="{{ $1 }}" placeholder="$2" border="{{ false }}" />

van-field:input-align

html
<van-field value="{{ $1 }}" label="$2" placeholder="$3" input-align="right" />

van-field:button[slot]

html
<van-field value="{{ $1 }}" center clearable label="" placeholder="" border="{{ false }}" use-button-slot>
    <van-button slot="button" size="small" type="primary"></van-button>
</van-field>

van-picker

html
<van-picker columns="{{ $1 }}" bind:change="$2" />

van-picker:default-index

html
<van-picker columns="{{ $1 }}" default-index="{{ $2 }}" bind:change="$3" />

van-radio

html
<van-radio name="$1">$2</van-radio>

van-radio:shape

html
<van-radio name="$1" shape="square">$2</van-radio>

van-radio-group

html
<van-radio-group value="{{ $1 }}" bind:change="$2">$3</van-radio-group>

van-radio-group:radio

html
<van-radio-group value="{{ $1 }}" bind:change="$2">
    <van-radio name="$3" shape="square">$4</van-radio>$5
</van-radio-group>

van-rate

html
<van-rate value="{{ $1 }}" bind:change="$2" />

van-rate:allow-half

html
<van-rate value="{{ $1 }}" allow-half void-icon="star" void-color="#eee" bind:change="onChange" />

van-search

html
<van-search value="{{ $1 }}" placeholder="$2">$3</van-search>

van-search:show-action

html
<van-search value="{{ $1 }}" placeholder="$2" show-action bind:search="onSearch" bind:cancel="onCancel">$3</van-search>

van-search:action[slot]

html
<view slot="action">$1</view>

van-search:label[slot]

html
<view slot="label">$1</view>

van-search:left-icon[slot]

html
<view slot="left-icon">$1</view>

van-search:right-icon[slot]

html
<view slot="right-icon">$1</view>

van-slider

html
<van-slider value="$1" bind:change="$2" />

van-slider:range

html
<van-slider value="$1" range bind:change="$2" />

van-stepper

html
<van-stepper value="{{ $1 }}" bind:change="$2" />

van-stepper:step

html
<van-stepper value="{{ $1 }}" step="$2" bind:change="$3" />

van-stepper:integer

html
<van-stepper value="{{ $1 }}" integer bind:change="$2" />

van-switch

html
<van-switch checked="{{ $1 }}" bind:change="$2" />

van-uploader

html
<van-uploader file-list="{{ ${1:fileList} }}" bind:after-read="$2" />

van-uploader:deletable

html
<van-uploader file-list="{{ ${1:fileList} }}" bind:after-read="$2" deletable="{{ true }}" />

van-action-sheet

html
<van-action-sheet show="{{ ${1:show} }}" actions="{{ ${2:actions} }}" bind:close="$3" bind:select="$4" />

van-action-sheet:cancel

html
<van-action-sheet show="{{ ${1:show} }}" actions="{{ ${2:actions} }}" cancel-text="取消" bind:close="$3" bind:select="$4" />

van-dialog

html
<van-dialog id="van-dialog" />

van-dialog:show

html
<van-dialog use-slot title="" show="{{ show }}" show-cancel-button bind:close="onClose">$1</van-dialog>

van-dropdown-menu

html
<van-dropdown-menu>$1</van-dropdown-menu>

van-dropdown-menu:item

html
<van-dropdown-menu>
    <van-dropdown-item value="$1" options="$2" />$3
</van-dropdown-menu>

van-dropdown-item

html
<van-dropdown-item value="$1" options="$2"></van-dropdown-item>

van-loading

html
<van-loading />

van-loading:type

html
<van-loading type="spinner" />

van-notify

html
<van-notify id="custom-selector" />

van-overlay

html
<van-overlay show="{{ show }}" bind:click="onClickHide">$1</van-overlay>

van-share-sheet

html
<van-share-sheet show="$1" title="$2" options="$3" bind:select="$4" bind:close="$5" />

van-swipe-cell

html
<van-swipe-cell>$1</van-swipe-cell>

van-swipe-cell:left[slot]

html
<view slot="left">$1</view>

van-swipe-cell:right[slot]

html
<view slot="right">$1</view>

van-circle

html
<van-circle value="$1" text="$2" />

van-circle:stroke-width

html
<van-circle value="$1" stroke-width="$2" text="$3" />

van-circle:color

html
<van-circle value="$1" layer-color="$2" color="$3" text="$4" />

van-collapse

html
<van-collapse value="$1" bind:change="$2">$3</van-collapse>

van-collapse:accordion

html
<van-collapse accordion value="$1" bind:change="$2">$3</van-collapse>

van-collapse:item

html
<van-collapse value="$1" bind:change="$2">
    <van-collapse-item title="" name="">$3</van-collapse-item>
</van-collapse>

van-collapse-item

html
<van-collapse-item title="$1" name="$2">$3</van-collapse-item>

van-count-down

html
<van-count-down time="$1" />

van-count-down:millisecond

html
<van-count-down millisecond time="$1" format="HH:mm:ss:SSS" />

van-divider

html
<van-divider></van-divider>

van-divider:hairline

html
<van-divider hairline></van-divider>

van-divider:dashed

html
<van-divider dashed></van-divider>

van-divider:contentPosition

html
<van-divider contentPosition="center">$1</van-divider>

van-empty

html
<van-empty description="$1">$2</van-empty>

van-empty:image

html
<van-empty image="$1" description="$2">$3</van-empty>

van-empty:button

html
<van-empty description="$1">
    <van-button round type="danger">按钮</van-button>
</van-empty>

van-notice-bar

html
<van-notice-bar left-icon="volume-o" text="$1" />

van-notice-bar:scrollable

html
<van-notice-bar left-icon="volume-o" text="$1" scrollable />

van-notice-bar:wrapable

html
<van-notice-bar left-icon="volume-o" text="$1" wrapable />

van-notice-bar:link

html
<van-notice-bar left-icon="volume-o" text="$1" mode="link" />

van-progress

html
<van-progress percentage="$1" />

van-progress:stroke-width

html
<van-progress :percentage="" stroke-width="" />

van-skeleton

html
<van-skeleton title row="$1">$2</van-skeleton>

van-skeleton:avatar

html
<van-skeleton avatar title row="$1">$2</van-skeleton>

van-steps

html
<van-steps steps="$1" active="$2" />

van-steps:vertical

html
<van-steps steps="$1" active="$2" direction="vertical" active-color="$3" />

van-sticky

html
<van-sticky>$1</van-sticky>

van-sticky:container

html
<van-sticky container="$1">$2</van-sticky>

van-sticky:offset-top

html
<van-sticky offset-top="$1">$2</van-sticky>

van-tag

html
<van-tag type="primary">$1</van-tag>

van-tag:plain

html
<van-tag plain type="primary">$1</van-tag>

van-tag:closeable

html
<van-tag closeable type="primary">$1</van-tag>

van-tag:mark

html
<van-tag mark type="primary">$1</van-tag>

van-tag:round

html
<van-tag round type="primary">$1</van-tag>

van-grid

html
<van-grid>$1</van-grid>

van-grid:square

html
<van-grid square>$1</van-grid>

van-grid:item

html
<van-grid>
    <van-grid-item icon="" text="" />
</van-grid>

van-grid-item

html
<van-grid-item icon="" text="" />

van-index-bar

html
<van-index-bar>$1</van-index-bar>

van-index-bar:index-list

html
<van-index-bar index-list="$1">$2</van-index-bar>

van-index-anchor

html
<van-index-anchor index="$1">$2</van-index-anchor>

van-nav-bar

html
<van-nav-bar title="标题" left-text="返回" right-text="按钮" left-arrow bind:click-left="onClickLeft" bind:click-right="onClickRight">$1</van-nav-bar>

van-nav-bar:title

html
<view slot="title"></view>

van-nav-bar:left

html
<view slot="left"></view>

van-nav-bar:right

html
<view slot="right"></view>

van-sidebar

html
<van-sidebar active-key="$1">$2</van-sidebar>

van-sidebar:item

html
<van-sidebar active-key="$1">
    <van-sidebar-item title="" />
</van-sidebar>

van-sidebar-item

html
<van-sidebar-item title="$1" />

van-sidebar-item:dot

html
<van-sidebar-item title="$1" dot />

van-sidebar-item:badge

html
<van-sidebar-item title="$1" badge="$2" />

van-tab

html
van-tab title="$1">$2</van-tab>

van-tabs

html
<van-tabs active="$1" bind:change="$2">$3</van-tabs>

van-tabs:sticky

html
<van-tabs sticky active="$1" bind:change="$2">$3</van-tabs>

van-tabs:card

html
<van-tabs type="card" active="$1" bind:change="$2">$3</van-tabs>

van-tabs:tab

html
<van-tabs active="$1" bind:change="$2">
    <van-tab title="$3"></van-tab>$4
</van-tabs>

van-tabbar

html
<van-tabbar active="$1" bind:change="$2">$3</van-tabbar>

van-tabbar:item

html
<van-tabbar active="$1" bind:change="$2"><van-tabbar-item name="$3" icon="$4">$5</van-tabbar-item></van-tabbar>

van-tabbar-item

html
<van-tabbar-item icon="$1">$2</van-tabbar-item>

van-tabbar-item:dot

html
<van-tabbar-item icon="$1" dot>$2</van-tabbar-item>

van-tabbar-item:info

html
<van-tabbar-item icon="$1" info>$2</van-tabbar-item>

van-tree-select

html
<van-tree-select items="$1" main-active-index="$2" active-id="$3" bind:click-nav="$4" bind:click-item="$5" />

van-tree-select:max

html
<van-tree-select items="$1" main-active-index="$2" active-id="$3" bind:click-nav="$4" bind:click-item="$5" max="$6" />

van-area

html
<van-area area-list="$1" />

van-card

html
<van-card num="$1" price="$2" desc="$3" title="$4" thumb="$5">$6</van-card>

van-card:title[slot]

html
<view slot="title"></view>

van-card:desc[slot]

html
<view slot="desc"></view>

van-card:num[slot]

html
<view slot="num"></view>

van-card:price[slot]

html
<view slot="price"></view>

van-card:origin-price[slot]

html
<view slot="origin-price"></view>

van-card:price-top[slot]

html
<view slot="price-top"></view>

van-card:bottom[slot]

html
<view slot="bottom"></view>

van-card:thumb[slot]

html
<view slot="thumb"></view>

van-card:tag[slot]

html
<view slot="tag"></view>

van-card:tags[slot]

html
<view slot="tags"></view>

van-card:footer[slot]

html
<view slot="footer"></view>

van-submit-bar

html
<van-submit-bar price="$1" button-text="$2" bind:submit="$3">$4</van-submit-bar>

van-submit-bar:top[slot]

html
<view slot="top">$1</veiw>

van-submit-bar:tip[slot]

html
<view slot="tip">$1</veiw>

van-goods-action

html
<van-goods-action>$1</van-goods-action>

van-goods-action-icon

html
<van-goods-action-icon icon="$1" text="$2" bind:click="$3" />

van-goods-action-button

html
<van-goods-action-button text="$2" bind:click="$3" />

van-goods-action-button:plain

html
<van-goods-action-button plain text="$2" bind:click="$3" />

van-panel

html
<van-panel title="$1" desc="$2" status="$3">$4</van-panel>