摘要: 1. document.execCommand() 【即将废弃】 function copy(textValue) { // 动态创建 textarea 标签 const textarea = document.createElement('textarea') // 将该 textarea 设为 阅读全文
posted @ 2022-12-06 16:24 Oopy 阅读(5559) 评论(0) 推荐(0)
摘要: v-model 实现原理 v-model 是一种语法糖,当使用 v-model="msg" 时,等价于 :msg="msg" @input='msg=𝑒𝑣𝑒𝑛𝑡′父组件使用:𝑚𝑠𝑔="𝑚𝑠𝑔"将属性传递给子组件,并监听𝑖𝑛𝑝𝑢𝑡事件。子组件使用𝑝⻖ 阅读全文
posted @ 2022-11-22 14:37 Oopy 阅读(2827) 评论(0) 推荐(0)
摘要: 1.Vue img标签自带@error事件 //图片损毁时触发 imgOnError(e) { e.target.src = 'xxxx'; //控制不要一直跳动 e.target.onerror = null; } 2.elementUI使用el-image标签自带加载失败功能 // 自定义内容 阅读全文
posted @ 2022-11-16 11:25 Oopy 阅读(1190) 评论(0) 推荐(0)
摘要: app.vue里的 onLaunch 中如果有异步方法(比如:登录),返回结果可能会在页面的 onLoad 之后,但 onLoad 中的方法需要登录回调的结果。 为了让页面的 onLoad 在 onLaunch 之后执行,解决方案: 1.main.js Vue.prototype.$onLaunch 阅读全文
posted @ 2022-09-14 11:28 Oopy 阅读(1071) 评论(0) 推荐(0)
摘要: 实现效果: 实现思路:给<el-cascader>添加类名:.cascader-input并添加禁止点击:pointer-events: none; 在<el-cascader>外层添加div并设置允许点击:pointer-events: all; 然后设置点击事件即可。 具体实现主要部分: CSS 阅读全文
posted @ 2022-07-15 17:09 Oopy 阅读(1916) 评论(0) 推荐(0)
摘要: 预览效果图: 完整代码: <!-- * @Descripttion: * @version: * @Author: Oop * @Date: 2022-07-06 11:10:28 * @LastEditors: Oop * @LastEditTime: 2022-07-08 17:30:01 -- 阅读全文
posted @ 2022-07-08 17:46 Oopy 阅读(525) 评论(0) 推荐(0)
摘要: 1.数据视图表格样式自定义: JS toolbox: { feature: { dataView: { show: true, readOnly: false, optionToContent(opt) { let axisData = opt.xAxis[0].data; //坐标数据 let s 阅读全文
posted @ 2022-06-29 10:56 Oopy 阅读(147) 评论(0) 推荐(0)
摘要: 实现思路:使用vue.draggable拖拽插件,隐藏原有的上传view,自定义上传view并绑定预览和删除功能 先上效果: view: <el-form-item label="商品细节图:"> <div style="display: flex;height: 110px;"> <!-- 使用e 阅读全文
posted @ 2022-06-16 17:54 Oopy 阅读(7084) 评论(0) 推荐(0)
摘要: $_array = array( array(1,11,'2016-05-18'), array(2,11,'2016-05-18'), array(3,22,'2016-05-18'), array(4,22,'2016-05-18'), array(5,33,'2016-05-19'), arr 阅读全文
posted @ 2021-08-11 15:37 Oopy 阅读(776) 评论(0) 推荐(0)
摘要: $user = User::where('email', $email)->first(); Auth::login($user); 阅读全文
posted @ 2021-08-06 14:10 Oopy 阅读(296) 评论(0) 推荐(0)