mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2026-07-07 23:21:08 +08:00
Compare commits
5 Commits
de8d8359f3
...
6dd89841a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dd89841a8 | ||
|
|
3da43a131c | ||
|
|
3e06aa4e89 | ||
|
|
fd41bd823a | ||
|
|
b9dea4fd16 |
2
dist/button/index.wxml
vendored
2
dist/button/index.wxml
vendored
@ -2,7 +2,7 @@
|
||||
<wxs src="./index.wxs" module="computed" />
|
||||
|
||||
<button
|
||||
id="{{ id }}"
|
||||
id="{{ id || buttonId }}"
|
||||
data-detail="{{ dataset }}"
|
||||
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
|
||||
hover-class="{{ disabled || loading ? '' : 'van-button--active hover-class'}}"
|
||||
|
||||
1
dist/dialog/index.js
vendored
1
dist/dialog/index.js
vendored
@ -18,6 +18,7 @@ VantComponent({
|
||||
type: String,
|
||||
value: 'default',
|
||||
},
|
||||
confirmButtonId: String,
|
||||
className: String,
|
||||
customStyle: String,
|
||||
asyncClose: Boolean,
|
||||
|
||||
8
dist/dialog/index.wxml
vendored
8
dist/dialog/index.wxml
vendored
@ -46,7 +46,7 @@
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm confirm-button-class"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
button-id="{{ confirmButtonId }}"
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
@ -56,7 +56,7 @@
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindcontact="onContact"
|
||||
@ -96,7 +96,7 @@
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm confirm-button-class"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
button-id="{{ confirmButtonId }}"
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
@ -106,7 +106,7 @@
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindcontact="onContact"
|
||||
|
||||
2
dist/goods-action-button/index.wxml
vendored
2
dist/goods-action-button/index.wxml
vendored
@ -1,6 +1,7 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
<van-button
|
||||
id="{{ id }}"
|
||||
button-id="{{ buttonId }}"
|
||||
lang="{{ lang }}"
|
||||
type="{{ type }}"
|
||||
size="{{ size }}"
|
||||
@ -23,6 +24,7 @@
|
||||
bindcontact="onContact"
|
||||
bindopensetting="onOpenSetting"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bindgetphonenumber="onGetPhoneNumber"
|
||||
bindlaunchapp="onLaunchApp"
|
||||
>
|
||||
|
||||
1
dist/mixins/button.js
vendored
1
dist/mixins/button.js
vendored
@ -3,6 +3,7 @@ export const button = Behavior({
|
||||
externalClasses: ['hover-class'],
|
||||
properties: {
|
||||
id: String,
|
||||
buttonId: String,
|
||||
lang: String,
|
||||
businessId: Number,
|
||||
sessionFrom: String,
|
||||
|
||||
@ -1,4 +1,16 @@
|
||||
# 更新日志
|
||||
### [v1.10.25](https://github.com/youzan/vant-weapp/compare/v1.10.24...v1.10.25)
|
||||
|
||||
`2023-08-30`
|
||||
|
||||
**Document**
|
||||
|
||||
- slider: 修复 use-button-slot 文档错误 [#5534](https://github.com/youzan/vant-weapp/issues/5534)
|
||||
|
||||
**Feature**
|
||||
|
||||
- button: 增加 button-id 属性 和 agreePrivacyAuthorization 事件支持 [#5533](https://github.com/youzan/vant-weapp/issues/5533)
|
||||
|
||||
### [v1.10.24](https://github.com/youzan/vant-weapp/compare/v1.10.23...v1.10.24)
|
||||
|
||||
`2023-08-25`
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<wxs src="./index.wxs" module="computed" />
|
||||
|
||||
<button
|
||||
id="{{ id }}"
|
||||
id="{{ id || buttonId }}"
|
||||
data-detail="{{ dataset }}"
|
||||
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
|
||||
hover-class="{{ disabled || loading ? '' : 'van-button--active hover-class'}}"
|
||||
|
||||
@ -20,6 +20,7 @@ var utils_1 = require("../common/utils");
|
||||
type: String,
|
||||
value: 'default',
|
||||
},
|
||||
confirmButtonId: String,
|
||||
className: String,
|
||||
customStyle: String,
|
||||
asyncClose: Boolean,
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm confirm-button-class"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
button-id="{{ confirmButtonId }}"
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
@ -56,7 +56,7 @@
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindcontact="onContact"
|
||||
@ -96,7 +96,7 @@
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm confirm-button-class"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
button-id="{{ confirmButtonId }}"
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
@ -106,7 +106,7 @@
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindcontact="onContact"
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
<van-button
|
||||
id="{{ id }}"
|
||||
button-id="{{ buttonId }}"
|
||||
lang="{{ lang }}"
|
||||
type="{{ type }}"
|
||||
size="{{ size }}"
|
||||
@ -23,6 +24,7 @@
|
||||
bindcontact="onContact"
|
||||
bindopensetting="onOpenSetting"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bindgetphonenumber="onGetPhoneNumber"
|
||||
bindlaunchapp="onLaunchApp"
|
||||
>
|
||||
|
||||
@ -6,6 +6,7 @@ exports.button = Behavior({
|
||||
externalClasses: ['hover-class'],
|
||||
properties: {
|
||||
id: String,
|
||||
buttonId: String,
|
||||
lang: String,
|
||||
businessId: Number,
|
||||
sessionFrom: String,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@vant/weapp",
|
||||
"version": "1.10.24",
|
||||
"version": "1.10.25",
|
||||
"author": "vant-ui",
|
||||
"license": "MIT",
|
||||
"miniprogram": "lib",
|
||||
|
||||
@ -120,6 +120,7 @@
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| id | 标识符 | _string_ | - |
|
||||
| button-id `v1.10.25`| 标识符,作为原生button组件的id值 | _string_ | - |
|
||||
| type | 按钮类型,可选值为 `primary` `info` `warning` `danger` | _string_ | `default` |
|
||||
| size | 按钮尺寸,可选值为 `normal` `large` `small` `mini` | _string_ | `normal` |
|
||||
| color `v1.0.0` | 按钮颜色,支持传入`linear-gradient`渐变色 | _string_ | - |
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<wxs src="./index.wxs" module="computed" />
|
||||
|
||||
<button
|
||||
id="{{ id }}"
|
||||
id="{{ id || buttonId }}"
|
||||
data-detail="{{ dataset }}"
|
||||
class="custom-class {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}"
|
||||
hover-class="{{ disabled || loading ? '' : 'van-button--active hover-class'}}"
|
||||
|
||||
@ -240,6 +240,7 @@ Page({
|
||||
| 参数 | 说明 | 类型 | 默认值 |
|
||||
| --- | --- | --- | --- |
|
||||
| show | 是否显示弹窗 | _boolean_ | - |
|
||||
| confirm-button-id `v1.10.25`| 确认按钮的标识符,作为底层原生button组件的id值 | _string_ | - |
|
||||
| title | 标题 | _string_ | - |
|
||||
| width | 弹窗宽度,默认单位为`px` | _string \| number_ | `320px` |
|
||||
| message | 文本内容,支持通过`\n`换行 | _string_ | - |
|
||||
@ -292,7 +293,7 @@ Page({
|
||||
| bind:contact | 客服消息回调 | - |
|
||||
| bind:getphonenumber | 获取用户手机号回调 | - |
|
||||
| bind:getrealtimephonenumber `v1.10.21` | 获取手机号实时验证回调,open-type=getRealtimePhoneNumber 时有效 | - |
|
||||
| bind:agreeprivacyauthorization `v1.10.24` | 同意隐私协议回调,openType="agreePrivacyAuthorization"时有效 | - |
|
||||
| bind:agreeprivacyauthorization `v1.10.25` | 同意隐私协议回调,openType="agreePrivacyAuthorization"时有效 | - |
|
||||
| bind:error | 当使用开放能力时,发生错误的回调 | - |
|
||||
| bind:opensetting | 在打开授权设置页后回调 | - |
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@ VantComponent({
|
||||
type: String,
|
||||
value: 'default',
|
||||
},
|
||||
confirmButtonId: String,
|
||||
className: String,
|
||||
customStyle: String,
|
||||
asyncClose: Boolean,
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm confirm-button-class"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
button-id="{{ confirmButtonId }}"
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
@ -56,7 +56,7 @@
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindcontact="onContact"
|
||||
@ -96,7 +96,7 @@
|
||||
loading="{{ loading.confirm }}"
|
||||
custom-class="van-dialog__confirm confirm-button-class"
|
||||
custom-style="color: {{ confirmButtonColor }}"
|
||||
|
||||
button-id="{{ confirmButtonId }}"
|
||||
open-type="{{ confirmButtonOpenType }}"
|
||||
lang="{{ lang }}"
|
||||
business-id="{{ businessId }}"
|
||||
@ -106,7 +106,7 @@
|
||||
send-message-img="{{ sendMessageImg }}"
|
||||
show-message-card="{{ showMessageCard }}"
|
||||
app-parameter="{{ appParameter }}"
|
||||
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onConfirm"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindcontact="onContact"
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||
<van-button
|
||||
id="{{ id }}"
|
||||
button-id="{{ buttonId }}"
|
||||
lang="{{ lang }}"
|
||||
type="{{ type }}"
|
||||
size="{{ size }}"
|
||||
@ -23,6 +24,7 @@
|
||||
bindcontact="onContact"
|
||||
bindopensetting="onOpenSetting"
|
||||
bindgetuserinfo="onGetUserInfo"
|
||||
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bindgetphonenumber="onGetPhoneNumber"
|
||||
bindlaunchapp="onLaunchApp"
|
||||
>
|
||||
|
||||
@ -130,6 +130,7 @@ Page({
|
||||
| url | 点击后跳转的链接地址 | _string_ | - |
|
||||
| link-type | 链接跳转类型,可选值为 `redirectTo` `switchTab` `reLaunch` | _string_ | `navigateTo` |
|
||||
| id | 标识符 | _string_ | - |
|
||||
| button-id `v1.10.25`| 标识符,作为原生button组件的id值 | _string_ | - |
|
||||
| type | 按钮类型,可选值为 `primary` `warning` `danger` | _string_ | `danger` |
|
||||
| plain | 是否为朴素按钮 | _boolean_ | `false` |
|
||||
| size | 按钮尺寸,可选值为 `normal` `large` `small` `mini` | _string_ | `normal` |
|
||||
|
||||
@ -157,6 +157,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--warning van-goods-action-button--first"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
@ -209,6 +210,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--danger van-goods-action-button--last"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
@ -490,6 +492,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--warning van-goods-action-button--first"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
@ -540,6 +543,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--danger van-goods-action-button--last"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
@ -741,6 +745,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--warning van-goods-action-button--first"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
@ -791,6 +796,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--danger van-goods-action-button--last"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
@ -992,6 +998,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--warning van-goods-action-button--first"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
@ -1042,6 +1049,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<van-button
|
||||
class="van-goods-action-button van-goods-action-button--danger van-goods-action-button--last van-goods-action-button--plain"
|
||||
customClass="van-goods-action-button__inner custom-class"
|
||||
bind:agreeprivacyauthorization="onAgreePrivacyAuthorization"
|
||||
bind:click="onClick"
|
||||
bind:contact="onContact"
|
||||
bind:error="onError"
|
||||
|
||||
@ -5,6 +5,7 @@ export const button = Behavior({
|
||||
|
||||
properties: {
|
||||
id: String,
|
||||
buttonId: String,
|
||||
lang: String,
|
||||
businessId: Number,
|
||||
sessionFrom: String,
|
||||
|
||||
@ -140,7 +140,7 @@ Page({
|
||||
| bar-height | 进度条高度,默认单位为 `px` | _string \| number_ | `2px` |
|
||||
| active-color | 进度条激活态颜色 | _string_ | `#1989fa` |
|
||||
| inactive-color | 进度条默认颜色 | _string_ | `#e5e5e5` |
|
||||
| use-slot-button | 是否使用按钮插槽 | _boolean_ | `false` |
|
||||
| use-button-slot | 是否使用按钮插槽 | _boolean_ | `false` |
|
||||
| range `v1.8.4` | 是否开启双滑块模式 | _boolean_ | `false` |
|
||||
| vertical `v1.8.5` | 是否垂直展示 | _boolean_ | `false` |
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user