feat: set control properties in read-only mode #679
This commit is contained in:
@@ -2453,20 +2453,14 @@ export class CommandAdapt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setControlValue(payload: ISetControlValueOption) {
|
public setControlValue(payload: ISetControlValueOption) {
|
||||||
const isReadonly = this.draw.isReadonly()
|
|
||||||
if (isReadonly) return
|
|
||||||
this.draw.getControl().setValueByConceptId(payload)
|
this.draw.getControl().setValueByConceptId(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
public setControlExtension(payload: ISetControlExtensionOption) {
|
public setControlExtension(payload: ISetControlExtensionOption) {
|
||||||
const isReadonly = this.draw.isReadonly()
|
|
||||||
if (isReadonly) return
|
|
||||||
this.draw.getControl().setExtensionByConceptId(payload)
|
this.draw.getControl().setExtensionByConceptId(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
public setControlProperties(payload: ISetControlProperties) {
|
public setControlProperties(payload: ISetControlProperties) {
|
||||||
const isReadonly = this.draw.isReadonly()
|
|
||||||
if (isReadonly) return
|
|
||||||
this.draw.getControl().setPropertiesByConceptId(payload)
|
this.draw.getControl().setPropertiesByConceptId(payload)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -647,8 +647,6 @@ export class Control {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setValueByConceptId(payload: ISetControlValueOption) {
|
public setValueByConceptId(payload: ISetControlValueOption) {
|
||||||
const isReadonly = this.draw.isReadonly()
|
|
||||||
if (isReadonly) return
|
|
||||||
let isExistSet = false
|
let isExistSet = false
|
||||||
const { conceptId, value } = payload
|
const { conceptId, value } = payload
|
||||||
// 设置值
|
// 设置值
|
||||||
@@ -761,8 +759,6 @@ export class Control {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setExtensionByConceptId(payload: ISetControlExtensionOption) {
|
public setExtensionByConceptId(payload: ISetControlExtensionOption) {
|
||||||
const isReadonly = this.draw.isReadonly()
|
|
||||||
if (isReadonly) return
|
|
||||||
const { conceptId, extension } = payload
|
const { conceptId, extension } = payload
|
||||||
const setExtension = (elementList: IElement[]) => {
|
const setExtension = (elementList: IElement[]) => {
|
||||||
let i = 0
|
let i = 0
|
||||||
@@ -803,8 +799,6 @@ export class Control {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public setPropertiesByConceptId(payload: ISetControlProperties) {
|
public setPropertiesByConceptId(payload: ISetControlProperties) {
|
||||||
const isReadonly = this.draw.isReadonly()
|
|
||||||
if (isReadonly) return
|
|
||||||
const { conceptId, properties } = payload
|
const { conceptId, properties } = payload
|
||||||
let isExistUpdate = false
|
let isExistUpdate = false
|
||||||
function setProperties(elementList: IElement[]) {
|
function setProperties(elementList: IElement[]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user