![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
各类vue使用技巧
大大大大冬瓜
这个作者很懒,什么都没留下…
展开
-
vue拖拽悬浮球
创建组件dragBallComponent.vue<template> <div class="drag-ball" ref="dragBall" @touchstart.stop.prevent="touchstart" @touchmove.stop.prevent="touchmove" @touchend.stop.prevent="touchend"> <div class="drag-content"> <slot name="原创 2021-07-23 11:54:03 · 616 阅读 · 0 评论 -
element时间组件修改不更新
网上的好多办法都不行,胡说八道,直接这样完美解决<el-date-picker style="width:400px;" v-model="formData.answers.time" @input="daterangeChange" value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange原创 2020-12-08 10:52:57 · 474 阅读 · 2 评论 -
el-dialog嵌套问题解决
两个el-dialog嵌套只需要在子组件上加:modal-append-to-body='false' :append-to-body='true'即可。。。。原创 2020-11-04 15:42:22 · 1222 阅读 · 0 评论 -
js复制文本到剪切板
公共方法//h5复制文本到剪切板 copyContentH5: function (content) { var copyDom = document.createElement('div'); copyDom.innerText=content; copyDom.style.position='absolute'; copyDom.style.top='0px'; copyDom.style.right='-原创 2020-10-10 15:54:30 · 134 阅读 · 0 评论 -
vue在ios中输入框需要点击多次
在min.js中添加以下代码FastClick.prototype.focus = function(targetElement) { let length if (targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month')原创 2020-08-17 09:50:30 · 379 阅读 · 1 评论 -
vue动态设置元素宽度
引入import elementResizeDetectorMaker from 'element-resize-detector'写在html上:style="{width: operatewidth + 'px'}"计算mounted() { const _this = this const erd = elementResizeDetectorMaker() // enterpriseinfo-container 父级id if (document.get原创 2020-05-09 10:37:22 · 6232 阅读 · 0 评论 -
vue 多级展开列表与递归组件的使用(超简单)
今天我们继续使用 Vue 的撸我们的实战项目,只有在实战中我们才会领悟更多,光纸上谈兵然并卵,继上篇我们的《Vue一个案例引发的动态组件与全局事件绑定总结》 之后,今天来聊一聊我们如何在项目中使用递归组件。信息的分类展示列表这次我们主要是实现一个信息的分类展示列表存在二级/三级的分类,如下如所示:看到这个很多人会想到这个实现起来很简单啊,来个嵌套循环不就完事了。对,你说的没错,事实就是这...转载 2019-07-25 09:19:58 · 3008 阅读 · 0 评论 -
wangeditor富文本编辑器
vue常用富文本编辑器wangeditor子组件代码父组件代码在这里接受子组件传过来的参数,赋值给data里的参数wangeditor** 最终效果**首先安装wangeditor$ npm install wangeditor将wangeditor 封装成组件方便使用子组件代码// wangeditor<template> <div id="wang...原创 2019-07-17 16:57:35 · 542 阅读 · 0 评论 -
vue微信分享插件
1.安装weixin-js-sdknpm install weixin-js-sdk2.闯进文件并引入创建wxshare.js3.在wxshare.js中编写插件import wx from 'weixin-js-sdk'import URL from '@/common/urlConfig'export const shareTitle = '测试';export con...原创 2020-02-17 15:43:17 · 649 阅读 · 2 评论