![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
夏天的一朵云
这个作者很懒,什么都没留下…
展开
-
render函数添加title属性控制文字长度
render: (h, params) => { let _this = this return h('div',[ h('div',{ class:'text-overflow-ellipsis',//用类名控制文字溢出显示省略号 attrs:{ title:'这是超出要显示的文字', }, props: { type: "text", size: "small", .转载 2021-03-22 18:43:58 · 2475 阅读 · 0 评论 -
vue导航守卫beforeRouteLeave浏览器返回时,自定义弹窗提醒用户保存信息
H5页面中经常会遇到的情况,当前页面点击返回,想要提示弹窗"是否确认离开当前页面"之类的需求。自己试着看了一下网上的方法,大多是alert出系统弹窗。其实要实现自定义弹窗提示,也是很容易的。从另一个页面点击跳转到当前页(如下),点击浏览器返回按钮,则会弹窗下面的弹窗,点击弹窗确定按钮,页面返回上一页完整代码<template> <div class="templ"> <div>123</div> <div c.原创 2021-01-27 16:19:26 · 996 阅读 · 1 评论 -
给vue打包的js文件添加哈希
在vue.config.js文件中module.exports = { // webpack配置 chainWebpack: config => { if (process.env.NODE_ENV === 'production') { // 清除css,js版本号 config.output.filename('static/js/[name].js').end(); config.out原创 2020-08-28 23:32:01 · 3452 阅读 · 0 评论 -
结合axios(formdata)+vue-cropper+element ui实现头像图片剪切上传
萌新用vue + axios + formdata 上传文件的爬坑之路https://blog.csdn.net/qq_41688165/article/details/80834842结合vue-cropper与element ui实现头像图片剪切上传https://www.jianshu.com/p/039cfd0dfd05<template> <div...原创 2020-02-05 00:55:53 · 518 阅读 · 0 评论