[new feature] Sidebar: add to and replace prop (#3696)
This commit is contained in:
@@ -72,6 +72,8 @@ export default {
|
||||
| title | 内容 | `String` | `''` | - |
|
||||
| info | 提示消息 | `String | Number` | `''` | - |
|
||||
| url | 跳转链接 | `String` | - | - |
|
||||
| to | 路由跳转对象,同 vue-router 的 to 属性 | `String | Object` | - | 2.0.4 |
|
||||
| replace | 跳转时是否替换当前页面历史 | `Boolean` | `false` | 2.0.4 |
|
||||
|
||||
### SidebarItem Events
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { mount } from '../../../test/utils';
|
||||
import Sidebar from '..';
|
||||
import SidebarItem from '../../sidebar-item';
|
||||
|
||||
test('event', () => {
|
||||
test('click event & change event', () => {
|
||||
const onClick = jest.fn();
|
||||
const onChange = jest.fn();
|
||||
const wrapper = mount({
|
||||
|
||||
Reference in New Issue
Block a user