refactor(Dialog): refactor with composition api

This commit is contained in:
chenjiahan
2020-09-04 16:53:22 +08:00
parent 902a1b7c63
commit 2b8284a227
2 changed files with 147 additions and 172 deletions
+1 -9
View File
@@ -8,15 +8,7 @@ function initInstance() {
const Wrapper = {
setup() {
const { state, toggle } = usePopupState();
return () => (
<VanDialog
lazyRender={false}
{...{
...state,
'onUpdate:show': toggle,
}}
/>
);
return () => <VanDialog {...{ ...state, 'onUpdate:show': toggle }} />;
},
};