vue-loader icon indicating copy to clipboard operation
vue-loader copied to clipboard

sub component lost style (without data-v-xxxxxxxx attribute ) when I use style scoped

Open yokefellow opened this issue 3 years ago • 3 comments

Version

15.10.0

Reproduction link

codesandbox.io

Steps to reproduce

<template>
  Please see the reproduction link above for details
</template>
<script>
export default {
  name: "VuetifyDemo",
  data: () => ({
    show: false,
  }),
};
</script>
<style scoped src="vuetify/dist/vuetify.min.css">
</style>
<style lang="stylus" scoped></style>

What is expected?

Components can be displayed normally when I import without using global styles. I am using vuetify to complete some functions of vuepress, but reset.css is included in vuetify.min.css, I don't want them to affect other styles, so I choose partial import.

What is actually happening?

When component is rendered, v-img (.v-image div) has no data-v-xxxxxxxx attribute. When I remove the scoped setting, it displays fine, but it also means that other styles of vuepress are polluted. image

When I manually add the data-v-xxxxxxxx attribute in the browser developer tools, the display is normal, now I want to know how to achieve it by code image

yokefellow avatar Oct 04 '22 10:10 yokefellow

I got same problem today

conarti avatar Nov 01 '22 18:11 conarti

is there any fix for this yet ? @conarti @yokefellow

didagu avatar Jun 23 '23 11:06 didagu

+1

aurium avatar Jun 11 '24 20:06 aurium