Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Leon Zhang njleonzhang

💭
I may be slow to respond.
View GitHub Profile
View compose1.js
function fn1(num) {
console.log('fn1', num)
return num
}
function fn2(num) {
console.log('fn2', num)
return num
}
View gist:963b221f6bb0bf8aa54c0dfdc01eb581
试试:
1. line-height 设置为 normal
2. inline 元素,底部距离 (将其父元素的 font-size 设置为 0)
3. 字 + iconfont 的场景,不设置父元素高度由子元素撑开的时候,图标可能会有明显的偏差。
```
.mp-article-content-more-text {
position: absolute;
bottom: 50px;
left: 0;
View k01.js
import Vue from 'vue'
// 传入一个组件配置
// 创建它的实例,并且将它挂载到body上
// 返回组件实例
// export default function create(Component, props) {
// // 实例创建
// // 作业:使用extend方式创建组件实例并挂载
// // extend方法返回的组件构造函数
@njleonzhang
njleonzhang / gist:dbf6051b8f42d8ed68c8ededf9fdf150
Last active Oct 29, 2018
服务器地址变化后,需要修改各个服务
View gist:dbf6051b8f42d8ed68c8ededf9fdf150
@njleonzhang
njleonzhang / index.md
Last active Nov 8, 2018
华为 AR 路由器配置静态 dns 解析
View index.md

登录华为路由器

telnet 192.168.20.1

进入system view

system-view
@njleonzhang
njleonzhang / gist:33f3a5ae9eb5ebedc6145568c19b0a1b
Created Oct 16, 2018
autoimport should care about semicolons #37991
View gist:33f3a5ae9eb5ebedc6145568c19b0a1b
https://github.com/Microsoft/vscode/blob/master/extensions/typescript-language-features/src/features/fileConfigurationManager.ts
https://github.com/Microsoft/vscode/issues/37991
@njleonzhang
njleonzhang / index.js
Last active Aug 21, 2018
Vue jsx transform sample
View index.js
const Babel = require('babel-core')
const vueJsx = require('babel-plugin-transform-vue-jsx')
let code = `
function render() {
return (
<div>
<div leon={a} onClick={this.click()}
{...{
props: {
@njleonzhang
njleonzhang / crash1.txt
Last active Jul 30, 2018
TotalFinder crash
View crash1.txt
Process: Finder [765]
Path: /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder
Identifier: com.apple.finder
Version: 10.13.5 (10.13.5)
Build Info: Finder_FE-1054005004000000~20
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Finder [765]
User ID: 501
@njleonzhang
njleonzhang / rn.md
Last active Nov 12, 2018
react native 坑
View rn.md

用xcode编译RN项目的时候, 出现“RCTBundleURLProvider.h” file not found - AppDelegate.m

解决:

xcode Product->Scheme->Manage Schemes click '+' at the Target to select "React" and set the React is shared.

stackoverflow上 mark 的答案。

View gist:d4092685ae6d05c1f26ddd66dc13c2e3
"editor.tabSize": 2,
"editor.renderWhitespace": "all",
"editor.wordWrap": "on",
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,