Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

fix: avoid native tag as component#159

Merged
xiaoxiangmoe merged 12 commits intounplugin:mainfromjaw52:fix/html-tag-as-component
Jun 21, 2023

Conversation

jaw52
Copy link
Contributor

@jaw52jaw52 commentedJun 13, 2023
edited
Loading

Description

<script setup lang="ts">let p="not ok";</script><template>  <p>{{ p }}</p></template>

variablep will be misinterpreted as a component (Component names in vue avoid using html tag)

Linked Issues

Thiscloses#133 ,closes#135

Additional context

@xiaoxiangmoe
Copy link
Collaborator

How about

<script setup lang="ts">importbuttonfrom'./button.vue'</script><template>  <button>{{ button }}</button></template>

@jaw52
Copy link
ContributorAuthor

jaw52 commentedJun 13, 2023
edited
Loading

How about

<script setup lang="ts">import button from './button.vue'</script><template>  <button>{{ button }}</button></template>

This is the effect of the official scaffolding of vite + vue3
demo:https://stackblitz.com/edit/vitejs-vite-beh2mo?file=src%2FApp.vue

image

And. This is the effect of running after this commit
image

@jaw52
Copy link
ContributorAuthor

Do we need to add more test cases?

@xiaoxiangmoe
Copy link
Collaborator

Yes, we need more test case.

Include

importbuttonfrom'./button.vue'importButtonfrom'./button.vue'

@jaw52jaw52 requested a review fromxiaoxiangmoeJune 13, 2023 09:20
@jaw52jaw52 requested a review fromxiaoxiangmoeJune 14, 2023 01:18
@jaw52
Copy link
ContributorAuthor

Is there any work to be done about this PR@xiaoxiangmoe

xiaoxiangmoe reacted with eyes emoji

@jaw52jaw52 requested a review fromxiaoxiangmoeJune 19, 2023 06:13
@jaw52
Copy link
ContributorAuthor

@xiaoxiangmoe I'm ready to review, bro ^_^

@jaw52jaw52 requested a review fromxiaoxiangmoeJune 21, 2023 01:39
@jaw52jaw52 requested a review fromxiaoxiangmoeJune 21, 2023 06:58
@jaw52jaw52 requested a review fromxiaoxiangmoeJune 21, 2023 09:38
@jaw52jaw52 changed the titlefix: avoid HTML elements as componentfix: avoid native tag as componentJun 21, 2023
@xiaoxiangmoexiaoxiangmoe merged commitd29eeab intounplugin:mainJun 21, 2023
@jaw52jaw52 deleted the fix/html-tag-as-component branchJune 21, 2023 10:17
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@xiaoxiangmoexiaoxiangmoeAwaiting requested review from xiaoxiangmoe

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Renaming of template refs is not reflected in the template Error when giving variable the same name as a tag in the template
2 participants
@jaw52@xiaoxiangmoe

[8]ページ先頭

©2009-2025 Movatter.jp