mirror of
https://gitee.com/hoslay/ddei-editor.git
synced 2025-12-06 17:18:36 +08:00
quickstyle在简单布局下选了样式不生效
This commit is contained in:
parent
bf1321e2d2
commit
9dc982477b
8
package-lock.json
generated
8
package-lock.json
generated
@ -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",
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//打开弹出框
|
||||
|
||||
@ -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
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
//获取数据值
|
||||
|
||||
@ -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;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -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();
|
||||
},
|
||||
|
||||
@ -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
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -4,34 +4,38 @@
|
||||
<div class="content">
|
||||
<div class="buttons">
|
||||
<div class="b1">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-fontfamily']"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-fontfamily']"></component>
|
||||
</div>
|
||||
<div class="b2">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-fontsize']"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-fontsize']"></component>
|
||||
</div>
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="1"
|
||||
attrCode="font.size" img="icon-a-ziyuan456" extcls="magtop-2"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="1" attrCode="font.size" img="icon-a-ziyuan456"
|
||||
extcls="magtop-2"></component>
|
||||
</div>
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="-1"
|
||||
attrCode="font.size" img="icon-a-ziyuan455" extcls="magtop-1"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="-1" attrCode="font.size" img="icon-a-ziyuan455"
|
||||
extcls="magtop-1"></component>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1"
|
||||
:supportQuickEdit="false" attrCode="textStyle.align" img="icon-a-ziyuan440" extcls="magtop-1"
|
||||
:unSelectValue="2"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" :supportQuickEdit="false"
|
||||
attrCode="textStyle.align" img="icon-a-ziyuan440" extcls="magtop-1" :unSelectValue="2"></component>
|
||||
</div>
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="2"
|
||||
:supportQuickEdit="false" attrCode="textStyle.align" img="icon-a-ziyuan437" extcls="magtop-1"
|
||||
:unSelectValue="2"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="2" :supportQuickEdit="false"
|
||||
attrCode="textStyle.align" img="icon-a-ziyuan437" extcls="magtop-1" :unSelectValue="2"></component>
|
||||
</div>
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="3"
|
||||
:supportQuickEdit="false" attrCode="textStyle.align" img="icon-a-ziyuan439" extcls="magtop-1"
|
||||
:unSelectValue="2"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="3" :supportQuickEdit="false"
|
||||
attrCode="textStyle.align" img="icon-a-ziyuan439" extcls="magtop-1" :unSelectValue="2"></component>
|
||||
</div>
|
||||
|
||||
|
||||
@ -39,71 +43,78 @@
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<div class="mg14">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1"
|
||||
attrCode="textStyle.bold" img="icon-a-ziyuan461"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.bold"
|
||||
img="icon-a-ziyuan461"></component>
|
||||
</div>
|
||||
<div class="mg16">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1"
|
||||
attrCode="textStyle.italic" img="icon-a-ziyuan459"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.italic"
|
||||
img="icon-a-ziyuan459"></component>
|
||||
</div>
|
||||
<div class="mg16">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1"
|
||||
attrCode="textStyle.underline" img="icon-icon-text-underline" extcls="ext-underline"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.underline"
|
||||
img="icon-icon-text-underline" extcls="ext-underline"></component>
|
||||
</div>
|
||||
<div class="mg165">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" electedValue="1"
|
||||
attrCode="textStyle.deleteline" img="icon-a-ziyuan457">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" electedValue="1" attrCode="textStyle.deleteline"
|
||||
img="icon-a-ziyuan457">
|
||||
</component>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mg17">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1"
|
||||
:onlyQuickEdit="true" attrCode="textStyle.subtype" img="icon-a-ziyuan394" extcls="magtop-1">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" :onlyQuickEdit="true"
|
||||
attrCode="textStyle.subtype" img="icon-a-ziyuan394" extcls="magtop-1">
|
||||
</component>
|
||||
|
||||
</div>
|
||||
<div class="mg17">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="2"
|
||||
:onlyQuickEdit="true" attrCode="textStyle.subtype" img="icon-a-ziyuan393" extcls="magtop-1">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="2" :onlyQuickEdit="true"
|
||||
attrCode="textStyle.subtype" img="icon-a-ziyuan393" extcls="magtop-1">
|
||||
</component>
|
||||
|
||||
</div>
|
||||
<div class="b4">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="3"
|
||||
:onlyQuickEdit="true" attrCode="textStyle.subtype" img="icon-a-ziyuan392" extcls="magtop-1">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="3" :onlyQuickEdit="true"
|
||||
attrCode="textStyle.subtype" img="icon-a-ziyuan392" extcls="magtop-1">
|
||||
</component>
|
||||
</div>
|
||||
<div class="b5">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="textStyle.bgcolor"
|
||||
img="icon-a-ziyuan452">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="textStyle.bgcolor" img="icon-a-ziyuan452">
|
||||
</component>
|
||||
</div>
|
||||
<div class="b6">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="font.color"
|
||||
img="icon-a-ziyuan463">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="font.color" img="icon-a-ziyuan463">
|
||||
</component>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1"
|
||||
:supportQuickEdit="false" attrCode="textStyle.valign" img="icon-a-ziyuan440" extcls="rotate-90"
|
||||
:unSelectValue="2">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" :supportQuickEdit="false"
|
||||
attrCode="textStyle.valign" img="icon-a-ziyuan440" extcls="rotate-90" :unSelectValue="2">
|
||||
</component>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="2"
|
||||
:supportQuickEdit="false" attrCode="textStyle.valign" img="icon-a-ziyuan437" extcls="rotate-90"
|
||||
:unSelectValue="2">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="2" :supportQuickEdit="false"
|
||||
attrCode="textStyle.valign" img="icon-a-ziyuan437" extcls="rotate-90" :unSelectValue="2">
|
||||
</component>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="3"
|
||||
:supportQuickEdit="false" attrCode="textStyle.valign" img="icon-a-ziyuan439" extcls="rotate-90"
|
||||
:unSelectValue="2">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="3" :supportQuickEdit="false"
|
||||
attrCode="textStyle.valign" img="icon-a-ziyuan439" extcls="rotate-90" :unSelectValue="2">
|
||||
</component>
|
||||
|
||||
</div>
|
||||
|
||||
@ -31,8 +31,9 @@
|
||||
}}<span v-if="attrDefine.notNull">*</span>:
|
||||
</div>
|
||||
<div class="editor" v-if="attrDefine.visiable != false">
|
||||
<component :editor="editor" :is="editor?.getPropEditor(attrDefine.controlType)"
|
||||
v-if="reFresh && attrDefine?.visiable != false" :attrDefine="attrDefine"></component>
|
||||
<component :editor="editor" :controlDefine="controlDefine"
|
||||
:is="editor?.getPropEditor(attrDefine.controlType)" v-if="reFresh && attrDefine?.visiable != false"
|
||||
:attrDefine="attrDefine"></component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -58,7 +59,7 @@
|
||||
<script lang="ts">
|
||||
import {DDeiEditorUtil} from "ddei-framework";
|
||||
import {DDeiEditor} from "ddei-framework";
|
||||
import { cloneDeep } from "lodash";
|
||||
import { cloneDeep, first } from "lodash";
|
||||
import {DDeiUtil} from "ddei-framework";
|
||||
import {DDeiAbstractShape} from "ddei-framework";
|
||||
import {DDeiEditorArrtibute } from "ddei-framework";
|
||||
@ -162,72 +163,22 @@ export default {
|
||||
},
|
||||
|
||||
refreshAttrs(newVal, oldVal) {
|
||||
this.selectedModels = this.editor.ddInstance.stage.selectedModels;
|
||||
let models: DDeiAbstractShape[] = null;
|
||||
let firstModel: DDeiAbstractShape = null;
|
||||
if (this.selectedModels?.size > 0) {
|
||||
//获取当前所有组件的公共属性定义
|
||||
models = Array.from(this.selectedModels.values());
|
||||
firstModel = models[0];
|
||||
} else {
|
||||
//获取当前所有组件的公共属性定义
|
||||
models = [this.editor.ddInstance.stage];
|
||||
let firstControlDefine;
|
||||
let firstModel;
|
||||
if (!this.editor.currentControlDefine) {
|
||||
let models: DDeiAbstractShape[] = [this.editor.ddInstance.stage];
|
||||
firstModel = models[0];
|
||||
this.selectedModels = models;
|
||||
firstControlDefine = cloneDeep(
|
||||
this.editor.controls.get(firstModel?.modelCode)
|
||||
);
|
||||
} else {
|
||||
this.selectedModels = this.editor.ddInstance.stage.selectedModels;
|
||||
firstModel = Array.from(this.selectedModels.values());
|
||||
firstControlDefine = this.editor.currentControlDefine
|
||||
}
|
||||
|
||||
let firstControlDefine = cloneDeep(
|
||||
this.editor.controls.get(firstModel?.modelCode)
|
||||
);
|
||||
//获取第一个组件及其定义
|
||||
if (firstControlDefine) {
|
||||
//如果同时有多个组件被选中,则以第一个组件为基准,对属性定义进行过滤,属性值相同则采用相同值,属性值不同采用空值
|
||||
let removeKeys = [];
|
||||
for (let i = 0; i < models.length; i++) {
|
||||
let curModel: DDeiAbstractShape = models[i];
|
||||
let curDefine = this.editor.controls.get(curModel.modelCode);
|
||||
|
||||
firstControlDefine.attrDefineMap.forEach(
|
||||
(firstAttrDefine, attrKey) => {
|
||||
//key不存在
|
||||
if (!curDefine.attrDefineMap.has(attrKey)) {
|
||||
removeKeys.push(attrKey);
|
||||
firstAttrDefine.model = curModel;
|
||||
}
|
||||
//隐藏
|
||||
else if (!firstAttrDefine.visiable) {
|
||||
removeKeys.push(attrKey);
|
||||
firstAttrDefine.model = curModel;
|
||||
}
|
||||
//key存在,进一步比较值
|
||||
else {
|
||||
//当前属性的定义
|
||||
let curAttrDefine = curDefine.attrDefineMap.get(attrKey);
|
||||
//记录属性值
|
||||
if (i == 0) {
|
||||
firstAttrDefine.value = DDeiUtil.getDataByPathList(
|
||||
firstModel,
|
||||
curAttrDefine.code,
|
||||
curAttrDefine.mapping
|
||||
);
|
||||
firstAttrDefine.model = firstModel;
|
||||
}
|
||||
//根据属性定义,从model获取值
|
||||
let curAttrValue = DDeiUtil.getDataByPathList(
|
||||
curModel,
|
||||
curAttrDefine.code,
|
||||
curAttrDefine.mapping
|
||||
);
|
||||
if (firstAttrDefine.value != curAttrValue) {
|
||||
//记录备选值
|
||||
firstAttrDefine.diffValues.push(curAttrValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
//清除不同的属性
|
||||
this.deleteAttrDefineByKeys(firstControlDefine, removeKeys);
|
||||
let topGroups = null;
|
||||
if (firstControlDefine.type == "DDeiStage") {
|
||||
//加载layer的配置
|
||||
@ -305,7 +256,6 @@ export default {
|
||||
}
|
||||
}
|
||||
this.changeSubGroup(currentSubGroup);
|
||||
this.editor.currentControlDefine = this.controlDefine;
|
||||
} else {
|
||||
//清除信息
|
||||
this.controlDefine = null;
|
||||
@ -318,22 +268,7 @@ export default {
|
||||
}
|
||||
this.editor.currentControlDefine = null;
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
//清除信息
|
||||
this.controlDefine = null;
|
||||
this.topGroups = null;
|
||||
if (this.currentTopGroup) {
|
||||
this.currentTopGroup.subGroups = null;
|
||||
}
|
||||
if (this.currentSubGroup) {
|
||||
this.currentSubGroup.children = null;
|
||||
}
|
||||
this.editor.currentControlDefine = null;
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
|
||||
getFirstChildAttrsGroup(control) {
|
||||
@ -437,49 +372,6 @@ export default {
|
||||
}, 100);
|
||||
},
|
||||
|
||||
/**
|
||||
* 移除属性定义中的属性
|
||||
* @param firstControlDefine
|
||||
* @param removeKeys
|
||||
*/
|
||||
deleteAttrDefineByKeys(firstControlDefine: object, removeKeys: string[]) {
|
||||
//移除属性
|
||||
removeKeys.forEach((item) => {
|
||||
firstControlDefine.attrDefineMap.delete(item);
|
||||
firstControlDefine.groups?.forEach(group => {
|
||||
this.deleteGroupAttrsByKey(group, item);
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
deleteGroupAttrsByKey(pData: object, key: string): void {
|
||||
let rmglist = [];
|
||||
pData.subGroups.forEach((group) => {
|
||||
let rmlist = [];
|
||||
for (let gci = 0; gci < group.children.length; gci++) {
|
||||
if (group.children[gci].code == key) {
|
||||
rmlist.push(group.children[gci]);
|
||||
}
|
||||
}
|
||||
rmlist.forEach((rm) => {
|
||||
let index = group.children.indexOf(rm);
|
||||
if (index > -1) {
|
||||
group.children.splice(index, 1);
|
||||
}
|
||||
});
|
||||
//如果group被清空,则删除group
|
||||
if (group.children.length == 0) {
|
||||
rmglist.push(group);
|
||||
}
|
||||
});
|
||||
rmglist.forEach((rmg) => {
|
||||
let index = pData.subGroups.indexOf(rmg);
|
||||
if (index > -1) {
|
||||
pData.subGroups.splice(index, 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
syncAttrsToGroup(firstControlDefine: object, pData: object): void {
|
||||
let newChildren = [];
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div v-if="forceRefresh" class="ddei-core-panel-topmenu" @mousedown="changeEditorFocus">
|
||||
<div class="ddei-core-panel-topmenu-quickbox">
|
||||
<component :editor="editor" v-for="(item, index) in editor?.getPartPanels(options, 'panels') " :is="item.comp"
|
||||
:options="item.options" v-bind="item.options"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
v-for="(item, index) in editor?.getPartPanels(options, 'panels') " :is="item.comp" :options="item.options"
|
||||
v-bind="item.options"></component>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,56 +1,67 @@
|
||||
<template>
|
||||
<div :id="editor?.id + '_' + dialogId" v-show="selectedModels?.size > 0" v-if="forceRefresh" @mousedown="closeAllDialog()"
|
||||
class='ddei-core-dialog-quickpop'>
|
||||
<div :id="editor?.id + '_' + dialogId" v-show="selectedModels?.size > 0" v-if="forceRefresh"
|
||||
@mousedown="closeAllDialog()" class='ddei-core-dialog-quickpop'>
|
||||
<div v-if="operateState == 50" class="content">
|
||||
<div class="panel12">
|
||||
<div class="panel12-content-1">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-fontfamily']"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-fontfamily']"></component>
|
||||
</div>
|
||||
<div class="panel12-content-2">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-fontsize']"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-fontsize']"></component>
|
||||
</div>
|
||||
<div class="panel12-content-5">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="1" attrCode="font.size"
|
||||
img="icon-a-ziyuan456" extcls="magtop-2"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="1" attrCode="font.size" img="icon-a-ziyuan456"
|
||||
extcls="magtop-2"></component>
|
||||
</div>
|
||||
<div class="panel12-content-5">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="-1" attrCode="font.size"
|
||||
img="icon-a-ziyuan455" extcls="magtop-1"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-addfontsize']" :addValue="-1" attrCode="font.size" img="icon-a-ziyuan455"
|
||||
extcls="magtop-1"></component>
|
||||
</div>
|
||||
|
||||
<div class="panel12-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.bold"
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.bold"
|
||||
img="icon-a-ziyuan461"></component>
|
||||
</div>
|
||||
<div class="panel12-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.italic"
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.italic"
|
||||
img="icon-a-ziyuan459"></component>
|
||||
</div>
|
||||
<div class="panel12-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.underline"
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.underline"
|
||||
img="icon-icon-text-underline" extcls="ext-underline"></component>
|
||||
</div>
|
||||
<div class="panel12-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" electedValue="1" attrCode="textStyle.deleteline"
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" electedValue="1" attrCode="textStyle.deleteline"
|
||||
img="icon-a-ziyuan457">
|
||||
</component>
|
||||
</div>
|
||||
<div class="panel12-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" :onlyQuickEdit="true"
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" :onlyQuickEdit="true"
|
||||
attrCode="textStyle.subtype" img="icon-a-ziyuan394" extcls="magtop-1">
|
||||
</component>
|
||||
</div>
|
||||
<div class="panel12-split-3 panel12-content-4 panel1-split-4">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="textStyle.bgcolor" img="icon-a-ziyuan452">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="textStyle.bgcolor" img="icon-a-ziyuan452">
|
||||
</component>
|
||||
</div>
|
||||
<div class="panel12-content-4">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="font.color" img="icon-a-ziyuan463">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="font.color" img="icon-a-ziyuan463">
|
||||
</component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel2" title="格式刷" @click="execBrushAction($event)">
|
||||
<div class="panel2" title="格式刷" style="border-right:none" @click="execBrushAction($event)">
|
||||
<div :class="{ 'panel2-content': true, 'brush-selected': editor?.ddInstance?.stage?.brushDataText }">
|
||||
<svg class="icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-a-ziyuan485"></use>
|
||||
@ -62,7 +73,8 @@
|
||||
<div v-if="operateState != 50 && allLine" class="content">
|
||||
<div class="panel6">
|
||||
<div class="panel6-content1 pointtype">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-linepointtype']" attrCode="sp.type">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-linepointtype']" attrCode="sp.type">
|
||||
</component>
|
||||
<div class="text">起点</div>
|
||||
</div>
|
||||
@ -72,30 +84,35 @@
|
||||
</svg>
|
||||
</div>
|
||||
<div class="panel6-content1 pointtype">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-linepointtype']" attrCode="ep.type">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-linepointtype']" attrCode="ep.type">
|
||||
</component>
|
||||
<div class="text">终点</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel6" style="border-left:1px solid #E2E2EB;">
|
||||
<div class="panel6-content type">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-linetype']" attrCode="type" img="icon-a-ziyuan430">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-linetype']" attrCode="type" img="icon-a-ziyuan430">
|
||||
</component>
|
||||
<div class="text">类型</div>
|
||||
</div>
|
||||
<div class="panel6-content color2">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="color" img="icon-border-pencil">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="color" img="icon-border-pencil">
|
||||
</component>
|
||||
<div class="text">颜色</div>
|
||||
</div>
|
||||
<div class="panel6-content dash">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-borderweight']" attrCode="weight" hiddenCombo="1">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-borderweight']" attrCode="weight" hiddenCombo="1">
|
||||
</component>
|
||||
|
||||
<div class="text">粗细</div>
|
||||
</div>
|
||||
<div class="panel6-content dash">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-borderdash']" attrCode="dash" hiddenCombo="1">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-borderdash']" attrCode="dash" hiddenCombo="1">
|
||||
</component>
|
||||
<div class="text">虚线</div>
|
||||
</div>
|
||||
@ -114,29 +131,37 @@
|
||||
<div v-if="operateState != 50 && !allLine" class="content">
|
||||
<div class="panel1">
|
||||
<div class="panel1-content-1">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-fontfamily']"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-fontfamily']"></component>
|
||||
</div>
|
||||
<div class="panel1-content-2">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-fontsize']"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-fontsize']"></component>
|
||||
</div>
|
||||
<div class="panel1-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.bold"
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.bold"
|
||||
img="icon-a-ziyuan461"></component>
|
||||
</div>
|
||||
<div class="panel1-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.italic"
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-editbox']" selectedValue="1" attrCode="textStyle.italic"
|
||||
img="icon-a-ziyuan459"></component>
|
||||
</div>
|
||||
<div class="panel1-content-3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-textalign']" img="icon-a-ziyuan440"></component>
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-textalign']" img="icon-a-ziyuan440">
|
||||
</component>
|
||||
|
||||
</div>
|
||||
<div class="panel1-split-3 panel1-content-4 panel1-split-4">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="textStyle.bgcolor" img="icon-a-ziyuan452">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="textStyle.bgcolor" img="icon-a-ziyuan452">
|
||||
</component>
|
||||
</div>
|
||||
<div class="panel1-content-4 ">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="font.color" img="icon-a-ziyuan463">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="font.color" img="icon-a-ziyuan463">
|
||||
</component>
|
||||
</div>
|
||||
</div>
|
||||
@ -156,12 +181,14 @@
|
||||
<div class="text">样式</div>
|
||||
</div>
|
||||
<div class="panel3-content i2">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="fill.color" img="icon-a-ziyuan419">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="fill.color" img="icon-a-ziyuan419">
|
||||
</component>
|
||||
<div class="text">填充</div>
|
||||
</div>
|
||||
<div class="panel3-content i3">
|
||||
<component :editor="editor" :is="editor?.panels['ddei-core-btn-color']" attrCode="border.color" img="icon-border-pencil">
|
||||
<component :editor="editor" :controlDefine="editor.currentControlDefine"
|
||||
:is="editor?.panels['ddei-core-btn-color']" attrCode="border.color" img="icon-border-pencil">
|
||||
</component>
|
||||
<div class="text">线条</div>
|
||||
</div>
|
||||
@ -206,7 +233,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {DDeiEditor,DDeiEnumBusCommandType} from "ddei-framework";
|
||||
import { DDeiEditor, DDeiEnumBusCommandType, DDeiAbstractShape } from "ddei-framework";
|
||||
import {DDeiEditorUtil} from "ddei-framework";
|
||||
import {DDeiEditorState} from "ddei-framework";
|
||||
|
||||
@ -273,8 +300,11 @@ export default {
|
||||
});
|
||||
this.allLine = allLine
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
exchangeLinePoint() {
|
||||
|
||||
this.selectedModels?.forEach(model => {
|
||||
@ -479,7 +509,6 @@ export default {
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
border-right: 1px solid var(--panel-border);//darken(var(--panel-header), 13%);
|
||||
|
||||
.panel2-content {
|
||||
flex: 1;
|
||||
border-radius: 4px;
|
||||
@ -550,6 +579,7 @@ export default {
|
||||
margin-top: 10px;
|
||||
padding-left: 10px;
|
||||
height: 60px;
|
||||
width:150px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
@ -697,6 +727,7 @@ export default {
|
||||
}
|
||||
|
||||
.type {
|
||||
width:40px;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
|
||||
@ -715,6 +746,7 @@ export default {
|
||||
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
width:40px;
|
||||
|
||||
.ddei-editor-quick-fat-item-box {
|
||||
width: 22px;
|
||||
@ -730,11 +762,16 @@ export default {
|
||||
.dash {
|
||||
width: 50px;
|
||||
margin-top: 8px;
|
||||
|
||||
}
|
||||
|
||||
.brush {
|
||||
width: 50px;
|
||||
margin-top: 4px;
|
||||
&:hover {
|
||||
background-color: var(--panel-hover);
|
||||
cursor: pointer
|
||||
}
|
||||
}
|
||||
|
||||
.pointtype {
|
||||
@ -746,7 +783,10 @@ export default {
|
||||
flex: 0 0 20px !important;
|
||||
margin-top: -20px;
|
||||
padding: 0px 2px;
|
||||
|
||||
&:hover {
|
||||
background-color: var(--panel-hover);
|
||||
cursor: pointer
|
||||
}
|
||||
.icon {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
@ -26,9 +26,11 @@ class DDeiCoreCanvasLifeCycle extends DDeiLifeCycle {
|
||||
if (models?.length > 0) {
|
||||
let height = 100;
|
||||
//计算弹出框的显示位置,这里需要把模型的坐标转换为dom的坐标
|
||||
let editorEle = document.getElementById(editor.id);
|
||||
let editorDomPos = DDeiUtil.getDomAbsPosition(editorEle);
|
||||
let modelPos = DDeiUtil.getModelsDomAbsPosition(models)
|
||||
let left = modelPos.left + 20
|
||||
let top = modelPos.top
|
||||
let left = (modelPos.left - editorDomPos.left) + 20
|
||||
let top = (modelPos.top - editorDomPos.top)
|
||||
if (modelPos.top - height <= modelPos.cTop) {
|
||||
if (modelPos.height > 400) {
|
||||
top = top + height + 20
|
||||
@ -57,6 +59,7 @@ class DDeiCoreCanvasLifeCycle extends DDeiLifeCycle {
|
||||
* 选择后,在选择控件的合适位置显示快捷编辑框
|
||||
*/
|
||||
showQuickEditPicker(operateType, data, ddInstance, evt): DDeiFuncCallResult {
|
||||
|
||||
if (ddInstance && ddInstance["AC_DESIGN_EDIT"]) {
|
||||
let models = data?.models;
|
||||
let editor = DDeiEditorUtil.getEditorInsByDDei(ddInstance);
|
||||
@ -68,9 +71,11 @@ class DDeiCoreCanvasLifeCycle extends DDeiLifeCycle {
|
||||
if (models?.length > 0) {
|
||||
let height = 100;
|
||||
//计算弹出框的显示位置,这里需要把模型的坐标转换为dom的坐标
|
||||
let editorEle = document.getElementById(editor.id);
|
||||
let editorDomPos = DDeiUtil.getDomAbsPosition(editorEle);
|
||||
let modelPos = DDeiUtil.getModelsDomAbsPosition(models)
|
||||
let left = modelPos.left + (modelPos.width / 2)
|
||||
let top = modelPos.top + (modelPos.height / 2)
|
||||
let left = (modelPos.left - editorDomPos.left) + (modelPos.width / 2)
|
||||
let top = (modelPos.top - editorDomPos.top) + (modelPos.height / 2)
|
||||
if (modelPos.top - height <= modelPos.cTop) {
|
||||
if (modelPos.height > 400) {
|
||||
top = top + height + 20
|
||||
|
||||
12
src/App.vue
12
src/App.vue
@ -18,11 +18,11 @@ export default defineComponent({
|
||||
//布局的配置
|
||||
DDeiCoreStandLayout.configuration({
|
||||
//配置插件
|
||||
'top': [],
|
||||
'middle': ['ddei-core-panel-openfilesview', 'ddei-core-panel-canvasview', 'ddei-core-panel-quickcolorview'],
|
||||
'bottom': [],
|
||||
'left': [],
|
||||
'right': []
|
||||
// 'top': [],
|
||||
// 'middle': ['ddei-core-panel-openfilesview', 'ddei-core-panel-canvasview', 'ddei-core-panel-quickcolorview'],
|
||||
// 'bottom': [],
|
||||
// 'left': [],
|
||||
// 'right': []
|
||||
}),
|
||||
// DDeiCoreThemeBlack.configuration({
|
||||
// default: true
|
||||
@ -117,6 +117,7 @@ export default defineComponent({
|
||||
EXT_STAGE_HEIGHT:false,
|
||||
ruler:false,
|
||||
grid: 0,
|
||||
// readonly:true,
|
||||
initData: {
|
||||
controls: [
|
||||
{
|
||||
@ -152,6 +153,7 @@ export default defineComponent({
|
||||
DDeiCoreThemeBlack.configuration({
|
||||
default: true
|
||||
}),
|
||||
DDeiExtQuickStyle
|
||||
],
|
||||
})
|
||||
const options4 = markRaw({
|
||||
|
||||
@ -204,10 +204,10 @@ export default {
|
||||
|
||||
<style lang="less">
|
||||
.ddei-editor {
|
||||
position:sticky;
|
||||
position:relative;
|
||||
width: 100%;
|
||||
height:100%;
|
||||
overflow: auto;
|
||||
// overflow: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: var(--background);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user