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
Table of contents 1. Component Registration 2. Us...
Table of contents Safe Mode Settings test 1. Upda...
Table of contents Problems with resource manageme...
The Linux operating system has revolutionized the...
<br />With the increase of bandwidth, there ...
Preface BINARY and VARBINARY are somewhat similar...
In the pages of WEB applications, tables are ofte...
Method 1 Copy code The code is as follows: documen...
Many times, we ignore the setting of the web page ...
1. Wireless Run PowerShell and enter the command:...
Vue parent component calls the function of the ch...
1. Download and install MySql Download MySql data...
MySQL implements Oracle-like sequences Oracle gen...
This article shares the specific code of writing ...
background Today, I was browsing CodePen and saw ...