Skip to content

Instantly share code, notes, and snippets.

View syrxw's full-sized avatar
🏠
Working from home

手艺人小王 syrxw

🏠
Working from home
  • Hefei
View GitHub Profile
@syrxw
syrxw / icons.svg
Last active December 7, 2020 09:31
svg symbol合成脚本
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@syrxw
syrxw / LoadingCircle.vue
Last active June 13, 2019 09:48
elementui loading circle
<template>
<el-dialog
:title="title"
:visible.sync="dialogVisible"
width="26%"
@closed="handleExportDialogClose"
>
<div
class="dialog-content"
style="text-align: center"
@syrxw
syrxw / validationException.filter.ts
Created May 29, 2019 02:41
next.js 使用validatePipe的错误过滤器,自定义错误信息返回
import {
BadRequestException,
ExceptionFilter,
Catch,
ArgumentsHost,
} from '@nestjs/common';
import { jsonMsg } from '../common/utils/jsonMsg';
import { ApiCode } from '../common/enums/api-code.enum';
@syrxw
syrxw / Log.php
Last active May 16, 2019 03:47
laravel手动日之类
<?php
namespace App\Libs;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Carbon;
use App\Jobs\RecordSystemLog;
use App\Models\System\Log;
@syrxw
syrxw / index.js
Created April 29, 2019 15:29
百度地图省份点展示
var mapName = 'china'
var data = [
{name: '北京',value: Math.round(Math.random()*1000)},
{name: '天津',value: Math.round(Math.random()*1000)},
{name: '上海',value: Math.round(Math.random()*1000)},
{name: '重庆',value: Math.round(Math.random()*1000)},
{name: '河北',value: Math.round(Math.random()*1000)},
{name: '河南',value: Math.round(Math.random()*1000)},
{name: '云南',value: Math.round(Math.random()*1000)},
{name: '辽宁',value: Math.round(Math.random()*1000)},
@syrxw
syrxw / map.js
Created April 18, 2019 02:42
高德地图绘制国家区域+大数据可视化
let data = [
{ "lnglat": [116.366794, 39.915309], "name": "西城区", "style": 2 },
{ "lnglat": [116.486409, 39.921489], "name": "朝阳区", "style": 2 },
{ "lnglat": [116.286968, 39.863642], "name": "丰台区", "style": 2 },
// ...更多数据
]
const areaObject = new window.AMap.DistrictLayer.Country({
zIndex: 10,
SOC: 'CHN',
@syrxw
syrxw / QuillEditor.vue
Created February 10, 2019 05:23
nuxt.js quill 富文本上传组件
<template>
<section class="container">
<input
id="file"
ref="input"
class="file"
type="file"
style="display:none"
@change="picUpload"
>
@syrxw
syrxw / lp.py
Created January 18, 2019 09:30
楼盘爬虫
import requests
from datetime import datetime
import time
import urllib
import re
import os
import sys
from bs4 import BeautifulSoup
from openpyxl import Workbook
@syrxw
syrxw / drr.vue
Last active December 20, 2018 02:29
缩放插件
<template>
<div class="container">
<div class="wrap">
<div class="d1" @mousedown="eleDown" :style="style">
</div>
</div>
<!--drr-->
@syrxw
syrxw / svg.vue
Last active November 24, 2018 05:36
vue+svg 实现缩放
<template>
<svg width="800px" height="800px" version="1.1"
xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">
<g class="port_output" style="pointer-events: all;">
<rect fill="#ddd" stroke-width="1.5"
:x="listData['001'].x" :y="listData['001'].y"
:width="listData['001'].width" :height="listData['001'].height"
:transform="listData['001'].transform"
style="vector-effect: non-scaling-stroke"
class="port" @click="elementClick($event,'001')" stroke-dasharray="none" stroke="#000"></rect>