+ type Property = Component.Property
+ type Method = Component.Method
+
+ type DefinitionFilter = Component.DefinitionFilter
+ type Lifetimes = Component.Lifetimes
+
+ interface OtherOption {
+ /** 类似于mixins和traits的组件间代码复用机制,参见 [behaviors](behaviors.md) */
+ behaviors: string[]
+ /** 定义段过滤器,用于自定义组件扩展,参见 [自定义组件扩展](extend.md)
+ *
+ * 最低基础库: `2.2.3` */
+ definitionFilter?: DefinitionFilter
+ }
+ }
+}
+/** 注册一个 `behavior`,接受一个 `Object` 类型的参数。*/
+declare const Behavior: WechatMiniprogram.Behavior.Constructor
diff --git a/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.cloud.d.ts b/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.cloud.d.ts
new file mode 100644
index 0000000..6ec32d5
--- /dev/null
+++ b/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.cloud.d.ts
@@ -0,0 +1,709 @@
+/*! *****************************************************************************
+Copyright (c) 2019 Tencent, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+/////////////////////
+///// WX Cloud Apis
+/////////////////////
+
+/**
+ * Common interfaces and types
+ */
+
+interface IAPIError {
+ errMsg: string
+}
+
+interface IAPIParam {
+ config?: ICloudConfig
+ success?: (res: T) => void
+ fail?: (err: IAPIError) => void
+ complete?: (val: T | IAPIError) => void
+}
+
+interface IAPISuccessParam {
+ errMsg: string
+}
+
+type IAPICompleteParam = IAPISuccessParam | IAPIError
+
+type IAPIFunction> = (param?: P) => Promise
+
+interface IInitCloudConfig {
+ env?:
+ | string
+ | {
+ database?: string
+ functions?: string
+ storage?: string,
+ }
+ traceUser?: boolean
+}
+
+interface ICloudConfig {
+ env?: string
+ traceUser?: boolean
+}
+
+interface IICloudAPI {
+ init: (config?: IInitCloudConfig) => void
+ [api: string]: AnyFunction | IAPIFunction
+}
+
+interface ICloudService {
+ name: string
+
+ getAPIs: () => { [name: string]: IAPIFunction }
+}
+
+interface ICloudServices {
+ [serviceName: string]: ICloudService
+}
+
+interface ICloudMetaData {
+ session_id: string
+}
+
+declare class InternalSymbol {}
+
+interface AnyObject {
+ [x: string]: any
+}
+
+type AnyArray = any[]
+
+type AnyFunction = (...args: any[]) => any
+
+/**
+ * extend wx with cloud
+ */
+interface WxCloud {
+ init: (config?: ICloudConfig) => void
+
+ callFunction(param: OQ): void
+ callFunction(
+ param: RQ,
+ ): Promise
+
+ uploadFile(param: OQ): WechatMiniprogram.UploadTask
+ uploadFile(
+ param: RQ,
+ ): Promise
+
+ downloadFile(
+ param: OQ,
+ ): WechatMiniprogram.DownloadTask
+ downloadFile(
+ param: RQ,
+ ): Promise
+
+ getTempFileURL(param: OQ): void
+ getTempFileURL(
+ param: RQ,
+ ): Promise
+
+ deleteFile(param: OQ): void
+ deleteFile(
+ param: RQ,
+ ): Promise
+
+ database: (config?: ICloudConfig) => DB.Database
+}
+
+declare namespace ICloud {
+ interface ICloudAPIParam extends IAPIParam {
+ config?: ICloudConfig
+ }
+
+ // === API: callFunction ===
+ type CallFunctionData = AnyObject
+
+ interface CallFunctionResult extends IAPISuccessParam {
+ result: AnyObject | string | undefined
+ }
+
+ interface CallFunctionParam extends ICloudAPIParam {
+ name: string
+ data?: CallFunctionData
+ slow?: boolean
+ }
+ // === end ===
+
+ // === API: uploadFile ===
+ interface UploadFileResult extends IAPISuccessParam {
+ fileID: string
+ statusCode: number
+ }
+
+ interface UploadFileParam extends ICloudAPIParam {
+ cloudPath: string
+ filePath: string
+ header?: AnyObject
+ }
+ // === end ===
+
+ // === API: downloadFile ===
+ interface DownloadFileResult extends IAPISuccessParam {
+ tempFilePath: string
+ statusCode: number
+ }
+
+ interface DownloadFileParam extends ICloudAPIParam {
+ fileID: string
+ cloudPath?: string
+ }
+ // === end ===
+
+ // === API: getTempFileURL ===
+ interface GetTempFileURLResult extends IAPISuccessParam {
+ fileList: GetTempFileURLResultItem[]
+ }
+
+ interface GetTempFileURLResultItem {
+ fileID: string
+ tempFileURL: string
+ maxAge: number
+ status: number
+ errMsg: string
+ }
+
+ interface GetTempFileURLParam extends ICloudAPIParam {
+ fileList: string[]
+ }
+ // === end ===
+
+ // === API: deleteFile ===
+ interface DeleteFileResult extends IAPISuccessParam {
+ fileList: DeleteFileResultItem[]
+ }
+
+ interface DeleteFileResultItem {
+ fileID: string
+ status: number
+ errMsg: string
+ }
+
+ interface DeleteFileParam extends ICloudAPIParam {
+ fileList: string[]
+ }
+ // === end ===
+}
+
+// === Database ===
+declare namespace DB {
+ /**
+ * The class of all exposed cloud database instances
+ */
+ class Database {
+ readonly config: ICloudConfig
+ readonly command: DatabaseCommand
+ readonly Geo: IGeo
+ readonly serverDate: () => ServerDate
+ readonly RegExp: IRegExpConstructor
+
+ private constructor()
+
+ collection(collectionName: string): CollectionReference
+ }
+
+ class CollectionReference extends Query {
+ readonly collectionName: string
+ readonly database: Database
+
+ private constructor(name: string, database: Database)
+
+ doc(docId: string | number): DocumentReference
+
+ // add(options: IAddDocumentOptions): Promise | void
+
+ add(options: OQ): void
+ add(options: RQ): Promise
+ }
+
+ class DocumentReference {
+ private constructor(docId: string | number, database: Database)
+
+ field(object: object): this
+
+ get(options: OQ): void
+ get(options?: RQ): Promise
+
+ set(options: OQ): void
+ set(options?: RQ): Promise
+
+ update(options: OQ): void
+ update(
+ options?: RQ,
+ ): Promise
+
+ remove(options: OQ): void
+ remove(
+ options?: RQ,
+ ): Promise
+ }
+
+ class Query {
+ where(condition: IQueryCondition): Query
+
+ orderBy(fieldPath: string, order: string): Query
+
+ limit(max: number): Query
+
+ skip(offset: number): Query
+
+ field(object: object): Query
+
+ get(options: OQ): void
+ get(options?: RQ): Promise
+
+ count(options: OQ): void
+ count(options?: RQ): Promise
+ }
+
+ interface DatabaseCommand {
+ eq(val: any): DatabaseQueryCommand
+ neq(val: any): DatabaseQueryCommand
+ gt(val: any): DatabaseQueryCommand
+ gte(val: any): DatabaseQueryCommand
+ lt(val: any): DatabaseQueryCommand
+ lte(val: any): DatabaseQueryCommand
+ in(val: any[]): DatabaseQueryCommand
+ nin(val: any[]): DatabaseQueryCommand
+
+ geoNear(options: IGeoNearCommandOptions): DatabaseQueryCommand
+ geoWithin(options: IGeoWithinCommandOptions): DatabaseQueryCommand
+ geoIntersects(
+ options: IGeoIntersectsCommandOptions,
+ ): DatabaseQueryCommand
+
+ and(
+ ...expressions: Array
+ ): DatabaseLogicCommand
+ or(
+ ...expressions: Array
+ ): DatabaseLogicCommand
+
+ set(val: any): DatabaseUpdateCommand
+ remove(): DatabaseUpdateCommand
+ inc(val: number): DatabaseUpdateCommand
+ mul(val: number): DatabaseUpdateCommand
+
+ push(...values: any[]): DatabaseUpdateCommand
+ pop(): DatabaseUpdateCommand
+ shift(): DatabaseUpdateCommand
+ unshift(...values: any[]): DatabaseUpdateCommand
+ }
+
+ enum LOGIC_COMMANDS_LITERAL {
+ AND = 'and',
+ OR = 'or',
+ NOT = 'not',
+ NOR = 'nor',
+ }
+
+ class DatabaseLogicCommand {
+ fieldName: string | InternalSymbol
+ operator: LOGIC_COMMANDS_LITERAL | string
+ operands: any[]
+
+ _setFieldName(fieldName: string): DatabaseLogicCommand
+
+ and(
+ ...expressions: Array
+ ): DatabaseLogicCommand
+ or(
+ ...expressions: Array
+ ): DatabaseLogicCommand
+ }
+
+ enum QUERY_COMMANDS_LITERAL {
+ // normal
+ EQ = 'eq',
+ NEQ = 'neq',
+ GT = 'gt',
+ GTE = 'gte',
+ LT = 'lt',
+ LTE = 'lte',
+ IN = 'in',
+ NIN = 'nin',
+ // geo
+ GEO_NEAR = 'geoNear',
+ GEO_WITHIN = 'geoWithin',
+ GEO_INTERSECTS = 'geoIntersects',
+ }
+
+ class DatabaseQueryCommand extends DatabaseLogicCommand {
+ operator: QUERY_COMMANDS_LITERAL | string
+
+ _setFieldName(fieldName: string): DatabaseQueryCommand
+
+ eq(val: any): DatabaseLogicCommand
+ neq(val: any): DatabaseLogicCommand
+ gt(val: any): DatabaseLogicCommand
+ gte(val: any): DatabaseLogicCommand
+ lt(val: any): DatabaseLogicCommand
+ lte(val: any): DatabaseLogicCommand
+ in(val: any[]): DatabaseLogicCommand
+ nin(val: any[]): DatabaseLogicCommand
+
+ geoNear(options: IGeoNearCommandOptions): DatabaseLogicCommand
+ geoWithin(options: IGeoWithinCommandOptions): DatabaseLogicCommand
+ geoIntersects(
+ options: IGeoIntersectsCommandOptions,
+ ): DatabaseLogicCommand
+ }
+
+ enum UPDATE_COMMANDS_LITERAL {
+ SET = 'set',
+ REMOVE = 'remove',
+ INC = 'inc',
+ MUL = 'mul',
+ PUSH = 'push',
+ POP = 'pop',
+ SHIFT = 'shift',
+ UNSHIFT = 'unshift',
+ }
+
+ class DatabaseUpdateCommand {
+ fieldName: string | InternalSymbol
+ operator: UPDATE_COMMANDS_LITERAL
+ operands: any[]
+
+ constructor(
+ operator: UPDATE_COMMANDS_LITERAL,
+ operands: any[],
+ fieldName?: string | InternalSymbol,
+ )
+
+ _setFieldName(fieldName: string): DatabaseUpdateCommand
+ }
+
+ class Batch {}
+
+ /**
+ * A contract that all API provider must adhere to
+ */
+ class APIBaseContract<
+ PROMISE_RETURN,
+ CALLBACK_RETURN,
+ PARAM extends IAPIParam,
+ CONTEXT = any
+ > {
+ getContext(param: PARAM): CONTEXT
+
+ /**
+ * In case of callback-style invocation, this function will be called
+ */
+ getCallbackReturn(param: PARAM, context: CONTEXT): CALLBACK_RETURN
+
+ getFinalParam(param: PARAM, context: CONTEXT): T
+
+ run(param: T): Promise
+ }
+
+ interface IGeoPointConstructor {
+ new (longitude: number, latitide: number): GeoPoint
+ new (geojson: IGeoJSONPoint): GeoPoint
+ (longitude: number, latitide: number): GeoPoint
+ (geojson: IGeoJSONPoint): GeoPoint
+ }
+
+ interface IGeoMultiPointConstructor {
+ new (points: GeoPoint[] | IGeoJSONMultiPoint): GeoMultiPoint
+ (points: GeoPoint[] | IGeoJSONMultiPoint): GeoMultiPoint
+ }
+
+ interface IGeoLineStringConstructor {
+ new (points: GeoPoint[] | IGeoJSONLineString): GeoLineString
+ (points: GeoPoint[] | IGeoJSONLineString): GeoLineString
+ }
+
+ interface IGeoMultiLineStringConstructor {
+ new (
+ lineStrings: GeoLineString[] | IGeoJSONMultiLineString,
+ ): GeoMultiLineString
+ (
+ lineStrings: GeoLineString[] | IGeoJSONMultiLineString,
+ ): GeoMultiLineString
+ }
+
+ interface IGeoPolygonConstructor {
+ new (lineStrings: GeoLineString[] | IGeoJSONPolygon): GeoPolygon
+ (lineStrings: GeoLineString[] | IGeoJSONPolygon): GeoPolygon
+ }
+
+ interface IGeoMultiPolygonConstructor {
+ new (polygons: GeoPolygon[] | IGeoJSONMultiPolygon): GeoMultiPolygon
+ (polygons: GeoPolygon[] | IGeoJSONMultiPolygon): GeoMultiPolygon
+ }
+
+ interface IGeo {
+ Point: IGeoPointConstructor
+ MultiPoint: IGeoMultiPointConstructor
+ LineString: IGeoLineStringConstructor
+ MultiLineString: IGeoMultiLineStringConstructor
+ Polygon: IGeoPolygonConstructor
+ MultiPolygon: IGeoMultiPolygonConstructor
+ }
+
+ interface IGeoJSONPoint {
+ type: 'Point'
+ coordinates: [number, number]
+ }
+
+ interface IGeoJSONMultiPoint {
+ type: 'MultiPoint'
+ coordinates: Array<[number, number]>
+ }
+
+ interface IGeoJSONLineString {
+ type: 'LineString'
+ coordinates: Array<[number, number]>
+ }
+
+ interface IGeoJSONMultiLineString {
+ type: 'MultiLineString'
+ coordinates: Array>
+ }
+
+ interface IGeoJSONPolygon {
+ type: 'Polygon'
+ coordinates: Array>
+ }
+
+ interface IGeoJSONMultiPolygon {
+ type: 'MultiPolygon'
+ coordinates: Array>>
+ }
+
+ type IGeoJSONObject =
+ | IGeoJSONPoint
+ | IGeoJSONMultiPoint
+ | IGeoJSONLineString
+ | IGeoJSONMultiLineString
+ | IGeoJSONPolygon
+ | IGeoJSONMultiPolygon
+
+ abstract class GeoPoint {
+ longitude: number
+ latitude: number
+
+ constructor(longitude: number, latitude: number)
+
+ toJSON(): object
+ toString(): string
+ }
+
+ abstract class GeoMultiPoint {
+ points: GeoPoint[]
+
+ constructor(points: GeoPoint[])
+
+ toJSON(): IGeoJSONMultiPoint
+ toString(): string
+ }
+
+ abstract class GeoLineString {
+ points: GeoPoint[]
+
+ constructor(points: GeoPoint[])
+
+ toJSON(): IGeoJSONLineString
+ toString(): string
+ }
+
+ abstract class GeoMultiLineString {
+ lines: GeoLineString[]
+
+ constructor(lines: GeoLineString[])
+
+ toJSON(): IGeoJSONMultiLineString
+ toString(): string
+ }
+
+ abstract class GeoPolygon {
+ lines: GeoLineString[]
+
+ constructor(lines: GeoLineString[])
+
+ toJSON(): IGeoJSONPolygon
+ toString(): string
+ }
+
+ abstract class GeoMultiPolygon {
+ polygons: GeoPolygon[]
+
+ constructor(polygons: GeoPolygon[])
+
+ toJSON(): IGeoJSONMultiPolygon
+ toString(): string
+ }
+
+ type GeoInstance =
+ | GeoPoint
+ | GeoMultiPoint
+ | GeoLineString
+ | GeoMultiLineString
+ | GeoPolygon
+ | GeoMultiPolygon
+
+ interface IGeoNearCommandOptions {
+ geometry: GeoPoint
+ maxDistance?: number
+ minDistance?: number
+ }
+
+ interface IGeoWithinCommandOptions {
+ geometry: GeoPolygon | GeoMultiPolygon
+ }
+
+ interface IGeoIntersectsCommandOptions {
+ geometry:
+ | GeoPoint
+ | GeoMultiPoint
+ | GeoLineString
+ | GeoMultiLineString
+ | GeoPolygon
+ | GeoMultiPolygon
+ }
+
+ interface IServerDateOptions {
+ offset: number
+ }
+
+ abstract class ServerDate {
+ readonly options: IServerDateOptions
+ constructor(options?: IServerDateOptions)
+ }
+
+ interface IRegExpOptions {
+ regexp: string
+ options?: string
+ }
+
+ interface IRegExpConstructor {
+ new (options: IRegExpOptions): RegExp
+ (options: IRegExpOptions): RegExp
+ }
+
+ abstract class RegExp {
+ readonly regexp: string
+ readonly options: string
+ constructor(options: IRegExpOptions)
+ }
+
+ type DocumentId = string | number
+
+ interface IDocumentData {
+ _id?: DocumentId
+ [key: string]: any
+ }
+
+ type IDBAPIParam = IAPIParam
+
+ interface IAddDocumentOptions extends IDBAPIParam {
+ data: IDocumentData
+ }
+
+ type IGetDocumentOptions = IDBAPIParam
+
+ type ICountDocumentOptions = IDBAPIParam
+
+ interface IUpdateDocumentOptions extends IDBAPIParam {
+ data: IUpdateCondition
+ }
+
+ interface IUpdateSingleDocumentOptions extends IDBAPIParam {
+ data: IUpdateCondition
+ }
+
+ interface ISetDocumentOptions extends IDBAPIParam {
+ data: IUpdateCondition
+ }
+
+ interface ISetSingleDocumentOptions extends IDBAPIParam {
+ data: IUpdateCondition
+ }
+
+ interface IRemoveDocumentOptions extends IDBAPIParam {
+ query: IQueryCondition
+ }
+
+ type IRemoveSingleDocumentOptions = IDBAPIParam
+
+ interface IQueryCondition {
+ [key: string]: any
+ }
+
+ type IStringQueryCondition = string
+
+ interface IQueryResult extends IAPISuccessParam {
+ data: IDocumentData[]
+ }
+
+ interface IQuerySingleResult extends IAPISuccessParam {
+ data: IDocumentData
+ }
+
+ interface IUpdateCondition {
+ [key: string]: any
+ }
+
+ type IStringUpdateCondition = string
+
+ interface IAddResult extends IAPISuccessParam {
+ _id: DocumentId
+ }
+
+ interface IUpdateResult extends IAPISuccessParam {
+ stats: {
+ updated: number,
+ // created: number,
+ }
+ }
+
+ interface ISetResult extends IAPISuccessParam {
+ _id: DocumentId
+ stats: {
+ updated: number
+ created: number,
+ }
+ }
+
+ interface IRemoveResult extends IAPISuccessParam {
+ stats: {
+ removed: number,
+ }
+ }
+
+ interface ICountResult extends IAPISuccessParam {
+ total: number
+ }
+}
+
+type Optional = { [K in keyof T]+?: T[K] }
+
+type OQ<
+ T extends Optional<
+ Record<'complete' | 'success' | 'fail', (...args: any[]) => any>
+ >
+> =
+ | (RQ & Required>)
+ | (RQ & Required>)
+ | (RQ & Required>)
+ | (RQ & Required>)
+ | (RQ & Required>)
+ | (RQ & Required>)
+ | (RQ & Required>)
+
+type RQ<
+ T extends Optional<
+ Record<'complete' | 'success' | 'fail', (...args: any[]) => any>
+ >
+> = Pick>
diff --git a/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.component.d.ts b/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.component.d.ts
new file mode 100644
index 0000000..7b0b57e
--- /dev/null
+++ b/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.component.d.ts
@@ -0,0 +1,381 @@
+/*! *****************************************************************************
+Copyright (c) 2019 Tencent, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+declare namespace WechatMiniprogram {
+ namespace Component {
+ type Instance<
+ TData extends DataOption,
+ TProperty extends PropertyOption,
+ TMethod extends Partial
+ > = InstanceProperties &
+ InstanceMethods &
+ TMethod & {
+ /** 组件数据,**包括内部数据和属性值** */
+ data: TData & PropertyOptionToData
+ /** 组件数据,**包括内部数据和属性值**(与 `data` 一致) */
+ properties: TData & PropertyOptionToData,
+ }
+ type TrivialInstance = Instance
+ type TrivialOption = Options
+ type Options<
+ TData extends DataOption,
+ TProperty extends PropertyOption,
+ TMethod extends MethodOption
+ > = Partial> &
+ Partial> &
+ Partial> &
+ Partial &
+ Partial &
+ ThisType>
+ interface Constructor {
+ <
+ TData extends DataOption,
+ TProperty extends PropertyOption,
+ TMethod extends MethodOption
+ >(
+ options: Options,
+ ): string
+ }
+ type DataOption = Record
+ type PropertyOption = Record
+ type MethodOption = Record any>
+
+ interface Data {
+ /** 组件的内部数据,和 `properties` 一同用于组件的模板渲染 */
+ data?: D
+ }
+ interface Property {
+ /** 组件的对外属性,是属性名到属性设置的映射表 */
+ properties: P
+ }
+ interface Method {
+ /** object组件的方法,包括事件响应函数和任意的自定义方法,关于事件响应函数的使用,参见 [组件事件](events.md) */
+
+ methods: M
+ }
+ type PropertyType =
+ | StringConstructor
+ | NumberConstructor
+ | BooleanConstructor
+ | ArrayConstructor
+ | ObjectConstructor
+ | null
+ type ValueType = T extends StringConstructor
+ ? string
+ : T extends NumberConstructor
+ ? number
+ : T extends BooleanConstructor
+ ? boolean
+ : T extends ArrayConstructor
+ ? any[]
+ : T extends ObjectConstructor ? IAnyObject : any
+ interface FullProperty {
+ /** 属性类型 */
+ type: T
+ /** 属性初始值 */
+ value?: ValueType
+ /** 属性值被更改时的响应函数 */
+ observer?(
+ newVal: ValueType,
+ oldVal: ValueType,
+ changedPath: Array,
+ ): void
+ /** 属性的类型(可以指定多个) */
+ optionalTypes?: ShortProperty[]
+ }
+ type AllFullProperty =
+ | FullProperty
+ | FullProperty
+ | FullProperty
+ | FullProperty
+ | FullProperty
+ | FullProperty
+ type ShortProperty =
+ | StringConstructor
+ | NumberConstructor
+ | BooleanConstructor
+ | ArrayConstructor
+ | ObjectConstructor
+ | null
+ type AllProperty = AllFullProperty | ShortProperty
+ type PropertyToData = T extends ShortProperty
+ ? ValueType
+ : FullPropertyToData>
+ type FullPropertyToData = ValueType<
+ T['type']
+ >
+ type PropertyOptionToData = {
+ [name in keyof P]: PropertyToData
+ }
+
+ interface InstanceProperties {
+ /** 组件的文件路径 */
+ is: string
+ /** 节点id */
+ id: string
+ /** 节点dataset */
+ dataset: Record
+ }
+
+ interface InstanceMethods {
+ /** `setData` 函数用于将数据从逻辑层发送到视图层
+ *(异步),同时改变对应的 `this.data` 的值(同步)。
+ *
+ * **注意:**
+ *
+ * 1. **直接修改 this.data 而不调用 this.setData 是无法改变页面的状态的,还会造成数据不一致**。
+ * 1. 仅支持设置可 JSON 化的数据。
+ * 1. 单次设置的数据不能超过1024kB,请尽量避免一次设置过多的数据。
+ * 1. 请不要把 data 中任何一项的 value 设为 `undefined` ,否则这一项将不被设置并可能遗留一些潜在问题。
+ */
+ setData(
+ /** 这次要改变的数据
+ *
+ * 以 `key: value` 的形式表示,将 `this.data` 中的 `key` 对应的值改变成 `value`。
+ *
+ * 其中 `key` 可以以数据路径的形式给出,支持改变数组中的某一项或对象的某个属性,如 `array[2].message`,`a.b.c.d`,并且不需要在 this.data 中预先定义。
+ */
+ data: Partial & IAnyObject,
+ /** setData引起的界面更新渲染完毕后的回调函数,最低基础库: `1.5.0` */
+ callback?: () => void,
+ ): void
+
+ /** 检查组件是否具有 `behavior` (检查时会递归检查被直接或间接引入的所有behavior) */
+ hasBehavior(behavior: object): void
+ /** 触发事件,参见组件事件 */
+ triggerEvent(
+ name: string,
+ detail?: object,
+ options?: TriggerEventOption,
+ ): void
+ /** 创建一个 SelectorQuery 对象,选择器选取范围为这个组件实例内 */
+ createSelectorQuery(): SelectorQuery
+ /** 创建一个 IntersectionObserver 对象,选择器选取范围为这个组件实例内 */
+ createIntersectionObserver(
+ options: CreateIntersectionObserverOption,
+ ): IntersectionObserver
+ /** 使用选择器选择组件实例节点,返回匹配到的第一个组件实例对象(会被 `wx://component-export` 影响) */
+ selectComponent(selector: string): TrivialInstance
+ /** 使用选择器选择组件实例节点,返回匹配到的全部组件实例对象组成的数组 */
+ selectAllComponents(selector: string): TrivialInstance[]
+ /** 获取这个关系所对应的所有关联节点,参见 组件间关系 */
+ getRelationNodes(relationKey: string): TrivialInstance[]
+ /** 立刻执行 callback ,其中的多个 setData 之间不会触发界面绘制(只有某些特殊场景中需要,如用于在不同组件同时 setData 时进行界面绘制同步)*/
+ groupSetData(callback?: () => void): void
+ /** 返回当前页面的 custom-tab-bar 的组件实例 */
+ getTabBar(): TrivialInstance
+ /** 返回页面标识符(一个字符串),可以用来判断几个自定义组件实例是不是在同一个页面内 */
+ getPageId(): string
+ }
+
+ interface ComponentOptions {
+ /**
+ * [启用多slot支持](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件wxml的slot)
+ */
+ multipleSlots?: boolean
+ /**
+ * [组件样式隔离](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件样式隔离)
+ */
+ addGlobalClass?: boolean
+ /**
+ * [组件样式隔离](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#组件样式隔离)
+ */
+ styleIsolation?:
+ | 'isolated'
+ | 'apply-shared'
+ | 'shared'
+ | 'page-isolated'
+ | 'page-apply-shared'
+ | 'page-shared'
+ }
+
+ interface TriggerEventOption {
+ /** 事件是否冒泡
+ *
+ * 默认值: `false`
+ */
+ bubbles?: boolean
+ /** 事件是否可以穿越组件边界,为false时,事件将只能在引用组件的节点树上触发,不进入其他任何组件内部
+ *
+ * 默认值: `false`
+ */
+ composed?: boolean
+ /** 事件是否拥有捕获阶段
+ *
+ * 默认值: `false`
+ */
+ capturePhase?: boolean
+ }
+
+ interface RelationOption {
+ /** 目标组件的相对关系 */
+ type: 'parent' | 'child' | 'ancestor' | 'descendant'
+ /** 关系生命周期函数,当关系被建立在页面节点树中时触发,触发时机在组件attached生命周期之后 */
+ linked?(target: TrivialInstance): void
+ /** 关系生命周期函数,当关系在页面节点树中发生改变时触发,触发时机在组件moved生命周期之后 */
+ linkChanged?(target: TrivialInstance): void
+ /** 关系生命周期函数,当关系脱离页面节点树时触发,触发时机在组件detached生命周期之后 */
+ unlinked?(target: TrivialInstance): void
+ /** 如果这一项被设置,则它表示关联的目标节点所应具有的behavior,所有拥有这一behavior的组件节点都会被关联 */
+ target?: string
+ }
+
+ interface PageLifetimes {
+ /** 页面生命周期回调—监听页面显示
+ *
+ * 页面显示/切入前台时触发。
+ */
+ show(): void
+ /** 页面生命周期回调—监听页面隐藏
+ *
+ * 页面隐藏/切入后台时触发。 如 `navigateTo` 或底部 `tab` 切换到其他页面,小程序切入后台等。
+ */
+ hide(): void
+ /** 页面生命周期回调—监听页面尺寸变化
+ *
+ * 所在页面尺寸变化时执行
+ */
+ resize(size: Page.IResizeOption): void
+ }
+
+ type DefinitionFilter = (
+ /** 使用该 behavior 的 component/behavior 的定义对象 */
+ defFields: T,
+ /** 该 behavior 所使用的 behavior 的 definitionFilter 函数列表 */
+ definitionFilterArr?: DefinitionFilter[],
+ ) => void
+
+ interface Lifetimes {
+ /** 组件生命周期声明对象,组件的生命周期:`created`、`attached`、`ready`、`moved`、`detached` 将收归到 `lifetimes` 字段内进行声明,原有声明方式仍旧有效,如同时存在两种声明方式,则 `lifetimes` 字段内声明方式优先级最高
+ *
+ * 最低基础库: `2.2.3` */
+ lifetimes: Partial<{
+ /**
+ * 在组件实例刚刚被创建时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ created(): void
+ /**
+ * 在组件实例进入页面节点树时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ attached(): void
+ /**
+ * 在组件在视图层布局完成后执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ ready(): void
+ /**
+ * 在组件实例被移动到节点树另一个位置时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ moved(): void
+ /**
+ * 在组件实例被从页面节点树移除时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ detached(): void
+ /**
+ * 每当组件方法抛出错误时执行
+ *
+ * 最低基础库版本:[`2.4.1`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ error(err: Error): void,
+ }>
+ /**
+ * @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义
+ *
+ * 在组件实例刚刚被创建时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ created(): void
+ /**
+ * @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义
+ *
+ * 在组件实例进入页面节点树时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ attached(): void
+ /**
+ * @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义
+ *
+ * 在组件在视图层布局完成后执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ ready(): void
+ /**
+ * @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义
+ *
+ * 在组件实例被移动到节点树另一个位置时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ moved(): void
+ /**
+ * @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义
+ *
+ * 在组件实例被从页面节点树移除时执行
+ *
+ * 最低基础库版本:[`1.6.3`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ detached(): void
+ /**
+ * @deprecated 旧式的定义方式,基础库 `2.2.3` 起请在 lifetimes 中定义
+ *
+ * 每当组件方法抛出错误时执行
+ *
+ * 最低基础库版本:[`2.4.1`](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html)
+ */
+ error(err: Error): void
+ }
+
+ interface OtherOption {
+ /** 类似于mixins和traits的组件间代码复用机制,参见 [behaviors](behaviors.md) */
+ behaviors: string[]
+ /** 组件数据字段监听器,用于监听 properties 和 data 的变化 */
+ observers: Record any>
+ /** 组件间关系定义,参见 [组件间关系](relations.md) */
+ relations: {
+ [componentName: string]: RelationOption,
+ }
+ /** 组件接受的外部样式类,参见 [外部样式类](wxml-wxss.md) */
+ externalClasses?: string[]
+ /** 组件所在页面的生命周期声明对象,目前仅支持页面的 `show` 和 `hide` 两个生命周期
+ *
+ * 最低基础库: `2.2.3` */
+ pageLifetimes?: Partial
+ /** 一些选项(文档中介绍相关特性时会涉及具体的选项设置,这里暂不列举) */
+ options: ComponentOptions
+
+ /** 定义段过滤器,用于自定义组件扩展,参见 [自定义组件扩展](extend.md)
+ *
+ * 最低基础库: `2.2.3` */
+ definitionFilter?: DefinitionFilter
+ }
+ }
+}
+/** Component构造器可用于定义组件,调用Component构造器时可以指定组件的属性、数据、方法等。
+ *
+ * * 使用 `this.data` 可以获取内部数据和属性值,但不要直接修改它们,应使用 `setData` 修改。
+ * * 生命周期函数无法在组件方法中通过 `this` 访问到。
+ * * 属性名应避免以 data 开头,即不要命名成 `dataXyz` 这样的形式,因为在 WXML 中, `data-xyz=""` 会被作为节点 dataset 来处理,而不是组件属性。
+ * * 在一个组件的定义和使用时,组件的属性名和 data 字段相互间都不能冲突(尽管它们位于不同的定义段中)。
+ * * 从基础库 `2.0.9` 开始,对象类型的属性和 data 字段中可以包含函数类型的子字段,即可以通过对象类型的属性字段来传递函数。低于这一版本的基础库不支持这一特性。
+ * * `bug` : 对于 type 为 Object 或 Array 的属性,如果通过该组件自身的 `this.setData` 来改变属性值的一个子字段,则依旧会触发属性 observer ,且 observer 接收到的 `newVal` 是变化的那个子字段的值, `oldVal` 为空, `changedPath` 包含子字段的字段名相关信息。
+ */
+declare const Component: WechatMiniprogram.Component.Constructor
diff --git a/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.page.d.ts b/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.page.d.ts
new file mode 100644
index 0000000..b214a3e
--- /dev/null
+++ b/node_modules/.pnpm/registry.npmjs.org+miniprogram-api-typings@2.8.3-1/node_modules/miniprogram-api-typings/types/wx/lib.wx.page.d.ts
@@ -0,0 +1,212 @@
+/*! *****************************************************************************
+Copyright (c) 2019 Tencent, Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+***************************************************************************** */
+
+declare namespace WechatMiniprogram {
+ namespace Page {
+ type Instance<
+ TData extends DataOption,
+ TCustom extends CustomOption
+ > = OptionalInterface &
+ InstanceProperties &
+ InstanceMethods &
+ Data &
+ TCustom
+ type Options<
+ TData extends DataOption,
+ TCustom extends CustomOption
+ > = (TCustom & Partial> & Partial) &
+ ThisType>
+ type TrivialInstance = Instance
+ interface Constructor {
+ (
+ options: Options,
+ ): void
+ }
+ interface ILifetime {
+ /** 生命周期回调—监听页面加载
+ *
+ * 页面加载时触发。一个页面只会调用一次,可以在 onLoad 的参数中获取打开当前页面路径中的参数。
+ */
+ onLoad(
+ /** 打开当前页面路径中的参数 */
+ query: Record,
+ ): void
+ /** 生命周期回调—监听页面显示
+ *
+ * 页面显示/切入前台时触发。
+ */
+ onShow(): void
+ /** 生命周期回调—监听页面初次渲染完成
+ *
+ * 页面初次渲染完成时触发。一个页面只会调用一次,代表页面已经准备妥当,可以和视图层进行交互。
+ *
+
+ * 注意:对界面内容进行设置的 API 如`wx.setNavigationBarTitle`,请在`onReady`之后进行。
+ */
+ onReady(): void
+ /** 生命周期回调—监听页面隐藏
+ *
+ * 页面隐藏/切入后台时触发。 如 `navigateTo` 或底部 `tab` 切换到其他页面,小程序切入后台等。
+ */
+ onHide(): void
+ /** 生命周期回调—监听页面卸载
+ *
+ * 页面卸载时触发。如`redirectTo`或`navigateBack`到其他页面时。
+ */
+ onUnload(): void
+ /** 监听用户下拉动作
+ *
+ * 监听用户下拉刷新事件。
+ * - 需要在`app.json`的`window`选项中或页面配置中开启`enablePullDownRefresh`。
+ * - 可以通过`wx.startPullDownRefresh`触发下拉刷新,调用后触发下拉刷新动画,效果与用户手动下拉刷新一致。
+ * - 当处理完数据刷新后,`wx.stopPullDownRefresh`可以停止当前页面的下拉刷新。
+ */
+ onPullDownRefresh(): void
+ /** 页面上拉触底事件的处理函数
+ *
+ * 监听用户上拉触底事件。
+ * - 可以在`app.json`的`window`选项中或页面配置中设置触发距离`onReachBottomDistance`。
+ * - 在触发距离内滑动期间,本事件只会被触发一次。
+ */
+ onReachBottom(): void
+ /** 用户点击右上角转发
+ *
+ * 监听用户点击页面内转发按钮(`