diff --git a/src/assets/icons/divider.svg b/src/assets/icons/divider.svg new file mode 100644 index 0000000..05b44aa --- /dev/null +++ b/src/assets/icons/divider.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/page.svg b/src/assets/icons/page.svg new file mode 100644 index 0000000..12981cf --- /dev/null +++ b/src/assets/icons/page.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/sign-pad.svg b/src/assets/icons/sign-pad.svg new file mode 100644 index 0000000..d79e773 --- /dev/null +++ b/src/assets/icons/sign-pad.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/form/SignPad/index.vue b/src/components/form/SignPad/index.vue index 0c919f9..1c39ce2 100644 --- a/src/components/form/SignPad/index.vue +++ b/src/components/form/SignPad/index.vue @@ -26,6 +26,15 @@ export default { value: { type: String, default: '' + }, + color: { + type: String, + default: '' + }, + // 文件上传地址 + action: { + type: String, + default: '' } }, data() { @@ -36,7 +45,7 @@ export default { config: { minWidth: 1, maxWidth: 3, - penColor: 'rgb(66, 133, 244)' + penColor: this.color } } }, @@ -98,7 +107,7 @@ export default { let config = { headers: {'Content-Type': 'multipart/form-data'} } - this.$api.post('/project/file/upload/77f1648542af4caf98deb8345a3d0406', param, config).then(res => { + this.$api.post(this.action, param, config).then(res => { this.signImageUrl = res.data this.$emit('input', res.data) }) diff --git a/src/components/form/pagination/index.vue b/src/components/form/pagination/index.vue new file mode 100644 index 0000000..dd4daf2 --- /dev/null +++ b/src/components/form/pagination/index.vue @@ -0,0 +1,41 @@ + + + + diff --git a/src/components/generator/config.js b/src/components/generator/config.js index 0fd8c5e..d4416b7 100644 --- a/src/components/generator/config.js +++ b/src/components/generator/config.js @@ -595,6 +595,28 @@ export const assistComponents = [ textAlign: 'left', style: {width: '100%'} }, + { + typeId: 'DIVIDER', + __config__: { + label: '分割线', + defaultValue: '分割线', + showLabel: false, + showDefaultValue: false, + showRequired: false, + showClearable: false, + showRegList: false, + tag: 'el-divider', + tagIcon: 'divider', + layout: 'colFormItem', + span: 24, + required: false, + regList: [], + changeTag: false + }, + color: '#000000', + style: {width: '100%'}, + action: '/project/file/upload/' + }, { typeId: 'SIGN_PAD', __config__: { @@ -606,15 +628,35 @@ export const assistComponents = [ showClearable: false, showRegList: false, tag: 'sign-pad', - tagIcon: 'text', + tagIcon: 'sign-pad', layout: 'colFormItem', span: 24, required: true, regList: [], changeTag: false }, - color: '', - textAlign: 'left', + color: '#000000', + style: {width: '100%'}, + action: '/project/file/upload/' + }, + { + typeId: 'PAGINATION', + __config__: { + label: '分页', + defaultValue: '分页', + showLabel: false, + showDefaultValue: false, + showRequired: false, + showClearable: false, + showRegList: false, + tag: 'pagination', + tagIcon: 'page', + layout: 'colFormItem', + span: 24, + required: false, + regList: [], + changeTag: false + }, style: {width: '100%'} } ] diff --git a/src/utils/convert.js b/src/utils/convert.js index a5c4854..f1971d1 100644 --- a/src/utils/convert.js +++ b/src/utils/convert.js @@ -78,7 +78,7 @@ export function dbDataConvertForItemJson(data) { } } // 不同项目地址区分 动态修改上传地址 - if (jsonItem.__config__.tag === 'el-upload') { + if (jsonItem.action) { jsonItem.action = jsonItem.action + data.projectKey } jsonItem.regList = data.regList @@ -177,6 +177,15 @@ const dataParams = { // 图片轮播 'IMAGE_CAROUSEL': { 'options': '__slot__.options' + }, + // 文字描述 + 'DESC_TEXT': { + 'color': 'color', + 'textAlign': 'textAlign' + }, + // 手写签名 + 'SIGN_PAD': { + 'color': 'color' } } diff --git a/src/views/form/RightPanel.vue b/src/views/form/RightPanel.vue index 7a79c64..1b106a6 100644 --- a/src/views/form/RightPanel.vue +++ b/src/views/form/RightPanel.vue @@ -679,7 +679,7 @@ - + 左对齐 diff --git a/src/views/test.vue b/src/views/test.vue index ac35998..79d7258 100644 --- a/src/views/test.vue +++ b/src/views/test.vue @@ -1,16 +1,18 @@