xxhzm | 小小孩子们

Solve the problem that the dist folder is too large after Vue is packaged

1. Do not generate a sorce map file Set productionSourceMap to false in vue.config.js When this option is turned off, the packaged file will be twice as small 2. If the component library is referenced, set the on-demand reference If your project references the component library, the development environment can be imported without thinking, and

Solve the problem that the dist folder is too large after Vue is packaged Read More »

Use of Vuex

foreword What is Vuex? The official documentation says this: Vuex 是一个专为Vue.js 应用程序开发的状态管理模式+ 库。它采用集中式存储管理应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化。 It can be understood that Vuex is a data management framework what Vuex has state (where state data is stored) getters (can be understood as the computed properties of the store) mutations (methods that change data in state (modify data synchronously)) actions

Use of Vuex Read More »

Encapsulate ajax request

foreword As the title, I encapsulated an own ajax request function. Uncompressed version: https://cdn.xxhzm.cn/request/request.js Compressed version: https://cdn.xxhzm.cn/request/request.min.js Instructions for use pass parameters URL address Request method (GET, POST) request parameters request header Whether to request asynchronously (true, false), asynchronous request is enabled by default GET GET takes no parameters and no request headers: <script src=”https://cdn.xxhzm.cn/request/request.min.js”></script>

Encapsulate ajax request Read More »

Solve the problem that the dist folder is too large after Vue is packaged

1. Do not generate a sorce map file Set productionSourceMap to false in vue.config.js When this option is turned off, the packaged file will be twice as small 2. If the component library is referenced, set the on-demand reference If your project references the component library, the development environment can be imported without thinking, and

Solve the problem that the dist folder is too large after Vue is packaged Read More »

Use of Vuex

foreword What is Vuex? The official documentation says this: Vuex 是一个专为Vue.js 应用程序开发的状态管理模式+ 库。它采用集中式存储管理应用的所有组件的状态,并以相应的规则保证状态以一种可预测的方式发生变化。 It can be understood that Vuex is a data management framework what Vuex has state (where state data is stored) getters (can be understood as the computed properties of the store) mutations (methods that change data in state (modify data synchronously)) actions

Use of Vuex Read More »

Encapsulate ajax request

foreword As the title, I encapsulated an own ajax request function. Uncompressed version: https://cdn.xxhzm.cn/request/request.js Compressed version: https://cdn.xxhzm.cn/request/request.min.js Instructions for use pass parameters URL address Request method (GET, POST) request parameters request header Whether to request asynchronously (true, false), asynchronous request is enabled by default GET GET takes no parameters and no request headers: <script src=”https://cdn.xxhzm.cn/request/request.min.js”></script>

Encapsulate ajax request Read More »