Commit eb6b80db by xinla

智能表单选择问题,render props重名冲突问题

1 parent 09e8a410
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"driver.js": "^0.9.8", "driver.js": "^0.9.8",
"echarts": "^5.4.2", "echarts": "^5.4.2",
"element-plus": "^2.3.6", "element-plus": "^2.3.7",
"fabric": "^5.3.0", "fabric": "^5.3.0",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"fuse.js": "^6.6.2", "fuse.js": "^6.6.2",
......
...@@ -61,13 +61,7 @@ const layouts = { ...@@ -61,13 +61,7 @@ const layouts = {
: '' : ''
}></div> }></div>
<div class={element.formCodeId == '1' && !element.src ? 'nullC' : ''}> <div class={element.formCodeId == '1' && !element.src ? 'nullC' : ''}>
<render <render key={element.renderKey} conf={element} />
key={element.renderKey}
conf={element}
onInput={(event) => {
element.defaultValue = event
}}
/>
</div> </div>
</div> </div>
<div class={element.formCodeId == 4 ? 'elementInputNum' : 'nullC'}> <div class={element.formCodeId == 4 ? 'elementInputNum' : 'nullC'}>
......
...@@ -537,7 +537,11 @@ import TreeNodeDialog from './TreeNodeDialog' ...@@ -537,7 +537,11 @@ import TreeNodeDialog from './TreeNodeDialog'
import { isNumberStr } from '@/utils/index' import { isNumberStr } from '@/utils/index'
import IconsDialog from './IconsDialog' import IconsDialog from './IconsDialog'
import draggable from 'vuedraggable' import draggable from 'vuedraggable'
import { inputComponents, selectComponents, layoutComponents } from './generator/config' import {
inputComponents,
// selectComponents,
layoutComponents,
} from './generator/config'
const dateTimeFormat = { const dateTimeFormat = {
date: 'YYYY-MM-DD', date: 'YYYY-MM-DD',
...@@ -696,18 +700,18 @@ export default { ...@@ -696,18 +700,18 @@ export default {
} }
return [] return []
}, },
tagList() { // tagList() {
return [ // return [
{ // {
label: '输入型组件', // label: '输入型组件',
options: inputComponents, // options: inputComponents,
}, // },
{ // {
label: '选择型组件', // label: '选择型组件',
options: selectComponents, // options: selectComponents,
}, // },
] // ]
}, // },
}, },
methods: { methods: {
numberChange(val, max) { numberChange(val, max) {
......
...@@ -46,9 +46,9 @@ function vModel(self, dataObject, defaultValue) { ...@@ -46,9 +46,9 @@ function vModel(self, dataObject, defaultValue) {
// } // }
// console.log('dataObject.props', dataObject.props) // console.log('dataObject.props', dataObject.props)
dataObject['model-value'] = defaultValue dataObject['modelValue'] = self.conf.defaultValue
dataObject.onInput = (val) => { dataObject['onUpdate:modelValue'] = (val) => {
self.$emit('input', val) self.conf.defaultValue = val
} }
} }
...@@ -165,6 +165,13 @@ export default { ...@@ -165,6 +165,13 @@ export default {
} }
Object.assign(dataObject, confClone) Object.assign(dataObject, confClone)
for (const key in dataObject._props) {
if (Object.hasOwnProperty.call(dataObject._props, key)) {
dataObject[key] = dataObject._props[key];
}
}
delete dataObject._props
// Object.keys(confClone).forEach((key) => { // Object.keys(confClone).forEach((key) => {
// const val = confClone[key] // const val = confClone[key]
// if (key === 'style') { // if (key === 'style') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!