- {child}
+ colFormItem(h, currentItem, index, list) {
+ const {activeItem, changeLabel} = this.$listeners
+ const config = currentItem.__config__
+ const child = renderChildren.apply(this, arguments)
+ let className = this.activeId === config.formId ? 'drawing-item active-from-item' : 'drawing-item'
+ if (this.formConf.unFocusedComponentBorder) className += ' unfocus-bordered'
+ let labelWidth = config.labelWidth ? `${config.labelWidth}px` : null
+ if (config.showLabel === false) labelWidth = '0'
+ return (
+ {
+ activeItem(currentItem)
+ event.stopPropagation()
+ }}>
+
+ {
+ this.$set(config, 'defaultValue', event)
+ }}>
+ {child}
+
+
+ {components.itemBtns.apply(this, arguments)}
+
+ )
+ },
+ rowFormItem(h, currentItem, index, list) {
+ const {activeItem} = this.$listeners
+ const config = currentItem.__config__
+ const className = this.activeId === config.formId
+ ? 'drawing-row-item active-from-item'
+ : 'drawing-row-item'
+ let child = renderChildren.apply(this, arguments)
+ if (currentItem.type === 'flex') {
+ child =
+ {child}
- }
- return (
-
- { activeItem(currentItem); event.stopPropagation() }}>
- {config.componentName}
-
+ }
+ return (
+
+ {
+ activeItem(currentItem)
+ event.stopPropagation()
+ }}>
+ {config.componentName}
+
+ {child}
+
+ {components.itemBtns.apply(this, arguments)}
+
+
+ )
+ },
+ raw(h, currentItem, index, list) {
+ const config = currentItem.__config__
+ const child = renderChildren.apply(this, arguments)
+ return {
+ this.$set(config, 'defaultValue', event)
+ }}>
{child}
-
- {components.itemBtns.apply(this, arguments)}
-
-
- )
- },
- raw(h, currentItem, index, list) {
- const config = currentItem.__config__
- const child = renderChildren.apply(this, arguments)
- return {
- this.$set(config, 'defaultValue', event)
- }}>
- {child}
-
- }
+
+ }
}
function renderChildren(h, currentItem, index, list) {
- const config = currentItem.__config__
- if (!Array.isArray(config.children)) return null
- return config.children.map((el, i) => {
- const layout = layouts[el.__config__.layout]
- if (layout) {
- return layout.call(this, h, el, i, config.children)
- }
- return layoutIsNotFound.call(this)
- })
+ const config = currentItem.__config__
+ if (!Array.isArray(config.children)) return null
+ return config.children.map((el, i) => {
+ const layout = layouts[el.__config__.layout]
+ if (layout) {
+ return layout.call(this, h, el, i, config.children)
+ }
+ return layoutIsNotFound.call(this)
+ })
}
function layoutIsNotFound() {
- throw new Error(`没有与${this.currentItem.__config__.layout}匹配的layout`)
+ throw new Error(`没有与${this.currentItem.__config__.layout}匹配的layout`)
}
export default {
- components: {
- render,
- draggable
- },
- props: [
- 'currentItem',
- 'index',
- 'drawingList',
- 'activeId',
- 'formConf'
- ],
- render(h) {
- const layout = layouts[this.currentItem.__config__.layout]
+ components: {
+ render,
+ draggable
+ },
+ props: [
+ 'currentItem',
+ 'index',
+ 'drawingList',
+ 'activeId',
+ 'formConf'
+ ],
+ render(h) {
+ const layout = layouts[this.currentItem.__config__.layout]
- if (layout) {
- return layout.call(this, h, this.currentItem, this.index, this.drawingList)
+ if (layout) {
+ return layout.call(this, h, this.currentItem, this.index, this.drawingList)
+ }
+ return layoutIsNotFound.call(this)
}
- return layoutIsNotFound.call(this)
- }
}
+
diff --git a/src/views/form/ProjectForm.vue b/src/views/form/ProjectForm.vue
index ae8fbe7..db0639e 100644
--- a/src/views/form/ProjectForm.vue
+++ b/src/views/form/ProjectForm.vue
@@ -17,7 +17,7 @@
+ class="form-name-text" v-html="formConf.description">
diff --git a/src/views/form/RightPanel.vue b/src/views/form/RightPanel.vue
index d80bc1c..b35b022 100644
--- a/src/views/form/RightPanel.vue
+++ b/src/views/form/RightPanel.vue
@@ -1,1036 +1,1083 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.__config__.label }}{{item.__config__.tagIcon}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.__config__.label }}{{ item.__config__.tagIcon }}
-
-
-
-
-
-
-
-
- {{ activeData.__config__.componentName }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选择
-
-
-
-
-
-
- 选择
-
-
-
-
-
-
- 选择
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 默认
-
-
- 右侧
-
-
-
-
-
-
- 个字符
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text
-
-
- picture
-
-
- picture-card
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选项
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加选项
-
-
-
-
+
+
+
+
+
+
+
+
+ {{ activeData.__config__.componentName }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 默认
+
+
+ 右侧
+
+
+
+
+
+
+ 个字符
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text
+
+
+ picture
+
+
+ picture-card
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选项
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加选项
+
+
+ 添加其他
+
+
+
+
-
- 选项
-
-
-
-
-
-
-
-
-
-
+
+ 选项
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- 添加父级
-
-
-
-
+
+
+
+
+ 添加父级
+
+
+
+
-
-
-
- 默认
-
-
- 按钮
-
-
-
-
-
-
-
-
-
+
+
+
+ 默认
+
+
+ 按钮
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 中等
-
-
- 较小
-
-
- 迷你
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ label="组件尺寸"
+ >
+
+
+ 中等
+
+
+ 较小
+
+
+ 迷你
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- 布局结构树
-
+
+ 布局结构树
+
-
+
{{ node.label }}
-
-
+
+
-
- 正则校验
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加规则
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 中等
-
-
- 较小
-
-
- 迷你
-
-
-
-
-
-
- 左对齐
-
-
- 右对齐
-
-
- 顶部对齐
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ 正则校验
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加规则
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 中等
+
+
+ 较小
+
+
+ 迷你
+
+
+
+
+
+
+ 左对齐
+
+
+ 右对齐
+
+
+ 顶部对齐
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
diff --git a/src/views/form/editor.vue b/src/views/form/editor.vue
index 5741b5c..6d7de40 100644
--- a/src/views/form/editor.vue
+++ b/src/views/form/editor.vue
@@ -280,9 +280,9 @@ export default {
this.activeData = tempActiveData
this.activeId = this.idGlobal
}
+ this.onItemEnd(obj)
},
onItemEnd(obj) {
- console.log(obj)
let params = {'projectKey': this.projectKey}
if (this.drawingList[obj.newIndex - 1]) {
let sort1 = this.drawingList[obj.newIndex - 1].sort
diff --git a/src/views/project/MyProject.vue b/src/views/project/MyProject.vue
index 11681bc..a199fa9 100644
--- a/src/views/project/MyProject.vue
+++ b/src/views/project/MyProject.vue
@@ -69,6 +69,7 @@