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 }); // console.log('useDesignable', { schema, schemaPath, currentSchema });
const options = useContext(SchemaOptionsContext); const options = useContext(SchemaOptionsContext);
const DesignableBar = let DesignableBar = get(options.components, currentSchema['x-designable-bar']);
get(options.components, currentSchema['x-designable-bar']) || (() => null); if (!designable) {
DesignableBar = () => null;
}
if (!DesignableBar) {
DesignableBar = () => null;
}
return { return {
designable, designable,
root: schema, root: schema,