Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Since some projects need to write styles to override the styles of components generated with a scopeId, for example:
.xxx[data-v-123]{color:red;}
However, the generated scopeId changes every time the component version is updated (e.g., it changes to 456), which makes it necessary to modify the styles like this:
.xxx[data-v-456]{color:red;}
Because it is not possible to implement .xxx[data-v-*]{color:red;} with CSS, a new requirement is proposed:
Can we support compiling it into data-v="123"?
If so, we can use it like this:
.xxx[data-v]{color:red;}
---中文描述如下---
.xxx[data-v-123]{color:red;}
但每次更新组件版本后生成的scopeId不同,比如变成了456,导致要修改样式,如
.xxx[data-v-456]{color:red;}
因为无法用css实现.xxx[data-v-*]{color:red;},所以提出新需求:
是否可以支持编译data-v="123"?
那就可以这么用了:
.xxx[data-v]{color:red;}
Beta Was this translation helpful? Give feedback.
All reactions