Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
`;
static components = {
's-col': Col,
's-row': Row,
's-icon': Icon,
's-menu': Menu,
's-menu-item': Menu.Item,
's-sub-menu': Menu.Sub,
's-input': Input,
's-badge': Badge,
's-select': Select,
's-select-option': Select.Option
};
initData() {
return {
opts: [],
showOpts: [],
value: ''
};
}
created() {
const routes = this.data.get('routes');
const opts = this.getCom(routes);
>
<span>{{leafItem.name}}</span>
<span>{{item.name}}</span>
`;
static components = {
's-menu': Menu,
's-sub-menu': Menu.Sub,
's-menu-item': Menu.Item,
's-menu-item-group': Menu.MenuItemGroup
};
static computed = {
defaultOpenKeys() {
const routes = this.data.get('routes');
return routes.map(item => item.key);
},
selectedKeys() {
return [this.data.get('currentPath')];
},
count() {
let routes = this.data.get('routes').filter(route => route.list);
let count = 0;
routes.forEach(route => {
route.list.forEach(r => {
key="{{'/' + item.key + '/' + leafItem.path}}"
>
<span>{{leafItem.name}}</span>
<span>{{item.name}}</span>
`;
static components = {
's-menu': Menu,
's-sub-menu': Menu.Sub,
's-menu-item': Menu.Item,
's-menu-item-group': Menu.MenuItemGroup
};
static computed = {
defaultOpenKeys() {
const routes = this.data.get('routes');
return routes.map(item => item.key);
},
selectedKeys() {
return [this.data.get('currentPath')];
},
count() {
let routes = this.data.get('routes').filter(route => route.list);
let count = 0;
routes.forEach(route => {
`;
static components = {
's-col': Col,
's-row': Row,
's-icon': Icon,
's-menu': Menu,
's-menu-item': Menu.Item,
's-sub-menu': Menu.Sub,
's-input': Input,
's-badge': Badge,
's-select': Select,
's-select-option': Select.Option
};
initData() {
return {
opts: [],
showOpts: [],
value: ''
};
}
created() {
const routes = this.data.get('routes');
const opts = this.getCom(routes);
this.data.set('opts', opts);
<span>{{leafItem.name}}</span>
<span>{{item.name}}</span>
`;
static components = {
's-menu': Menu,
's-sub-menu': Menu.Sub,
's-menu-item': Menu.Item,
's-menu-item-group': Menu.MenuItemGroup
};
static computed = {
defaultOpenKeys() {
const routes = this.data.get('routes');
return routes.map(item => item.key);
},
selectedKeys() {
return [this.data.get('currentPath')];
},
count() {
let routes = this.data.get('routes').filter(route => route.list);
let count = 0;
routes.forEach(route => {
route.list.forEach(r => {
count += r.leaf.length;
handleError(err) {
Notification.error({
message: err.type || '错误提示',
description: err.message || '出错了'
});
}
`;
static components = {
's-col': Col,
's-row': Row,
's-icon': Icon,
's-menu': Menu,
's-menu-item': Menu.Item,
's-sub-menu': Menu.Sub,
's-input': Input,
's-badge': Badge,
's-select': Select,
's-select-option': Select.Option
};
initData() {
return {
opts: [],
showOpts: [],
value: ''
};
}
created() {
const routes = this.data.get('routes');
const opts = this.getCom(routes);
this.data.set('opts', opts);
this.data.set('showOpts', opts);
}
getCom(arr) {
return arr.reduce((pre, cur) => {
/**
* @file 自动完成组件
* @author fuqiangqiang@baidu.com
*/
import Select from 'santd/select';
export default Select.Option;