- 博客(111)
- 资源 (1)
- 收藏
- 关注
原创 vue3 项目起始
在这里插入图片描述](https://img-blog.csdnimg.cn/9728e6e9ba564eebab7417a6d263234e.png。
2022-10-29 15:19:29
75
原创 vue 关于阿里巴巴矢量图标库的使用(包含在伪类中使用字体图标)
引入代码import "@/assets/iconfont/iconfont.css";<style lang="less" scoped>::v-deep .el-collapse-item__arrow { width: 40px;}::v-deep .el-icon-arrow-right:before { font-family: "iconfont"; //这一句是必须要加的 content: "展开\e68a";}::v-deep .el-coll.
2022-05-30 14:58:35
617
原创 vue elment 上传附件 (复制可用完整)
=======================完整复制可用================= <el-upload accept=".xls" :show-file-list="false" auto-upload action="none" :http-request="handleUpload" > 批量导入
2022-05-18 10:59:35
169
原创 vue 文字复制clipboard2 复制功能
npm install --save vue-clipboard2import Vue from 'vue'import Clipboard from 'vue-clipboard2'Vue.use(Clipboard)<template> <div> <button type="dashed" v-clipboard:copy="code" v-clipboard:success="copyAddres
2022-05-11 16:18:26
234
原创 vue el-dialog通用弹窗 高度设置好的弹窗
::v-deep .el-dialog { position: relative; margin: 0 auto 0px; background: #ffffff; border-radius: 2px; -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); -webkit-box-sizing: border-box; box-sizing: .
2022-05-11 14:55:35
2352
原创 vue 全局节流 input and button
1、输入框新建debounce.js文件:import Vue from 'vue'Vue.directive('debounce',{ inserted: function (el, binding) { let timer el.addEventListener('keyup', () => { if (timer) { clearTimeout(timer) } timer = setTimeout(() =>
2022-04-28 16:19:24
536
原创 javascript new Promise setTimeout process.nextTick 宏任务 微任务执行顺序
// 宏任务 ajax 定时器 // 微任务 Promise async/await // 注:process.nextTick为同步 setTimeout(function () { //宏任务队列执行 console.log('three') // 7、 process.nextTick(console.log('10')) // 8、 new Promise(resolve=>{...
2022-04-27 15:16:44
1381
原创 vue components is动态组件
<template> <div> <div class="child-div"> <el-tabs v-model="activeName" @tab-click="handleClick"> <el-tab-pane v-for="(item, index) in list" :key="index" :label="item.name" ..
2022-04-22 15:44:53
1647
原创 小程序uni-app 登录 配置导航
------------登录-------------<button @click="getUser" type="default">登录</button> getUser() { uni.getUserProfile({ desc: "weixin", success: res => { console.log("登录", res) uni.setStorageSync('userInfo', res) //用户
2022-04-22 09:42:11
393
原创 vue 手机号码校验 elment校验 简单校验 提交校验
<el-form :model="shipmentFormal" label-width="180px" class="query" :inline="true" :rules="rules" style="background-color: #fff; border: 1px solid #eaeaea" ...
2022-03-31 10:06:38
2061
原创 vue elment表格实现单选
ref="supplierTable" @selection-change="chooseInstance"` // 供应商表格单选 chooseInstance(val){ if (val.length > 1) { this.$refs.supplierTable.clearSelection() this.$refs.supplierTable.toggleRowSelection(val.pop()) ...
2021-12-30 19:52:56
394
原创 vue 活动倒计时
<span>{{ count || 0 }}</span data count: "", //倒计时 seconds: 864000, // 10天的秒数 methods: { // 天 时 分 秒 格式化函数 countDown() { let d = parseInt(this.seconds / (24 * 60 * 60)); d = d < 10 ? d : d + "0"; ...
2021-09-13 10:03:46
241
原创 浏览器滚动条修改
.main-box::-webkit-scrollbar { /*滚动条整体样式*/ width : 10px; /*高宽分别对应横竖滚动条的尺寸*/ height: 1px; } .main-box::-webkit-scrollbar-thumb { /*滚动条里面小方块*/ border-radius : 10px; background-color: skyblue; backgroun
2021-09-08 18:22:25
251
原创 Vue— 获取当前时间并实时刷新
【前言】获取当前系统时间,并在页面上显示并实时刷新,和系统时间保持一致。【内容】1、在data中声明变量data() { return { nowDate: null, //存放年月日变量 nowTime: null, //存放时分秒变量 timer: "", //定义一个定时器的变量 currentTime: new Date(), // 获取当前时间 } }2、定义获取时间的方法getTime,并在created()声
2021-09-07 16:33:17
3281
原创 vue elment大图查看
<template> <div> <el-button @click="open">打开图片预览</el-button> <el-image-viewer v-if="show" :on-close="onClose" :url-list="urls" :initial-index="initialIndex" /> </div></templat.
2021-08-30 14:12:00
153
转载 vue elment表格选中行效果
我的解决方法用到了@selection-change="handleSelectionChange" :row-style="rowClass",在handleSelectionChange中取到所有checkbox选中的内容保存在selectData,然后监听selectData 判断选中行在table列表里面的位置,将所有的index保存在selectRow中,最后在rowClass中给对应的行添加背景色data(){ return { selectRow:[], .
2021-08-27 19:06:41
166
原创 elment 表格内置颜色
:cell-style="cellStyle" cellStyle({ row, column, rowIndex, columnIndex }) { if ( (row.provinceNameStatus === "1" && columnIndex === 1) || (row.companyNameStatus === "1" && columnIndex === 2) || (row.depart...
2021-08-24 20:53:05
70
原创 上传多个文件判断大小多个files选中到数组 带删除功能
<template> <div> <input type="file" ref="fileId" @change="getFile($event)" class="mail-file-upload" id="fileupload" multiple="multiple" /> <div class="mail-file-name" v-for="(item, ind
2021-08-21 23:02:17
213
原创 input上传多个文件 并携带文本参数
<input type="file" ref="fileId" multiple="multiple" @change="getFile" class="mail-file-upload" />main.js import axios from 'axios';V...
2021-08-20 10:46:30
581
转载 转载 elment tree 树组件 实现父节点选中,子节点不选中,子节点选中,父节点选中,子节点全部取消,父节点不取消,父节点取消,子节点全去选
1、带复选框的树组件必须设置:check-strictly=“true” :show-checkbox=“true” @check=“checkChange” <el-tree ref="tree" :data="treeData" :props="defaultProps" node-key="id" show-checkbox :check-strictly = "true" @
2021-08-19 10:32:03
889
1
原创 vue 拖动div 改变宽度
<template> <div class="box" > <div class="left"> <!--左侧div内容--> </div> <div class="resize" title="收缩侧边栏"> ⋮ </div> <div class="mid"> <!--右侧div内容--> 右侧 .
2021-08-14 15:00:06
938
2
原创 vue 请求拦截器响应拦截器添加Loading... 工具函数
import axios from 'axios';import { Message, Loading } from 'element-ui'; //项目已经全局引入element的话可以不单独引入import Cookies from 'js-cookie';import router from '@/router/index'let loading //定义loading变量function startLoading() { //使用Element loading
2021-08-14 13:19:35
1874
原创 vue懒加载局部刷新
写入标签 node-key="id" ref="asyncTree"写入函数 refreshNodeBy(id) { if (id == '根节点id') { // 根节点的增删改查 this.treeLoadRootNode() // 重新加载根节点 } else { // 子节点的增删改查 let node = this.$refs.asyncTree.getNode(id) // 通过
2021-08-10 20:07:18
331
原创 echarts 更改业内颜色用法
myChart = echarts.init(document.getElementById('myEcharts')); var option = { tooltip: { trigger: 'axis', axisPointer: { t...
2021-08-10 09:13:36
189
原创 vue axios 文件流下载文件
axios.post( 'a.bbb.cc/d/ee',//请求的url { 'data':this.data//请求数据 }, { responseType:'blob'//服务器返回的数据类型 } ).then((res)=>{ //此处有个坑。这里用content保存文件流,最初是content=res,但下载的test.xls里
2021-08-05 15:51:48
533
原创 vue 左侧导航栏选中样式 elment ui
.el-menu-item:hover { background: #2b5dbe !important; border-radius: 10px 0px 0px 10px; } .el-menu-item.is-active { background: #1D33A2 !important; // border-radius: 10px 0px 0px 10px; color: #fff!important; i { color: #fff
2021-07-30 15:21:52
665
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人