为表单提供禁用和启用的方法
This commit is contained in:
parent
6700d611b9
commit
f9ea1bec3f
1 changed files with 21 additions and 0 deletions
|
@ -81,6 +81,27 @@ export class SettingUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disable setting item
|
||||||
|
* @param key key name
|
||||||
|
*/
|
||||||
|
disable(key: string) {
|
||||||
|
let element = this.elements.get(key) as any;
|
||||||
|
if (element) {
|
||||||
|
element.disabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Enable setting item
|
||||||
|
* @param key key name
|
||||||
|
*/
|
||||||
|
enable(key: string) {
|
||||||
|
let element = this.elements.get(key) as any;
|
||||||
|
if (element) {
|
||||||
|
element.disabled = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将设置项目导出为 JSON 对象
|
* 将设置项目导出为 JSON 对象
|
||||||
* @returns object
|
* @returns object
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue