forked from buefy/buefy
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `Modal` migrates to Vue 3. Changes sufficient to render the documentation page of `Modal` are made. The commit of changes to the documentation page will follow this commit. - In `src/components/modal/Modal.vue`, - `v-model` binding is replaced so that the default `v-model` works. - `active` prop --> `modelValue` - `update:active` event --> `update:modelValue` - Appending `$el` to body is not done at `beforeMount` but at `mounted`, because `$el` is not available at `beforeMount`. - Events to be emitted are listed in `emits`. - Automatic ESLint fix is applied. - In `src/components/modal/index.js`, - `open` creates a new component instance by the `createApp` API, and then mount it on a fresh div element instead of extending an existing Vue instance. Because Vue 3 no longer supports extention of a Vue instance. A component instance returned by this function is not exactly a `Modal` but exposes `close` function so that it can be programmatically closed. A created app unmounts itself when the modal is closed. - Because of the above change, the component specified to the `component` option cannot resolve components registered to the current app. The component has to explicitly reference components that it depends on.
- Loading branch information
Showing
2 changed files
with
60 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters