08 2021 档案

摘要:let Img = new Image() Img.src = this.full_img_src if (Img.fileSize > 0 || (Img.width > 0 && Img.height > 0)) { } else { return this.$message.error('找不 阅读全文
posted @ 2021-08-27 14:48 yw3692582 阅读(868) 评论(0) 推荐(0) 编辑
摘要:function(file_type){ let url = '文件的url地址' let file_suffix = { // 后缀 img: '.jpg', video: '.mp4', } let file_name = 'file' + file_suffix[file_type] // 文 阅读全文
posted @ 2021-08-27 13:03 yw3692582 阅读(1007) 评论(0) 推荐(0) 编辑
摘要:语法:navigator.sendBeacon(url, data); 例子(写在mounted中): window.addEventListener("beforeunload", (e) => { window.navigator.sendBeacon(url, '测试发送的数据'); });参 阅读全文
posted @ 2021-08-24 19:51 yw3692582 阅读(199) 评论(0) 推荐(0) 编辑
摘要:<el-dialog title="上传文件" :visible.sync="upload_dialog" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" width="500px" > 阅读全文
posted @ 2021-08-13 13:21 yw3692582 阅读(93) 评论(0) 推荐(0) 编辑
摘要:<template> <div id="ailse_box"> <div> <el-table style="width: 100%;" :row-key="get_row_key" @cell-click="cell_click" :row-class-name="table_row_class_ 阅读全文
posted @ 2021-08-13 11:20 yw3692582 阅读(3568) 评论(0) 推荐(1) 编辑
摘要:1、el-table 加一个方法::row-key="get_row_key" 2、在 methods 中: // 保持选中状态 get_row_key(row) { // 保证是唯一标识符即可 return row.id }, 3、加上 :reserve-selection="true" <el- 阅读全文
posted @ 2021-08-13 11:11 yw3692582 阅读(934) 评论(0) 推荐(1) 编辑
摘要:1、npm install vue-xlsx-table --save 2、在main.js中 import vueXlsxTable from 'vue-xlsx-table' Vue.use(vueXlsxTable, {rABS: false}) 3、在组件中使用 <vue-xlsx-tabl 阅读全文
posted @ 2021-08-12 16:56 yw3692582 阅读(604) 评论(0) 推荐(0) 编辑
摘要:// 自定义指令 directives: { // 指令名称:v-test test: { bind(el, binding, vnode) { // 初始化时触发,只触发一次,这里可以放dom的样式相关的内容 console.log(binding) }, inserted(el, binding 阅读全文
posted @ 2021-08-12 09:39 yw3692582 阅读(26) 评论(0) 推荐(0) 编辑
摘要:1、创建一个文件夹 2、npm init -y 3、npm install express --save // 创建 index.js, 然后 node index.jsconst express = require("express") const app = express() app.list 阅读全文
posted @ 2021-08-11 21:38 yw3692582 阅读(89) 评论(0) 推荐(0) 编辑
摘要:地址:https://mp.weixin.qq.com/s/sOeFauAE8aK2wJLnghEufw 阅读全文
posted @ 2021-08-11 16:44 yw3692582 阅读(168) 评论(0) 推荐(0) 编辑
摘要:// java 代码import java.io.IOException; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.s 阅读全文
posted @ 2021-08-11 09:49 yw3692582 阅读(46) 评论(0) 推荐(0) 编辑
摘要:nginx:作用,web服务器,用来提供负载均衡和反向代理启动nginx位置:/usr/local/nginx/sbin常用命令:启动 nginx:./nginx查看 nginx进程:ps -ef | grep nginx修改 nginx.conf 文件后,重启nginx:nginx -s relo 阅读全文
posted @ 2021-08-09 14:06 yw3692582 阅读(138) 评论(0) 推荐(0) 编辑
摘要:此内容均以 win10 系统为参照: 前提条件: 首先确定安装了Python,我安装的是Python3.9版本,地址如下 1、官网链接:https://www.python.org/downloads/release/python-390/ 2、直接下载链接:https://www.python.o 阅读全文
posted @ 2021-08-09 11:36 yw3692582 阅读(811) 评论(0) 推荐(0) 编辑
摘要:原生放在 mounted 添加正常: document.getElementById('real_center_box').addEventListener('scroll', this.get_scrollTop) 移除,放在 beforeDestroy 或者 destroyed 中,移除时会报错 阅读全文
posted @ 2021-08-08 10:45 yw3692582 阅读(2280) 评论(0) 推荐(0) 编辑
摘要:// 语音播放 const synth = window.speechSynthesis const message = new SpeechSynthesisUtterance() function voice_playback(text) { message.text = text messag 阅读全文
posted @ 2021-08-07 18:00 yw3692582 阅读(193) 评论(0) 推荐(0) 编辑
摘要:/***** 主要需要一个变量(distinguish )来判断是哪种状态*****/ // 单击 once_click(item) { this.distinguish = true setTimeout(() => { if (this.distinguish) { // 处理单击事件的代码块 阅读全文
posted @ 2021-08-06 17:18 yw3692582 阅读(376) 评论(0) 推荐(0) 编辑
摘要:// 文件结构如下, 父容器高度固定,内容超出时出现滚动条,现在需要获取滚动条的位置 <div id="center" style="height: 500px;overflow-y: auto;"> <div></div> </div> script: var center_scrollTop = 阅读全文
posted @ 2021-08-06 13:53 yw3692582 阅读(2913) 评论(0) 推荐(0) 编辑
摘要:let url = 'http://127.0.0.1:3000' let reg_str = /\d+\.\d+\.\d+\.\d+/ console.log(url.match(reg_str)) // ["127.0.0.1", index: 7, input: "http://127.0.0 阅读全文
posted @ 2021-08-05 12:57 yw3692582 阅读(1223) 评论(0) 推荐(0) 编辑
摘要:1、在index.html中引入animate.css 2、使用 transition 标签包裹需要显示/隐藏的内容,通过 v-if 或者 v-show 来控制显示/隐藏,vue官网关于它的介绍:https://cn.vuejs.org/v2/guide/transitions.html 3、重点: 阅读全文
posted @ 2021-08-04 19:26 yw3692582 阅读(1217) 评论(0) 推荐(0) 编辑
摘要:1、HTML部分 <div class="parent"> <div class="box1"></div> <div class="box2"></div> <div class="box3"></div> <div class="box4"></div> <div class="box5"></ 阅读全文
posted @ 2021-08-03 14:06 yw3692582 阅读(2067) 评论(0) 推荐(0) 编辑
摘要:// 升序function compare(property) { return function (a, b) { let value1 = a[property]; let value2 = b[property]; return value1 - value2; };} // 降序functi 阅读全文
posted @ 2021-08-03 09:06 yw3692582 阅读(242) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示