-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `Steps` migrates to Vue 3. Utilities `InjectedChildMixin`, `ProviderParentMixin`, `TabbedChildMixin`, and `TabbedMixin` are also changed. Changes sufficient to render the documentation page of `Steps` are made. A commint of updates of the documentation page will follow this commit. - In `src/components/steps/Steps.vue`, - The `disabled` bindings of navigation buttons are fixed. Because setting a boolean attribute to `false` does not remove it, `null` or `undefined` has to be given to remove it. - In `src/utils/InjectedChildMixin.js`, - A new prop `order` is introduced. This controls the ordering of `StepItem`s in `Steps`. It used to be controlled by the index in `$scopedSlots.default`, but I give it up because it seems no longer possible to enumerate component instances in a slot. - A new field `dynamicIndex` is added to `data`. Despite I give enumerating `StepItem`s up, automatic indexing still works in a limited situation where no child is unmounted after it is mounted. `dynamicIndex` of an item is assigned when the item is registered to `ProviderParentMixin` (see below). - `index` becomes a computed property, and it becomes `order` if `order` is defined, but `dynamicIndex` otherwise. - Note that `InjectedChildMixin` is mixed in to `StepItem` via `TabbedChildMixin`. - In `src/utils/ProviderParentMixin.js`, - A new field `nextIndex` is introduced to `data`. This is used to determine an index of a child item to be registered. - The watch trigger of `childItems` is no longer used to update indices of children. There are two reasons why I give it up, 1. It seems that there is no way to enumerate child components in a slot, as I mentioned above. 2. The watch trigger of `childItems` is fired only once when it is initialized; i.e., fired with an empty array. A workaround may be using a deep watch trigger, though it will be pricy. - Note that `ProviderParentMixin` is mixed in to `StepItem` via `TabbedMixin`. - In `src/utils/TabbedChildMixin.js`, - A `v-show` directive used to be simulated by styling `display`. It prevented `transition` from working. I found that `withDirectives` is a proper way to add a directive, and the simulation is replaced with `withDirectives`. - A built-in `Transition` component is directly specified instead of giving a name "transition", because the name "transition" is no longer resolved on Vue 3. - Note that `TabbedChildMixin` is mixed in to `StepItem`. - In `src/utils/TabbedMixin.js`, - The default `v-model` binding conforms to Vue 3. - `value` prop --> `modelValue` - `input` event --> `update:modelValue` - Note that `TabbedMixin` is mixed in to `Steps`. - Common, - ESLint fix is applied.
- Loading branch information
Showing
5 changed files
with
90 additions
and
81 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
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