From ea1a419793fd83acb47a1d085d58dbf87f1cc7c9 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Mon, 12 Jul 2021 18:22:00 +0800 Subject: [PATCH] fix(types): UniElement --- packages/uni-app-plus/src/PageAction.ts | 10 +++++----- packages/uni-app-plus/src/view/framework/dom/page.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/uni-app-plus/src/PageAction.ts b/packages/uni-app-plus/src/PageAction.ts index 355e819ed..26194967d 100644 --- a/packages/uni-app-plus/src/PageAction.ts +++ b/packages/uni-app-plus/src/PageAction.ts @@ -50,27 +50,27 @@ type NodeAction> = [/* nodeId */ number, ...T] export type InsertAction = [ typeof ACTION_TYPE_INSERT, - ...NodeAction> + ...NodeAction['insert']>> ] export type RemoveAction = [ typeof ACTION_TYPE_REMOVE, - ...NodeAction> + ...NodeAction['remove']>> ] export type SetAttributeAction = [ typeof ACTION_TYPE_SET_ATTRIBUTE, - ...NodeAction> + ...NodeAction['setAttr']>> ] export type RemoveAttributeAction = [ typeof ACTION_TYPE_REMOVE_ATTRIBUTE, - ...NodeAction> + ...NodeAction['removeAttr']>> ] export type SetTextAction = [ typeof ACTION_TYPE_SET_TEXT, - ...NodeAction> + ...NodeAction['setText']>> ] export type PageUpdateAction = diff --git a/packages/uni-app-plus/src/view/framework/dom/page.ts b/packages/uni-app-plus/src/view/framework/dom/page.ts index 854e4655e..dace26340 100644 --- a/packages/uni-app-plus/src/view/framework/dom/page.ts +++ b/packages/uni-app-plus/src/view/framework/dom/page.ts @@ -16,7 +16,7 @@ import { UniNode } from './elements/UniNode' const elements = new Map() export function $(id: number) { - return elements.get(id) as UniElement + return elements.get(id) as UniElement } export function createElement(id: number, tag: string | number) { -- GitLab