mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-05-22 06:31:46 +08:00
[Improvement] Tap event name
This commit is contained in:
parent
d5eca77afc
commit
2f9d0e585d
@ -8,7 +8,7 @@
|
|||||||
<van-button
|
<van-button
|
||||||
wx:for="{{ actions }}"
|
wx:for="{{ actions }}"
|
||||||
wx:key="{{ index }}-{{ item.name }}"
|
wx:key="{{ index }}-{{ item.name }}"
|
||||||
bind:buttonclick="handleBtnClick"
|
bind:tap="handleBtnClick"
|
||||||
data-index="{{ index }}"
|
data-index="{{ index }}"
|
||||||
open-type="{{ item.openType }}"
|
open-type="{{ item.openType }}"
|
||||||
custom-class="van-actionsheet__button"
|
custom-class="van-actionsheet__button"
|
||||||
|
@ -68,7 +68,7 @@ Component({
|
|||||||
'van-button--plain': plain,
|
'van-button--plain': plain,
|
||||||
'van-button--loading': loading,
|
'van-button--loading': loading,
|
||||||
'van-button--disabled': disabled,
|
'van-button--disabled': disabled,
|
||||||
'van-button--unclickable': disabled || loading
|
'van-button--untapable': disabled || loading
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
opacity: .3;
|
opacity: .3;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--unclickable::after {
|
&--untapable::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
| center | 是否使内容垂直居中 | `Boolean` | `false` |
|
| center | 是否使内容垂直居中 | `Boolean` | `false` |
|
||||||
| url | 跳转链接 | `String` | - |
|
| url | 跳转链接 | `String` | - |
|
||||||
| link-type | 链接跳转类型,可选值为 `redirectTo` `switchTab` `reLaunch` | `String` | `navigateTo` |
|
| link-type | 链接跳转类型,可选值为 `redirectTo` `switchTab` `reLaunch` | `String` | `navigateTo` |
|
||||||
| clickable | 是否开启点击反馈 | `Boolean` | `false` |
|
| tapable | 是否开启点击反馈 | `Boolean` | `false` |
|
||||||
| is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` |
|
| is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` |
|
||||||
| required | 是否显示表单必填星号 | `Boolean` | `false` |
|
| required | 是否显示表单必填星号 | `Boolean` | `false` |
|
||||||
| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `String` | - |
|
| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `String` | - |
|
||||||
|
@ -21,7 +21,7 @@ Component({
|
|||||||
center: Boolean,
|
center: Boolean,
|
||||||
isLink: Boolean,
|
isLink: Boolean,
|
||||||
required: Boolean,
|
required: Boolean,
|
||||||
clickable: Boolean,
|
tapable: Boolean,
|
||||||
titleWidth: String,
|
titleWidth: String,
|
||||||
arrowDirection: String,
|
arrowDirection: String,
|
||||||
linkType: {
|
linkType: {
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--clickable {
|
&--tapable {
|
||||||
&:active {
|
&:active {
|
||||||
background-color: $active-color;
|
background-color: $active-color;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<view
|
<view
|
||||||
class="custom-class van-cell {{ center ? 'van-cell--center' : '' }} {{ required ? 'van-cell--required' : '' }} {{ isLink || clickable ? 'van-cell--clickable' : '' }} {{ border ? 'van-hairline' : '' }}"
|
class="custom-class van-cell {{ center ? 'van-cell--center' : '' }} {{ required ? 'van-cell--required' : '' }} {{ isLink || tapable ? 'van-cell--tapable' : '' }} {{ border ? 'van-hairline' : '' }}"
|
||||||
bind:tap="onTap"
|
bind:tap="onTap"
|
||||||
>
|
>
|
||||||
<van-icon wx:if="{{ icon }}" custom-class="van-cell__left-icon left-icon-class" name="{{ icon }}" />
|
<van-icon wx:if="{{ icon }}" custom-class="van-cell__left-icon left-icon-class" name="{{ icon }}" />
|
||||||
|
@ -151,7 +151,7 @@
|
|||||||
|-----------|-----------|-----------|
|
|-----------|-----------|-----------|
|
||||||
| inout | 输入内容时触发 | value: 当前输入值 |
|
| inout | 输入内容时触发 | value: 当前输入值 |
|
||||||
| change | 输入内容时触发 | value: 当前输入值 |
|
| change | 输入内容时触发 | value: 当前输入值 |
|
||||||
| click-icon | 点击尾部图标时触发 | - |
|
| tap-icon | 点击尾部图标时触发 | - |
|
||||||
| focus | 输入框聚焦时触发 | - |
|
| focus | 输入框聚焦时触发 | - |
|
||||||
| blur | 输入框失焦时触发 | - |
|
| blur | 输入框失焦时触发 | - |
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user