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 The principle and function of l...
The solutions to the problems encountered during x...
Feelings: I am a backend developer. Sometimes when...
question: Recently, garbled data appeared when de...
As a lightweight open source database, MySQL is w...
Table of contents Preface && Operator || ...
The traditional method is to write a square in a ...
We use the translate parameter to achieve movemen...
MySQL encryption and decryption examples Data enc...
Table of contents 1. Overview 1.1 Creating a func...
1. The Linux server configures /etc/hosts.deny to...
Docker supports running on the following CentOS v...
This article example shares the specific code of ...
html <div class="totop" v-show="...
MQTT Protocol MQTT (Message Queuing Telemetry Tra...