增加代码
This commit is contained in:
parent
18a51e7c26
commit
fce6f58eb0
@ -31,7 +31,7 @@ export default {
|
||||
{
|
||||
label: '组合',
|
||||
handler: this.doBinding,
|
||||
disabledCb: selected => {
|
||||
disabledCb: e => {
|
||||
const storage = this.$iscs.getController().getStorage();
|
||||
return storage.values().length <= 1;
|
||||
}
|
||||
@ -39,14 +39,14 @@ export default {
|
||||
{
|
||||
label: '解组',
|
||||
handler: this.unBinding,
|
||||
disabledCb: selected => {
|
||||
return selected.shapeType != shapeType.Compose;
|
||||
disabledCb: e => {
|
||||
return this.selected.shapeType != shapeType.Compose;
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '复制',
|
||||
handler: this.doCopy,
|
||||
disabledCb: selected => {
|
||||
disabledCb: e => {
|
||||
const storage = this.$iscs.getController().getStorage();
|
||||
return !storage.values().length;
|
||||
}
|
||||
@ -56,7 +56,7 @@ export default {
|
||||
{
|
||||
label: '粘贴',
|
||||
handler: this.doParse,
|
||||
disabledCb: selected => {
|
||||
disabledCb: e => {
|
||||
return !this.clipboardList.length;
|
||||
}
|
||||
}
|
||||
@ -67,7 +67,8 @@ export default {
|
||||
methods: {
|
||||
doShow(point, code) {
|
||||
const list = code ? this.menusMap.Normal: this.menusMap.None;
|
||||
this.menus = list.map(el => { el.disabled = el.disabledCb(this.selected); return el} );
|
||||
this.selected= this.$iscs.getShapeByCode(code);
|
||||
this.menus = list.map(el => { el.disabled = el.disabledCb({}); return el} );
|
||||
if (this.menus &&
|
||||
this.menus.length) {
|
||||
this.position = {...point}
|
||||
|
Loading…
Reference in New Issue
Block a user