Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export function createNativePageConfig (Component, pageName: string, data: Recor
[ONUNLOAD] () {
const $taroPath = this.$taroPath
// 销毁当前页面的上下文信息
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
window.trigger(CONTEXT_ACTIONS.DESTROY, $taroPath)
// 触发onUnload生命周期
safeExecute($taroPath, ONUNLOAD)
resetCurrent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function createNativePageConfig (
[ONUNLOAD] () {
const $taroPath = this.$taroPath
// 销毁当前页面的上下文信息
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
window.trigger(CONTEXT_ACTIONS.DESTROY, $taroPath)
// 触发onUnload生命周期
safeExecute($taroPath, ONUNLOAD)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export function createPageConfig (component: any, pageName?: string, pageConfig?
[ONUNLOAD] () {
const $taroPath = this.$taroPath
// 销毁当前页面的上下文信息
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
window.trigger(CONTEXT_ACTIONS.DESTROY, $taroPath)

// 触发onUnload生命周期
safeExecute($taroPath, ON_UNLOAD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function isElement (node: TaroNode): node is TaroElement {
* @param node 当前组件
* @param type 事件类型
*/
export function isParentBinded (node: TaroElement | null, type: string): boolean {
export function isParentBound (node: TaroElement | null, type: string): boolean {
let res = false

while (node?.parentElement) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export function createNativePageConfig (
[ONUNLOAD] () {
const $taroPath = this.$taroPath
// 销毁当前页面的上下文信息
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
window.trigger(CONTEXT_ACTIONS.DESTROY, $taroPath)
// 触发 onUnload 生命周期
safeExecute($taroPath, ONUNLOAD)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function createPageConfig (component: any, pageName?: string, pageConfig?
[ONUNLOAD] () {
const $taroPath = this.$taroPath
// 销毁当前页面的上下文信息
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
window.trigger(CONTEXT_ACTIONS.DESTROY, $taroPath)

// 触发onUnload生命周期
safeExecute($taroPath, ON_UNLOAD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function createPageConfig (component: any, pageName?: string, pageConfig?
[ONUNLOAD] () {
const $taroPath = this.$taroPath
// 销毁当前页面的上下文信息
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
window.trigger(CONTEXT_ACTIONS.DESTROY, $taroPath)

// 触发onUnload生命周期
safeExecute($taroPath, ON_UNLOAD)
Expand Down
4 changes: 2 additions & 2 deletions packages/taro-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Taro 运行时。在小程序端连接框架(DSL)渲染机制到小程序渲

在小程序端模仿浏览器的 `navigator` 实现的对象,在浏览器环境中返回浏览器本身的 `navigator`。此对象通过 Webpack 的 [ProvidePlugin](https://webpack.js.org/plugins/provide-plugin/) 注入到全局对象以供第三方库调用。

### document
### document

在小程序端模仿浏览器的 `document` 实现的对象,在浏览器环境中返回浏览器本身的 `document`。此对象通过 Webpack 的 [ProvidePlugin](https://webpack.js.org/plugins/provide-plugin/) 注入到全局对象以供第三方库调用。

Expand All @@ -47,4 +47,4 @@ Taro 配置:

### Events

[Taro 消息机制](https://nervjs.github.io/taro/docs/apis/about/events.html#docsNav)。
[Taro 消息机制](https://docs.taro.zone/docs/apis/about/events)。
35 changes: 0 additions & 35 deletions packages/taro-runtime/jest.config.js

This file was deleted.

5 changes: 2 additions & 3 deletions packages/taro-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"clean": "rimraf ./dist",
"dev": "pnpm run rollup --environment NODE_ENV:development -w",
"rollup": "rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
"test": "jest",
"test:ci": "jest --ci -i --coverage --silent"
"test": "vitest run",
"test:ci": "vitest run --coverage"
},
"repository": {
"type": "git",
Expand All @@ -41,7 +41,6 @@
"@vue/runtime-core": "^3.4.23",
"lodash": "^4.17.21",
"rollup": "^4.37.0",
"rollup-plugin-ts": "^3.4.5",
"rollup-plugin-dts": "^6.2.1"
}
}
182 changes: 0 additions & 182 deletions packages/taro-runtime/src/__tests__/event.spec.js

This file was deleted.

Loading
Loading