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.
- `Dialog` and `Modal` components are updated during the update of the documentation page of `Autocomplete`. Only changes sufficient to render the documentation page of `Autocomplete` are made. The documentation page of `Autocomplete` does not work yet. - In `src/components/dialog/index.js`, - On Vue 3, `Vue.extend` no longer exists, and newing a component looks not supported. A dynamic Vue instance that renders `Dialog` is created and mounted instead. When the dialog is confirmed or cancelled, the Vue instance is unmounted. `Dialog` used to destroy itself, but `$destroy` no longer exists on Vue 3. Thus, a Vue instance has to be unmounted from outside. - A component instance returned from `open` is not actually `Dialog` but exposes the `close` function so that a dialog may manually be closed. To access the `Dialog` instance, undocumented VNode structure is used. - A component instance no longer exposes `$on`, so event listeners `onConfirm` and `onCancel` have to be specified to the `createElement` function. - In `src/components/dialog/Dialog.vue`, - On Vue 3, a `confirm` event can be received by binding `onConfirm`. This conflicts with the former definition of the `onConfirm` prop. To avoid this conflict, `onConfirm` is renamed to `confirmCallback`. - `inputAttrs` is no longer modified inside `Dialog`. It is copied as `safeInputAttrs` and `safeInputAttrs` is modified instead. `value` is deleted from `safeInputAttrs` because binding `value` by `v-bind` inhibits `v-model` binding of the input element. - In `src/components/modal/Modal.vue`, - On Vue 3, a `cancel` event can be received by binding `onCancel`. This conflicts with the former definition of the `onCancel` prop. To avoid this conflict, `onCancel` is renamed to `cancelCallback`. - `beforeDestroy` --> `beforeUnmount`. - Common, - `$destroy` is removed because it no longer exists on Vue 3. - Automatic ESLint fix is applied.
- Loading branch information
Showing
3 changed files
with
92 additions
and
40 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
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