diff --git a/package-lock.json b/package-lock.json index 437afc1..e7ecc02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.2.11-54", "license": "Apache License 2.0", "dependencies": { - "ddei-framework": "file:../ddei-framework/ddei-framework-1.2.35-36.tgz" + "ddei-framework": "file:../ddei-framework/ddei-framework-1.2.35-37.tgz" }, "devDependencies": { "@tsconfig/node18": "^18.2.0", @@ -518,9 +518,9 @@ "integrity": "sha512-tdMuLdcJyreope1BWfnYqTQaIkSIrU/KtY9yX5mNGd+tYeJ0Y99ARHDuYnEABPX/8yh/r0Kl169v5ODg2vr98g==" }, "node_modules/ddei-framework": { - "version": "1.2.35-36", - "resolved": "file:../ddei-framework/ddei-framework-1.2.35-36.tgz", - "integrity": "sha512-OEBGy7BrJ0Z1rwqqBD33rYTp+5JeB1B6/NY1HDndZriI5h7qNL2OJs62T3GbEdAtTHSB/jo6utrCO6/k2f0ReA==", + "version": "1.2.35-37", + "resolved": "file:../ddei-framework/ddei-framework-1.2.35-37.tgz", + "integrity": "sha512-1A0XS0drcIx4p5NOE9asPhLwLlQfc4vSlUpXgZf/Kmp0+RnX2ZFnegdTpdisI3jX8ZKmv0/jPV/QX0vN24b9sA==", "license": "Apache License 2.0", "dependencies": { "ddei-autolink": "^1.1.1", diff --git a/package.json b/package.json index 445264c..03af8ef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ddei-editor", - "version": "1.2.11-54", + "version": "1.2.11-56", "private": false, "type": "module", "author": "hoslay <3697355039@qq.com>", @@ -49,7 +49,7 @@ "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false" }, "dependencies": { - "ddei-framework": "file:../ddei-framework/ddei-framework-1.2.35-36.tgz" + "ddei-framework": "file:../ddei-framework/ddei-framework-1.2.35-38.tgz" }, "devDependencies": { "@tsconfig/node18": "^18.2.0", diff --git a/plugins/core/components/buttons/QBTBorderDash.vue b/plugins/core/components/buttons/QBTBorderDash.vue index 6161faf..26455d9 100644 --- a/plugins/core/components/buttons/QBTBorderDash.vue +++ b/plugins/core/components/buttons/QBTBorderDash.vue @@ -52,11 +52,14 @@ export default { , editor: { type: DDeiEditor, default: null, + }, + controlDefine: { + type: Object, + default: null, } }, data() { return { - controlDefine: null, attrDefine: null, value: null }; @@ -73,18 +76,16 @@ export default { }, methods: { refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); - let valueDefine = this.getDataValue(); - if (valueDefine && !valueDefine.isDefault) { - this.value = valueDefine.value; - } - } else { - this.attrDefine = null + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); + let valueDefine = this.getDataValue(); + if (valueDefine && !valueDefine.isDefault) { + this.value = valueDefine.value; } + } else { + this.attrDefine = null } + }, //打开弹出框 diff --git a/plugins/core/components/buttons/QBTBorderWeight.vue b/plugins/core/components/buttons/QBTBorderWeight.vue index fe45252..9e6291b 100644 --- a/plugins/core/components/buttons/QBTBorderWeight.vue +++ b/plugins/core/components/buttons/QBTBorderWeight.vue @@ -52,10 +52,14 @@ export default { type: DDeiEditor, default: null, } + , + controlDefine: { + type: Object, + default: null, + } }, data() { return { - controlDefine: null, attrDefine: null, value: null, @@ -73,18 +77,15 @@ export default { }, methods: { refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); - let valueDefine = this.getDataValue(); - if (valueDefine && !valueDefine.isDefault) { - this.value = valueDefine.value; - } - - } else { - this.attrDefine = null + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); + let valueDefine = this.getDataValue(); + if (valueDefine && !valueDefine.isDefault) { + this.value = valueDefine.value; } + + } else { + this.attrDefine = null } }, diff --git a/plugins/core/components/buttons/QBTEditAddFontSize.vue b/plugins/core/components/buttons/QBTEditAddFontSize.vue index 3dbb842..1d63745 100644 --- a/plugins/core/components/buttons/QBTEditAddFontSize.vue +++ b/plugins/core/components/buttons/QBTEditAddFontSize.vue @@ -47,11 +47,14 @@ export default { , editor: { type: DDeiEditor, default: null, + }, + controlDefine: { + type: Object, + default: null, } }, data() { return { - controlDefine: null, attrDefine: null, value: 0 }; @@ -75,19 +78,17 @@ export default { refreshEditor() { this.value = 0; - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); - let valueDefine = this.getDataValue(); + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); + let valueDefine = this.getDataValue(); - if (valueDefine) { - this.value = valueDefine.value; - } - } else { - this.attrDefine = null + if (valueDefine) { + this.value = valueDefine.value; } + } else { + this.attrDefine = null } + }, //获取数据值 diff --git a/plugins/core/components/buttons/QBTEditBox.vue b/plugins/core/components/buttons/QBTEditBox.vue index 31712b9..85ca93e 100644 --- a/plugins/core/components/buttons/QBTEditBox.vue +++ b/plugins/core/components/buttons/QBTEditBox.vue @@ -58,11 +58,14 @@ export default { , editor: { type: DDeiEditor, default: null, + }, + controlDefine: { + type: Object, + default: null, } }, data() { return { - controlDefine: null, attrDefine: null, value: false, }; @@ -92,23 +95,20 @@ export default { return; } this.value = false; - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get( - this.attrCode - ); - let valueDefine = this.getDataValue(); - if ( - valueDefine && - !valueDefine.isDefault && - valueDefine.value + "" == this.selectedValue + "" - ) { - this.value = true; - } - } else { - this.attrDefine = null; + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get( + this.attrCode + ); + let valueDefine = this.getDataValue(); + if ( + valueDefine && + !valueDefine.isDefault && + valueDefine.value + "" == this.selectedValue + "" + ) { + this.value = true; } + } else { + this.attrDefine = null; } }, diff --git a/plugins/core/components/buttons/QBTEditColor.vue b/plugins/core/components/buttons/QBTEditColor.vue index e5dec78..d70dba4 100644 --- a/plugins/core/components/buttons/QBTEditColor.vue +++ b/plugins/core/components/buttons/QBTEditColor.vue @@ -43,11 +43,14 @@ export default { , editor: { type: DDeiEditor, default: null, + }, + controlDefine: { + type: Object, + default: null, } }, data() { return { - controlDefine: null, attrDefine: null, value: null }; @@ -69,17 +72,14 @@ export default { }, methods: { refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); - let valueDefine = this.getDataValue(); - if (valueDefine && !valueDefine.isDefault) { - this.value = valueDefine.value; - } - } else { - this.attrDefine = null + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); + let valueDefine = this.getDataValue(); + if (valueDefine && !valueDefine.isDefault) { + this.value = valueDefine.value; } + } else { + this.attrDefine = null } }, diff --git a/plugins/core/components/buttons/QBTEditTextAlign.vue b/plugins/core/components/buttons/QBTEditTextAlign.vue index 748b033..edc42f2 100644 --- a/plugins/core/components/buttons/QBTEditTextAlign.vue +++ b/plugins/core/components/buttons/QBTEditTextAlign.vue @@ -37,11 +37,14 @@ export default { , editor: { type: DDeiEditor, default: null, + }, + controlDefine: { + type: Object, + default: null, } }, data() { return { - controlDefine: null, attrDefine: null, valignAttrDefine: null, value: false, @@ -70,21 +73,19 @@ export default { }, refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get( - "textStyle.align" - ); - this.valignAttrDefine = this.controlDefine.attrDefineMap.get( - "textStyle.valign" - ); + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get( + "textStyle.align" + ); + this.valignAttrDefine = this.controlDefine.attrDefineMap.get( + "textStyle.valign" + ); - } else { - this.attrDefine = null; - this.valignAttrDefine = null; - } + } else { + this.attrDefine = null; + this.valignAttrDefine = null; } + }, diff --git a/plugins/core/components/buttons/QBTFontFamily.vue b/plugins/core/components/buttons/QBTFontFamily.vue index 8ccc848..0bffdcc 100644 --- a/plugins/core/components/buttons/QBTFontFamily.vue +++ b/plugins/core/components/buttons/QBTFontFamily.vue @@ -39,11 +39,14 @@ export default { editor: { type: DDeiEditor, default: null, + }, + controlDefine:{ + type:Object, + default:null, } }, data() { return { - controlDefine: null, attrDefine: null, dataSource: null, value: null, @@ -71,29 +74,26 @@ export default { methods: { refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get("font.family"); - } else { - this.attrDefine = null; - } - - this.getDataSource(this.attrDefine); - let type = this.getDataValue(); - let define = this.getDataDefine(type.value); - if (!type.isDefault) { - this.attrDefine.value = type.value; - this.text = define.text; - if (define.img) { - this.$refs.combox.img = define.img; - } - } else { - this.defaultText = define.text; - } - this.value = type.value; + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get("font.family"); + } else { + this.attrDefine = null; } + + this.getDataSource(this.attrDefine); + let type = this.getDataValue(); + let define = this.getDataDefine(type.value); + if (!type.isDefault) { + this.attrDefine.value = type.value; + this.text = define.text; + if (define.img) { + this.$refs.combox.img = define.img; + } + } else { + this.defaultText = define.text; + } + this.value = type.value; + }, diff --git a/plugins/core/components/buttons/QBTFontSize.vue b/plugins/core/components/buttons/QBTFontSize.vue index 3989f1f..f916751 100644 --- a/plugins/core/components/buttons/QBTFontSize.vue +++ b/plugins/core/components/buttons/QBTFontSize.vue @@ -37,11 +37,14 @@ export default { , editor: { type: DDeiEditor, default: null, + }, + controlDefine: { + type: Object, + default: null, } }, data() { return { - controlDefine: null, attrDefine: null, dataSource: null, value: null, @@ -67,30 +70,27 @@ export default { methods: { refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get("font.size"); - } else { - this.attrDefine = null; - } - if (this.attrDefine) { - this.getDataSource(this.attrDefine); - let type = this.getDataValue() + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get("font.size"); + } else { + this.attrDefine = null; + } + if (this.attrDefine) { + this.getDataSource(this.attrDefine); + let type = this.getDataValue() - let define = this.getDataDefine(type.value); - if (!type.isDefault) { - this.attrDefine.value = type.value; - this.text = define.text; - } else { - this.defaultText = define.text; - } - if (this.attrDefine.value) { - this.value = this.attrDefine.value; - this.text = this.attrDefine.value; - } else { - this.value = type.value; - } + let define = this.getDataDefine(type.value); + if (!type.isDefault) { + this.attrDefine.value = type.value; + this.text = define.text; + } else { + this.defaultText = define.text; + } + if (this.attrDefine.value) { + this.value = this.attrDefine.value; + this.text = this.attrDefine.value; + } else { + this.value = type.value; } } }, diff --git a/plugins/core/components/buttons/QBTLinePointType.vue b/plugins/core/components/buttons/QBTLinePointType.vue index f8a25cd..27b0b96 100644 --- a/plugins/core/components/buttons/QBTLinePointType.vue +++ b/plugins/core/components/buttons/QBTLinePointType.vue @@ -44,10 +44,14 @@ export default { type: DDeiEditor, default: null, } + , + controlDefine: { + type: Object, + default: null, + } }, data() { return { - controlDefine: null, attrDefine: null, value: null, text: "" @@ -79,18 +83,15 @@ export default { this.text = text }, refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); - let valueDefine = this.getDataValue(); - if (valueDefine && !valueDefine.isDefault) { - this.value = valueDefine.value; - } - - } else { - this.attrDefine = null + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); + let valueDefine = this.getDataValue(); + if (valueDefine && !valueDefine.isDefault) { + this.value = valueDefine.value; } + + } else { + this.attrDefine = null } this.refreshText(); }, diff --git a/plugins/core/components/buttons/QBTLineType.vue b/plugins/core/components/buttons/QBTLineType.vue index fa42ede..61fecfb 100644 --- a/plugins/core/components/buttons/QBTLineType.vue +++ b/plugins/core/components/buttons/QBTLineType.vue @@ -42,11 +42,14 @@ export default { , editor: { type: DDeiEditor, default: null, + }, + controlDefine: { + type: Object, + default: null, } }, data() { return { - controlDefine: null, attrDefine: null, value: null }; @@ -63,17 +66,14 @@ export default { }, methods: { refreshEditor() { - if (this.editor?.currentControlDefine) { - this.controlDefine = this.editor.currentControlDefine; - if (this.controlDefine) { - this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); - let valueDefine = this.getDataValue(); - if (valueDefine && !valueDefine.isDefault) { - this.value = valueDefine.value; - } - } else { - this.attrDefine = null + if (this.controlDefine) { + this.attrDefine = this.controlDefine.attrDefineMap.get(this.attrCode); + let valueDefine = this.getDataValue(); + if (valueDefine && !valueDefine.isDefault) { + this.value = valueDefine.value; } + } else { + this.attrDefine = null } }, diff --git a/plugins/core/panels/common/FontAndText.vue b/plugins/core/panels/common/FontAndText.vue index 25b3c85..41f9080 100644 --- a/plugins/core/panels/common/FontAndText.vue +++ b/plugins/core/panels/common/FontAndText.vue @@ -4,34 +4,38 @@
- +
- +
- +
- +
- +
- +
- +
@@ -39,71 +43,78 @@
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
- +
diff --git a/plugins/core/panels/propertyview/PropertyView.vue b/plugins/core/panels/propertyview/PropertyView.vue index 548a21b..1790192 100644 --- a/plugins/core/panels/propertyview/PropertyView.vue +++ b/plugins/core/panels/propertyview/PropertyView.vue @@ -31,8 +31,9 @@ }}*
- +
@@ -58,7 +59,7 @@