You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.5 KiB

import {getToken} from "@/utils/auth";
export const addPropsMap = new Map([
["text", {
clearable: true
}],
["richtext",{}],
['radio',{
clearable: true
}],
["checkbox", {
collapseTags: true,
multiple: true,
clearable: true
}],
["date", {
clearable: true,
valueFormat: 'yyyy-MM-dd'
}],
["datetime", {
type: 'datetime',
clearable: true,
valueFormat: 'yyyy-MM-dd mm:hh:ss',
pickerOptions: {
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
}
}, {
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
}
}]
}
}],
["file",{
action: process.env.VUE_APP_UPLOAD_API,
headers: {
Authorization: `Bearer ${getToken()}`,
},
autoUpload: false,
multiple: false,
limit: 1
}],
["files",{
action: process.env.VUE_APP_UPLOAD_API,
headers: {
Authorization: `Bearer ${getToken()}`,
},
autoUpload: false,
multiple: true
}],
["textarea", {
clearable: true,
type: 'textarea',
autosize: {
'minRows': 2
}
}],
["map", "el-input"],
])