|
@@ -2,11 +2,11 @@
|
|
|
* @Author: wjc
|
|
|
* @Date: 2021-09-15 16:03:17
|
|
|
* @LastEditors: wjc
|
|
|
- * @LastEditTime: 2021-09-16 11:23:18
|
|
|
+ * @LastEditTime: 2021-09-17 15:12:04
|
|
|
* @Description:
|
|
|
-->
|
|
|
<template>
|
|
|
- <div class="element-ui-pane">
|
|
|
+ <div class="element-ui-panel">
|
|
|
<el-scrollbar>
|
|
|
<div class="components-list">
|
|
|
<div v-for="(item, listIndex) in elementComponents" :key="listIndex">
|
|
@@ -44,12 +44,17 @@
|
|
|
<script>
|
|
|
import draggable from 'vuedraggable'
|
|
|
|
|
|
+import {
|
|
|
+ exportDefault, beautifierConf, isNumberStr, titleCase, deepClone, isObjectObject
|
|
|
+} from '@/utils/index'
|
|
|
import {
|
|
|
inputComponents, selectComponents, layoutComponents, formConf
|
|
|
} from '@/components/generator/config'
|
|
|
|
|
|
+let tempActiveData
|
|
|
+
|
|
|
export default {
|
|
|
- name: 'ElementUiPane',
|
|
|
+ name: 'ElementUiPanel',
|
|
|
components: {
|
|
|
draggable
|
|
|
},
|
|
@@ -81,13 +86,13 @@ export default {
|
|
|
// this.activeFormItem(clone)
|
|
|
},
|
|
|
cloneComponent(origin) {
|
|
|
- // const clone = deepClone(origin)
|
|
|
- // const config = clone.__config__
|
|
|
+ const clone = deepClone(origin)
|
|
|
+ const config = clone.__config__
|
|
|
// config.span = this.formConf.span // 生成代码时,会根据span做精简判断
|
|
|
// this.createIdAndKey(clone)
|
|
|
- // clone.placeholder !== undefined && (clone.placeholder += config.label)
|
|
|
- // tempActiveData = clone
|
|
|
- // return tempActiveData
|
|
|
+ clone.placeholder !== undefined && (clone.placeholder += config.label)
|
|
|
+ tempActiveData = clone
|
|
|
+ return tempActiveData
|
|
|
},
|
|
|
onEnd(obj) {
|
|
|
// if (obj.from !== obj.to) {
|
|
@@ -101,7 +106,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
- .element-ui-pane {
|
|
|
+ .element-ui-panel {
|
|
|
height: calc(100vh - 60px);
|
|
|
overflow: hidden;
|
|
|
.components-list {
|