diff --git a/packages/cascader/test/__snapshots__/demo.spec.ts.snap b/packages/cascader/test/__snapshots__/demo.spec.ts.snap index 74ed9507..9ca8a016 100644 --- a/packages/cascader/test/__snapshots__/demo.spec.ts.snap +++ b/packages/cascader/test/__snapshots__/demo.spec.ts.snap @@ -16,7 +16,7 @@ exports[`should render demo and match snapshot 1`] = ` bind:tap="onClick" > + ``` ```js @@ -199,9 +206,9 @@ Page({ callback({ value: value + 1, - cursor: 0 - }) - } + cursor: 0, + }); + }, }); ``` @@ -289,7 +296,7 @@ Page({ | 事件 | 说明 | 回调参数 | | --- | --- | --- | | bind:input | 输入内容时触发 | event.detail: 当前输入值; 在 extra-event-params 为 `true` 时为 [InputDetail](#/field#inputdetail) | -| bind:change | 输入内容时触发 | event.detail: 当前输入值; 在 extra-event-params 为 `true` 时为 [InputDetail](#/field#inputdetail) | +| bind:change | 输入内容时触发 | event.detail: 当前输入值; 在 extra-event-params 为 `true` 时为 [InputDetail](#/field#inputdetail) | | bind:confirm | 点击完成按钮时触发 | event.detail: 当前输入值 | | bind:click-icon | 点击尾部图标时触发 | - | | bind:focus | 输入框聚焦时触发 | event.detail.value: 当前输入值;
event.detail.height: 键盘高度 | @@ -300,12 +307,13 @@ Page({ | bind:keyboardheightchange | 键盘高度发生变化的时候触发此事件 | event.detail = { height: height, duration: duration } | ### InputDetail + | 参数 | 说明 | 类型 | 默认值 | | --- | --- | --- | --- | | value | 当前输入值 | _string_ | - | | cursor | 光标位置 | _number_ | - | | keyCode | 键值 | _number_ | - | -| callback | 调用该函数传 `{ value: string, cursor: number }` 来替换输入框的内容,具体用法可以参考 [wx-input](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) | _function_ | - | +| callback | 调用该函数传 `{ value: string, cursor: number }` 来替换输入框的内容,具体用法可以参考 [wx-input](https://developers.weixin.qq.com/miniprogram/dev/component/input.html) | _function_ | - | ### Slot @@ -319,8 +327,9 @@ Page({ ### 外部样式类 -| 类名 | 说明 | -| ---------------- | -------------- | -| label-class | 左侧文本样式类 | -| input-class | 输入框样式类 | -| right-icon-class | 右侧图标样式类 | +| 类名 | 说明 | +| ----------------------- | -------------- | +| custom-class `v1.10.21` | 根节点样式类 | +| label-class | 左侧文本样式类 | +| input-class | 输入框样式类 | +| right-icon-class | 右侧图标样式类 | diff --git a/packages/field/index.wxml b/packages/field/index.wxml index ec2e0ea8..117adb74 100644 --- a/packages/field/index.wxml +++ b/packages/field/index.wxml @@ -13,7 +13,7 @@ title-style="margin-right: 12px;" custom-style="{{ customStyle }}" arrow-direction="{{ arrowDirection }}" - custom-class="van-field" + custom-class="custom-class van-field" > diff --git a/packages/field/test/__snapshots__/demo.spec.ts.snap b/packages/field/test/__snapshots__/demo.spec.ts.snap index 91d90cb6..ae3cdae9 100644 --- a/packages/field/test/__snapshots__/demo.spec.ts.snap +++ b/packages/field/test/__snapshots__/demo.spec.ts.snap @@ -17,7 +17,7 @@ exports[`should render demo and match snapshot 1`] = ` >