diff --git a/plugins/core/controls/control/base/polygon.ts b/plugins/core/controls/control/base/polygon.ts index 02ff22c..a4a369b 100644 --- a/plugins/core/controls/control/base/polygon.ts +++ b/plugins/core/controls/control/base/polygon.ts @@ -404,6 +404,19 @@ export default { 'type': [1, 2], //类别,1图形,2业务,3事件 'readonly': true, }, + { + 'code': 'text1', + 'name': '文本1', + 'desc': '控件的主体显示文本', + 'controlType': 'excheckbox', + 'dataType': 'integer', + 'dataSource': [{ 'text': '文本', 'value': 0 }, { 'text': '数字', 'value': 1 }, { 'text': '金额', 'value': 2 }, { 'text': '时间', 'value': 3 }], + 'itemStyle': { width: 80, height: 25, col: 2, row: 0, imgWidth: 20, imgHeight: 20 }, + 'isArray':true, + 'defaultValue': [1,2], + 'type': [1, 2], //类别,1图形,2业务,3事件 + 'readonly': true, + }, { 'code': 'fmt.type', 'name': '格式', @@ -521,7 +534,7 @@ export default { subGroups: [ { name: "基础信息", - attrs: ["code", "text", "fmt.type", "fmt.nscale", "fmt.tmark", "fmt.mmark", "fmt.munit", "fmt.mrmb", "fmt.dtype", "fmt.format"] + attrs: ["code", "text", "text1", "fmt.type", "fmt.nscale", "fmt.tmark", "fmt.mmark", "fmt.munit", "fmt.mrmb", "fmt.dtype", "fmt.format"] }, ] diff --git a/plugins/core/hotkeys/actions/key-action-copy-image.ts b/plugins/core/hotkeys/actions/key-action-copy-image.ts index d1316d4..7b4bf5a 100644 --- a/plugins/core/hotkeys/actions/key-action-copy-image.ts +++ b/plugins/core/hotkeys/actions/key-action-copy-image.ts @@ -109,10 +109,16 @@ class DDeiKeyActionCopyImage extends DDeiKeyAction { ctx.translate(-outRect.x * rat1 + addWidth / 2, -outRect.y * rat1 + addWidth / 2) containerDiv.appendChild(canvas) - models.forEach(item => { - item.render.clearCachedValue() - item.render.drawShape(); + + models[0].pModel.midList.forEach(mid=>{ + models.forEach(item => { + if (item.id == mid){ + item.render.clearCachedValue() + item.render.drawShape({}); + } + }) }) + ddInstance.render.ratio = oldRat1 let dataURL = canvas.toDataURL() diff --git a/plugins/core/hotkeys/actions/key-action-copy.ts b/plugins/core/hotkeys/actions/key-action-copy.ts index ede8fbc..e6ae388 100644 --- a/plugins/core/hotkeys/actions/key-action-copy.ts +++ b/plugins/core/hotkeys/actions/key-action-copy.ts @@ -64,13 +64,24 @@ class DDeiKeyActionCopy extends DDeiKeyAction { let selectedControls = ddInstance.stage.selectedModels; //存在选中控件 if (selectedControls?.size > 0) { + //按照midlist排序输出 + let models = Array.from(selectedControls.values()) + let sortedModels = [] + models[0].pModel.midList.forEach(mid => { + models.forEach(item => { + if (item.id == mid) { + sortedModels.push(item) + } + }) + }) //生成控件HTML let copyHtml = '
'; copyHtml += '' let jsonStr = '[' let jsonLinksStr = '[' let innerHTML = '' - selectedControls?.forEach((model, key) => { + + sortedModels?.forEach((model, key) => { if (selectedControls?.size == 1) { if (model.baseModelType == "DDeiTable") { if (model.curRow == -1 && model.curCol == -1) { diff --git a/plugins/core/propeditors/PVAlignTypeEditor.vue b/plugins/core/propeditors/PVAlignTypeEditor.vue index 640f412..8d69ac4 100644 --- a/plugins/core/propeditors/PVAlignTypeEditor.vue +++ b/plugins/core/propeditors/PVAlignTypeEditor.vue @@ -1,6 +1,7 @@