Skip to content

Commit b14e5cd

Browse files
committed
fix: 一些杂项
1 parent 7642ca8 commit b14e5cd

File tree

10 files changed

+22
-186
lines changed

10 files changed

+22
-186
lines changed

packages/eslint-plugin-taro/CHANGELOG.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

packages/eslint-plugin-taro/yarn.lock

Lines changed: 0 additions & 144 deletions
This file was deleted.

packages/shared/src/shortcuts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const enum Shortcuts {
66
NodeType = 'nt',
77
NodeName = 'nn',
88

9-
// Attrtibutes
9+
// Attributes
1010
Sid = 'sid',
1111
Style = 'st',
1212
Class = 'cl',

packages/taro-api/src/interceptor/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export default class Link {
3131
}
3232
}
3333

34-
export function interceptorify (promiseifyApi) {
34+
export function interceptorify (promisifyApi) {
3535
return new Link(function (chain) {
36-
return promiseifyApi(chain.requestParams)
36+
return promisifyApi(chain.requestParams)
3737
})
3838
}

packages/taro-components/CHANGELOG.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/taro-framework-react/src/runtime/connect-native.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,20 +345,20 @@ export function createNativePageConfig (Component, pageName: string, data: Recor
345345
export function createH5NativeComponentConfig (
346346
Component,
347347
react: typeof React,
348-
reactdom: typeof ReactDOM,
348+
reactDOM: typeof ReactDOM,
349349
) {
350350
reactMeta.R = react
351351
h = react.createElement
352-
ReactDOM = reactdom
352+
ReactDOM = reactDOM
353353
setReconciler(ReactDOM)
354354

355355
return Component
356356
}
357357

358-
export function createNativeComponentConfig (Component, react: typeof React, reactdom, componentConfig) {
358+
export function createNativeComponentConfig (Component, react: typeof React, reactDOM, componentConfig) {
359359
reactMeta.R = react
360360
h = react.createElement
361-
ReactDOM = reactdom
361+
ReactDOM = reactDOM
362362
setReconciler(ReactDOM)
363363
const { isNewBlended } = componentConfig
364364

packages/taro-platform-harmony-cpp/src/runtime/framework/native-page.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,12 @@ export function createNativeComponentConfig (
446446
Component,
447447
compName: string,
448448
react: typeof React,
449-
reactdom,
449+
reactDOM,
450450
componentConfig: any = {}
451451
) {
452452
reactMeta.R = react
453453
h = react.createElement
454-
ReactDOM = reactdom
454+
ReactDOM = reactDOM
455455
setReconciler(ReactDOM)
456456
const { isUseReact18 = true } = componentConfig
457457

packages/taro-platform-harmony/src/runtime-framework/react/native-page.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ interface InitNativeComponentEntryParams {
2626
R: typeof React
2727
ReactDOM: typeof ReactDOM
2828
cb?: TFunc
29-
// 是否使用默认的 DOM 入口 - app;默认为true,false的时候,会创建一个新的dom并且把它挂载在 app 下面
29+
// 是否使用默认的 DOM 入口 - app;默认为 true,false 的时候,会创建一个新的 dom 并且把它挂载在 app 下面
3030
isDefaultEntryDom?: boolean
3131
isUseReact18?: boolean
3232
}
@@ -320,7 +320,7 @@ export function createNativePageConfig (
320320
const $taroPath = this.$taroPath
321321
// 销毁当前页面的上下文信息
322322
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
323-
// 触发onUnload生命周期
323+
// 触发 onUnload 生命周期
324324
safeExecute($taroPath, ONUNLOAD)
325325

326326

@@ -381,7 +381,7 @@ export function createNativePageConfig (
381381

382382
function resetCurrent () {
383383
if (Current.page === this) {
384-
// 小程序插件页面卸载之后返回到宿主页面时,需重置Current页面和路由。否则引发插件组件二次加载异常 fix:#11991
384+
// 小程序插件页面卸载之后返回到宿主页面时,需重置 Current 页面和路由。否则引发插件组件二次加载异常 fix:#11991
385385
Current.page = null
386386
Current.router = null
387387
}
@@ -418,12 +418,12 @@ export function createNativePageConfig (
418418
export function createNativeComponentConfig (
419419
Component,
420420
react: typeof React,
421-
reactdom,
421+
reactDOM,
422422
componentConfig
423423
) {
424424
reactMeta.R = react
425425
h = react.createElement
426-
ReactDOM = reactdom
426+
ReactDOM = reactDOM
427427
setReconciler(ReactDOM)
428428
const { isNewBlended, isUseReact18 } = componentConfig
429429

@@ -442,10 +442,10 @@ export function createNativeComponentConfig (
442442
this.config = componentConfig
443443
app!.mount!(
444444
Component,
445-
compId,
445+
compId.toString(),
446446
() => this,
447447
() => {
448-
const el = document.getElementById(compId)
448+
const el = document.getElementById(compId.toString())
449449

450450
if (!el) {
451451
throw new Error(`没有找到组件实例。`)

packages/taro-router/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ H5 端路由系统。
44

55
## 核心 API
66

7-
### createRouter(app, config, type, framework, reactdom)
7+
### createRouter(app, config, type, framework, reactDOM)
88

99
暴露给 `@tarojs/taro-loader/h5` 调用,在应用入口文件中调用,创建一个兼容小程序路由规范的应用。
1010

@@ -26,7 +26,6 @@ H5 端路由系统。
2626

2727
框架的 default import 对象。
2828

29-
### `reactdom`
29+
### `reactDOM`
3030

3131
可选,`react-dom` 的 default import 对象。
32-

packages/taro/types/api/taro.extend.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ declare module '../index' {
5252
}
5353

5454
namespace interceptorify {
55-
type promiseifyApi<T, R> = (requestParams: T) => Promise<R>
55+
type promisifyApi<T, R> = (requestParams: T) => Promise<R>
5656
interface InterceptorifyChain<T, R> {
5757
requestParams: T
58-
proceed: promiseifyApi<T, R>
58+
proceed: promisifyApi<T, R>
5959
}
6060
type InterceptorifyInterceptor<T, R> = (chain: InterceptorifyChain<T, R>) => Promise<R>
6161
interface Interceptorify<T, R> {
@@ -176,7 +176,7 @@ declare module '../index' {
176176
/**
177177
* 包裹 promiseify api 的洋葱圈模型
178178
* @supported global
179-
* @param promiseifyApi
179+
* @param promisifyApi
180180
* @example
181181
* ```tsx
182182
* // 创建实例
@@ -228,6 +228,6 @@ declare module '../index' {
228228
* })
229229
* ```
230230
*/
231-
interceptorify<T, R>(promiseifyApi: interceptorify.promiseifyApi<T, R>): interceptorify.Interceptorify<T, R>
231+
interceptorify<T, R>(promisifyApi: interceptorify.promisifyApi<T, R>): interceptorify.Interceptorify<T, R>
232232
}
233233
}

0 commit comments

Comments
 (0)