![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
文章平均质量分 50
阿宅的小天地
前端学习
展开
-
vue2.x生命周期学习
主要就记录下各个生命周期在干什么,加强记忆。beforeCreate、created、beforeMount、mounted、beforeUpdate、updated、beforeDestroy、destroyed。其中需要注意this.$el, this.$data,前者是DOM,后者是响应数据。结果如图:可以看到在created阶段中,已经可以获取到this.$data,在创建周期中,Vue里对props、data、computed等做了初始化。beforeMount阶段中,th...原创 2021-12-07 21:24:19 · 557 阅读 · 0 评论 -
vue element-ui 中表单弹框的使用
使用Vue+Element-UI简单的做了一个表格的增删改,效果图如下,新增和修改编辑共用一个弹框表单组件。首先点击编辑按钮,把当前的行数据传递给子组件,开始我以为只要在父组件中传递相应的props,然后子组件里获取即可,但是没有表单并没有读取到数据。// 父组件<template>... <edit-modal :row="row" :visible.sync="dialogFormVisible" @close="dialogFormVisible原创 2021-12-05 15:20:37 · 11992 阅读 · 2 评论 -
vue中子组件中传值问题
问题描述:数据列表中Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders....原创 2021-11-21 15:09:43 · 675 阅读 · 0 评论 -
在vue中使用Mock
1. 安装插件npm i -D mockjsnpm i -D json52. 在根目录下新建Mock文件夹,并新建index.js、test.json5mkdir Mocktouch index.js test.json5// index.jsconst Mock = require('mockjs')const path = require('path')const fs = require('fs')const json5 = require('json5')原创 2021-11-19 17:01:38 · 750 阅读 · 0 评论