07 2020 档案
摘要:svg标签直接在页面使用 不多说。 其他标签使用svg 除了直接使用svg标签,还有如下方法: <object data="your.svg" type="image/svg+xml" id="svg1"> <img src="yourfallback.jpg" /> </object> <img
阅读全文
摘要:element-ui的按需引入的配置:文档地址 npm install babel-plugin-component -D { "presets": [["es2015", { "modules": false }]], "plugins": [ [ "component", { "libraryN
阅读全文
摘要:前言: 开发 vue 组件库需要提供组件的使用文档,最好是有渲染到浏览器的 demo 实例,既能操作又能查看源代码。markdown 作为常用的文档编写载体,如果能在里面直接写 vue 组件,同时编写使用说明就再好不过。流行的组件库 element-ui 的文档就是用 markdown 写出来的,看
阅读全文
摘要:版本 babel-loader version:"8.1.0" create-react-app:"3.4.1" 三个配置 第一部分: { test: /\.(js|mjs|jsx|ts|tsx)$/, include: paths.appSrc, loader: require.resolve('
阅读全文
摘要:svg 中的疑惑点 svg,g ,defs,symbol 都是容器元素,使用起来给人许多疑惑 svg-spirite-loader在页面生成的svg标签有什么特点? svg标签里面的symbol有什么用? 这些标签能够随意相互包裹么? 不能任意嵌套 经过实验发现: svg>g>svg>g可以任意嵌套
阅读全文
摘要:express获取client_ip req.ip // 获取客户端ip req.ips // 获取请求经过的客户端与代理服务器的Ip列表 查看源码 定义获取ip的入口, // 源码 request.js defineGetter(req, 'ip', function ip(){ var trus
阅读全文
摘要:案例 var koa = require('koa') var app = new koa() app.use(function (ctx,next) { ctx.body = ctx.ip }) app.listen('9090') 同时nginx设置代理: server { listen 806
阅读全文
摘要:前提 博客侧边栏公告开通js支持,按照说明操作即可; 步骤一 页面定制 CSS 代码中粘贴如下代码,目的是修改生成的html的样式 .custom-content_xxxx ul{ padding-left:8px; list-style:none; } .custom-content_xxxx l
阅读全文
摘要:先上代码 var http = require('http') var server = http.createServer(function (req,res) { console.log(req.headers['x-forwarded-for'] ); // 判断是否有反向代理 console
阅读全文