How to use santd - 8 common examples

To help you get started, we’ve selected a few santd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ecomfe / santd / site / src / containers / Header.js View on Github external
`;

    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);
github ecomfe / santd / site / src / containers / Navigator.js View on Github external
>
                            <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 =&gt; item.key);
        },
        selectedKeys() {
            return [this.data.get('currentPath')];
        },
        count() {
            let routes = this.data.get('routes').filter(route =&gt; route.list);
            let count = 0;
            routes.forEach(route =&gt; {
                route.list.forEach(r =&gt; {
github ecomfe / santd / site / src / containers / Navigator.js View on Github external
key="{{'/' + item.key + '/' + leafItem.path}}"
                        &gt;
                            <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 =&gt; item.key);
        },
        selectedKeys() {
            return [this.data.get('currentPath')];
        },
        count() {
            let routes = this.data.get('routes').filter(route =&gt; route.list);
            let count = 0;
            routes.forEach(route =&gt; {
github ecomfe / santd / site / src / containers / Header.js View on Github external
`;

    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);
github ecomfe / santd / site / src / containers / Navigator.js View on Github external
<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 =&gt; item.key);
        },
        selectedKeys() {
            return [this.data.get('currentPath')];
        },
        count() {
            let routes = this.data.get('routes').filter(route =&gt; route.list);
            let count = 0;
            routes.forEach(route =&gt; {
                route.list.forEach(r =&gt; {
                    count += r.leaf.length;
github ecomfe / santd / site / src / index.js View on Github external
handleError(err) {
        Notification.error({
            message: err.type || '错误提示',
            description: err.message || '出错了'
        });
    }
github ecomfe / santd / site / src / containers / Header.js View on Github external
`;

    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) =&gt; {
github ecomfe / santd / santd / auto-complete / option.js View on Github external
/**
 * @file 自动完成组件
 * @author fuqiangqiang@baidu.com
 */

import Select from 'santd/select';

export default Select.Option;

santd

san UI design

Unrecognized
Latest version published 1 year ago

Package Health Score

49 / 100
Full package analysis