How to use the san.DataTypes.string 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 ecomfe / san-mui / src / Card / CardMedia.js View on Github external
<div class="${cx.getPartClassName('sub-title')} {{subTitleClass}}">
                    {{title}}
                </div>
            
        
    `,

    computed: {
        styleClass() {
            return cx(this).build();
        }
    },

    dataTypes: {
        title: DataTypes.string,
        subTitle: DataTypes.string,
        titleClass: DataTypes.string,
        subTitleClass: DataTypes.string
    },

    initData() {
        return {
            title: '', // 标题
            subTitle: '', // 副标题
            titleClass: '', // 标题样式
            subTitleClass: '' // 副标题样式
        };
    }
});
github ecomfe / santd / santd / timepicker / src / timepicker.js View on Github external
dataTypes: {
        prefixCls: DataTypes.string,
        clearText: DataTypes.string,
        value: DataTypes.object,
        defaultOpenValue: DataTypes.object,
        inputReadOnly: DataTypes.bool,
        disabled: DataTypes.bool,
        allowClear: DataTypes.bool,
        defaultValue: DataTypes.object,
        open: DataTypes.bool,
        defaultOpen: DataTypes.bool,
        align: DataTypes.object,
        popupPlacement: DataTypes.string,
        transitionName: DataTypes.string,
        getPopupContainer: DataTypes.func,
        timePlaceholder: DataTypes.string,
        format: DataTypes.string,
        showHour: DataTypes.bool,
        showMinute: DataTypes.bool,
        showSecond: DataTypes.bool,
        style: DataTypes.oneOfType([DataTypes.object, DataTypes.string]),
        className: DataTypes.string,
        popupClassName: DataTypes.string,
        popupStyle: DataTypes.object,
        disabledHours: DataTypes.func,
        disabledMinutes: DataTypes.func,
        disabledSeconds: DataTypes.func,
        hideDisabledOptions: DataTypes.bool,
        addon: DataTypes.func,
        name: DataTypes.string,
        autoComplete: DataTypes.string,
        use12Hours: DataTypes.bool,
github baidu / san-devtool / src / panel / components / misc / inspectable_button.js View on Github external
&gt;
                
                    {{iconName}}
                
                {{text}}
            
        
    `;

    static components = {
        'san-button': Button,
        'san-icon': Icon
    };

    static dataTypes = {
        cid: DataTypes.oneOfType([DataTypes.string, DataTypes.number]),
        variants: DataTypes.string,
        hasIcon: DataTypes.bool,
        iconName: DataTypes.string,
        spacing: DataTypes.string,
        text: DataTypes.oneOfType([DataTypes.string, DataTypes.number])
    };

    initData() {
        return {
            cid: '',
            variants: 'info',
            hasIcon: false,
            iconName: '',
            spacing: '0',
            text: 'Inspect'
        }
github ecomfe / san-xui / src / x / components / asDrawer.js View on Github external
<div class="iconfont icon-close ${cx('close')}"></div>
            
        `,

        dataTypes: {
            /**
             * Drawer top 距离
             * @default 0px
             */
            top: DataTypes.string,
            /**
             * 宽度,`expandTo`为 `left|right` 时候有效
             * @default 400px
             */
            width: DataTypes.string,
            /**
             * 高度,`expandTo`为 `top|bottom` 时候有效
             * @default 400px
             */
            height: DataTypes.string,
            /**
             * 传递给业务组件的参数
             * @default {}
             */
            payload: DataTypes.any,
            /**
             * 是否打开
             * @default false
             */
            expand: DataTypes.bool,
            /**
github ecomfe / santd / src / calendar / src / calendar / calendarFooter.js View on Github external
**/

import san, {DataTypes} from 'san';
import TodayButton from './todayButton';
import OkButton from './okButton';
import TimepickerButton from './timepickerButton';

export default san.defineComponent({
    dataTypes: {
        prefixCls: DataTypes.string,
        showDateInput: DataTypes.bool,
        disabledDate: DataTypes.func,
        disabledTime: DataTypes.func,
        selectedValue: DataTypes.object,
        value: DataTypes.object,
        mode: DataTypes.string,
        defaultValue: DataTypes.object
    },
    components: {
        's-todaybutton': TodayButton,
        's-okbutton': OkButton,
        's-timepickerbutton': TimepickerButton
    },
    handleOk() {
        this.fire('ok');
    },
    handleToday() {
        this.fire('today');
    },
    handleCloseTimePicker() {
        this.fire('closeTimePicker');
    },
github ecomfe / san-xui / src / x / components / CheckBox.js View on Github external
* 设置或者获取控件的选中状态
         *
         * @bindx
         * @default false
         */
        checked: DataTypes.bool,

        /**
         * 控件的禁用状态
         */
        disabled: DataTypes.bool,

        /**
         * 控件的文案
         */
        title: DataTypes.string
    },
    computed: {
        mainClass() {
            return cx.mainClass(this);
        }
    },
    onChange(e) {
        this.fire('change', {value: e.target.checked});
    },
    onClick(e) {
        this.fire('click', e);
    }
});


export default asInput(CheckBox);
github ecomfe / santd / src / collapse / collapse.js View on Github external
/**
 * @file Santd collapse collapse source file
 * @author mayihui@baidu.com
 **/

import san, {DataTypes} from 'san';
import {classCreator} from '../core/util';

const prefixCls = classCreator('collapse')();

export default san.defineComponent({
    dataTypes: {
        activeKey: DataTypes.oneOfType([DataTypes.string, DataTypes.array]),
        defaultActiveKey: DataTypes.oneOfType([DataTypes.string, DataTypes.array]),
        acordion: DataTypes.bool,
        destroyInactivePanel: DataTypes.bool
    },

    initData() {
        return {
            bordered: true,
            accordion: false,
            destroyInactivePanel: false
        };
    },

    inited() {
        this.panelChildren = [];
github ecomfe / san-mui / example / AppNavigator.js View on Github external
name="{{route.name}}"
                path="{{route.path || route.name}}"
                currentPath="{{path}}"
                component="{{route.component}}"
                components="{{route.components}}"
                index="{{index}}" /&gt;
        
    `;

    static components = {
        'sm-nav-item': NavigatorItem
    };

    static dataTypes = {
        routes: DataTypes.arrayOf(DataTypes.shape(NavigatorItem.dataTypes)),
        path: DataTypes.string
    };

}
github ecomfe / santd / src / timepicker / index.js View on Github external
dataTypes: {
        clearText: DataTypes.string,
        value: DataTypes.object,
        defaultOpenValue: DataTypes.object,
        inputReadOnly: DataTypes.bool,
        disabled: DataTypes.bool,
        allowClear: DataTypes.bool,
        defaultValue: DataTypes.object,
        open: DataTypes.bool,
        defaultOpen: DataTypes.bool,
        align: DataTypes.object,
        popupPlacement: DataTypes.string,
        transitionName: DataTypes.string,
        getPopupContainer: DataTypes.func,
        timePlaceholder: DataTypes.string,
        format: DataTypes.string,
        showHour: DataTypes.bool,
        showMinute: DataTypes.bool,
        showSecond: DataTypes.bool,
        popupClassName: DataTypes.string,
        popupStyle: DataTypes.object,
        disabledHours: DataTypes.func,
        disabledMinutes: DataTypes.func,
        disabledSeconds: DataTypes.func,
        hideDisabledOptions: DataTypes.bool,
        name: DataTypes.string,
        autoComplete: DataTypes.string,
        use12Hours: DataTypes.bool,
        hourStep: DataTypes.number,
        minuteStep: DataTypes.number,
        secondStep: DataTypes.number,
        focusOnOpen: DataTypes.bool,
github ecomfe / santd / src / card / card.js View on Github external
* @file 组件 card
 * @author chenkai13 
 */

import './style/index.less';
import san, {DataTypes} from 'san';
import {classCreator} from '../core/util';
import LoadingBlock from './loadingBlock';
import Tabs from '../tabs';

const prefix = classCreator('card')();
export default san.defineComponent({
    dataTypes: {
        type: DataTypes.string,
        title: DataTypes.string,
        size: DataTypes.string,
        tabList: DataTypes.array,
        loading: DataTypes.bool,
        hoverable: DataTypes.bool,
        defaultActiveKey: DataTypes.string,
        activeTabKey: DataTypes.string,
        bordered: DataTypes.bool,
        actions: DataTypes.array
    },
    template: `
        <div class="{{cls}}">
            <div style="{{headStyle}}" class="${prefix}-head">
                <div class="${prefix}-head-wrapper">
                    <div class="${prefix}-head-title">{{title}}</div>
                    <div class="${prefix}-extra">
                        
                    </div></div></div></div>