Vue
起啥名呢啊
这个作者很懒,什么都没留下…
展开
-
线上PDF文件展示
场景: 请求到的PDF(url链接),将其展示在页面上原创 2023-11-24 16:02:58 · 787 阅读 · 0 评论 -
Fabric.js 的使用
Fabric.js 矩形绘制. 设置背景图. 禁止绘制区域超出画布原创 2023-02-03 10:25:43 · 714 阅读 · 0 评论 -
Element 选择当天和往前半年的日期
Element 选择当天和往前半年的日期转载 2023-01-05 10:05:06 · 265 阅读 · 0 评论 -
vue 未登录 登录超时跳转到登录页
在router下面的index.js中添加meta: {requireauth: true, // 判断是否需要登录},用来判断需要是否登录原创 2022-09-06 10:45:45 · 1065 阅读 · 0 评论 -
Vue 兄弟之间传值
如何在兄弟组件中传值在main.js中:new Vue({ beforeCreate() { Vue.prototype.$bus = this; //安装全局事件总线,$bus就是当前应用的vm },}).$mount("#app");```2. 在发送页面this.bus.bus.bus.emit(“canshu”, res.data.data); // canshu 自定义的, 可以理解为标识, 在接收页面需要和其一致 res.data.data 是需要传原创 2022-05-25 14:55:28 · 55 阅读 · 0 评论 -
Vue 监听浏览器页面窗口切换, 窗口最小化
mounted() { document.addEventListener("visibilitychange", function () { if (document.visibilityState == "hidden") { //切离该页面时执行 localStorage.setItem("api", "ac"); } else if (document.visibilityState == "visible") { /.原创 2022-05-11 17:55:46 · 1443 阅读 · 0 评论 -
关于 vue 第三方库 Velocity js的使用问题
1. 安装 Velocity js 依赖yarn: yarn add velocity-animate (我用的这个 )npm:npm install velocity-animatebower:bower install velocity2. 引入Vulocity js我用的是局部引入的方式import Velocity from "velocity-animate";或者 <script src="https://cdnjs.cloudflare.com/ajax/libs/v原创 2022-04-12 14:31:54 · 917 阅读 · 0 评论 -
Element input检索table表格中的数据
<template> <div class="table"> <div class="search-Box"> <el-input placeholder="请输入关键字" v-model="search"></el-input> </div> <el-table :data="tables" border style="width: 100%"> <el-t转载 2022-03-10 09:27:39 · 668 阅读 · 1 评论 -
记: 利用VueX 实现子组件之间传值
需求: A,B两个子页面 点击A页面中table表格中的某行内的button, 获取该行内的信息"ID", 并将该id 传送至B页面,并渲染在页面上.思路: 获取id > 利用Vuex 将id存到state中 > 在B页面接收id,并渲染到页面第一步: 先获取table中改行的id ,我用的是element-ui. 利用插槽的方式lot-scope.上代码: <template slot-scope="scope"> <el-button styl原创 2022-03-01 11:49:47 · 759 阅读 · 0 评论