Kha'Zix

Results 30 comments of Kha'Zix

我提了 [pr](https://github.com/umijs/father/pull/220) 但没 merge,等 father3 出来吧, 或者你可以看看我[这里](https://github.com/jsany/lean/blob/master/scripts/hack-depend.js)是怎么处理的

## 功能描述 希望增加 对 babel 方式下编译默认 @ 别名为真实目录的支持 umi 默认:@/* => src/* 在 dumi 中使用 umi 提供的别名 @,打包后,别名 @ 符号没有被替换成映射的真实目录,如图: ![image](https://user-images.githubusercontent.com/22312092/84159438-a56b0e00-aa9f-11ea-8299-0cb3ffba49eb.png) ### miniRepo: ## 解决的问题 - 可以提高开发效率 - 方便移动到另外的目录 -...

## 功能描述 希望增加 babel 方式下,引入静态资源,并生成 d.ts 文件的支持 有些场景是需要在组件中引入静态资源(image、font)的 ```tsx import Img1 from './images/01.png' ``` ![image](https://user-images.githubusercontent.com/22312092/84161436-dc422380-aaa1-11ea-9200-0f79dc615319.png) ### miniRepo: ## 解决的问题 - 扩大使用场景 ## 解决方案参考 针对 father2,我提了 [PR](https://github.com/umijs/father/pull/220) 进行处理,官方还未 merge,可以先 hack 实现一下,demo:...

# Async/Await 如何通过同步的方式实现异步 首先想要更好的理解 Async/Await,需要了解这两个知识点: - 同步 - 异步 ## 背景 首先,**js 是单线程的(重复三遍)**,所谓单线程, 通俗的讲就是,~~一根筋~~(比喻有点过分,哈哈)执行代码是一行一行的往下走(即所谓的**同步**), 如果上面的没执行完,就痴痴的等着(是不是很像恋爱中在路边等她/他的你,假装 new 了个对象,啊哈哈哈,调皮一下很开心), 还是举个 🌰 吧: ```javascript // chrome 81 function test() { let d =...

> @Mr-jiangzhiguo 您好,请教一下,为什么在 LinkedList 中要分别为每个方法绑定一次 this 呢? > > 一个猜想,是为了这样使用的时候依旧能够正确访问到 this 吗? > > ```js > class Test { > constructor() { > this.a = this.a.bind(this) > } > a()...

> ![image](https://user-images.githubusercontent.com/31301552/71396042-7d076880-2653-11ea-8ef3-cb8cfbe1c84d.png) > 字打错了... 😅,已更正

![image](https://user-images.githubusercontent.com/22312092/145599606-90fb9b6e-9fc0-4466-a8d9-c289084a7418.png) ![image](https://user-images.githubusercontent.com/22312092/145599567-247eb919-eb92-498d-9efc-3754eca16877.png) it not work

![image](https://user-images.githubusercontent.com/22312092/145603081-f048dc5b-3dc9-45cb-8641-9fe9c6a0f5fb.png) this line throw an error, but it print "[native code]", so I don't know why

![image](https://user-images.githubusercontent.com/22312092/145762337-fba9a822-b6e9-440a-b207-15d8ce177d76.png) It seems necessary to have an `.md` suffix of `app.read`

My script is: ```js /* cSpell:disable */ ObjC.import('stdlib'); console.log('Running script - od') // get the current app to access the standard additions app = Application.currentApplication(); app.includeStandardAdditions = true; // replace...