12345678910111213 |
- import { cloneDeep } from '@cip/utils/util'
- export const setOptionWritable = (options, value) => {
- return options.map(option => {
- if (option?.config.children?.length > 0) {
- option.config.children = setOptionWritable(option.config.children, value)
- } else {
- option = cloneDeep(option)
- option.config.writable = value
- }
- return option
- })
- }
|