How to use the san.DataTypes.objectOf function in san

To help you get started, we’ve selected a few san 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 baidu / san-devtool / src / panel / components / TreeView / TreeViewItem.js View on Github external
initiallyOpen: DataTypes.bool,
        compact: DataTypes.bool,
        wholeLineSelected: DataTypes.bool,
        keepingSelected: DataTypes.bool,
        checked: DataTypes.bool,
        nestedLevel: DataTypes.number,
        secondaryTextLines: DataTypes.number,
        lastExpandingState: DataTypes.bool,
        checkboxValue: DataTypes.string,
        checkboxInputValue: DataTypes.array,
        checkboxIndeterminate: DataTypes.bool,
        filterText: DataTypes.string,
        filtered: DataTypes.bool,
        primaryText: DataTypes.string,
        secondaryText: DataTypes.oneOfType([DataTypes.string, DataTypes.number]),
        extras: DataTypes.arrayOf(DataTypes.objectOf(DataTypes.string))
    },

    components: {
        'san-touch-ripple': TouchRipple,
        'san-center-ripple': CenterRipple,
        'san-checkbox': Checkbox,
        'san-icon': Icon,
        'san-chip': Chip,
        'san-avatar': Avatar,
        'san-tree-view-item': 'self'
    },

    messages: {
        'UI:nested-counter'(arg) {
            let target = arg.value;
            target.set('nestedLevel', target.get('nestedLevel') + 1);
github ecomfe / san-xui / src / x / biz / LegacyActionAdapter.js View on Github external
export default defineComponent({
    template,
    components: {
        'ui-actionloader': ActionLoader,
        'ui-button': Button,
        'ui-dialog': Dialog
    },
    dataTypes: {
        dialog: DataTypes.bool,
        foot: DataTypes.bool,
        confirm: DataTypes.objectOf({
            label: DataTypes.string,
            disabled: DataTypes.bool
        }),
        actionOptions: DataTypes.objectOf({
            open: DataTypes.bool,
            width: DataTypes.number,
            height: DataTypes.number,
            title: DataTypes.string,
            url: DataTypes.string,
            module: DataTypes.string,
            needFoot: DataTypes.bool,
            options: DataTypes.objectOf({
                parentAction: DataTypes.object
            })
        })
    },
    initData() {
        return {
            dialog: false,
            foot: true,
github ecomfe / san-xui / src / x / biz / Table.js View on Github external
},
    computed: {
        frozen() {
            const columns = this.data.get('columns');
            for (let i = 0; i < columns.length; i++) {
                const col = columns[i];
                if (col.freezed) {
                    return true;
                }
            }
            return false;
        }
    },
    dataTypes: {
        columns: DataTypes.array,
        table: DataTypes.objectOf({
            error: DataTypes.any,
            loading: DataTypes.bool,
            disabledSelectAll: DataTypes.bool,
            datasource: DataTypes.array,
            selectedIndex: DataTypes.array,
            cellRenderer: DataTypes.func,
            select: DataTypes.string
        })
    },
    onTableCommand(event) {
        this.fire('command', event);
    },
    onFilter(event) {
        this.fire('filter', event);
    },
    onSort(event) {
github ecomfe / san-xui / src / x / biz / LegacyActionAdapter.js View on Github external
function isSanPage(erAction) {
    return !!(erAction && erAction.page && erAction.SanPage);
}

export default defineComponent({
    template,
    components: {
        'ui-actionloader': ActionLoader,
        'ui-button': Button,
        'ui-dialog': Dialog
    },
    dataTypes: {
        dialog: DataTypes.bool,
        foot: DataTypes.bool,
        confirm: DataTypes.objectOf({
            label: DataTypes.string,
            disabled: DataTypes.bool
        }),
        actionOptions: DataTypes.objectOf({
            open: DataTypes.bool,
            width: DataTypes.number,
            height: DataTypes.number,
            title: DataTypes.string,
            url: DataTypes.string,
            module: DataTypes.string,
            needFoot: DataTypes.bool,
            options: DataTypes.objectOf({
                parentAction: DataTypes.object
            })
        })
    },
github ecomfe / san-xui / src / x / biz / LegacyActionAdapter.js View on Github external
dataTypes: {
        dialog: DataTypes.bool,
        foot: DataTypes.bool,
        confirm: DataTypes.objectOf({
            label: DataTypes.string,
            disabled: DataTypes.bool
        }),
        actionOptions: DataTypes.objectOf({
            open: DataTypes.bool,
            width: DataTypes.number,
            height: DataTypes.number,
            title: DataTypes.string,
            url: DataTypes.string,
            module: DataTypes.string,
            needFoot: DataTypes.bool,
            options: DataTypes.objectOf({
                parentAction: DataTypes.object
            })
        })
    },
    initData() {
        return {
            dialog: false,
            foot: true,
            confirm: {
                label: '确定',
                disabled: false
            },
            actionOptions: {
                open: false
            }
        };
github ecomfe / san-xui / src / x / forms / Form.js View on Github external
*/

import {defineComponent, DataTypes} from 'san';

import {create} from '../components/util';

const cx = create('ui-form');

export default defineComponent({
    roleType: 'Form',
    template: '<form class="{{mainClass}}">',
    dataTypes: {
        /**
         * 校验规则
         */
        rules: DataTypes.objectOf(DataTypes.function),

        /**
         * 表单错误
         */
        errors: DataTypes.object,

        /**
         * 表单数据
         * @default false
         */
        formData: DataTypes.object
    },
    computed: {
        mainClass() {
            return cx.mainClass(this);
        }</form>