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) {
|
||||
const isReadonly = this.draw.isReadonly()
|
||||
if (isReadonly) return
|
||||
this.draw.getControl().setValueByConceptId(payload)
|
||||
}
|
||||
|
||||
public setControlExtension(payload: ISetControlExtensionOption) {
|
||||
const isReadonly = this.draw.isReadonly()
|
||||
if (isReadonly) return
|
||||
this.draw.getControl().setExtensionByConceptId(payload)
|
||||
}
|
||||
|
||||
public setControlProperties(payload: ISetControlProperties) {
|
||||
const isReadonly = this.draw.isReadonly()
|
||||
if (isReadonly) return
|
||||
this.draw.getControl().setPropertiesByConceptId(payload)
|
||||
}
|
||||
|
||||
|
||||
@@ -647,8 +647,6 @@ export class Control {
|
||||
}
|
||||
|
||||
public setValueByConceptId(payload: ISetControlValueOption) {
|
||||
const isReadonly = this.draw.isReadonly()
|
||||
if (isReadonly) return
|
||||
let isExistSet = false
|
||||
const { conceptId, value } = payload
|
||||
// 设置值
|
||||
@@ -761,8 +759,6 @@ export class Control {
|
||||
}
|
||||
|
||||
public setExtensionByConceptId(payload: ISetControlExtensionOption) {
|
||||
const isReadonly = this.draw.isReadonly()
|
||||
if (isReadonly) return
|
||||
const { conceptId, extension } = payload
|
||||
const setExtension = (elementList: IElement[]) => {
|
||||
let i = 0
|
||||
@@ -803,8 +799,6 @@ export class Control {
|
||||
}
|
||||
|
||||
public setPropertiesByConceptId(payload: ISetControlProperties) {
|
||||
const isReadonly = this.draw.isReadonly()
|
||||
if (isReadonly) return
|
||||
const { conceptId, properties } = payload
|
||||
let isExistUpdate = false
|
||||
function setProperties(elementList: IElement[]) {
|
||||
|
||||
Reference in New Issue
Block a user