S
S
shasoft2019-02-11 10:13:44
Vue.js
shasoft, 2019-02-11 10:13:44

How to make Vuetify web components render correctly?

Created this Bt.vue web component

<template>
  <div style="border:1px solid red">
    <div>
      <v-btn depressed small color="primary">Primary</v-btn>
    </div>
    <div>
      <v-btn depressed small color="error">Error</v-btn>
    </div>
  </div>	
  </template>

<script>
  export default {
  }
</script>

Compiling it
npx vue-cli-service build --target wc --name shasoft "src/components/*.vue"

and display on the page as
<shasoft-bt></shasoft-bt>
    <div>
      <v-btn depressed small color="error">Ошибка</v-btn>
    </div>

But it is displayed in this form:
5c61215575d5a588544165.png
and this is how it looks
5c61213fe498c116374948.png
. the button that is displayed directly on the page - everything is ok with it. And the button that is in the component - it is displayed crookedly. I understand that there is not enough CSS, but how can I make this CSS come from the main page?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question