In the previous article, we introduced how to create a Vue CLI project using Vue3 (Part 1). Next, we will continue to expand the content of the following article based on the previous article. 1. Integrate Ant Design VueSQL: npm install [email protected] --save compatibility: If you need to support For IE series browsers, support for 2. Use of componentsOfficial website address: https://2x.antdv.com/docs/vue/getting-started-cn 1. Full citationModify the content in main.ts as follows: ts import { createApp } from 'vue'; import Antd from 'ant-design-vue'; import App from './App.vue'; import 'ant-design-vue/dist/antd.css'; import router from './router'; import store from './store'; //The advantage is that it is easy to develop, but the disadvantage is that the file will be larger when packaged (but it does not affect anything) createApp(App).use(store).use(router).use(Antd).mount('#app') 2. Component reference After the complete import, we can use the components happily. If you have used 3. Component Usage Examples Let's add a button to the 1. We make changes on the home pageHTML: <template> <div class="home"> <a-button type="primary" danger>Primary</a-button> <img alt="Vue logo" src="../assets/logo.png"> <HelloWorld msg="Welcome to Your Vue.js + TypeScript App"/> </div> </template> <script lang="ts"> import { defineComponent } from 'vue'; import HelloWorld from '@/components/HelloWorld.vue'; // @ is an alias to /src export default defineComponent({ name: 'Home', components: HelloWorld, }, }); </script> 2. Restart the service to see the effect Double-click IV. Conclusion This is the end of this article about You may also be interested in:
|
<<: Sqoop export map100% reduce0% stuck in various reasons and solutions
>>: HTML table tag tutorial (35): cross-column attribute COLSPAN
First download the latest MySQL 5.7.17 Community ...
What I have been learning recently involves knowl...
I encountered mysql ERROR 1045 and spent a long t...
<br />Table is an awkward tag in XHTML, so y...
Sometimes you will see English commas ",&quo...
When developing a Vue project, you often need to ...
1. The catalina.bat must be set to UTF-8. If I do...
Prerequisite: Percona 5.6 version, transaction is...
This article uses examples to illustrate the prin...
When you write buttons (input, button), you will f...
Web Services are concerned with application-to-ap...
Preface As we all know, HTML5 belongs to the Worl...
MySQL installation is relatively simple, usually ...
Installation Environment Centos Environment Depen...
Copy code The code is as follows: <!-- List ta...