Basic usage Define components globally: // Define a b component in the form of Vue.component() Vue.component(‘b’, {<!– –> template: ‘<p>{<!– –>{ a }}{<!– –>{ name }}</p>’, data () {<!– –> return {<!– –> a: 999 } }, created(){<!– –> // (‘created of child component’) }, beforeMount(){<!– –> // (‘beforeMount of subcomponent’) } }) Locally defined […]
Tag: vue
Vite3+vue3 project packaging optimization 3 – CDN acceleration, file compression
1. CDN online acceleration Content Delivery Network (CDN for short) is a distributed content distribution network built on a data network, which allows users to request resources from the nearest server to improve the response speed of network requests. Usually, we request dependent modules to use CDN, while requesting project code still uses its own […]
Vue (Vuex plugin)
1. Introduction to Vuex 1. Concept A Vue plug-in that specifically implements centralized state data management in Vue. It performs centralized management (read/write) on the shared state of multiple components in Vue applications. It is also a way of communication between components, and Suitable for communication between arbitrary components. 2. Understand vuex address https://github.com/vuejs/vuexhttps://github.com/vuejs/vuex 3. […]
[Vue source code] logic analysis of keep-alive components (Part 2)
Start the growth journey of Nuggets! This is the 17th day of my participation in the “Nuggets Daily New Project · February Update Challenge”, click to view the event details Foreword It is recommended to read two chapters before reading this chapter [Vue source code] logic analysis of keep-alive components (Part 1) [Vue source code] […]
Vue development menu management page
Our general background management projects are configured in the background to configure routing and permissions, and if we need to add menus in the front end, we need to write a menu management page for configuration. 1. New menu management page Create a new menu package under views, and create a new SysMenu.vue page under […]
[Vue source code] Logical analysis of keep-alive components (Part 1)
Start the growth journey of Nuggets! This is the 15th day of my participation in the “Nuggets Daily New Project · February Update Challenge”, click to view the event details keep-alive Basic usage The use of keep only needs to add labels to the outermost layer of dynamic components <div id=”app”> <button @click=”changeTabs(‘child1’)”>child1</button> <button @click=”changeTabs(‘child2’)”>child2</button> […]
Vue uses Swiper content too long bug
Project scenario: For example: use Swiper to realize sliding on the mobile phone swiper Chinese website Description of the problem For example: Some page content is larger than the screen length, but Swiper is not suitable for scroll bars by default. The solution given by the official website @Override <!DOCTYPE html> <html lang=”en”> <head> <meta […]
[Vue source code] logic analysis of keep-alive components (in)
Start the growth journey of Nuggets! This is the 16th day I have participated in the “Nuggets Daily New Project · February Update Challenge”, click to view the event details Before reading this chapter, it is recommended to read [[Vue source code]keep-alive component logic analysis (middle)]([Vue source code]keep-alive component logic analysis (on)). This chapter mainly […]
About my realization of the vue functional pop-up window overflowing the project
vue functional pop-up window I have read a lot of articles before, and I always wanted to make my own, mainly based on secondary packaging and Vue.extend. I will share the pitfalls I stepped on and how to deal with them. The main functions are as follows: support title Load child component rendering Provides a […]
About the two ways to deploy vue project on Linux tomcat and nignx (1) use tomcat for deployment
Adam said: When writing the spring-boot project before, the jsp page written directly was directly packaged into a war package to run. Tomcat is used, and it is simple and convenient, but the fly in the ointment is that the animation demonstration and the page cannot be very beautiful. Since I started writing projects (microservices, […]