![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Vue
Vue
郑子健_
八岁习武,是个人才.
展开
-
Vue Echarts 中国地图
准备部分// 下载 echarts "echarts": "^4.6.0",// 下载 lodash "lodash": "^4.17.21",(地图自适应防抖)// 在 main.js 文件中 引入/注册/声明使用import echarts from 'echarts'Vue.prototype.$echarts = echartsimport china from 'echarts/map/json/china.json'echarts.registerMap('china原创 2021-09-28 17:00:45 · 516 阅读 · 0 评论 -
Vue + Element 表格 + 分页器 二次封装
表格效果组件的创建<template> <div id="Wrap"> <!-- 表格 --> <el-table :data="tableData" :border="hasBorder" :header-cell-style="{ background: '#DDDDDD', color: '#606266' }" > <!-- 序号 --> <原创 2021-09-10 16:23:36 · 390 阅读 · 2 评论 -
模块化(暴露与引入)
模块化是什么?将JS文件按照功能分解为多个Js文件。为什么模块化?使用模块化可以对不同的功能点进行同一的管理,降低耦合性,减少同名的影响.每一个模块都有属于自己单独空间。如何模块化?/* --分别暴露-- */export const a = 10;export const getData = ()=>{};import {a,getData} from './test' // 按需引入import * as Demo from './test' // 统一引入/.原创 2021-07-03 21:27:17 · 281 阅读 · 0 评论 -
Vue项目优化(持续更新)
UI库使用按需加载(打包)下载bebel插件包: bebel-plugin-component路由组件的懒加载const Home = ()=> import('../Home/Home.vue')图片懒加载npm install vue-lazyload声明使用:Vue.use(VueLazyLoad,{loading:loading图片})组件使用:webpack打包优化目标:兼容性/减少打包文件/懒加载/预加载/首页加载优化技巧:H..原创 2021-07-03 20:51:41 · 67 阅读 · 0 评论 -
Vue生命周期
// 创建 => 挂载 => 更新 => 销毁// 初始化(执行1次) beforeCreate() => created() => beforeMount() => mounted()// 更新数(执行n次) beforeUpdate() => updated()// 销毁数(执行1次) beforeDestroy() => destroyed()// 组件的缓存/激活 deactivated()/activated()// 捕获子组件错误 er原创 2021-07-03 20:48:04 · 155 阅读 · 0 评论