annil 1.17.0 → 1.18.0
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.
- package/README.md +38 -169
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.d.ts +1 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js +2 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedConstraint.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.d.ts +10 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkComputed/ChunkComputedOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.d.ts +9 -0
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkData/chunkDataOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.d.ts +2 -0
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.js +2 -0
- package/dist/api/ChunkComponent/ChunkData/validatePrefix.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.d.ts +10 -0
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkMethods/ChunkMethodsOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.d.ts +2 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js +2 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreConstraint.js.map +1 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.d.ts +12 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js +2 -0
- package/dist/api/ChunkComponent/ChunkStore/ChunkStoreOption.js.map +1 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.d.ts +2 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js +2 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsConstraint.js.map +1 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.d.ts +10 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js +2 -0
- package/dist/api/ChunkComponent/ChunklEvents/ChunkEventsOption.js.map +1 -0
- package/dist/api/ChunkComponent/SlotComponentReturnType.d.ts +20 -0
- package/dist/api/ChunkComponent/SlotComponentReturnType.js +2 -0
- package/dist/api/ChunkComponent/SlotComponentReturnType.js.map +1 -0
- package/dist/api/ChunkComponent/index.d.ts +24 -0
- package/dist/api/ChunkComponent/index.js +4 -0
- package/dist/api/ChunkComponent/index.js.map +1 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.d.ts +3 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubComputed/SubComputedOption.d.ts → CustomComponent/CustomComputed/CustomComputedOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js +2 -0
- package/dist/api/CustomComponent/CustomComputed/CustomComputedOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.d.ts +3 -0
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js +2 -0
- package/dist/api/CustomComponent/CustomComputed/GetCustomComputedDoc.js.map +1 -0
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.d.ts +3 -0
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomData/CustomDataConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubData/SubDataOption.d.ts → CustomComponent/CustomData/CustomDataOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomData/CustomDataOption.js +2 -0
- package/dist/api/CustomComponent/CustomData/CustomDataOption.js.map +1 -0
- package/dist/api/{SubComponent/SubEvents/SubEventsConstraint.d.ts → CustomComponent/CustomEvents/CustomEventsConstraint.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsConstraint.js.map +1 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.d.ts +4 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js +2 -0
- package/dist/api/CustomComponent/CustomEvents/CustomEventsOption.js.map +1 -0
- package/dist/api/{SubComponent/SubInherit/SubInheritConstraint.d.ts → CustomComponent/CustomInherit/CustomInheritConstraint.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomInherit/CustomInheritConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubInherit/SubInheritOption.d.ts → CustomComponent/CustomInherit/CustomInheritOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js +2 -0
- package/dist/api/CustomComponent/CustomInherit/CustomInheritOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomInstance/CustomInstance.d.ts +2 -0
- package/dist/api/CustomComponent/CustomInstance/CustomInstance.js +2 -0
- package/dist/api/CustomComponent/CustomInstance/CustomInstance.js.map +1 -0
- package/dist/api/{SubComponent/SubLifetimes/SubLifetimesOption.d.ts → CustomComponent/CustomLifetimes/CustomLifetimesOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomLifetimes/CustomLifetimesOption.js +2 -0
- package/dist/api/CustomComponent/CustomLifetimes/CustomLifetimesOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.d.ts +2 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsConstraint.js.map +1 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.d.ts +5 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js +2 -0
- package/dist/api/CustomComponent/CustomMethods/CustomMethodsOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.d.ts +2 -0
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js +2 -0
- package/dist/api/CustomComponent/CustomObservers/CustomObserversOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.d.ts +2 -0
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js +2 -0
- package/dist/api/CustomComponent/CustomPageLifetimes/CustomPageLifetimesOption.js.map +1 -0
- package/dist/api/{SubComponent/SubReturnType/CreateSubComponentDoc.d.ts → CustomComponent/CustomReturnType/CreateCustomComponentDoc.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js +2 -0
- package/dist/api/CustomComponent/CustomReturnType/CreateCustomComponentDoc.js.map +1 -0
- package/dist/api/{SubComponent/SubStore/SubStoreConstraint.d.ts → CustomComponent/CustomStore/CustomStoreConstraint.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js +2 -0
- package/dist/api/CustomComponent/CustomStore/CustomStoreConstraint.js.map +1 -0
- package/dist/api/{SubComponent/SubStore/SubStoreOption.d.ts → CustomComponent/CustomStore/CustomStoreOption.d.ts} +1 -1
- package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js +2 -0
- package/dist/api/CustomComponent/CustomStore/CustomStoreOption.js.map +1 -0
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.d.ts +2 -0
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js +2 -0
- package/dist/api/CustomComponent/CustomWatch/CustomWatchOption.js.map +1 -0
- package/dist/api/CustomComponent/index.d.ts +49 -0
- package/dist/api/CustomComponent/index.js +4 -0
- package/dist/api/CustomComponent/index.js.map +1 -0
- package/dist/api/{SubComponent → CustomComponent}/returnType.d.ts +3 -3
- package/dist/api/CustomComponent/returnType.js.map +1 -0
- package/dist/api/DefineComponent/SubComponents/SubComponentsOption.d.ts +2 -2
- package/dist/api/DefineComponent/index.d.ts +4 -4
- package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.d.ts +3 -2
- package/dist/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/customEventsHandle.js +3 -3
- package/dist/api/DefineComponent/normalizeOptions/customEventsHandle.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/handleStore/reactionRegister.js +1 -2
- package/dist/api/DefineComponent/normalizeOptions/handleStore/reactionRegister.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.d.ts +3 -2
- package/dist/api/DefineComponent/normalizeOptions/handleSubComponents.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/index.js +1 -2
- package/dist/api/DefineComponent/normalizeOptions/index.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.d.ts +3 -2
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.js +1 -2
- package/dist/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/getPathsValue.js +1 -1
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/getPathsValue.js.map +1 -1
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js +3 -4
- package/dist/api/DefineComponent/normalizeOptions/watchHandler/index.js.map +1 -1
- package/dist/api/DefineComponent/returnType/ComponentDoc.d.ts +1 -4
- package/dist/api/DefineComponent/returnType/GenerateComponentDoc.d.ts +3 -3
- package/dist/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.d.ts +3 -3
- package/dist/api/InstanceInject/instanceConfig.js +1 -3
- package/dist/api/InstanceInject/instanceConfig.js.map +1 -1
- package/dist/api/RootComponent/Events/EventsConstraint.d.ts +9 -7
- package/dist/api/RootComponent/index.d.ts +4 -3
- package/dist/api/RootComponent/index.js.map +1 -1
- package/dist/behaviors/BbeforeCreated.d.ts +1 -1
- package/dist/behaviors/BthrottleDebounce.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/thirdLib/vant/Button.d.ts +2 -2
- package/dist/thirdLib/vant/NoticeBar.d.ts +2 -2
- package/dist/thirdLib/vant/Popup.d.ts +2 -2
- package/dist/thirdLib/wm/Textarea.d.ts +2 -2
- package/dist/thirdLib/wm/map.d.ts +2 -2
- package/dist/thirdLib/wm/scrollView.d.ts +2 -2
- package/dist/thirdLib/wm/swiper.d.ts +2 -2
- package/dist/thirdLib/wm/view.d.ts +2 -2
- package/dist/types/{CreateComponentType.d.ts → CreateComponentDoc.d.ts} +5 -2
- package/dist/types/CreateComponentDoc.js +2 -0
- package/dist/types/CreateComponentDoc.js.map +1 -0
- package/dist/utils/nonNullable.js +1 -1
- package/dist/utils/nonNullable.js.map +1 -1
- package/package.json +8 -11
- package/CHANGELOG.md +0 -950
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.d.ts +0 -3
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js +0 -2
- package/dist/api/SubComponent/SubComputed/GetSubComputedDoc.js.map +0 -1
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.d.ts +0 -3
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js +0 -2
- package/dist/api/SubComponent/SubComputed/SubComputedConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubComputed/SubComputedOption.js +0 -2
- package/dist/api/SubComponent/SubComputed/SubComputedOption.js.map +0 -1
- package/dist/api/SubComponent/SubData/SubDataConstraint.d.ts +0 -3
- package/dist/api/SubComponent/SubData/SubDataConstraint.js +0 -2
- package/dist/api/SubComponent/SubData/SubDataConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubData/SubDataOption.js +0 -2
- package/dist/api/SubComponent/SubData/SubDataOption.js.map +0 -1
- package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js +0 -2
- package/dist/api/SubComponent/SubEvents/SubEventsConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubEvents/SubEventsOption.d.ts +0 -4
- package/dist/api/SubComponent/SubEvents/SubEventsOption.js +0 -2
- package/dist/api/SubComponent/SubEvents/SubEventsOption.js.map +0 -1
- package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js +0 -2
- package/dist/api/SubComponent/SubInherit/SubInheritConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubInherit/SubInheritOption.js +0 -2
- package/dist/api/SubComponent/SubInherit/SubInheritOption.js.map +0 -1
- package/dist/api/SubComponent/SubInstance/SubInstance.d.ts +0 -2
- package/dist/api/SubComponent/SubInstance/SubInstance.js +0 -2
- package/dist/api/SubComponent/SubInstance/SubInstance.js.map +0 -1
- package/dist/api/SubComponent/SubLifetimes/SubLifetimesOption.js +0 -2
- package/dist/api/SubComponent/SubLifetimes/SubLifetimesOption.js.map +0 -1
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.d.ts +0 -2
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js +0 -2
- package/dist/api/SubComponent/SubMethods/SubMethodsConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.d.ts +0 -5
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.js +0 -2
- package/dist/api/SubComponent/SubMethods/SubMethodsOption.js.map +0 -1
- package/dist/api/SubComponent/SubObservers/SubObserversOption.d.ts +0 -2
- package/dist/api/SubComponent/SubObservers/SubObserversOption.js +0 -2
- package/dist/api/SubComponent/SubObservers/SubObserversOption.js.map +0 -1
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.d.ts +0 -2
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js +0 -2
- package/dist/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.js.map +0 -1
- package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js +0 -2
- package/dist/api/SubComponent/SubReturnType/CreateSubComponentDoc.js.map +0 -1
- package/dist/api/SubComponent/SubStore/SubStoreConstraint.js +0 -2
- package/dist/api/SubComponent/SubStore/SubStoreConstraint.js.map +0 -1
- package/dist/api/SubComponent/SubStore/SubStoreOption.js +0 -2
- package/dist/api/SubComponent/SubStore/SubStoreOption.js.map +0 -1
- package/dist/api/SubComponent/SubWatch/SubWatchOption.d.ts +0 -2
- package/dist/api/SubComponent/SubWatch/SubWatchOption.js +0 -2
- package/dist/api/SubComponent/SubWatch/SubWatchOption.js.map +0 -1
- package/dist/api/SubComponent/index.d.ts +0 -49
- package/dist/api/SubComponent/index.js +0 -4
- package/dist/api/SubComponent/index.js.map +0 -1
- package/dist/api/SubComponent/returnType.js.map +0 -1
- package/dist/types/CreateComponentType.js +0 -2
- package/dist/types/CreateComponentType.js.map +0 -1
- package/dist/types/ExtendComponentType.d.ts +0 -7
- package/dist/types/ExtendComponentType.js +0 -2
- package/dist/types/ExtendComponentType.js.map +0 -1
- package/dist/types/RemoveNullOfRequired.d.ts +0 -4
- package/dist/types/RemoveNullOfRequired.js +0 -2
- package/dist/types/RemoveNullOfRequired.js.map +0 -1
- package/src/api/DefineComponent/NameOrPath/NameOrPathOption.ts +0 -31
- package/src/api/DefineComponent/NameOrPath/test/error.test.ts +0 -32
- package/src/api/DefineComponent/NameOrPath/test/normal.test.ts +0 -13
- package/src/api/DefineComponent/RootComponent/RootComponentOption.ts +0 -11
- package/src/api/DefineComponent/SubComponents/SubComponentsOption.ts +0 -13
- package/src/api/DefineComponent/SubComponents/test/normal.test.ts +0 -1049
- package/src/api/DefineComponent/index.ts +0 -58
- package/src/api/DefineComponent/normalizeOptions/__throttleDebounce__FieldCheck.ts +0 -29
- package/src/api/DefineComponent/normalizeOptions/customEventsHandle.ts +0 -55
- package/src/api/DefineComponent/normalizeOptions/handleRootComponent.ts +0 -33
- package/src/api/DefineComponent/normalizeOptions/handleStore/disposeStore.ts +0 -10
- package/src/api/DefineComponent/normalizeOptions/handleStore/initStore.ts +0 -9
- package/src/api/DefineComponent/normalizeOptions/handleStore/reactionRegister.ts +0 -70
- package/src/api/DefineComponent/normalizeOptions/handleSubComponents.ts +0 -23
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/addDetachedData.ts +0 -10
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/hijack.ts +0 -26
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/index.ts +0 -57
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/isPageCheck.ts +0 -22
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/loadReceivedDataHandle.ts +0 -25
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/onLoadReceivedDataHandle.ts +0 -33
- package/src/api/DefineComponent/normalizeOptions/hijackHandle/pagePathCheck.ts +0 -9
- package/src/api/DefineComponent/normalizeOptions/index.ts +0 -143
- package/src/api/DefineComponent/normalizeOptions/initComputed/computedUpdater.ts +0 -51
- package/src/api/DefineComponent/normalizeOptions/initComputed/data-tracer.ts +0 -62
- package/src/api/DefineComponent/normalizeOptions/initComputed/dependencesOptimize.ts +0 -45
- package/src/api/DefineComponent/normalizeOptions/initComputed/index.ts +0 -42
- package/src/api/DefineComponent/normalizeOptions/initComputed/initComputedAndGetCache.ts +0 -105
- package/src/api/DefineComponent/normalizeOptions/injectInfoHandler.ts +0 -51
- package/src/api/DefineComponent/normalizeOptions/internalFieldProtection.ts +0 -27
- package/src/api/DefineComponent/normalizeOptions/otherFieldsHandle.ts +0 -29
- package/src/api/DefineComponent/normalizeOptions/sameFuncFieldsCollect.ts +0 -23
- package/src/api/DefineComponent/normalizeOptions/sameFuncOptionsHandle.ts +0 -36
- package/src/api/DefineComponent/normalizeOptions/watchHandler/getPathsValue.ts +0 -31
- package/src/api/DefineComponent/normalizeOptions/watchHandler/getPropertiesValue.ts +0 -51
- package/src/api/DefineComponent/normalizeOptions/watchHandler/hasComputedPath.ts +0 -9
- package/src/api/DefineComponent/normalizeOptions/watchHandler/index.ts +0 -78
- package/src/api/DefineComponent/returnType/ComponentDoc.ts +0 -25
- package/src/api/DefineComponent/returnType/GenerateComponentDoc.ts +0 -46
- package/src/api/DefineComponent/returnType/GeneratePageDoc.ts +0 -22
- package/src/api/DefineComponent/returnType/GetCustomEventDocOfSubDoc.ts +0 -24
- package/src/api/DefineComponent/returnType/GetPropertiesDocOfSubDoc.ts +0 -7
- package/src/api/DefineComponent/returnType/PageDoc.ts +0 -19
- package/src/api/DefineComponent/returnType/test/normalComponentDoc.test.ts +0 -248
- package/src/api/DefineComponent/returnType/test/normalPageDoc.test.ts +0 -49
- package/src/api/InstanceInject/inject.ts +0 -41
- package/src/api/InstanceInject/instanceConfig.ts +0 -49
- package/src/api/InstanceInject/test/normal.test.ts +0 -42
- package/src/api/RootComponent/Computed/ComputedConstraint.ts +0 -4
- package/src/api/RootComponent/Computed/ComputedOption.ts +0 -35
- package/src/api/RootComponent/Computed/GetComputedDef.ts +0 -10
- package/src/api/RootComponent/Computed/test/GetComputedDoc.test.ts +0 -25
- package/src/api/RootComponent/Computed/test/error.test.ts +0 -50
- package/src/api/RootComponent/Computed/test/normal.test.ts +0 -124
- package/src/api/RootComponent/CustomEvents/CustomEventConstraint.ts +0 -89
- package/src/api/RootComponent/CustomEvents/CustomEventsDef.ts +0 -4
- package/src/api/RootComponent/CustomEvents/CustomEventsDoc.ts +0 -4
- package/src/api/RootComponent/CustomEvents/CustomEventsOption.ts +0 -41
- package/src/api/RootComponent/CustomEvents/CustomEventsTag.ts +0 -59
- package/src/api/RootComponent/CustomEvents/GetCustomEventDef.ts +0 -29
- package/src/api/RootComponent/CustomEvents/GetCustomEventDoc.ts +0 -47
- package/src/api/RootComponent/CustomEvents/test/GetCustomEventDoc.test.ts +0 -38
- package/src/api/RootComponent/CustomEvents/test/GetFullEventDoc.test.ts +0 -57
- package/src/api/RootComponent/CustomEvents/test/GetShortEventDoc.test.ts +0 -36
- package/src/api/RootComponent/CustomEvents/test/error.test.ts +0 -101
- package/src/api/RootComponent/CustomEvents/test/normal.test.ts +0 -99
- package/src/api/RootComponent/Data/DataConstraint.ts +0 -1
- package/src/api/RootComponent/Data/DataOption.ts +0 -25
- package/src/api/RootComponent/Data/GetDataDef.ts +0 -8
- package/src/api/RootComponent/Data/GetDataDoc.ts +0 -8
- package/src/api/RootComponent/Data/test/GetDataDoc.test.ts +0 -32
- package/src/api/RootComponent/Data/test/error.test.ts +0 -14
- package/src/api/RootComponent/Data/test/normal.test.ts +0 -33
- package/src/api/RootComponent/Events/EventsConstraint.ts +0 -74
- package/src/api/RootComponent/Events/EventsOption.ts +0 -55
- package/src/api/RootComponent/Events/test/normal.test.ts +0 -161
- package/src/api/RootComponent/Instance/CustomEventMethods.ts +0 -11
- package/src/api/RootComponent/Instance/CustomSetData.ts +0 -17
- package/src/api/RootComponent/Instance/RootComponentInstance.ts +0 -46
- package/src/api/RootComponent/Instance/test/CustomEventsDoc.test.ts +0 -70
- package/src/api/RootComponent/Instance/test/CustomSetData.test.ts +0 -44
- package/src/api/RootComponent/Instance/test/customEvents/error.test.ts +0 -13
- package/src/api/RootComponent/Instance/test/customEvents/normal.test.ts +0 -71
- package/src/api/RootComponent/Instance/test/datas/mormal.test.ts +0 -43
- package/src/api/RootComponent/Instance/test/methods/error.test.ts +0 -14
- package/src/api/RootComponent/Instance/test/methods/mormal.test.ts +0 -27
- package/src/api/RootComponent/Instance/test/properties/mormal.test.ts +0 -58
- package/src/api/RootComponent/Instance/test/setData/error.test.ts +0 -65
- package/src/api/RootComponent/Instance/test/setData/normal.test.ts +0 -51
- package/src/api/RootComponent/IsPage/IsPageOption.ts +0 -6
- package/src/api/RootComponent/IsPage/test/normal.test.ts +0 -29
- package/src/api/RootComponent/Lifetimes/LifetimesConstraint.ts +0 -14
- package/src/api/RootComponent/Lifetimes/LifetimesOption.ts +0 -31
- package/src/api/RootComponent/Lifetimes/test/error.test.ts +0 -31
- package/src/api/RootComponent/Lifetimes/test/normal.test.ts +0 -34
- package/src/api/RootComponent/Methods/MethodsConstraint.ts +0 -3
- package/src/api/RootComponent/Methods/MethodsOption.ts +0 -15
- package/src/api/RootComponent/Methods/test/error.test.ts +0 -41
- package/src/api/RootComponent/Methods/test/mormal.test.ts +0 -25
- package/src/api/RootComponent/Observers/ObserversOption.ts +0 -58
- package/src/api/RootComponent/Observers/test/normal.test.ts +0 -30
- package/src/api/RootComponent/PageLifetimes/PageLifetimesOption.ts +0 -29
- package/src/api/RootComponent/PageLifetimes/test/error.test.ts +0 -37
- package/src/api/RootComponent/PageLifetimes/test/normal.test.ts +0 -71
- package/src/api/RootComponent/Properties/GetOptionalDef.ts +0 -18
- package/src/api/RootComponent/Properties/GetPropertiesDef.ts +0 -22
- package/src/api/RootComponent/Properties/GetRequiredDef.ts +0 -16
- package/src/api/RootComponent/Properties/PropertiesConstraint.ts +0 -38
- package/src/api/RootComponent/Properties/PropertiesOption.ts +0 -25
- package/src/api/RootComponent/Properties/PropertiesValueValidator.ts +0 -21
- package/src/api/RootComponent/Properties/test/error.test.ts +0 -49
- package/src/api/RootComponent/Properties/test/normalEmpty.test.ts +0 -42
- package/src/api/RootComponent/Properties/test/normalOptional.test.ts +0 -118
- package/src/api/RootComponent/Properties/test/normalRequired.test.ts +0 -107
- package/src/api/RootComponent/Store/GetStoreDef.ts +0 -34
- package/src/api/RootComponent/Store/StoreConstraint.ts +0 -2
- package/src/api/RootComponent/Store/StoreOption.ts +0 -53
- package/src/api/RootComponent/Store/test/error.test.ts +0 -30
- package/src/api/RootComponent/Store/test/normal.test.ts +0 -55
- package/src/api/RootComponent/Watch/WatchOption.ts +0 -67
- package/src/api/RootComponent/Watch/test/WatchComputed.test.ts +0 -40
- package/src/api/RootComponent/Watch/test/WatchData.test.ts +0 -55
- package/src/api/RootComponent/Watch/test/WatchProperties.test.ts +0 -170
- package/src/api/RootComponent/Watch/test/WtachInject.test.ts +0 -16
- package/src/api/RootComponent/Watch/test/error.test.ts +0 -54
- package/src/api/RootComponent/index.ts +0 -164
- package/src/api/RootComponent/returnType.ts +0 -57
- package/src/api/SubComponent/SubComputed/GetSubComputedDoc.ts +0 -4
- package/src/api/SubComponent/SubComputed/SubComputedConstraint.ts +0 -1
- package/src/api/SubComponent/SubComputed/SubComputedOption.ts +0 -11
- package/src/api/SubComponent/SubComputed/test/error.test.ts +0 -88
- package/src/api/SubComponent/SubComputed/test/normal.test.ts +0 -207
- package/src/api/SubComponent/SubData/SubDataConstraint.ts +0 -9
- package/src/api/SubComponent/SubData/SubDataOption.ts +0 -17
- package/src/api/SubComponent/SubData/test/error.test.ts +0 -64
- package/src/api/SubComponent/SubData/test/normal.test.ts +0 -91
- package/src/api/SubComponent/SubEvents/SubEventsConstraint.ts +0 -27
- package/src/api/SubComponent/SubEvents/SubEventsOption.ts +0 -12
- package/src/api/SubComponent/SubEvents/test/error.test.ts +0 -36
- package/src/api/SubComponent/SubEvents/test/normal.test.ts +0 -209
- package/src/api/SubComponent/SubInherit/SubInheritConstraint.ts +0 -17
- package/src/api/SubComponent/SubInherit/SubInheritOption.ts +0 -15
- package/src/api/SubComponent/SubInherit/test/error.test.ts +0 -84
- package/src/api/SubComponent/SubInherit/test/normal.test.ts +0 -81
- package/src/api/SubComponent/SubInstance/SubInstance.ts +0 -9
- package/src/api/SubComponent/SubInstance/test/error.test.ts +0 -22
- package/src/api/SubComponent/SubInstance/test/normal.test.ts +0 -87
- package/src/api/SubComponent/SubLifetimes/SubLifetimesOption.ts +0 -3
- package/src/api/SubComponent/SubMethods/SubMethodsConstraint.ts +0 -3
- package/src/api/SubComponent/SubMethods/SubMethodsOption.ts +0 -17
- package/src/api/SubComponent/SubMethods/test/error.test.ts +0 -51
- package/src/api/SubComponent/SubMethods/test/normarl.test.ts +0 -33
- package/src/api/SubComponent/SubObservers/SubObserversOption.ts +0 -3
- package/src/api/SubComponent/SubPageLifetimes/SubPageLifetimesOption.ts +0 -6
- package/src/api/SubComponent/SubPageLifetimes/test/error.test.ts +0 -1
- package/src/api/SubComponent/SubPageLifetimes/test/normal.test.ts +0 -1
- package/src/api/SubComponent/SubReturnType/CreateSubComponentDoc.ts +0 -41
- package/src/api/SubComponent/SubReturnType/test/error.test.ts +0 -18
- package/src/api/SubComponent/SubReturnType/test/normal.test.ts +0 -98
- package/src/api/SubComponent/SubStore/SubStoreConstraint.ts +0 -13
- package/src/api/SubComponent/SubStore/SubStoreOption.ts +0 -32
- package/src/api/SubComponent/SubStore/test/error.test.ts +0 -60
- package/src/api/SubComponent/SubStore/test/normal.test.ts +0 -43
- package/src/api/SubComponent/SubWatch/SubWatchOption.ts +0 -3
- package/src/api/SubComponent/SubWatch/test/WatchComputed.test.ts +0 -90
- package/src/api/SubComponent/SubWatch/test/WatchProperties.test.ts +0 -151
- package/src/api/SubComponent/SubWatch/test/WatchRootData.test.ts +0 -122
- package/src/api/SubComponent/SubWatch/test/WatchSubData.test.ts +0 -49
- package/src/api/SubComponent/SubWatch/test/WtachInject.test.ts +0 -16
- package/src/api/SubComponent/SubWatch/test/error.test.ts +0 -60
- package/src/api/SubComponent/index.ts +0 -301
- package/src/api/SubComponent/returnType.ts +0 -39
- package/src/api/wxSugar.ts +0 -107
- package/src/behaviors/BbeforeCreated.ts +0 -18
- package/src/behaviors/BthrottleDebounce.ts +0 -28
- package/src/index.ts +0 -46
- package/src/thirdLib/index.ts +0 -3
- package/src/thirdLib/vant/Button.ts +0 -23
- package/src/thirdLib/vant/NoticeBar.ts +0 -32
- package/src/thirdLib/vant/Popup.ts +0 -70
- package/src/thirdLib/vant/index.ts +0 -5
- package/src/thirdLib/wm/Textarea.ts +0 -117
- package/src/thirdLib/wm/baseEvents.ts +0 -54
- package/src/thirdLib/wm/index.ts +0 -9
- package/src/thirdLib/wm/map.ts +0 -266
- package/src/thirdLib/wm/scrollView.ts +0 -86
- package/src/thirdLib/wm/swiper.test.ts +0 -22
- package/src/thirdLib/wm/swiper.ts +0 -111
- package/src/thirdLib/wm/view.ts +0 -28
- package/src/types/AddNullForObject.ts +0 -6
- package/src/types/AddPrefix.ts +0 -10
- package/src/types/Assert.ts +0 -1
- package/src/types/Assign.ts +0 -1
- package/src/types/ComputeObject.ts +0 -1
- package/src/types/CreateComponentType.ts +0 -37
- package/src/types/DetailedType.ts +0 -15
- package/src/types/ExtendComponentType.ts +0 -60
- package/src/types/Extra.ts +0 -1
- package/src/types/GetComponentPrefix.ts +0 -36
- package/src/types/GetPropertiesDuplicatedKeys.ts +0 -14
- package/src/types/Has.ts +0 -1
- package/src/types/InferDetailedType.test.ts +0 -13
- package/src/types/InferDetailedType.ts +0 -12
- package/src/types/InnerData.ts +0 -1
- package/src/types/ListOfSamePrimitive.ts +0 -20
- package/src/types/OfficialTypeAlias.ts +0 -107
- package/src/types/RemoveInnerData.ts +0 -5
- package/src/types/RemoveNever.ts +0 -6
- package/src/types/RemoveNullOfRequired.ts +0 -8
- package/src/types/RemovePrefix.ts +0 -3
- package/src/types/Replace.ts +0 -24
- package/src/types/ReplacePrefix.ts +0 -46
- package/src/types/RequiredKeys.ts +0 -8
- package/src/types/Shift.ts +0 -2
- package/src/types/TwoParamsEqual.ts +0 -3
- package/src/types/UnionToComma.test.ts +0 -9
- package/src/types/Validators.ts +0 -17
- package/src/types/includes.ts +0 -3
- package/src/utils/InnerMarker.ts +0 -3
- package/src/utils/_utils.ts +0 -8
- package/src/utils/applyDebounceAndThrottle.ts +0 -31
- package/src/utils/debounce.ts +0 -22
- package/src/utils/deepClone.ts +0 -20
- package/src/utils/deepEqual.ts +0 -32
- package/src/utils/isEmptyObject.ts +0 -14
- package/src/utils/nonNullable.ts +0 -20
- package/src/utils/throttle.ts +0 -24
- package/src/utils/typeEqual.ts +0 -30
- package/src/utils/typeNotEqual.ts +0 -48
- package/tsconfig.json +0 -24
- /package/dist/api/{SubComponent → CustomComponent}/returnType.js +0 -0
package/src/thirdLib/wm/map.ts
DELETED
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
import type { CreateComponentType } from "../../types/CreateComponentType";
|
|
2
|
-
|
|
3
|
-
type RegionChangeBegin = { type: "begin"; causedBy: "gesture" | "update" };
|
|
4
|
-
|
|
5
|
-
export type MarkLocation = { latitude: number; longitude: number };
|
|
6
|
-
|
|
7
|
-
type RegionChangeEnd = {
|
|
8
|
-
type: "end";
|
|
9
|
-
causedBy: "drag" | "scale" | "update";
|
|
10
|
-
centerLocation: MarkLocation;
|
|
11
|
-
region: { northeast: MarkLocation; southwest: MarkLocation };
|
|
12
|
-
rotate: number;
|
|
13
|
-
scale: number;
|
|
14
|
-
skew: number;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type RegionChangeDetail = RegionChangeBegin | RegionChangeEnd;
|
|
18
|
-
|
|
19
|
-
export type Callout = {
|
|
20
|
-
content: string;
|
|
21
|
-
display: "ALWAYS" | "BYCLICK";
|
|
22
|
-
color?: string;
|
|
23
|
-
fontSize?: string | number;
|
|
24
|
-
borderWidth?: number;
|
|
25
|
-
borderRadius?: number;
|
|
26
|
-
borderColor?: string;
|
|
27
|
-
bgColor?: string;
|
|
28
|
-
padding?: number;
|
|
29
|
-
textAlign?: "center" | "left" | "right";
|
|
30
|
-
/**
|
|
31
|
-
* 横向偏移量,向右为正数 number 2.11.0
|
|
32
|
-
*/
|
|
33
|
-
anchorX?: number;
|
|
34
|
-
/**
|
|
35
|
-
* anchorY 纵向偏移量,向下为正数 number 2.11.0
|
|
36
|
-
*/
|
|
37
|
-
anchorYL?: number;
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
// 官方说明 https://developers.weixin.qq.com/miniprogram/dev/component/map.html#marker
|
|
41
|
-
export type Marker = {
|
|
42
|
-
// 标记点 id marker 点击事件回调会返回此 id
|
|
43
|
-
id: number;
|
|
44
|
-
// 标注图标宽度 默认为图片实际宽度
|
|
45
|
-
width: number | string;
|
|
46
|
-
// 标注图标高度 默认为图片实际高度
|
|
47
|
-
height: number | string;
|
|
48
|
-
// 聚合簇的 id 自定义点聚合簇效果时使用
|
|
49
|
-
clusterId?: number;
|
|
50
|
-
// 是否参与点聚合 默认不参与点聚合
|
|
51
|
-
joinCluster?: boolean;
|
|
52
|
-
// 纬度 浮点数,范围 -90 ~ 90
|
|
53
|
-
latitude: number;
|
|
54
|
-
// 经度 浮点数,范围 -180 ~ 180
|
|
55
|
-
longitude: number;
|
|
56
|
-
// 标注点名 点击时显示,callout 存在时将被忽略
|
|
57
|
-
title?: string;
|
|
58
|
-
// 显示层级 默认为 0
|
|
59
|
-
zIndex?: number;
|
|
60
|
-
// 显示的图标 项目目录下的图片路径,支持网络路径、本地路径、代码包路径(2.3.0)
|
|
61
|
-
iconPath: string;
|
|
62
|
-
// 旋转角度 顺时针旋转的角度,范围 0 ~ 360,默认为 0
|
|
63
|
-
rotate?: number;
|
|
64
|
-
// 标注的透明度 默认 1,无透明,范围 0 ~ 1
|
|
65
|
-
alpha?: number;
|
|
66
|
-
// 标记点上方的气泡窗口 支持的属性见下表,可识别换行符
|
|
67
|
-
callout?: Callout;
|
|
68
|
-
// 自定义气泡窗口 支持的属性见下表
|
|
69
|
-
customCallout?: Callout;
|
|
70
|
-
// 为标记点旁边增加标签 支持的属性见下表,可识别换行符
|
|
71
|
-
label?: Callout;
|
|
72
|
-
// 经纬度在标注图标的锚点,默认底边中点
|
|
73
|
-
anchor?: { x: number; y: number };
|
|
74
|
-
// 无障碍访问,(属性)元素的额外描述
|
|
75
|
-
ariaLabel?: string;
|
|
76
|
-
// 碰撞关系 详见下表碰撞关系 3.4.3
|
|
77
|
-
collisionRelation?: string;
|
|
78
|
-
// 碰撞类型 详见下表碰撞关系 3.4.3
|
|
79
|
-
collision?: string;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
export type Circle = {
|
|
83
|
-
// 纬度 number 是 浮点数,范围 -90 ~ 90
|
|
84
|
-
latitude: number;
|
|
85
|
-
// 经度 number 是 浮点数,范围 -180 ~ 180
|
|
86
|
-
longitude: number;
|
|
87
|
-
// 半径 number 是
|
|
88
|
-
radius: number;
|
|
89
|
-
// 描边的颜色 string 否 十六进制
|
|
90
|
-
color?: string;
|
|
91
|
-
// 填充颜色 string 否 十六进制
|
|
92
|
-
fillColor?: string;
|
|
93
|
-
// 描边的宽度 number 否
|
|
94
|
-
strokeWidth?: number;
|
|
95
|
-
// 压盖关系 string 否 默认为 abovelabels
|
|
96
|
-
level?: string;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
export type Polygon = {
|
|
100
|
-
// 边线虚线 Array<number> 否 默认值 [0, 0] 为实线,[10, 10]表示十个像素的实线和十个像素的空白(如此反复)组成的虚线 2.22.0
|
|
101
|
-
dashArray?: number[];
|
|
102
|
-
// 经纬度数组 array 是 [{latitude: 0, longitude: 0}] 2.3.0
|
|
103
|
-
points: MarkLocation[];
|
|
104
|
-
// 描边的宽度 number 否 2.3.0
|
|
105
|
-
strokeWidth?: number;
|
|
106
|
-
// 描边的颜色 string 否 十六进制 2.3.0
|
|
107
|
-
strokeColor?: string;
|
|
108
|
-
// 填充颜色 string 否 十六进制
|
|
109
|
-
fillColor?: string;
|
|
110
|
-
// 设置多边形 Z 轴数值 number 否 2.3.0
|
|
111
|
-
zIndex?: number;
|
|
112
|
-
// 压盖关系 string 否 默认为 abovelabels 2.14.0
|
|
113
|
-
level?: string;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export type Polyline = {
|
|
117
|
-
// 经纬度数组 array
|
|
118
|
-
points: MarkLocation[];
|
|
119
|
-
// 线的颜色 string 否 十六进制
|
|
120
|
-
color?: string;
|
|
121
|
-
// 彩虹线 array 否 存在时忽略 color 值 2.13.0
|
|
122
|
-
colorList?: string[];
|
|
123
|
-
// 线的宽度 number 否
|
|
124
|
-
width?: number;
|
|
125
|
-
// 是否虚线 boolean 否 默认 false
|
|
126
|
-
dottedLine?: boolean;
|
|
127
|
-
// 带箭头的线 boolean 否 默认 false,开发者工具暂不支持该属性 1.2.0
|
|
128
|
-
arrowLine?: boolean;
|
|
129
|
-
// 更换箭头图标 string 否 在 arrowLine 为 true 时生效 1.6.0
|
|
130
|
-
arrowIconPath?: string;
|
|
131
|
-
// 线的边框颜色 string 否 1.2.0
|
|
132
|
-
borderColor?: string;
|
|
133
|
-
// 线的厚度 number 否 1.2.0
|
|
134
|
-
borderWidth?: number;
|
|
135
|
-
// 压盖关系 string 否 默认为 abovelabels 2.14.0
|
|
136
|
-
level?: string;
|
|
137
|
-
// 文字样式 TextStyle 否 折线上文本样式 2.22.0
|
|
138
|
-
textStyle?: TextStyle;
|
|
139
|
-
// 分段文本 Array<SegmentText> 否 折线上文本内容和位置 2.22.0
|
|
140
|
-
segmentTexts?: SegmentText[];
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export type TextStyle = {
|
|
144
|
-
// 文本颜色 string 否 #000000
|
|
145
|
-
textColor?: string;
|
|
146
|
-
// 描边颜色 string 否 #ffffff
|
|
147
|
-
strokeColor?: string;
|
|
148
|
-
// 文本大小 number 否 14
|
|
149
|
-
fontSize?: number;
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
export type SegmentText = {
|
|
153
|
-
// 名称 string 默认''
|
|
154
|
-
name: string;
|
|
155
|
-
// 起点 number
|
|
156
|
-
startIndex: string;
|
|
157
|
-
// 终点 number
|
|
158
|
-
endIndex: number;
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
// 源自 https://developers.weixin.qq.com/miniprogram/dev/component/map.html#%E5%B1%9E%E6%80%A7%E8%AF%B4%E6%98%8E
|
|
162
|
-
export type Map = CreateComponentType<"map", {
|
|
163
|
-
properties: {
|
|
164
|
-
// 中心经度 1.0.0
|
|
165
|
-
latitude: number;
|
|
166
|
-
// 中心纬度 1.0.0
|
|
167
|
-
longitude: number;
|
|
168
|
-
// 缩放级别,取值范围为3-20 1.0.0
|
|
169
|
-
scale?: number;
|
|
170
|
-
// 最小缩放级别 2.13.0
|
|
171
|
-
minScale?: number;
|
|
172
|
-
// 最大缩放级别 2.13.0
|
|
173
|
-
maxScale?: number;
|
|
174
|
-
// 标记点 1.0.0
|
|
175
|
-
markers?: Marker[];
|
|
176
|
-
// 即将移除,请使用 markers 1.0.0
|
|
177
|
-
covers?: Marker[];
|
|
178
|
-
// 路线 1.0.0
|
|
179
|
-
polyline?: Polyline[];
|
|
180
|
-
// 圆 1.0.0
|
|
181
|
-
circles?: Circle[];
|
|
182
|
-
// 控件(即将废弃,建议使用 cover-view 代替) 1.0.0
|
|
183
|
-
controls?: Marker[];
|
|
184
|
-
// 缩放视野以包含所有给定的坐标点 1.0.0
|
|
185
|
-
includePoints?: Marker[];
|
|
186
|
-
/**
|
|
187
|
-
* 显示带有方向的当前定位点 1.0.0
|
|
188
|
-
*/
|
|
189
|
-
showLocation?: boolean;
|
|
190
|
-
// 多边形 2.3.0
|
|
191
|
-
polygons?: Polygon[];
|
|
192
|
-
// 地图能力【个性化地图】使用的key,不支持动态修改 2.3.0
|
|
193
|
-
subkey?: string;
|
|
194
|
-
// 地图能力【个性化地图】配置的 style
|
|
195
|
-
layerStyle?: number;
|
|
196
|
-
// 旋转角度,范围 0 ~ 360, 地图正北和设备 y 轴角度的夹角 2.5.0
|
|
197
|
-
rotate?: number;
|
|
198
|
-
// 倾斜角度,范围 0 ~ 40 , 关于 z 轴的倾角 2.5.0
|
|
199
|
-
skew?: number;
|
|
200
|
-
// 展示3D楼块 2.3.0
|
|
201
|
-
enable3D?: boolean;
|
|
202
|
-
// 显示指南针 2.3.0
|
|
203
|
-
showCompass?: boolean;
|
|
204
|
-
// 显示比例尺,工具暂不支持 2.8.0
|
|
205
|
-
showScale?: boolean;
|
|
206
|
-
// 开启俯视 2.3.0
|
|
207
|
-
enableOverlooking?: boolean;
|
|
208
|
-
// 开启最大俯视角,俯视角度从 45 度拓展到 75 度 2.26.0
|
|
209
|
-
enableAutoMaxOverlooking?: boolean;
|
|
210
|
-
// 是否支持缩放 2.3.0
|
|
211
|
-
enableZoom?: boolean;
|
|
212
|
-
// 是否支持拖动 2.3.0
|
|
213
|
-
enableScroll?: boolean;
|
|
214
|
-
// 是否支持旋转 2.3.0
|
|
215
|
-
enableRotate?: boolean;
|
|
216
|
-
// 是否开启卫星图 2.7.0
|
|
217
|
-
enableSatellite?: boolean;
|
|
218
|
-
// 是否开启实时路况 2.7.0
|
|
219
|
-
enableTraffic?: boolean;
|
|
220
|
-
// 是否展示 POI 点 2.14.0
|
|
221
|
-
enablePOI?: boolean;
|
|
222
|
-
// 是否展示建筑物 2.14.0
|
|
223
|
-
enableBuilding?: boolean;
|
|
224
|
-
// 配置项 2.8.2
|
|
225
|
-
setting?: object;
|
|
226
|
-
};
|
|
227
|
-
events: {
|
|
228
|
-
// 点击地图时触发,2.9.0起返回经纬度信息 1.0.0
|
|
229
|
-
tap: MarkLocation;
|
|
230
|
-
// 点击标记点时触发,e.detail = {markerId} 1.0.0
|
|
231
|
-
markertap: { markerId: number };
|
|
232
|
-
// 点击label时触发,e.detail = {markerId} 2.9.0
|
|
233
|
-
labeltap: { markerId: number };
|
|
234
|
-
// 点击控件时触发,e.detail = {controlId} 1.0.0
|
|
235
|
-
controltap: { controlId: number };
|
|
236
|
-
// 点击标记点对应的气泡时触发e.detail = {markerId} 1.2.0
|
|
237
|
-
callouttap: { markerId: number };
|
|
238
|
-
// 在地图渲染更新完成时触发 1.6.0
|
|
239
|
-
updated: undefined;
|
|
240
|
-
/**
|
|
241
|
-
* 视野改变时,regionchange 会触发两次,返回的 type 值分别为 begin 和 end。
|
|
242
|
-
* 2.8.0 起 begin 阶段返回 causedBy,有效值为 gesture(手势触发) & update(接口触发)
|
|
243
|
-
* 2.3.0 起 end 阶段返回 causedBy,有效值为 drag(拖动导致)、scale(缩放导致)、update(调用更新接口导致)
|
|
244
|
-
*/
|
|
245
|
-
regionchange: RegionChangeDetail;
|
|
246
|
-
// 点击地图poi点时触发,e.detail = {name, longitude, latitude} 2.3.0
|
|
247
|
-
poitap: { name: string; longitude: number; latitude: number };
|
|
248
|
-
// 点击地图路线时触发,e.detail = {longitude, latitude} 3.1.0
|
|
249
|
-
polylinetap: { longitude: number; latitude: number };
|
|
250
|
-
// 地图能力生效时触发,e.detail = {ability, errCode, errMsg}
|
|
251
|
-
abilitysuccess: { ability: string; errCode: number; errMsg: string };
|
|
252
|
-
// 地图能力失败时触发,e.detail = {ability, errCode, errMsg}
|
|
253
|
-
abilityfail: { ability: string; errCode: number; errMsg: string };
|
|
254
|
-
// 地图鉴权结果成功时触发,e.detail = {errCode, errMsg}
|
|
255
|
-
authsuccess: { errCode: number; errMsg: string };
|
|
256
|
-
// MapContext.moveAlong 插值动画时触发。e.detail = {markerId, longitude, latitude, animationStatus: "interpolating" | "complete"}, 3.1.0
|
|
257
|
-
interpolatepoint: {
|
|
258
|
-
markerId: number;
|
|
259
|
-
longitude: number;
|
|
260
|
-
latitude: number;
|
|
261
|
-
animationStatus: "interpolating" | "complete";
|
|
262
|
-
};
|
|
263
|
-
// 组件错误时触发,例如创建或鉴权失败,e.detail = {longitude, latitude}
|
|
264
|
-
error: { longitude: number; latitude: number };
|
|
265
|
-
};
|
|
266
|
-
}>;
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { EmptyObject } from "hry-types/src/Misc/EmptyObject";
|
|
2
|
-
import type { CreateComponentType } from "../../types/CreateComponentType";
|
|
3
|
-
|
|
4
|
-
export type ScrollView = CreateComponentType<"scrollView", {
|
|
5
|
-
properties: {
|
|
6
|
-
class?: string;
|
|
7
|
-
style?: string;
|
|
8
|
-
// 允许横向滚动
|
|
9
|
-
scroll_x?: boolean;
|
|
10
|
-
// 允许纵向滚动
|
|
11
|
-
scroll_y?: boolean;
|
|
12
|
-
// 距顶部/左边多远时,触发 scrolltoupper 事件 默认50
|
|
13
|
-
upper_threshold?: number | string;
|
|
14
|
-
// 距底部/右边多远时,触发 scrolltolower 事件 默认50
|
|
15
|
-
lower_threshold?: number | string;
|
|
16
|
-
// 设置竖向滚动条位置
|
|
17
|
-
scroll_top?: number | string;
|
|
18
|
-
// 设置横向滚动条位置
|
|
19
|
-
scroll_left?: number | string;
|
|
20
|
-
// 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素
|
|
21
|
-
scroll_into_view?: string;
|
|
22
|
-
// 在设置滚动条位置时使用动画过渡 默认 false
|
|
23
|
-
scroll_with_animation?: boolean;
|
|
24
|
-
// iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向 默认false
|
|
25
|
-
enable_back_to_top?: boolean;
|
|
26
|
-
// 启用 flexbox 布局。开启后,当前节点声明了 display: flex 就会成为 flex container,并作用于其孩子节点。
|
|
27
|
-
enable_flex?: boolean;
|
|
28
|
-
// 默认false 开启 scroll anchoring 特性,即控制滚动位置不随内容变化而抖动,仅在 iOS 下生效,安卓下可参考 CSS overflow-anchor 属性
|
|
29
|
-
scroll_anchoring?: boolean;
|
|
30
|
-
// 开启自定义下拉刷新
|
|
31
|
-
refresher_enabled?: boolean;
|
|
32
|
-
// 设置自定义下拉刷新阈值 默认45
|
|
33
|
-
refresher_threshold?: number;
|
|
34
|
-
// 设置自定义下拉刷新默认样式,默认 "black" 支持设置 black | white | none, none 表示不使用默认样式
|
|
35
|
-
refresher_default_style?: string;
|
|
36
|
-
// 设置自定义下拉刷新区域背景颜色 默认"#FFF"
|
|
37
|
-
refresher_background?: string;
|
|
38
|
-
// 设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
|
|
39
|
-
refresher_triggered?: boolean;
|
|
40
|
-
// 启用 scroll-view 增强特性,启用后可通过 ScrollViewContext 操作 scroll-view 2.12.0
|
|
41
|
-
enhanced?: boolean;
|
|
42
|
-
// 默认true iOS 下 scroll-view 边界弹性控制 (同时开启 enhanced 属性后生效)
|
|
43
|
-
bounces?: boolean;
|
|
44
|
-
// 默认true 滚动条显隐控制 (同时开启 enhanced 属性后生效)
|
|
45
|
-
show_scrollbar?: boolean;
|
|
46
|
-
// 分页滑动效果 (同时开启 enhanced 属性后生效)
|
|
47
|
-
paging_enabled?: boolean;
|
|
48
|
-
// 滑动减速速率控制 (同时开启 enhanced 属性后生效)
|
|
49
|
-
fast_deceleration?: boolean;
|
|
50
|
-
};
|
|
51
|
-
events: {
|
|
52
|
-
// 滑动开始事件 (同时开启 enhanced 属性后生效) detail { scrollTop, scrollLeft }
|
|
53
|
-
binddragstart: { scrollTop: number; scrollLeft: number };
|
|
54
|
-
// 滑动事件 (同时开启 enhanced 属性后生效) detail { scrollTop, scrollLeft }
|
|
55
|
-
binddragging: { scrollTop: number; scrollLeft: number };
|
|
56
|
-
// 滑动结束事件 (同时开启 enhanced 属性后生效) detail { scrollTop, scrollLeft, velocity }
|
|
57
|
-
binddragend: { scrollTop: number; scrollLeft: number; velocity: number };
|
|
58
|
-
// 滚动到顶部/左边时触发
|
|
59
|
-
bindscrolltoupper: EmptyObject;
|
|
60
|
-
// 滚动到底部/右边时触发
|
|
61
|
-
bindscrolltolower: EmptyObject;
|
|
62
|
-
// 滚动时触发,event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth, deltaX, deltaY}
|
|
63
|
-
bindscroll: {
|
|
64
|
-
scrollLeft: number;
|
|
65
|
-
scrollTop: number;
|
|
66
|
-
scrollHeight: number;
|
|
67
|
-
scrollWidth: number;
|
|
68
|
-
deltaX: number;
|
|
69
|
-
deltaY: number;
|
|
70
|
-
};
|
|
71
|
-
// 自定义下拉刷新控件被下拉
|
|
72
|
-
bindrefresherpulling: EmptyObject;
|
|
73
|
-
// 自定义下拉刷新被触发
|
|
74
|
-
bindrefresherrefresh: EmptyObject;
|
|
75
|
-
// 自定义下拉刷新被复位
|
|
76
|
-
bindrefresherrestore: EmptyObject;
|
|
77
|
-
// 自定义下拉刷新被中止
|
|
78
|
-
bindrefresherabort: EmptyObject;
|
|
79
|
-
};
|
|
80
|
-
}>;
|
|
81
|
-
// Bug & Tip
|
|
82
|
-
// tip: 基础库 2.4.0以下不支持嵌套textarea、map、canvas、video 组件
|
|
83
|
-
// tip: scroll-into-view 的优先级高于 scroll-top
|
|
84
|
-
// tip: 在滚动 scroll-view 时会阻止页面回弹,所以在 scroll-view 中滚动,是无法触发 onPullDownRefresh
|
|
85
|
-
// tip: 若要使用下拉刷新,请使用页面的滚动,而不是 scroll-view ,这样也能通过点击顶部状态栏回到页面顶部
|
|
86
|
-
// tip: scroll-view 自定义下拉刷新可以结合 WXS 事件响应 开发交互动画
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { SubComponent, typeEqual } from "../../index";
|
|
2
|
-
import type { Wm } from "../index";
|
|
3
|
-
|
|
4
|
-
SubComponent<{}, Wm.Swiper>()({
|
|
5
|
-
data: {
|
|
6
|
-
swiper_style: "16/9",
|
|
7
|
-
},
|
|
8
|
-
computed: {
|
|
9
|
-
swiper_class() {
|
|
10
|
-
return `w-full h-auto ${this.data.swiper_style}`;
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
events: {
|
|
14
|
-
swiper_change(e) {
|
|
15
|
-
typeEqual<number>()(e.detail.current);
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
swiper_animationfinish(e) {
|
|
19
|
-
typeEqual<number>()(e.detail.current);
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import type { CreateComponentType } from "../../types/CreateComponentType";
|
|
2
|
-
|
|
3
|
-
type CssVar<T extends string = string> = `var(--${T}-${string})`;
|
|
4
|
-
|
|
5
|
-
type Color = `rgba(${number}, ${number}, ${number}, ${number})` | `#${number}` | CssVar<"color">;
|
|
6
|
-
|
|
7
|
-
interface ChangeEventDetail {
|
|
8
|
-
current: number;
|
|
9
|
-
currentItemId: string;
|
|
10
|
-
source: "touch" | "" | "autoplay";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type AnimationfinishEventDetail = ChangeEventDetail;
|
|
14
|
-
|
|
15
|
-
export type Swiper = CreateComponentType<"swiper", {
|
|
16
|
-
properties: {
|
|
17
|
-
/**
|
|
18
|
-
* @description class
|
|
19
|
-
*/
|
|
20
|
-
class?: string;
|
|
21
|
-
/**
|
|
22
|
-
* @description style
|
|
23
|
-
*/
|
|
24
|
-
style?: string;
|
|
25
|
-
/**
|
|
26
|
-
* 是否显示面板指示点
|
|
27
|
-
* @defaultValue false
|
|
28
|
-
*/
|
|
29
|
-
indicatorDots?: boolean;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 指示点颜色
|
|
33
|
-
* @defaultValue 'rgba(0, 0, 0, .3)'
|
|
34
|
-
*/
|
|
35
|
-
indicatorColor?: Color;
|
|
36
|
-
/**
|
|
37
|
-
* 当前选中的指示点颜色
|
|
38
|
-
* @defaultValue "#000000"
|
|
39
|
-
*/
|
|
40
|
-
indicatorActiveColor?: Color;
|
|
41
|
-
/**
|
|
42
|
-
* 是否自动切换
|
|
43
|
-
* @defaultValue false
|
|
44
|
-
*/
|
|
45
|
-
autoplay?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* 当前所在滑块的 index
|
|
48
|
-
* @defaultValue 0
|
|
49
|
-
*/
|
|
50
|
-
current?: number;
|
|
51
|
-
/**
|
|
52
|
-
* 自动切换时间间隔
|
|
53
|
-
* @defaultValue 5000
|
|
54
|
-
*/
|
|
55
|
-
interval?: number;
|
|
56
|
-
/**
|
|
57
|
-
* 滑动动画时长
|
|
58
|
-
* @defaultValue 500
|
|
59
|
-
*/
|
|
60
|
-
duration?: number;
|
|
61
|
-
/**
|
|
62
|
-
* 是否采用衔接滑动
|
|
63
|
-
* @defaultValue false
|
|
64
|
-
*/
|
|
65
|
-
circular?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* 滑动方向是否为纵向
|
|
68
|
-
* @defaultValue false
|
|
69
|
-
*/
|
|
70
|
-
vertical?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值
|
|
73
|
-
* @defaultValue '0px'
|
|
74
|
-
*/
|
|
75
|
-
previousMargin?: string;
|
|
76
|
-
/**
|
|
77
|
-
* 后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值
|
|
78
|
-
* @defaultValue '0px'
|
|
79
|
-
*/
|
|
80
|
-
nextMargin?: string;
|
|
81
|
-
/**
|
|
82
|
-
* 当 swiper-item 的个数大于等于 2,关闭 circular 并且开启 previous-margin 或 next-margin 的时候,可以指定这个边距是否应用到第一个、最后一个元素
|
|
83
|
-
* @defaultValue false
|
|
84
|
-
*/
|
|
85
|
-
snapToEdge?: boolean;
|
|
86
|
-
/**
|
|
87
|
-
* 同时显示的滑块数量
|
|
88
|
-
* @defaultValue 1
|
|
89
|
-
*/
|
|
90
|
-
displayMultipleItems?: number;
|
|
91
|
-
/**
|
|
92
|
-
* 指定 swiper 切换缓动动画类型
|
|
93
|
-
* @defaultValue 'defaultValue'
|
|
94
|
-
*/
|
|
95
|
-
easingFunction?: "defaultValue" | "linear" | "easeInCubic" | "easeOutCubic" | "easeInOutCubic";
|
|
96
|
-
};
|
|
97
|
-
events: {
|
|
98
|
-
/**
|
|
99
|
-
* current 改变时会触发 change 事件,event.detail = `{current, source}`
|
|
100
|
-
*/
|
|
101
|
-
change: ChangeEventDetail;
|
|
102
|
-
/**
|
|
103
|
-
* swiper-item 的位置发生改变时会触发 transition 事件,event.detail = `{dx: number, dy: number}`
|
|
104
|
-
*/
|
|
105
|
-
transition: { dx: number; dy: number };
|
|
106
|
-
/**
|
|
107
|
-
* animationfinish 动画结束时会触发 animationfinish 事件,event.detail change字段
|
|
108
|
-
*/
|
|
109
|
-
animationfinish: AnimationfinishEventDetail;
|
|
110
|
-
};
|
|
111
|
-
}>;
|
package/src/thirdLib/wm/view.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { CreateComponentType } from "../../types/CreateComponentType";
|
|
2
|
-
import type { BaseEvents } from "./baseEvents";
|
|
3
|
-
|
|
4
|
-
export type View = CreateComponentType<"view", {
|
|
5
|
-
properties: {
|
|
6
|
-
/**
|
|
7
|
-
* 指定按下去的样式类。当 hover-class="none" 时,没有点击态效果
|
|
8
|
-
* @defaultValue 'none'
|
|
9
|
-
*/
|
|
10
|
-
hoverClass?: string;
|
|
11
|
-
/**
|
|
12
|
-
* 指定是否阻止本节点的祖先节点出现点击态
|
|
13
|
-
* @defaultValue false
|
|
14
|
-
*/
|
|
15
|
-
hoverStopPropagation?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* 按住后多久出现点击态,单位毫秒
|
|
18
|
-
* @defaultValue 50
|
|
19
|
-
*/
|
|
20
|
-
hoverStartTime?: number;
|
|
21
|
-
/**
|
|
22
|
-
* 手指松开后点击态保留时间,单位毫秒
|
|
23
|
-
* @defaultValue 400
|
|
24
|
-
*/
|
|
25
|
-
hoverStayTime?: number;
|
|
26
|
-
};
|
|
27
|
-
events: BaseEvents;
|
|
28
|
-
}>;
|
package/src/types/AddPrefix.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 将对象 T 的所有属性名添加前缀 TPrefix。
|
|
3
|
-
* 如果 TPrefix 为空字符串,则返回原对象 T。
|
|
4
|
-
* @param T - 要添加前缀的对象。
|
|
5
|
-
* @param TPrefix - 要添加的前缀。
|
|
6
|
-
* @returns 添加前缀后的新对象或原对象。
|
|
7
|
-
*/
|
|
8
|
-
export type AddPrefix<T extends object, TPrefix extends string> = "" extends TPrefix ? T : {
|
|
9
|
-
[k in keyof T as `${TPrefix}_${k & string}`]: T[k];
|
|
10
|
-
};
|
package/src/types/Assert.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Assert<T, U> = T extends U ? T : never;
|
package/src/types/Assign.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Assign<O1, O2> = Omit<O1, keyof O2> & O2;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ComputeObject<T> = T extends unknown ? { [k in keyof T]: T[k] } : never;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { IfExtends } from "hry-types/src/Any/_api";
|
|
2
|
-
import type { ComputeIntersection } from "hry-types/src/Object/_api";
|
|
3
|
-
import type { ComponentDoc } from "../api/DefineComponent/returnType/ComponentDoc";
|
|
4
|
-
import type { AddPrefix } from "./AddPrefix";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 建立一个组件类型
|
|
8
|
-
* @param TName 组件名称
|
|
9
|
-
* @param T 类型配置
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* type $CustomA = CreateComponentType<"customA", {
|
|
13
|
-
* properties: { num: string };
|
|
14
|
-
* events: { onTap: string }
|
|
15
|
-
* }>;
|
|
16
|
-
*
|
|
17
|
-
* // 等同下面的类型
|
|
18
|
-
* type $CustomA = {
|
|
19
|
-
* properties: {
|
|
20
|
-
* customA_num: string;
|
|
21
|
-
* };
|
|
22
|
-
* events: {
|
|
23
|
-
* customA_onTap: string;
|
|
24
|
-
* };
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export type CreateComponentType<TName extends string, T extends ComponentDoc> = ComputeIntersection<
|
|
28
|
-
& IfExtends<
|
|
29
|
-
unknown,
|
|
30
|
-
T["properties"],
|
|
31
|
-
{},
|
|
32
|
-
{
|
|
33
|
-
properties: AddPrefix<T["properties"] & {}, TName>;
|
|
34
|
-
}
|
|
35
|
-
>
|
|
36
|
-
& IfExtends<unknown, T["events"], {}, { events: AddPrefix<T["events"] & {}, TName> }>
|
|
37
|
-
>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 通过as DetailedType 指定具体类型。
|
|
3
|
-
* @remarks
|
|
4
|
-
* 在js中使用构造函数(Object,Array等)表示类型时,无法给出明确的类型,DetailedType为此而生
|
|
5
|
-
* @example
|
|
6
|
-
* ``` ts
|
|
7
|
-
* RootComponent()({
|
|
8
|
-
* properties: {
|
|
9
|
-
* gender: String as DetailedType<"male" | "female">,
|
|
10
|
-
* unionArr: Array as DetailedType<string[] | number[]>,
|
|
11
|
-
* },
|
|
12
|
-
* });
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
export type DetailedType<T = unknown> = (() => T) | (new(...arg: unknown[]) => T);
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { IfExtends } from "hry-types/src/Any/IfExtends";
|
|
2
|
-
import type { ComputeIntersectionDeep } from "hry-types/src/Object/ComputeIntersectionDeep";
|
|
3
|
-
import type { ComponentDoc } from "../api/DefineComponent/returnType/ComponentDoc";
|
|
4
|
-
import type { GetComponentPrefix } from "./GetComponentPrefix";
|
|
5
|
-
|
|
6
|
-
type Validator<
|
|
7
|
-
TOriginalComponentType extends ComponentDoc,
|
|
8
|
-
TExtensionType extends ComponentDoc,
|
|
9
|
-
TOriginalPrefix extends PropertyKey = GetComponentPrefix<TOriginalComponentType>,
|
|
10
|
-
TExtenstionPrefix extends PropertyKey = GetComponentPrefix<TExtensionType>,
|
|
11
|
-
DuplicateKeys extends PropertyKey =
|
|
12
|
-
| Extract<keyof TExtensionType["properties"], keyof TOriginalComponentType["properties"]>
|
|
13
|
-
| Extract<keyof TExtensionType["events"], keyof TOriginalComponentType["events"]>,
|
|
14
|
-
> = IfExtends<
|
|
15
|
-
TOriginalPrefix,
|
|
16
|
-
TExtenstionPrefix,
|
|
17
|
-
IfExtends<DuplicateKeys, never, ComponentDoc, `${DuplicateKeys & string}字段重复`>,
|
|
18
|
-
`前缀错误,应为${TOriginalPrefix & string}`
|
|
19
|
-
>;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 拓展组件类型
|
|
23
|
-
* @param TOriginalComponentType 原始组件类型
|
|
24
|
-
* @param TExtensionType 拓展类型
|
|
25
|
-
* @description 拓展类型必须与原始类型有相同的前缀
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* type $CustomA = ExtendComponentType<
|
|
29
|
-
* { properties: { aaa_num: number };
|
|
30
|
-
* events: { aaa_xxx: string }
|
|
31
|
-
* },
|
|
32
|
-
* { properties: { aaa_str: string };
|
|
33
|
-
* events: { aaa_yyy: string }
|
|
34
|
-
* }>;
|
|
35
|
-
*
|
|
36
|
-
* // 等同下面的类型
|
|
37
|
-
* type $CustomA = {
|
|
38
|
-
* properties: {
|
|
39
|
-
* aaa_num: number;
|
|
40
|
-
* aaa_str: string;
|
|
41
|
-
* };
|
|
42
|
-
* events: {
|
|
43
|
-
* aaa_xxx: string;
|
|
44
|
-
* aaa_yyy: string;
|
|
45
|
-
* };
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
export type ExtendComponentType<
|
|
49
|
-
TOriginalComponentType extends ComponentDoc,
|
|
50
|
-
// @ts-ignore
|
|
51
|
-
TExtensionType extends Validator<TOriginalComponentType, TExtensionType>,
|
|
52
|
-
> = ComputeIntersectionDeep<TOriginalComponentType & TExtensionType>;
|
|
53
|
-
|
|
54
|
-
// type test0 = ExtendComponentType<{ properties: { aaa_xxx: string } }, { properties: { aaa_xxx: string } }>; // => "aaa_xxx字段重复"
|
|
55
|
-
|
|
56
|
-
// type test1 = ExtendComponentType<{ events: { aaa_xxx: string } }, { events: { aaa_xxx: string } }>; // => "aaa_xxx字段重复"
|
|
57
|
-
|
|
58
|
-
// type test2 = ExtendComponentType<{ properties: { aaa_xxx: string } }, { properties: { ddd_xxx: string } }>; // => "前缀错误,应为aaa"
|
|
59
|
-
|
|
60
|
-
// type test3 = ExtendComponentType<{ events: { aaa_xxx: string } }, { events: { ddd_xxx: string } }>; // => "前缀错误,应为aaa"
|
package/src/types/Extra.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Extra<Prefix extends string> = Partial<Record<`${Prefix}_isReady`, boolean>>;
|