随笔分类 -  Vue

摘要:<el-popover width="124px" effect="light" :popper-options="{ modifiers: [{ name: 'offset', options: { offset: [200, 200] } }] }" :show-arrow="false" po 阅读全文
posted @ 2022-08-15 10:46 脉望 编辑
摘要:安装 vuex-persistedstate npm install --save vuex-persistedstate admin.js const state = { name: '', phone: '', avatar: '' } const mutations = { } export 阅读全文
posted @ 2021-06-15 20:53 脉望 阅读(404) 评论(0) 推荐(0) 编辑
摘要:值传递 父组件: <template> <div> <h1>Parent</h1> <button @click="amount++">点击 amount++</button> <p>{{amount}}</p> <Child :data="amount"></Child> </div> </tem 阅读全文
posted @ 2021-06-02 22:38 脉望 阅读(3375) 评论(0) 推荐(0) 编辑
摘要:路由组件在复用的时候切换路由时,因为组件的复用,导致不会走完整的生命周期,有些在 mounted 和 created 生命周期函数中的方法就不会执行,由此产生疑问,在组件中引入的子组件,在路由父组件切换的时候,子组件会不会走mounted 和 created 父组件1: <template> <di 阅读全文
posted @ 2021-06-02 17:29 脉望 阅读(188) 评论(0) 推荐(0) 编辑
摘要:<template> <div class="corpping-warp"> <!-- 显示头像-选择图片 --> <el-upload action :on-change="selectImage" :show-file-list="false" accept=".jpg,.png" :auto- 阅读全文
posted @ 2021-05-30 23:47 脉望 阅读(468) 评论(0) 推荐(0) 编辑