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

v-bind 是不是有bug #11046

Closed
3ddbz opened this issue May 31, 2024 · 1 comment
Closed

v-bind 是不是有bug #11046

3ddbz opened this issue May 31, 2024 · 1 comment

Comments

@3ddbz
Copy link

3ddbz commented May 31, 2024

Vue version

3.4.27

Link to minimal reproduction

https://play.vuejs.org/#eNp9UcFKw0AQ/ZV1L2mhplQFIcaCSkE9qKjgZUHSZJKmJrvL7iZWQj7AX/DkH3jx4KGfo+DNX3B2S2sP0tvOvDfz3ptt6JGUfl0BDWioY5VLQzSYSg4Zz0splCENUZCSlqRKlMRDqsc447Hg2pBSZ+TQ4h3vFIpCkDuhimTL6y4JJrIE72v++vnx/P32/jN/8Q4YD/sLLVTBwkApi8gAVoSEk8Gwadzmtg37WFn6GgVLbZ4KIDoWEhLsTAZBMIZUKGjsBlQ2wE1A6u1xzpMOeuiiZutk7eSQ9qjBaZ7mmT/VgmN4N8loLEqZF6AupckxAKMBcYjFIgz4eO56RlXQW/bjCcQP//SnemZ7jF4p0KBqYHSFmUhlYBbw6OYCZvhegaVIqgLZG8Br0KKorMcF7bjiCdpe4zm3Z+4Lc57d6tEMj6KXoaxRy2wdn1H81pMN0f/s7vp7bg7viVe8r0HZnXhABPydfdr+At3JydA=

Steps to reproduce

下面的代码,“张三说:”不显示
`<script setup>
import { ref } from 'vue'

const msg = ref('Hello World!')
const tag = '张三说:';
</script>

{{ msg }}

<style scoped> h1::before{ content: v-bind(tag); } </style>`

Uploading 捕获.PNG…

What is expected?

v-bind,生成的变量,在碰到context 时,两边会出现 两个单引号
Uploading 捕获2.PNG…

What is actually happening?

代码中,v-bind,生成的变量少了两个单引号,
捕获

System Info

No response

Any additional comments?

No response

@edison1105
Copy link
Member

用户可以很简单的解决这个问题: const tag = '"张三"';
如果进行特殊处理,可能会是一个 breaking change, 因为有些用户可能已经 '"张三"' 这么做了。

@edison1105 edison1105 closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants