Daily 10/19 三个月

学习

webpack express 配置proxy (http -> https), 修改header参数

webpack dev环境下使用中间件http=proxy-middleware
通过配置参数option.onProxyReq来设置

function onProxyReq(proxyReq, req, res) {
    // add custom header to request
    proxyReq.setHeader('x-added', 'foobar');
    // or log the req
}

node-http-proxy 很多代理的示例,参考用

httpProxy.createProxyServer({
  target: 'https://google.com',
  agent  : https.globalAgent,
  headers: {
    host: 'google.com'
  }
}).listen(8011);

https->http 或者 https->https 配示例

Qs

qs 处理http参数的库,用上了很方便

Vue

编程式的导航

router.push({ path: 'home' })

自定义指令

// 注册一个全局自定义指令 v-focus
Vue.directive('focus', {
  // 当绑定元素插入到 DOM 中。
  inserted: function (el) {
    // 聚焦元素
    el.focus()
  }
})

ESLint

Rules

CSS 切图

页面制作(切图)第一章 从sketch切图

从视觉到App:网易有钱iOS项目切图与适配实践 这个项目过程,谁做什么事情很清楚

为何sketch预置画布尺寸比真实分辨率小? md再看

Retina屏的移动设备如何实现真正1px的线? TODO

中华人民共和国行政区划:省份、城市、区县、乡镇(街道) 很齐全呀

最后修改 February 7, 2021 : doc: 整理daily日记 (0dcc57d)