React不像Vue那样有router.beforeEach这样的路由钩子,但是它提供了一个组件:Prompt import { Prompt } from 'react-router-dom'; <Prompt when={true} message={location => '信息还没保存,确定 ...
分类:
其他好文 时间:
2020-06-29 13:25:25
阅读次数:
149
一、消息队列 RabbitMQ是目前非常热门的一款消息中间件,不管是互联网大厂还是中小企业都在大量使用。 1.1 什么是消息队列 MQ全称为Message Queue,即消息队列。“消息队列”是在消息的传输过程中保存消息的容器。它是典型的:生产者、消费者模型。生产者不断向消息队列中生产消息,消费者不 ...
分类:
编程语言 时间:
2020-06-29 11:54:48
阅读次数:
71
使用插件: vue-i18n 1. 安装: npm install vue-i18n 2. 目录结构 // i18n.js import Vue from 'vue' import VueI18n from 'vue-i18n' import messages from './lang' Vue.u ...
分类:
其他好文 时间:
2020-06-29 11:43:05
阅读次数:
68
1 """ 2 方法 rstrip() 删除(剥除)字符串末尾的空白 3 方法 lstrip() 删除(剥除)字符串开头的空白 4 方法 strip() 删除(剥除)字符串开头和末尾的空白 5 方法 replace()将字符串中的特定单词都替换为另一个单词 6 """ 7 8 message = ' ...
分类:
编程语言 时间:
2020-06-28 13:08:43
阅读次数:
59
//工厂模式functionnewObject(color,age,...arg){letobj=newObject()obj.color=color;obj.age=age;...arg;returnobj;}//单例模式functiongetinstance=(function(){letobject;returnfunction(){if(object==undefined){obj=new
分类:
其他好文 时间:
2020-06-28 09:47:43
阅读次数:
61
楔子 平时使用Snipaste截图总是不注意图片的尺寸,导致保存了一堆大大小小尺寸不一的图片 在写文档的时候插入图片显得很杂乱,因此抽空写了个小工具帮我批量格式化文件夹中的图片尺寸成一样的大小 代码 import os from tkinter import * class Application( ...
分类:
其他好文 时间:
2020-06-28 00:41:52
阅读次数:
134
vue-worker的使用 1.介绍:改插件将复杂的worker进行了一次的封装,暴露出几个方法简单好用 // 安装插件 npm install vue-worker --save // 在main.js引入使用 import VueWorker from 'vue-worker' Vue.use( ...
分类:
其他好文 时间:
2020-06-27 20:31:43
阅读次数:
222
<audio autoplay="autoplay" controls="controls"loop="loop" preload="auto" src="http://demo.mimvp.com/html5/take_you_fly.mp3"> 你的浏览器版本太低,不支持audio标签 </au ...
分类:
其他好文 时间:
2020-06-27 19:53:02
阅读次数:
62
if (!message.touser) { $("#sound").attr('src', "https://taibao-image.ecdpower.net/shtlc/chat/msg.mp3"); Notification.requestPermission(function (permi ...
分类:
其他好文 时间:
2020-06-27 16:21:01
阅读次数:
195
Introduction There are seven transmission modes in Release 8: Single antenna port, port 0 Transmit diversity Open-loop spatial multiplexing,large-dela ...
分类:
其他好文 时间:
2020-06-27 13:19:54
阅读次数:
79