DesignableBar

This commit is contained in:
chenos 2021-07-27 22:29:56 +08:00
parent 428beabd5a
commit 1007324b09

View File

@ -208,8 +208,13 @@ export function useDesignable(path?: any) {
}
// console.log('useDesignable', { schema, schemaPath, currentSchema });
const options = useContext(SchemaOptionsContext);
const DesignableBar =
get(options.components, currentSchema['x-designable-bar']) || (() => null);
let DesignableBar = get(options.components, currentSchema['x-designable-bar']);
if (!designable) {
DesignableBar = () => null;
}
if (!DesignableBar) {
DesignableBar = () => null;
}
return {
designable,
root: schema,