Browse Source

修复级联导致页面不显示

old
wangqing 4 years ago
parent
commit
720730601b
  1. 2
      src/components/generator/config.js
  2. 6
      src/components/parser/Parser.vue
  3. 6
      src/views/form/editor/RightPanel.vue

2
src/components/generator/config.js

@ -602,7 +602,7 @@ export const assistComponents = [
typeId: 'DIVIDER', typeId: 'DIVIDER',
__config__: { __config__: {
label: '分割线', label: '分割线',
defaultValue: '分割线', defaultValue: '',
displayType: true, displayType: true,
showLabel: false, showLabel: false,
showDefaultValue: false, showDefaultValue: false,

6
src/components/parser/Parser.vue

@ -361,8 +361,10 @@ export default {
if (defaultValue instanceof Array) { if (defaultValue instanceof Array) {
defaultValue.forEach(item => { defaultValue.forEach(item => {
if (item) { if (item) {
let {label} = getObject(_.get(cur, tagOptionKey), 'value', item) let labelItem = getObject(_.get(cur, tagOptionKey), 'value', item)
labelStr += label + ',' if (labelItem) {
labelStr += labelItem.label + ','
}
} }
}) })
formData[cur.__vModel__] = labelStr formData[cur.__vModel__] = labelStr

6
src/views/form/editor/RightPanel.vue

@ -1409,8 +1409,8 @@ export default {
}); });
}, },
async blukAddSelectItems() { async blukAddSelectItems() {
var arrStrs = await navigator.clipboard.readText(); let arrStrs = await navigator.clipboard.readText();
var arr = arrStrs.split("\n"); let arr = arrStrs.split("\n");
if (arr.length > 1) { if (arr.length > 1) {
const options = []; const options = [];
for (let index = 0; index < arr.length; index++) { for (let index = 0; index < arr.length; index++) {
@ -1424,8 +1424,6 @@ export default {
} }
this.activeData.__slot__.options = options; this.activeData.__slot__.options = options;
} }
//console.log(res);
console.log(this.activeData);
}, },
addImageSelectItem() { addImageSelectItem() {
let lastItem = _.last(this.activeData.options); let lastItem = _.last(this.activeData.options);

Loading…
Cancel
Save