Answer the question
In order to leave comments, you need to log in
How to create an asynchronous web component on vuetify?
I create a new project
vue create my-project
, add vuetify there and create a component
<template>
<v-container><v-btn @click="testClick">Кнопочка 1</v-btn></v-container>
</template>
<script>
import { VBtn, VContainer } from "vuetify/lib";
import vuetify from "../plugins/vuetify";
export default {
name: "HelloWorld",
vuetify,
components: {
VBtn,
VContainer,
},
data: () => {
return {};
},
methods: {
testClick: function () {
alert("Click Ok");
},
},
};
</script>
npx vue-cli-service build --inline-vue --target wc-async --name hello-world ./src/components/HelloWorld.vue
<meta charset="utf-8">
<title>hello-world demo</title>
<script src="https://unpkg.com/vue"></script>
<script src="./hello-world.js"></script>
<hello-world></hello-world>
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.js"></script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question