Processing components for vue2 source code analysis

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 […]

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 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 […]