Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<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: '' // 副标题样式
};
}
});
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,
>
{{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'
}
<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,
/**
**/
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');
},
* 设置或者获取控件的选中状态
*
* @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);
/**
* @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 = [];
name="{{route.name}}"
path="{{route.path || route.name}}"
currentPath="{{path}}"
component="{{route.component}}"
components="{{route.components}}"
index="{{index}}" />
`;
static components = {
'sm-nav-item': NavigatorItem
};
static dataTypes = {
routes: DataTypes.arrayOf(DataTypes.shape(NavigatorItem.dataTypes)),
path: DataTypes.string
};
}
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,
* @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>