@tarojs/plugin-platform-harmony-ets 4.0.0-beta.103 → 4.0.0-beta.105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -116,6 +116,7 @@ export default struct TaroInput {
|
|
|
116
116
|
|
|
117
117
|
eventHandler(event, 'focus', this.node)
|
|
118
118
|
})
|
|
119
|
+
.enableKeyboardOnFocus(typeof (this.node._attrs as TaroAny)?.enableKeyboardOnFocus === 'undefined' ? true : (this.node._attrs as TaroAny).enableKeyboardOnFocus)
|
|
119
120
|
.onAreaChange(getComponentEventCallback(this.node, AREA_CHANGE_EVENT_NAME, (res: TaroAny) => {
|
|
120
121
|
if (this.node) {
|
|
121
122
|
this.node._nodeInfo.areaInfo = res[1]
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @ts-ignore
|
|
2
|
+
import { getPageById } from '@tarojs/plugin-framework-react'
|
|
1
3
|
import { eventCenter, eventSource } from '@tarojs/runtime/dist/runtime.esm'
|
|
2
4
|
import { EMPTY_OBJ, toCamelCase } from '@tarojs/shared'
|
|
3
5
|
|
|
@@ -316,6 +318,13 @@ export class TaroElement<
|
|
|
316
318
|
// 3、removeChild的时候,会判断是否需要移除层级
|
|
317
319
|
public setLayer (value: number) {
|
|
318
320
|
if (!this.parentNode) return // 没有父节点,不需要设置层级关系
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
const currentPage = getPageById(this.getAttribute('__fixed'))
|
|
324
|
+
if (currentPage) {
|
|
325
|
+
this._page = currentPage
|
|
326
|
+
}
|
|
327
|
+
|
|
319
328
|
this._nodeInfo.layer = value
|
|
320
329
|
|
|
321
330
|
const currentLayerNode = this.currentLayerNode
|
|
@@ -66,7 +66,7 @@ function initNativeComponentEntry (params: InitNativeComponentEntryParams) {
|
|
|
66
66
|
|
|
67
67
|
render () {
|
|
68
68
|
return h(
|
|
69
|
-
'
|
|
69
|
+
'taro-page',
|
|
70
70
|
{
|
|
71
71
|
ref: this.root,
|
|
72
72
|
id: this.props.compId,
|
|
@@ -177,6 +177,20 @@ function initNativeComponentEntry (params: InitNativeComponentEntryParams) {
|
|
|
177
177
|
ReactDOM.render(h(Entry, {}), app)
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
|
|
181
|
+
const pages = new Map<string, any>()
|
|
182
|
+
export function setPageById (inst: any, id: string) {
|
|
183
|
+
pages.set(id, inst)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function getPageById (id: string): any {
|
|
187
|
+
return pages.get(id)
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export function removePageById (id: string) {
|
|
191
|
+
pages.delete(id)
|
|
192
|
+
}
|
|
193
|
+
|
|
180
194
|
export function createNativePageConfig (
|
|
181
195
|
Component,
|
|
182
196
|
pageName: string,
|
|
@@ -223,6 +237,8 @@ export function createNativePageConfig (
|
|
|
223
237
|
const uniqueOptions = Object.assign({}, options, { $taroTimestamp: Date.now() })
|
|
224
238
|
const $taroPath = (this.$taroPath = getPath(id, uniqueOptions))
|
|
225
239
|
|
|
240
|
+
setPageById(this, $taroPath)
|
|
241
|
+
|
|
226
242
|
// this.$taroParams 作为暴露给开发者的页面参数对象,可以被随意修改
|
|
227
243
|
if (this.$taroParams == null) {
|
|
228
244
|
this.$taroParams = uniqueOptions
|
|
@@ -268,6 +284,10 @@ export function createNativePageConfig (
|
|
|
268
284
|
window.trigger(CONTEXT_ACTIONS.DESTORY, $taroPath)
|
|
269
285
|
// 触发onUnload生命周期
|
|
270
286
|
safeExecute($taroPath, ONUNLOAD)
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
removePageById($taroPath)
|
|
290
|
+
|
|
271
291
|
resetCurrent.call(this)
|
|
272
292
|
unmounting = true
|
|
273
293
|
Current.app!.unmount!($taroPath, () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/plugin-platform-harmony-ets",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.105",
|
|
4
4
|
"description": "OpenHarmony & 鸿蒙系统插件",
|
|
5
5
|
"author": "O2Team",
|
|
6
6
|
"homepage": "https://gitee.com/openharmony-sig/taro",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"webpack-sources": "^3.2.3",
|
|
28
28
|
"@babel/preset-react": "^7.24.1",
|
|
29
29
|
"webpack": "5.91.0",
|
|
30
|
-
"@tarojs/components": "4.0.0-beta.
|
|
31
|
-
"@tarojs/helper": "4.0.0-beta.
|
|
32
|
-
"@tarojs/runner-utils": "4.0.0-beta.
|
|
33
|
-
"@tarojs/runtime": "4.0.0-beta.
|
|
34
|
-
"@tarojs/service": "4.0.0-beta.
|
|
35
|
-
"@tarojs/shared": "4.0.0-beta.
|
|
36
|
-
"@tarojs/taro": "4.0.0-beta.
|
|
30
|
+
"@tarojs/components": "4.0.0-beta.105",
|
|
31
|
+
"@tarojs/helper": "4.0.0-beta.105",
|
|
32
|
+
"@tarojs/runner-utils": "4.0.0-beta.105",
|
|
33
|
+
"@tarojs/runtime": "4.0.0-beta.105",
|
|
34
|
+
"@tarojs/service": "4.0.0-beta.105",
|
|
35
|
+
"@tarojs/shared": "4.0.0-beta.105",
|
|
36
|
+
"@tarojs/taro": "4.0.0-beta.105"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"fast-glob": "^3.3.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"rollup-plugin-ts": "^3.0.2",
|
|
43
43
|
"solid-js": "^1.8.16",
|
|
44
44
|
"tslib": "^2.4.0",
|
|
45
|
-
"rollup-plugin-copy": "4.0.0-beta.
|
|
45
|
+
"rollup-plugin-copy": "4.0.0-beta.105"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"prod": "pnpm run build",
|