mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
[improvement] optimize wxml (#858)
This commit is contained in:
parent
0de7ec38e4
commit
a234c97852
@ -1,12 +1,23 @@
|
||||
<demo-block title="基本用法">
|
||||
<van-radio-group value="{{ radio1 }}" data-key="radio1" bind:change="onChange" custom-class="demo-radio-group">
|
||||
<demo-block title="基本用法" padding>
|
||||
<van-radio-group
|
||||
value="{{ radio1 }}"
|
||||
data-key="radio1"
|
||||
custom-class="demo-radio-group"
|
||||
bind:change="onChange"
|
||||
>
|
||||
<van-radio name="1" custom-class="demo-radio">单选框 1</van-radio>
|
||||
<van-radio name="2" custom-class="demo-radio">单选框 2</van-radio>
|
||||
</van-radio-group>
|
||||
</demo-block>
|
||||
|
||||
<demo-block title="禁用状态">
|
||||
<van-radio-group value="{{ radio2 }}" data-key="radio2" bind:change="onChange" disabled custom-class="demo-radio-group">
|
||||
<demo-block title="禁用状态" padding>
|
||||
<van-radio-group
|
||||
disabled
|
||||
value="{{ radio2 }}"
|
||||
data-key="radio2"
|
||||
custom-class="demo-radio-group"
|
||||
bind:change="onChange"
|
||||
>
|
||||
<van-radio name="1" custom-class="demo-radio">单选框 1</van-radio>
|
||||
<van-radio name="2" custom-class="demo-radio">单选框 2</van-radio>
|
||||
</van-radio-group>
|
||||
|
@ -1,3 +1 @@
|
||||
<view class="custom-class">
|
||||
<slot />
|
||||
</view>
|
||||
|
@ -1,3 +1 @@
|
||||
<view class="custom-class">
|
||||
<slot />
|
||||
</view>
|
||||
|
@ -2,7 +2,6 @@
|
||||
class="van-search custom-class {{ showAction || useActionSlot ? 'van-search--show-action' : '' }}"
|
||||
style="background: {{ background }}"
|
||||
>
|
||||
<view class="van-search__field">
|
||||
<van-field
|
||||
clearable
|
||||
type="search"
|
||||
@ -11,6 +10,7 @@
|
||||
error="{{ error }}"
|
||||
border="{{ false }}"
|
||||
confirm-type="search"
|
||||
class="van-search__field"
|
||||
value="{{ value }}"
|
||||
disabled="{{ disabled }}"
|
||||
readonly="{{ readony }}"
|
||||
@ -24,7 +24,6 @@
|
||||
bind:change="onChange"
|
||||
bind:confirm="onSearch"
|
||||
/>
|
||||
</view>
|
||||
<view wx:if="{{ showAction || useActionSlot }}" class="van-search__action">
|
||||
<slot wx:if="{{ useActionSlot }}" name="action" />
|
||||
<view wx:else bind:tap="onCancel" class="cancel-class">取消</view>
|
||||
|
@ -5,12 +5,8 @@
|
||||
<view class="van-tabbar-item__icon {{ dot ? 'van-tabbar-item__icon--dot' : '' }}">
|
||||
<van-icon wx:if="{{ icon }}" name="{{ icon }}" info="{{ info }}" />
|
||||
<block wx:else>
|
||||
<block wx:if="{{ active }}">
|
||||
<slot name="icon-active" />
|
||||
</block>
|
||||
<block wx:else>
|
||||
<slot name="icon" />
|
||||
</block>
|
||||
<slot wx:if="{{ active }}" name="icon-active" />
|
||||
<slot wx:else name="icon" />
|
||||
<view wx:if="{{ info !== null }}" class="van-icon__info">{{ info }}</view>
|
||||
</block>
|
||||
</view>
|
||||
|
Loading…
x
Reference in New Issue
Block a user