Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
`;
/* eslint-enable max-len */
static computed = {
computedClassName() {
return cx(this).build();
},
[totalPageKey]() {
return Math.ceil(this.data.get(totalKey) / this.data.get(pageSizeKey)) || 0;
}
};
static dataTypes = {
total: DataTypes.number.isRequired,
pageSize: DataTypes.number.isRequired,
showSizeChanger: DataTypes.bool,
pageSizeOptions: DataTypes.arrayOf(DataTypes.number).isRequired,
nextPageText: DataTypes.string,
lastPageText: DataTypes.string
};
initData() {
// default data
return {
[pageSizeKey]: defaultPageSize,
[currentKey]: defaultCurrent,
[showSizeChangerKey]: true,
[pageSizeOptionsKey]: defaultPageSizeOption,
// 除去页首和页尾以多少个为一组,五个为一组则最多展示五个页码
pageGroupLen
};
}
adjustX: 0,
adjustY: 1
}
},
topLeft: {
points: ['bl', 'tl'],
offset: [0, -4],
overflow: {
adjustX: 0,
adjustY: 1
}
}
};
const valueType = DataTypes.oneOfType([
DataTypes.string,
DataTypes.arrayOf(DataTypes.string),
DataTypes.number,
DataTypes.arrayOf(DataTypes.number)
]);
export default san.defineComponent({
template: `
<div class="{{wrapClass}}">
</div>
}
},
topLeft: {
points: ['bl', 'tl'],
offset: [0, -4],
overflow: {
adjustX: 0,
adjustY: 1
}
}
};
const valueType = DataTypes.oneOfType([
DataTypes.string,
DataTypes.arrayOf(DataTypes.string),
DataTypes.number,
DataTypes.arrayOf(DataTypes.number)
]);
export default san.defineComponent({
template: `
<div class="{{wrapClass}}">
</div>
/**
* @file Santd calendar date input file
* @author mayihui@baidu.com
**/
import san, {DataTypes} from 'san';
import moment from 'moment';
import {formatDate} from '../util/index';
import KeyCode from '../../../core/util/keyCode';
export default san.defineComponent({
dataTypes: {
prefixCls: DataTypes.string,
value: DataTypes.object,
disabledTime: DataTypes.func,
format: DataTypes.oneOfType([DataTypes.string, DataTypes.arrayOf(DataTypes.string)]),
locale: DataTypes.object,
disabledDate: DataTypes.func,
placeholder: DataTypes.string,
selectedValue: DataTypes.object,
inputMode: DataTypes.string
},
initData() {
return {
showDate: '',
invalid: false,
hasFocus: true
};
},
inited() {
* @file 组件 skeleton/Paragraph
* @author baozhixin
* @borrows https://ant.design/components/skeleton-cn/
*/
import san, {DataTypes} from 'san';
import {classCreator} from '../core/util';
const prefixCls = classCreator('skeleton')('paragraph');
const widthUnit = DataTypes.oneOfType([DataTypes.number, DataTypes.string]);
export const SkeletonParagraphProps = DataTypes.oneOfType([
DataTypes.bool,
DataTypes.shape({
rows: DataTypes.number,
width: DataTypes.oneOfType([widthUnit, DataTypes.arrayOf(widthUnit)])
})
]);
export default san.defineComponent({
template: `
<ul class="${prefixCls}">
<li style="{{index | getWidth(props)}}">
</li></ul>
`,
dataTypes: {
props: SkeletonParagraphProps
},
computed: {
rowList() {
const rows = this.data.get('props.rows') || 0;
return new Array(rows);
'tags',
'combobox',
SECRET_COMBOBOX_MODE_DO_NOT_USE
]),
notFoundContent: DataTypes.string,
optionFilterProp: DataTypes.string,
optionLabelProp: DataTypes.string,
placeholder: DataTypes.string,
showArrow: DataTypes.bool,
showSearch: DataTypes.bool,
size: DataTypes.oneOf([
'default',
'large',
'small'
]),
tokenSeparators: DataTypes.arrayOf(DataTypes.string),
value: valueType,
defaultOpen: DataTypes.bool,
open: DataTypes.bool,
loading: DataTypes.bool
},
computed: {
modeConfig() {
const mode = this.data.get('mode');
const multiple = mode === 'multiple';
const tags = mode === 'tags';
const combobox = mode === 'combobox' || mode === SECRET_COMBOBOX_MODE_DO_NOT_USE;
return {
multiple,
tags,
>
`,
dataTypes: {
compact: DataTypes.bool,
wholeLineSelected: DataTypes.bool,
keepingSelected: DataTypes.bool,
defaultSelectedIdentity: DataTypes.string,
filterBar: DataTypes.bool,
filterBarHintText: DataTypes.string,
dataSource: DataTypes.oneOf(['ATTRIBUTE', 'JSON']),
highlighted: DataTypes.bool,
treeData: DataTypes.arrayOf(DataTypes.object),
loading: DataTypes.bool,
loadingToast: DataTypes.string,
loadingAsync: DataTypes.bool,
progress: DataTypes.number
},
components: {
'san-icon': Icon,
'san-text-field': TextField,
'san-tree-view-item': TreeViewItem,
},
inited() {
},
initData() {