Merge branch 'dev' into next
This commit is contained in:
@@ -170,7 +170,7 @@ export default {
|
||||
| width `v2.2.7` | Width | _number \| string_ | `320px` |
|
||||
| message | Message | _string_ | - |
|
||||
| message-align | Message align,can be set to `left` `right` | _string_ | `center` |
|
||||
| theme `v2.10.0` | theme style,can be set to `round` | _string_ | `default` |
|
||||
| theme `v2.10.0` | theme style,can be set to `round-button` | _string_ | `default` |
|
||||
| show-confirm-button | Whether to show confirm button | _boolean_ | `true` |
|
||||
| show-cancel-button | Whether to show cancel button | _boolean_ | `false` |
|
||||
| cancel-button-text | Cancel button text | _string_ | `Cancel` |
|
||||
|
||||
@@ -202,7 +202,7 @@ export default {
|
||||
| width `v2.2.7` | 弹窗宽度,默认单位为`px` | _number \| string_ | `320px` |
|
||||
| message | 文本内容,支持通过`\n`换行 | _string_ | - |
|
||||
| message-align | 内容对齐方式,可选值为`left` `right` | _string_ | `center` |
|
||||
| theme | 样式风格,可选值为`round` | _string_ | `default` |
|
||||
| theme | 样式风格,可选值为`round-button` | _string_ | `default` |
|
||||
| show-confirm-button | 是否展示确认按钮 | _boolean_ | `true` |
|
||||
| show-cancel-button | 是否展示取消按钮 | _boolean_ | `false` |
|
||||
| confirm-button-text | 确认按钮文案 | _string_ | `确认` |
|
||||
|
||||
+3
-1
@@ -191,7 +191,9 @@ export default createComponent({
|
||||
if (Array.isArray(value)) {
|
||||
return !value.length;
|
||||
}
|
||||
|
||||
if (value === 0) {
|
||||
return false;
|
||||
}
|
||||
return !value;
|
||||
},
|
||||
|
||||
|
||||
@@ -126,10 +126,7 @@ test('use stepper', async () => {
|
||||
});
|
||||
|
||||
await submitForm(wrapper);
|
||||
expect(onFailed).toHaveBeenCalledWith({
|
||||
errors: [{ message: 'foo', name: 'A' }],
|
||||
values: { A: 0 },
|
||||
});
|
||||
expect(onFailed).toBeCalledTimes(0);
|
||||
|
||||
wrapper.setData({ value: 1 });
|
||||
|
||||
@@ -146,10 +143,7 @@ test('use rate', async () => {
|
||||
});
|
||||
|
||||
await submitForm(wrapper);
|
||||
expect(onFailed).toHaveBeenCalledWith({
|
||||
errors: [{ message: 'foo', name: 'A' }],
|
||||
values: { A: 0 },
|
||||
});
|
||||
expect(onFailed).toBeCalledTimes(0);
|
||||
|
||||
wrapper.setData({ value: 1 });
|
||||
|
||||
@@ -166,10 +160,7 @@ test('use slider', async () => {
|
||||
});
|
||||
|
||||
await submitForm(wrapper);
|
||||
expect(onFailed).toHaveBeenCalledWith({
|
||||
errors: [{ message: 'foo', name: 'A' }],
|
||||
values: { A: 0 },
|
||||
});
|
||||
expect(onFailed).toBeCalledTimes(0);
|
||||
|
||||
wrapper.setData({ value: 50 });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user