Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions packages/eslint-plugin-taro/CHANGELOG.md

This file was deleted.

144 changes: 0 additions & 144 deletions packages/eslint-plugin-taro/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion packages/shared/src/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const enum Shortcuts {
NodeType = 'nt',
NodeName = 'nn',

// Attrtibutes
// Attributes
Sid = 'sid',
Style = 'st',
Class = 'cl',
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-api/src/interceptor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export default class Link {
}
}

export function interceptorify (promiseifyApi) {
export function interceptorify (promisifyApi) {
return new Link(function (chain) {
return promiseifyApi(chain.requestParams)
return promisifyApi(chain.requestParams)
})
}
7 changes: 0 additions & 7 deletions packages/taro-components/CHANGELOG.md

This file was deleted.

8 changes: 4 additions & 4 deletions packages/taro-framework-react/src/runtime/connect-native.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,20 +345,20 @@ export function createNativePageConfig (Component, pageName: string, data: Recor
export function createH5NativeComponentConfig (
Component,
react: typeof React,
reactdom: typeof ReactDOM,
reactDOM: typeof ReactDOM,
) {
reactMeta.R = react
h = react.createElement
ReactDOM = reactdom
ReactDOM = reactDOM
setReconciler(ReactDOM)

return Component
}

export function createNativeComponentConfig (Component, react: typeof React, reactdom, componentConfig) {
export function createNativeComponentConfig (Component, react: typeof React, reactDOM, componentConfig) {
reactMeta.R = react
h = react.createElement
ReactDOM = reactdom
ReactDOM = reactDOM
setReconciler(ReactDOM)
const { isNewBlended } = componentConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,12 @@ export function createNativeComponentConfig (
Component,
compName: string,
react: typeof React,
reactdom,
reactDOM,
componentConfig: any = {}
) {
reactMeta.R = react
h = react.createElement
ReactDOM = reactdom
ReactDOM = reactDOM
setReconciler(ReactDOM)
const { isUseReact18 = true } = componentConfig

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface InitNativeComponentEntryParams {
R: typeof React
ReactDOM: typeof ReactDOM
cb?: TFunc
// 是否使用默认的 DOM 入口 - app;默认为true,false的时候,会创建一个新的dom并且把它挂载在 app 下面
// 是否使用默认的 DOM 入口 - app;默认为 true,false 的时候,会创建一个新的 dom 并且把它挂载在 app 下面
isDefaultEntryDom?: boolean
isUseReact18?: boolean
}
Expand Down Expand Up @@ -320,7 +320,7 @@ export function createNativePageConfig (
const $taroPath = this.$taroPath
// 销毁当前页面的上下文信息
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
// 触发onUnload生命周期
// 触发 onUnload 生命周期
safeExecute($taroPath, ONUNLOAD)


Expand Down Expand Up @@ -381,7 +381,7 @@ export function createNativePageConfig (

function resetCurrent () {
if (Current.page === this) {
// 小程序插件页面卸载之后返回到宿主页面时,需重置Current页面和路由。否则引发插件组件二次加载异常 fix:#11991
// 小程序插件页面卸载之后返回到宿主页面时,需重置 Current 页面和路由。否则引发插件组件二次加载异常 fix:#11991
Current.page = null
Current.router = null
}
Expand Down Expand Up @@ -418,12 +418,12 @@ export function createNativePageConfig (
export function createNativeComponentConfig (
Component,
react: typeof React,
reactdom,
reactDOM,
componentConfig
) {
reactMeta.R = react
h = react.createElement
ReactDOM = reactdom
ReactDOM = reactDOM
setReconciler(ReactDOM)
const { isNewBlended, isUseReact18 } = componentConfig

Expand All @@ -442,10 +442,10 @@ export function createNativeComponentConfig (
this.config = componentConfig
app!.mount!(
Component,
compId,
compId.toString(),
() => this,
() => {
const el = document.getElementById(compId)
const el = document.getElementById(compId.toString())

if (!el) {
throw new Error(`没有找到组件实例。`)
Expand Down
5 changes: 2 additions & 3 deletions packages/taro-router/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ H5 端路由系统。

## 核心 API

### createRouter(app, config, type, framework, reactdom)
### createRouter(app, config, type, framework, reactDOM)

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

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

框架的 default import 对象。

### `reactdom`
### `reactDOM`

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

8 changes: 4 additions & 4 deletions packages/taro/types/api/taro.extend.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ declare module '../index' {
}

namespace interceptorify {
type promiseifyApi<T, R> = (requestParams: T) => Promise<R>
type promisifyApi<T, R> = (requestParams: T) => Promise<R>
interface InterceptorifyChain<T, R> {
requestParams: T
proceed: promiseifyApi<T, R>
proceed: promisifyApi<T, R>
}
type InterceptorifyInterceptor<T, R> = (chain: InterceptorifyChain<T, R>) => Promise<R>
interface Interceptorify<T, R> {
Expand Down Expand Up @@ -176,7 +176,7 @@ declare module '../index' {
/**
* 包裹 promiseify api 的洋葱圈模型
* @supported global
* @param promiseifyApi
* @param promisifyApi
* @example
* ```tsx
* // 创建实例
Expand Down Expand Up @@ -228,6 +228,6 @@ declare module '../index' {
* })
* ```
*/
interceptorify<T, R>(promiseifyApi: interceptorify.promiseifyApi<T, R>): interceptorify.Interceptorify<T, R>
interceptorify<T, R>(promisifyApi: interceptorify.promisifyApi<T, R>): interceptorify.Interceptorify<T, R>
}
}