perf: 升级d2-crud-plus版本,分组示例增加图片上传和富文本

This commit is contained in:
xiaojunnuo@126.com
2020-09-03 11:05:49 +08:00
parent cfa627e06e
commit 09b9baa539
4 changed files with 38 additions and 39 deletions

View File

@@ -27,21 +27,17 @@ export const crudOptions = {
search: { disabled: false },
sortable: true
},
// {
// title: '图片',
// key: 'images',
// sortable: true,
// type: 'image-uploader',
// form: {
// component: {
// props: {
// uploader: {
// type: 'form'
// }
// }
// }
// }
// },
{
title: '图片',
key: 'images',
sortable: true,
type: 'image-uploader',
form: {
component: {
span: 24
}
}
},
{
title: '价格',
key: 'price',
@@ -59,13 +55,13 @@ export const crudOptions = {
sortable: true,
type: 'text-area'
},
// {
// title: '详情',
// key: 'content',
// sortable: true,
// type: 'editor-ueditor',
// disabled: true
// },
{
title: '详情',
key: 'content',
sortable: true,
type: 'editor-quill',
disabled: true
},
{
title: '自定义',
key: 'custom',

View File

@@ -81,7 +81,10 @@ Vue.use(D2pFileUploader)
Vue.use(D2pUploader, {
defaultType: 'form',
form: {
action: 'http://qiniu.veryreader.com/D2CrudPlusExample/upload/form/upload',
name: 'file'
action: 'http://d2p.veryreader.com:7070/api/upload/form/upload',
name: 'file',
successHandle (res) { // 上传成功后,后台返回结果处理
return { url: 'http://d2p.veryreader.com:7070' + res.data } // data是该文件的url
}
}
})