Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix transition boolean props complete #2627

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

- 🙌 Fix `<transition>`'s boolean attributes were triggering completion with `=""`. Thanks to contribution from [@sapphi-red](https://github.com/sapphi-red).

### 0.32.0

- Show deprecated hint in script block.
Expand Down
6 changes: 3 additions & 3 deletions server/src/modes/template/tagProviders/vueTags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ const vueDirectives = [

const transitionProps = [
getAttribute('name', undefined, 'Used to automatically generate transition CSS class names. Default: "v"'),
getAttribute('appear', 'b', 'Whether to apply transition on initial render. Default: false'),
getAttribute('appear', 'v', 'Whether to apply transition on initial render. Default: false'),
getAttribute(
'css',
'b',
'v',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option default is true.
So we need ="".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes it should be.

'Whether to apply CSS transition classes. Defaults: true. If set to false, will only trigger JavaScript hooks registered via component events.'
),
getAttribute(
Expand Down Expand Up @@ -133,7 +133,7 @@ const vueTags = {
const valueSets = {
transMode: ['out-in', 'in-out'],
transType: ['transition', 'animation'],
b: ['true', 'false']
v: ['true', 'false']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also need to keep b.

};

export function getVueTagProvider(): IHTMLTagProvider {
Expand Down