Skip to content

Instantly share code, notes, and snippets.

View erguotou520's full-sized avatar

erguotou erguotou520

View GitHub Profile
package com.sunsoft.study.crawler;
import java.io.InputStream;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
/**
// init, append require.css method
(function() {
var list = {};
// 移除css
var remove = function remove() {
this.count --;
if (this.count <= 0) {
this.$style.remove();
}
}
<template>
<div ref="editor" :style="{height:height}"><slot></slot></div>
</template>
<script>
const WangEditor = require('wangeditor')
export default {
props: {
value: String,
height: {
type: String,
<template>
<div class="ui-data-table flex flex-1 flex-column">
<div v-if="$slots.toolbar" class="toolbar">
<slot name="toolbar"></slot>
</div>
<div class="data-table flex flex-1" ref="wrapper">
<el-table :data="data" border :height="avaliableHeight"
:row-key="(row)=>row[rowKey]" :multiple="multiple"
@selection-change="onSelectionChange">
<slot></slot>
{
"title": {
"text": "CPU使用率"
},
"tooltip": {
"trigger": "axis"
},
"legend": {
"data": [
"CPU使用率"
@erguotou520
erguotou520 / EchartBar.vue
Last active December 9, 2016 08:20
EchartBar.vue
<template>
<div class="ui-echart ui-echart-bar" ref="chart"></div>
</template>
<script>
import echarts from 'echarts/lib/echarts'
import 'echarts/lib/chart/bar'
import 'echarts/lib/chart/line'
import 'echarts/lib/component/title'
import 'echarts/lib/component/tooltip'
export default {
const getTextFeature = (text, color) => {
try {
const canvas = document.createElement('canvas');
/*
因为进行scale以后的图案区域实际上不能确定,
理论上应该只在(0,0,1,1),但有的也会在它周围的像素里,
综合效率的考虑,给一个2*2的范围是比较合适的;
*/
canvas.width = 2;
canvas.height = 2;
<template>
<div class="wrapper">
<div v-if="$slots.icon" class="icon">
<slot name="icon"></slot>
</div>
<input class="input" :class="{'with-icon':!!$slots.icon}" v-bind="$props" :value="inputVal"
@input="handleInput"
@change="(...args)=>$emit('change',...args)"
@focus="handleFocus"
@blur="(...args)=>$emit('blur',...args)"
doc := WB.doc
^!1::
Sleep, 500
WinActivate,Chrome
SendInput, admin@erguotou.me
Send, {tab}
SendInput, 1234qweR
Send, {Enter}
return
@erguotou520
erguotou520 / index.html
Created July 19, 2018 03:44
unable to disable selection outside the editor
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style href="https://cdn.quilljs.com/1.3.6/quill.snow.css"></style>
<style>
*,