chore(ActionBar): use relation composition

This commit is contained in:
chenjiahan
2020-09-25 11:38:03 +08:00
parent 278ea6a439
commit 36239090b9
3 changed files with 11 additions and 8 deletions
+3 -3
View File
@@ -1,5 +1,5 @@
import { provide, reactive } from 'vue';
import { createNamespace } from '../utils';
import { useChildren } from '../composition/use-relation';
const [createComponent, bem] = createNamespace('action-bar');
@@ -14,9 +14,9 @@ export default createComponent({
},
setup(props, { slots }) {
const children = reactive([]);
const { linkChildren } = useChildren(ACTION_BAR_KEY);
provide(ACTION_BAR_KEY, { children });
linkChildren();
return () => (
<div class={bem({ unfit: !props.safeAreaInsetBottom })}>