@tarojs/components 3.5.7 → 3.5.8
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/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +5 -0
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-movable-area-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-movable-view-core.cjs.entry.js +18 -43
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +5 -0
- package/dist/cjs/taro-video-control_3.cjs.entry.js +98 -181
- package/dist/collection/components/button/button.js +11 -0
- package/dist/collection/components/movable-area/area.css +2 -2
- package/dist/collection/components/movable-area/movable-view.js +18 -33
- package/dist/collection/components/swiper/swiper.js +23 -0
- package/dist/collection/components/video/video-control.js +22 -39
- package/dist/collection/components/video/video-danmu.js +39 -52
- package/dist/collection/components/video/video.js +37 -60
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +5 -0
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-movable-area-core.entry.js +1 -1
- package/dist/esm/taro-movable-view-core.entry.js +18 -43
- package/dist/esm/taro-swiper-core_2.entry.js +5 -0
- package/dist/esm/taro-video-control_3.entry.js +98 -181
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-movable-area-core.entry.js +1 -1
- package/dist/esm-es5/taro-movable-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +55 -55
- package/dist/taro-components/p-0380841f.system.js +1 -1
- package/dist/taro-components/{p-a94524c9.system.entry.js → p-06b9d39c.system.entry.js} +1 -1
- package/dist/taro-components/{p-63a0c6b0.entry.js → p-34178401.entry.js} +1 -1
- package/dist/taro-components/p-3549b6d2.entry.js +1 -0
- package/dist/taro-components/p-4262d1b6.entry.js +1 -0
- package/dist/taro-components/{p-f8b9c4b0.entry.js → p-42630f45.entry.js} +1 -1
- package/dist/taro-components/{p-f81a74bb.system.entry.js → p-4c1a7cae.system.entry.js} +81 -81
- package/dist/taro-components/{p-3744e978.entry.js → p-99d17a1a.entry.js} +52 -52
- package/dist/taro-components/{p-13f0b11f.system.entry.js → p-a5496bf5.system.entry.js} +1 -1
- package/dist/taro-components/p-f40e1218.system.entry.js +1 -0
- package/dist/taro-components/{p-1c775a11.system.entry.js → p-f5f1c3b7.system.entry.js} +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/button/button.d.ts +1 -0
- package/dist/types/components/swiper/swiper.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +15 -12
- package/types/Ad.d.ts +20 -21
- package/types/AnimationVideo.d.ts +62 -0
- package/types/AnimationView.d.ts +45 -0
- package/types/ArCamera.d.ts +50 -0
- package/types/Audio.d.ts +5 -5
- package/types/AwemeData.d.ts +43 -0
- package/types/Button.d.ts +67 -70
- package/types/Camera.d.ts +15 -16
- package/types/Canvas.d.ts +22 -27
- package/types/Checkbox.d.ts +7 -7
- package/types/CommentDetail.d.ts +72 -0
- package/types/CommentList.d.ts +128 -0
- package/types/ContactButton.d.ts +53 -0
- package/types/CoverImage.d.ts +15 -15
- package/types/CoverView.d.ts +5 -5
- package/types/FollowSwan.d.ts +28 -0
- package/types/Form.d.ts +10 -10
- package/types/Image.d.ts +20 -20
- package/types/InlinePaymentPanel.d.ts +58 -0
- package/types/Input.d.ts +23 -21
- package/types/Lifestyle.d.ts +26 -0
- package/types/Like.d.ts +107 -0
- package/types/LivePlayer.d.ts +31 -25
- package/types/LivePusher.d.ts +5 -5
- package/types/Login.d.ts +45 -0
- package/types/Lottie.d.ts +113 -0
- package/types/Map.d.ts +66 -71
- package/types/MovableView.d.ts +5 -14
- package/types/NativeSlot.d.ts +32 -0
- package/types/Navigator.d.ts +10 -10
- package/types/OpenData.d.ts +5 -5
- package/types/PageContainer.d.ts +7 -10
- package/types/PageMeta.d.ts +14 -14
- package/types/Picker.d.ts +1 -5
- package/types/PickerView.d.ts +11 -21
- package/types/Progress.d.ts +5 -5
- package/types/RadioGroup.d.ts +5 -5
- package/types/RichText.d.ts +17 -17
- package/types/RtcRoom.d.ts +104 -0
- package/types/RtcRoomItem.d.ts +26 -0
- package/types/ScrollView.d.ts +46 -30
- package/types/Slider.d.ts +10 -10
- package/types/Slot.d.ts +1 -1
- package/types/Swiper.d.ts +31 -19
- package/types/Switch.d.ts +5 -5
- package/types/TabItem.d.ts +35 -0
- package/types/Tabs.d.ts +58 -0
- package/types/Textarea.d.ts +32 -32
- package/types/Video.d.ts +120 -111
- package/types/View.d.ts +20 -13
- package/types/VoipRoom.d.ts +5 -5
- package/types/WebView.d.ts +11 -5
- package/types/index.vue3.d.ts +267 -259
- package/dist/taro-components/p-6800ac6f.entry.js +0 -1
- package/dist/taro-components/p-7f93fa08.entry.js +0 -1
- package/dist/taro-components/p-9e1572c5.system.entry.js +0 -1
package/types/index.vue3.d.ts
CHANGED
|
@@ -10,272 +10,280 @@
|
|
|
10
10
|
* }
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
import * as CSS from 'csstype'
|
|
14
|
+
import { DefineComponent, VNodeRef } from 'vue'
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
16
|
+
/** 开放能力 */
|
|
17
|
+
import { AdProps } from './Ad'
|
|
18
|
+
import { AdCustomProps } from './AdCustom'
|
|
19
|
+
/** 媒体组件 */
|
|
20
|
+
import { AudioProps } from './Audio'
|
|
21
|
+
/** 表单组件 */
|
|
22
|
+
import { ButtonProps } from './Button'
|
|
23
|
+
import { CameraProps } from './Camera'
|
|
24
|
+
/** 画布 */
|
|
25
|
+
import { CanvasProps } from './Canvas'
|
|
26
|
+
import { CheckboxProps } from './Checkbox'
|
|
27
|
+
import { CheckboxGroupProps } from './CheckboxGroup'
|
|
28
|
+
import { StandardProps } from './common'
|
|
29
|
+
/** 视图容器 */
|
|
30
|
+
import { CoverImageProps } from './CoverImage'
|
|
31
|
+
import { CoverViewProps } from './CoverView'
|
|
32
|
+
import { CustomWrapperProps } from './CustomWrapper'
|
|
33
|
+
import { EditorProps } from './Editor'
|
|
34
|
+
import { FormProps } from './Form'
|
|
35
|
+
/** 导航 */
|
|
36
|
+
import { FunctionalPageNavigatorProps } from './FunctionalPageNavigator'
|
|
37
|
+
/** 基础内容 */
|
|
38
|
+
import { IconProps } from './Icon'
|
|
39
|
+
import { ImageProps } from './Image'
|
|
40
|
+
import { InputProps } from './Input'
|
|
41
|
+
import { KeyboardAccessoryProps } from './KeyboardAccessory'
|
|
42
|
+
import { LabelProps } from './Label'
|
|
43
|
+
import { LivePlayerProps } from './LivePlayer'
|
|
44
|
+
import { LivePusherProps } from './LivePusher'
|
|
45
|
+
/** 地图 */
|
|
46
|
+
import { MapProps } from './Map'
|
|
47
|
+
import { MatchMediaProps } from './MatchMedia'
|
|
48
|
+
import { MovableAreaProps } from './MovableArea'
|
|
49
|
+
import { MovableViewProps } from './MovableView'
|
|
50
|
+
import { NavigationBarProps } from './NavigationBar'
|
|
51
|
+
import { NavigatorProps } from './Navigator'
|
|
52
|
+
import { OfficialAccountProps } from './OfficialAccount'
|
|
53
|
+
import { OpenDataProps } from './OpenData'
|
|
54
|
+
import { PageContainerProps } from './PageContainer'
|
|
55
|
+
/** 配置节点 */
|
|
56
|
+
import { PageMetaProps } from './PageMeta'
|
|
57
|
+
import { PickerDateProps, PickerMultiSelectorProps,PickerRegionProps, PickerSelectorProps, PickerTimeProps } from './Picker'
|
|
58
|
+
import { PickerViewProps } from './PickerView'
|
|
59
|
+
import { ProgressProps } from './Progress'
|
|
60
|
+
import { RadioProps } from './Radio'
|
|
61
|
+
import { RadioGroupProps } from './RadioGroup'
|
|
62
|
+
import { RichTextProps } from './RichText'
|
|
63
|
+
import { ScrollViewProps } from './ScrollView'
|
|
64
|
+
import { ShareElementProps } from './ShareElement'
|
|
65
|
+
import { SliderProps } from './Slider'
|
|
66
|
+
import { SlotProps } from './Slot'
|
|
67
|
+
import { SwiperProps } from './Swiper'
|
|
68
|
+
import { SwiperItemProps } from './SwiperItem'
|
|
69
|
+
import { SwitchProps } from './Switch'
|
|
70
|
+
import { TextProps } from './Text'
|
|
71
|
+
import { TextareaProps } from './Textarea'
|
|
72
|
+
import { VideoProps } from './Video'
|
|
73
|
+
import { ViewProps } from './View'
|
|
74
|
+
import { VoipRoomProps } from './VoipRoom'
|
|
75
|
+
import { WebViewProps } from './WebView'
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
/** 联合类型不能用omit(比如picker) */
|
|
78
|
+
type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
+
interface SlimProps {
|
|
81
|
+
class?: any
|
|
82
|
+
style?: CSS.Properties<string | number>
|
|
83
|
+
innerHTML?: string
|
|
84
|
+
}
|
|
80
85
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
+
/** 转换 react 的类型到 vue */
|
|
87
|
+
type RemoveReactAttribute = 'className' | 'style' | 'key' | 'ref' | 'dangerouslySetInnerHTML'
|
|
88
|
+
type TransformReact2VueType<P extends StandardProps = Record<string, never>> = DistributiveOmit<P, RemoveReactAttribute> & SlimProps
|
|
89
|
+
export type VueComponentType<P = Record<string, never>> = DefineComponent<TransformReact2VueType<P>>
|
|
86
90
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
export type VueComponentType<P = Record<string, never>> = DefineComponent<TransformReact2VueType<P>>
|
|
91
|
+
export * from './common'
|
|
92
|
+
export * from './event'
|
|
93
|
+
export * from './props'
|
|
91
94
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
/** 视图容器 */
|
|
96
|
+
export declare const Block: VueComponentType<StandardProps>
|
|
97
|
+
export declare const CoverImage: VueComponentType<CoverImageProps>
|
|
98
|
+
export declare const CoverView: VueComponentType<CoverViewProps>
|
|
99
|
+
export declare const MatchMedia: VueComponentType<MatchMediaProps>
|
|
100
|
+
export declare const MovableArea: VueComponentType<MovableAreaProps>
|
|
101
|
+
export declare const MovableView: VueComponentType<MovableViewProps>
|
|
102
|
+
export declare const PageContainer: VueComponentType<PageContainerProps>
|
|
103
|
+
export declare const RootPortal: VueComponentType
|
|
104
|
+
export declare const ScrollView: VueComponentType<ScrollViewProps>
|
|
105
|
+
export declare const ShareElement: VueComponentType<ShareElementProps>
|
|
106
|
+
export declare const Swiper: VueComponentType<SwiperProps>
|
|
107
|
+
export declare const SwiperItem: VueComponentType<SwiperItemProps>
|
|
108
|
+
export declare const View: VueComponentType<ViewProps>
|
|
109
|
+
/** 基础内容 */
|
|
110
|
+
export declare const Icon: VueComponentType<IconProps>
|
|
111
|
+
export declare const Progress: VueComponentType<ProgressProps>
|
|
112
|
+
export declare const RichText: VueComponentType<RichTextProps>
|
|
113
|
+
export declare const Text: VueComponentType<TextProps>
|
|
114
|
+
/** 表单组件 */
|
|
115
|
+
export declare const Button: VueComponentType<ButtonProps>
|
|
116
|
+
export declare const Checkbox: VueComponentType<CheckboxProps>
|
|
117
|
+
export declare const CheckboxGroup: VueComponentType<CheckboxGroupProps>
|
|
118
|
+
export declare const Editor: VueComponentType<EditorProps>
|
|
119
|
+
export declare const Form: VueComponentType<FormProps>
|
|
120
|
+
export declare const Input: VueComponentType<InputProps>
|
|
121
|
+
export declare const KeyboardAccessory: VueComponentType<KeyboardAccessoryProps>
|
|
122
|
+
export declare const Label: VueComponentType<LabelProps>
|
|
123
|
+
export declare const Picker: VueComponentType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
|
124
|
+
export declare const PickerView: VueComponentType<PickerViewProps>
|
|
125
|
+
export declare const PickerViewColumn: VueComponentType
|
|
126
|
+
export declare const Radio: VueComponentType<RadioProps>
|
|
127
|
+
export declare const RadioGroup: VueComponentType<RadioGroupProps>
|
|
128
|
+
export declare const Slider: VueComponentType<SliderProps>
|
|
129
|
+
export declare const Switch: VueComponentType<SwitchProps>
|
|
130
|
+
export declare const Textarea: VueComponentType<TextareaProps>
|
|
131
|
+
/** 导航 */
|
|
132
|
+
export declare const FunctionalPageNavigator: VueComponentType<FunctionalPageNavigatorProps>
|
|
133
|
+
export declare const Navigator: VueComponentType<NavigatorProps>
|
|
134
|
+
export declare const NavigationBar: VueComponentType<NavigationBarProps>
|
|
135
|
+
/** 媒体组件 */
|
|
136
|
+
export declare const Audio: VueComponentType<AudioProps>
|
|
137
|
+
export declare const Camera: VueComponentType<CameraProps>
|
|
138
|
+
export declare const Image: VueComponentType<ImageProps>
|
|
139
|
+
export declare const LivePlayer: VueComponentType<LivePlayerProps>
|
|
140
|
+
export declare const LivePusher: VueComponentType<LivePusherProps>
|
|
141
|
+
export declare const Video: VueComponentType<VideoProps>
|
|
142
|
+
export declare const VoipRoom: VueComponentType<VoipRoomProps>
|
|
143
|
+
/** 地图 */
|
|
144
|
+
export declare const Map: VueComponentType<MapProps>
|
|
145
|
+
/** 画布 */
|
|
146
|
+
export declare const Canvas: VueComponentType<CanvasProps>
|
|
147
|
+
/** 开放能力 */
|
|
148
|
+
export declare const Ad: VueComponentType<AdProps>
|
|
149
|
+
export declare const AdCustom: VueComponentType<AdCustomProps>
|
|
150
|
+
export declare const OfficialAccount: VueComponentType<OfficialAccountProps>
|
|
151
|
+
export declare const OpenData: VueComponentType<OpenDataProps>
|
|
152
|
+
export declare const WebView: VueComponentType<WebViewProps>
|
|
153
|
+
/** 配置节点 */
|
|
154
|
+
export declare const PageMeta: VueComponentType<PageMetaProps>
|
|
95
155
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
export declare const CoverImage: VueComponentType<CoverImageProps>
|
|
99
|
-
export declare const CoverView: VueComponentType<CoverViewProps>
|
|
100
|
-
export declare const MatchMedia: VueComponentType<MatchMediaProps>
|
|
101
|
-
export declare const MovableArea: VueComponentType<MovableAreaProps>
|
|
102
|
-
export declare const MovableView: VueComponentType<MovableViewProps>
|
|
103
|
-
export declare const PageContainer: VueComponentType<PageContainerProps>
|
|
104
|
-
export declare const RootPortal: VueComponentType
|
|
105
|
-
export declare const ScrollView: VueComponentType<ScrollViewProps>
|
|
106
|
-
export declare const ShareElement: VueComponentType<ShareElementProps>
|
|
107
|
-
export declare const Swiper: VueComponentType<SwiperProps>
|
|
108
|
-
export declare const SwiperItem: VueComponentType<SwiperItemProps>
|
|
109
|
-
export declare const View: VueComponentType<ViewProps>
|
|
110
|
-
/** 基础内容 */
|
|
111
|
-
export declare const Icon: VueComponentType<IconProps>
|
|
112
|
-
export declare const Progress: VueComponentType<ProgressProps>
|
|
113
|
-
export declare const RichText: VueComponentType<RichTextProps>
|
|
114
|
-
export declare const Text: VueComponentType<TextProps>
|
|
115
|
-
/** 表单组件 */
|
|
116
|
-
export declare const Button: VueComponentType<ButtonProps>
|
|
117
|
-
export declare const Checkbox: VueComponentType<CheckboxProps>
|
|
118
|
-
export declare const CheckboxGroup: VueComponentType<CheckboxGroupProps>
|
|
119
|
-
export declare const Editor: VueComponentType<EditorProps>
|
|
120
|
-
export declare const Form: VueComponentType<FormProps>
|
|
121
|
-
export declare const Input: VueComponentType<InputProps>
|
|
122
|
-
export declare const KeyboardAccessory: VueComponentType<KeyboardAccessoryProps>
|
|
123
|
-
export declare const Label: VueComponentType<LabelProps>
|
|
124
|
-
export declare const Picker: VueComponentType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
|
125
|
-
export declare const PickerView: VueComponentType<PickerViewProps>
|
|
126
|
-
export declare const PickerViewColumn: VueComponentType
|
|
127
|
-
export declare const Radio: VueComponentType<RadioProps>
|
|
128
|
-
export declare const RadioGroup: VueComponentType<RadioGroupProps>
|
|
129
|
-
export declare const Slider: VueComponentType<SliderProps>
|
|
130
|
-
export declare const Switch: VueComponentType<SwitchProps>
|
|
131
|
-
export declare const Textarea: VueComponentType<TextareaProps>
|
|
132
|
-
/** 导航 */
|
|
133
|
-
export declare const FunctionalPageNavigator: VueComponentType<FunctionalPageNavigatorProps>
|
|
134
|
-
export declare const Navigator: VueComponentType<NavigatorProps>
|
|
135
|
-
export declare const NavigationBar: VueComponentType<NavigationBarProps>
|
|
136
|
-
/** 媒体组件 */
|
|
137
|
-
export declare const Audio: VueComponentType<AudioProps>
|
|
138
|
-
export declare const Camera: VueComponentType<CameraProps>
|
|
139
|
-
export declare const Image: VueComponentType<ImageProps>
|
|
140
|
-
export declare const LivePlayer: VueComponentType<LivePlayerProps>
|
|
141
|
-
export declare const LivePusher: VueComponentType<LivePusherProps>
|
|
142
|
-
export declare const Video: VueComponentType<VideoProps>
|
|
143
|
-
export declare const VoipRoom: VueComponentType<VoipRoomProps>
|
|
144
|
-
/** 地图 */
|
|
145
|
-
export declare const Map: VueComponentType<MapProps>
|
|
146
|
-
/** 画布 */
|
|
147
|
-
export declare const Canvas: VueComponentType<CanvasProps>
|
|
148
|
-
/** 开放能力 */
|
|
149
|
-
export declare const Ad: VueComponentType<AdProps>
|
|
150
|
-
export declare const AdCustom: VueComponentType<AdCustomProps>
|
|
151
|
-
export declare const OfficialAccount: VueComponentType<OfficialAccountProps>
|
|
152
|
-
export declare const OpenData: VueComponentType<OpenDataProps>
|
|
153
|
-
export declare const WebView: VueComponentType<WebViewProps>
|
|
154
|
-
/** 配置节点 */
|
|
155
|
-
export declare const PageMeta: VueComponentType<PageMetaProps>
|
|
156
|
+
export declare const CustomWrapper: VueComponentType<CustomWrapperProps>
|
|
157
|
+
export declare const Slot: VueComponentType<SlotProps>
|
|
156
158
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
+
type ReservedProps = {
|
|
160
|
+
key?: string | number | symbol
|
|
161
|
+
ref?: VNodeRef
|
|
162
|
+
ref_for?: boolean
|
|
163
|
+
ref_key?: string
|
|
164
|
+
}
|
|
159
165
|
|
|
160
|
-
|
|
161
|
-
namespace JSX {
|
|
162
|
-
interface IntrinsicElements {
|
|
163
|
-
/** 视图容器 */
|
|
164
|
-
block: TransformReact2VueType<StandardProps>
|
|
165
|
-
'taro-block-core': TransformReact2VueType<StandardProps>
|
|
166
|
-
'cover-image': TransformReact2VueType<CoverImageProps>
|
|
167
|
-
'taro-cover-image-core': TransformReact2VueType<CoverImageProps>
|
|
168
|
-
'cover-view': TransformReact2VueType<CoverViewProps>
|
|
169
|
-
'taro-cover-view-core': TransformReact2VueType<CoverViewProps>
|
|
170
|
-
'match-media': TransformReact2VueType<MatchMediaProps>
|
|
171
|
-
'taro-match-media-core': TransformReact2VueType<MatchMediaProps>
|
|
172
|
-
'movable-area': TransformReact2VueType<MovableAreaProps>
|
|
173
|
-
'taro-movable-area-core': TransformReact2VueType<MovableAreaProps>
|
|
174
|
-
'movable-view': TransformReact2VueType<MovableViewProps>
|
|
175
|
-
'taro-movable-view-core': TransformReact2VueType<MovableViewProps>
|
|
176
|
-
'page-container': TransformReact2VueType<PageContainerProps>
|
|
177
|
-
'taro-page-container-core': TransformReact2VueType<PageContainerProps>
|
|
178
|
-
'root-portal': TransformReact2VueType
|
|
179
|
-
'taro-root-portal-core': TransformReact2VueType
|
|
180
|
-
'scroll-view': TransformReact2VueType<ScrollViewProps>
|
|
181
|
-
'taro-scroll-view-core': TransformReact2VueType<ScrollViewProps>
|
|
182
|
-
'share-element': TransformReact2VueType<ShareElementProps>
|
|
183
|
-
'taro-share-element-core': TransformReact2VueType<ShareElementProps>
|
|
184
|
-
swiper: TransformReact2VueType<SwiperProps>
|
|
185
|
-
'taro-swiper-core': TransformReact2VueType<SwiperProps>
|
|
186
|
-
'swiper-item': TransformReact2VueType<SwiperItemProps>
|
|
187
|
-
'taro-swiper-item-core': TransformReact2VueType<SwiperItemProps>
|
|
188
|
-
view: TransformReact2VueType<ViewProps>
|
|
189
|
-
'taro-view-core': TransformReact2VueType<ViewProps>
|
|
190
|
-
/** 基础内容 */
|
|
191
|
-
icon: TransformReact2VueType<IconProps>
|
|
192
|
-
'taro-icon-core': TransformReact2VueType<IconProps>
|
|
193
|
-
progress: TransformReact2VueType<ProgressProps>
|
|
194
|
-
'taro-progress-core': TransformReact2VueType<ProgressProps>
|
|
195
|
-
'rich-text': TransformReact2VueType<RichTextProps>
|
|
196
|
-
'taro-rich-text-core': TransformReact2VueType<RichTextProps>
|
|
197
|
-
text: TransformReact2VueType<TextProps>
|
|
198
|
-
'taro-text-core': TransformReact2VueType<TextProps>
|
|
199
|
-
/** 表单组件 */
|
|
200
|
-
button: TransformReact2VueType<ButtonProps>
|
|
201
|
-
'taro-button-core': TransformReact2VueType<ButtonProps>
|
|
202
|
-
checkbox: TransformReact2VueType<CheckboxProps>
|
|
203
|
-
'taro-checkbox-core': TransformReact2VueType<CheckboxProps>
|
|
204
|
-
'checkbox-group': TransformReact2VueType<CheckboxGroupProps>
|
|
205
|
-
'taro-checkbox-group-core': TransformReact2VueType<CheckboxGroupProps>
|
|
206
|
-
editor: TransformReact2VueType<EditorProps>
|
|
207
|
-
'taro-editor-core': TransformReact2VueType<EditorProps>
|
|
208
|
-
form: TransformReact2VueType<FormProps>
|
|
209
|
-
'taro-form-core': TransformReact2VueType<FormProps>
|
|
210
|
-
input: TransformReact2VueType<InputProps>
|
|
211
|
-
'taro-input-core': TransformReact2VueType<InputProps>
|
|
212
|
-
'keyboard-accessory': TransformReact2VueType<KeyboardAccessoryProps>
|
|
213
|
-
'taro-keyboard-accessory-core': TransformReact2VueType<KeyboardAccessoryProps>
|
|
214
|
-
label: TransformReact2VueType<LabelProps>
|
|
215
|
-
'taro-label-core': TransformReact2VueType<LabelProps>
|
|
216
|
-
picker: TransformReact2VueType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
|
217
|
-
'taro-picker-core': TransformReact2VueType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
|
218
|
-
'picker-view': TransformReact2VueType<PickerViewProps>
|
|
219
|
-
'taro-picker-view-core': TransformReact2VueType<PickerViewProps>
|
|
220
|
-
'picker-view-column': TransformReact2VueType
|
|
221
|
-
'taro-picker-view-column-core': TransformReact2VueType
|
|
222
|
-
radio: TransformReact2VueType<RadioProps>
|
|
223
|
-
'taro-radio-core': TransformReact2VueType<RadioProps>
|
|
224
|
-
'radio-group': TransformReact2VueType<RadioGroupProps>
|
|
225
|
-
'taro-radio-group-core': TransformReact2VueType<RadioGroupProps>
|
|
226
|
-
slider: TransformReact2VueType<SliderProps>
|
|
227
|
-
'taro-slider-core': TransformReact2VueType<SliderProps>
|
|
228
|
-
switch: TransformReact2VueType<SwitchProps>
|
|
229
|
-
'taro-switch-core': TransformReact2VueType<SwitchProps>
|
|
230
|
-
textarea: TransformReact2VueType<TextareaProps>
|
|
231
|
-
'taro-textarea-core': TransformReact2VueType<TextareaProps>
|
|
232
|
-
/** 导航 */
|
|
233
|
-
'functional-page-navigator': TransformReact2VueType<FunctionalPageNavigatorProps>
|
|
234
|
-
'taro-functional-page-navigator-core': TransformReact2VueType<FunctionalPageNavigatorProps>
|
|
235
|
-
navigator: TransformReact2VueType<NavigatorProps>
|
|
236
|
-
'taro-navigator-core': TransformReact2VueType<NavigatorProps>
|
|
237
|
-
'navigation-bar': TransformReact2VueType<NavigationBarProps>
|
|
238
|
-
'taro-navigation-bar-core': TransformReact2VueType<NavigationBarProps>
|
|
239
|
-
/** 媒体组件 */
|
|
240
|
-
audio: TransformReact2VueType<AudioProps>
|
|
241
|
-
'taro-audio-core': TransformReact2VueType<AudioProps>
|
|
242
|
-
camera: TransformReact2VueType<CameraProps>
|
|
243
|
-
'taro-camera-core': TransformReact2VueType<CameraProps>
|
|
244
|
-
image: TransformReact2VueType<ImageProps>
|
|
245
|
-
'taro-image-core': TransformReact2VueType<ImageProps>
|
|
246
|
-
'live-player': TransformReact2VueType<LivePlayerProps>
|
|
247
|
-
'taro-live-player-core': TransformReact2VueType<LivePlayerProps>
|
|
248
|
-
'live-pusher': TransformReact2VueType<LivePusherProps>
|
|
249
|
-
'taro-live-pusher-core': TransformReact2VueType<LivePusherProps>
|
|
250
|
-
video: TransformReact2VueType<VideoProps>
|
|
251
|
-
'taro-video-core': TransformReact2VueType<VideoProps>
|
|
252
|
-
'voip-room': TransformReact2VueType<VoipRoomProps>
|
|
253
|
-
'taro-voip-room-core': TransformReact2VueType<VoipRoomProps>
|
|
254
|
-
/** 地图 */
|
|
255
|
-
map: TransformReact2VueType<MapProps>
|
|
256
|
-
'taro-map-core': TransformReact2VueType<MapProps>
|
|
257
|
-
/** 画布 */
|
|
258
|
-
canvas: TransformReact2VueType<CanvasProps>
|
|
259
|
-
'taro-canvas-core': TransformReact2VueType<CanvasProps>
|
|
260
|
-
/** 开放能力 */
|
|
261
|
-
ad: TransformReact2VueType<AdProps>
|
|
262
|
-
'taro-ad-core': TransformReact2VueType<AdProps>
|
|
263
|
-
'ad-custom': TransformReact2VueType<AdCustomProps>
|
|
264
|
-
'taro-ad-custom-core': TransformReact2VueType<AdCustomProps>
|
|
265
|
-
'official-account': TransformReact2VueType<OfficialAccountProps>
|
|
266
|
-
'taro-official-account-core': TransformReact2VueType<OfficialAccountProps>
|
|
267
|
-
'open-data': TransformReact2VueType<OpenDataProps>
|
|
268
|
-
'taro-open-data-core': TransformReact2VueType<OpenDataProps>
|
|
269
|
-
'web-view': TransformReact2VueType<WebViewProps>
|
|
270
|
-
'taro-web-view-core': TransformReact2VueType<WebViewProps>
|
|
271
|
-
/** 配置节点 */
|
|
272
|
-
'page-meta': TransformReact2VueType<PageMetaProps>
|
|
273
|
-
'taro-page-meta-core': TransformReact2VueType<PageMetaProps>
|
|
166
|
+
type ElementAttrs<T> = T & ReservedProps
|
|
274
167
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
168
|
+
declare global {
|
|
169
|
+
namespace JSX {
|
|
170
|
+
interface IntrinsicElements {
|
|
171
|
+
/** 视图容器 */
|
|
172
|
+
block: ElementAttrs<TransformReact2VueType<StandardProps>>
|
|
173
|
+
'taro-block-core': ElementAttrs<TransformReact2VueType<StandardProps>>
|
|
174
|
+
'cover-image': ElementAttrs<TransformReact2VueType<CoverImageProps>>
|
|
175
|
+
'taro-cover-image-core': ElementAttrs<TransformReact2VueType<CoverImageProps>>
|
|
176
|
+
'cover-view': ElementAttrs<TransformReact2VueType<CoverViewProps>>
|
|
177
|
+
'taro-cover-view-core': ElementAttrs<TransformReact2VueType<CoverViewProps>>
|
|
178
|
+
'match-media': ElementAttrs<TransformReact2VueType<MatchMediaProps>>
|
|
179
|
+
'taro-match-media-core': ElementAttrs<TransformReact2VueType<MatchMediaProps>>
|
|
180
|
+
'movable-area': ElementAttrs<TransformReact2VueType<MovableAreaProps>>
|
|
181
|
+
'taro-movable-area-core': ElementAttrs<TransformReact2VueType<MovableAreaProps>>
|
|
182
|
+
'movable-view': ElementAttrs<TransformReact2VueType<MovableViewProps>>
|
|
183
|
+
'taro-movable-view-core': ElementAttrs<TransformReact2VueType<MovableViewProps>>
|
|
184
|
+
'page-container': ElementAttrs<TransformReact2VueType<PageContainerProps>>
|
|
185
|
+
'taro-page-container-core': ElementAttrs<TransformReact2VueType<PageContainerProps>>
|
|
186
|
+
'root-portal': ElementAttrs<TransformReact2VueType>
|
|
187
|
+
'taro-root-portal-core': ElementAttrs<TransformReact2VueType>
|
|
188
|
+
'scroll-view': ElementAttrs<TransformReact2VueType<ScrollViewProps>>
|
|
189
|
+
'taro-scroll-view-core': ElementAttrs<TransformReact2VueType<ScrollViewProps>>
|
|
190
|
+
'share-element': ElementAttrs<TransformReact2VueType<ShareElementProps>>
|
|
191
|
+
'taro-share-element-core': ElementAttrs<TransformReact2VueType<ShareElementProps>>
|
|
192
|
+
swiper: ElementAttrs<TransformReact2VueType<SwiperProps>>
|
|
193
|
+
'taro-swiper-core': ElementAttrs<TransformReact2VueType<SwiperProps>>
|
|
194
|
+
'swiper-item': ElementAttrs<TransformReact2VueType<SwiperItemProps>>
|
|
195
|
+
'taro-swiper-item-core': ElementAttrs<TransformReact2VueType<SwiperItemProps>>
|
|
196
|
+
view: ElementAttrs<TransformReact2VueType<ViewProps>>
|
|
197
|
+
'taro-view-core': ElementAttrs<TransformReact2VueType<ViewProps>>
|
|
198
|
+
/** 基础内容 */
|
|
199
|
+
icon: ElementAttrs<TransformReact2VueType<IconProps>>
|
|
200
|
+
'taro-icon-core': ElementAttrs<TransformReact2VueType<IconProps>>
|
|
201
|
+
progress: ElementAttrs<TransformReact2VueType<ProgressProps>>
|
|
202
|
+
'taro-progress-core': ElementAttrs<TransformReact2VueType<ProgressProps>>
|
|
203
|
+
'rich-text': ElementAttrs<TransformReact2VueType<RichTextProps>>
|
|
204
|
+
'taro-rich-text-core': ElementAttrs<TransformReact2VueType<RichTextProps>>
|
|
205
|
+
text: ElementAttrs<TransformReact2VueType<TextProps>>
|
|
206
|
+
'taro-text-core': ElementAttrs<TransformReact2VueType<TextProps>>
|
|
207
|
+
/** 表单组件 */
|
|
208
|
+
button: ElementAttrs<TransformReact2VueType<ButtonProps>>
|
|
209
|
+
'taro-button-core': ElementAttrs<TransformReact2VueType<ButtonProps>>
|
|
210
|
+
checkbox: ElementAttrs<TransformReact2VueType<CheckboxProps>>
|
|
211
|
+
'taro-checkbox-core': ElementAttrs<TransformReact2VueType<CheckboxProps>>
|
|
212
|
+
'checkbox-group': ElementAttrs<TransformReact2VueType<CheckboxGroupProps>>
|
|
213
|
+
'taro-checkbox-group-core': ElementAttrs<TransformReact2VueType<CheckboxGroupProps>>
|
|
214
|
+
editor: ElementAttrs<TransformReact2VueType<EditorProps>>
|
|
215
|
+
'taro-editor-core': ElementAttrs<TransformReact2VueType<EditorProps>>
|
|
216
|
+
form: ElementAttrs<TransformReact2VueType<FormProps>>
|
|
217
|
+
'taro-form-core': ElementAttrs<TransformReact2VueType<FormProps>>
|
|
218
|
+
input: ElementAttrs<TransformReact2VueType<InputProps>>
|
|
219
|
+
'taro-input-core': ElementAttrs<TransformReact2VueType<InputProps>>
|
|
220
|
+
'keyboard-accessory': ElementAttrs<TransformReact2VueType<KeyboardAccessoryProps>>
|
|
221
|
+
'taro-keyboard-accessory-core': ElementAttrs<TransformReact2VueType<KeyboardAccessoryProps>>
|
|
222
|
+
label: ElementAttrs<TransformReact2VueType<LabelProps>>
|
|
223
|
+
'taro-label-core': ElementAttrs<TransformReact2VueType<LabelProps>>
|
|
224
|
+
picker: ElementAttrs<TransformReact2VueType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>>
|
|
225
|
+
'taro-picker-core': ElementAttrs<TransformReact2VueType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>>
|
|
226
|
+
'picker-view': ElementAttrs<TransformReact2VueType<PickerViewProps>>
|
|
227
|
+
'taro-picker-view-core': ElementAttrs<TransformReact2VueType<PickerViewProps>>
|
|
228
|
+
'picker-view-column': ElementAttrs<TransformReact2VueType>
|
|
229
|
+
'taro-picker-view-column-core': ElementAttrs<TransformReact2VueType>
|
|
230
|
+
radio: ElementAttrs<TransformReact2VueType<RadioProps>>
|
|
231
|
+
'taro-radio-core': ElementAttrs<TransformReact2VueType<RadioProps>>
|
|
232
|
+
'radio-group': ElementAttrs<TransformReact2VueType<RadioGroupProps>>
|
|
233
|
+
'taro-radio-group-core': ElementAttrs<TransformReact2VueType<RadioGroupProps>>
|
|
234
|
+
slider: ElementAttrs<TransformReact2VueType<SliderProps>>
|
|
235
|
+
'taro-slider-core': ElementAttrs<TransformReact2VueType<SliderProps>>
|
|
236
|
+
switch: ElementAttrs<TransformReact2VueType<SwitchProps>>
|
|
237
|
+
'taro-switch-core': ElementAttrs<TransformReact2VueType<SwitchProps>>
|
|
238
|
+
textarea: ElementAttrs<TransformReact2VueType<TextareaProps>>
|
|
239
|
+
'taro-textarea-core': ElementAttrs<TransformReact2VueType<TextareaProps>>
|
|
240
|
+
/** 导航 */
|
|
241
|
+
'functional-page-navigator': ElementAttrs<TransformReact2VueType<FunctionalPageNavigatorProps>>
|
|
242
|
+
'taro-functional-page-navigator-core': ElementAttrs<TransformReact2VueType<FunctionalPageNavigatorProps>>
|
|
243
|
+
navigator: ElementAttrs<TransformReact2VueType<NavigatorProps>>
|
|
244
|
+
'taro-navigator-core': ElementAttrs<TransformReact2VueType<NavigatorProps>>
|
|
245
|
+
'navigation-bar': ElementAttrs<TransformReact2VueType<NavigationBarProps>>
|
|
246
|
+
'taro-navigation-bar-core': ElementAttrs<TransformReact2VueType<NavigationBarProps>>
|
|
247
|
+
/** 媒体组件 */
|
|
248
|
+
audio: ElementAttrs<TransformReact2VueType<AudioProps>>
|
|
249
|
+
'taro-audio-core': ElementAttrs<TransformReact2VueType<AudioProps>>
|
|
250
|
+
camera: ElementAttrs<TransformReact2VueType<CameraProps>>
|
|
251
|
+
'taro-camera-core': ElementAttrs<TransformReact2VueType<CameraProps>>
|
|
252
|
+
image: ElementAttrs<TransformReact2VueType<ImageProps>>
|
|
253
|
+
'taro-image-core': ElementAttrs<TransformReact2VueType<ImageProps>>
|
|
254
|
+
'live-player': ElementAttrs<TransformReact2VueType<LivePlayerProps>>
|
|
255
|
+
'taro-live-player-core': ElementAttrs<TransformReact2VueType<LivePlayerProps>>
|
|
256
|
+
'live-pusher': ElementAttrs<TransformReact2VueType<LivePusherProps>>
|
|
257
|
+
'taro-live-pusher-core': ElementAttrs<TransformReact2VueType<LivePusherProps>>
|
|
258
|
+
video: ElementAttrs<TransformReact2VueType<VideoProps>>
|
|
259
|
+
'taro-video-core': ElementAttrs<TransformReact2VueType<VideoProps>>
|
|
260
|
+
'voip-room': ElementAttrs<TransformReact2VueType<VoipRoomProps>>
|
|
261
|
+
'taro-voip-room-core': ElementAttrs<TransformReact2VueType<VoipRoomProps>>
|
|
262
|
+
/** 地图 */
|
|
263
|
+
map: ElementAttrs<TransformReact2VueType<MapProps>>
|
|
264
|
+
'taro-map-core': ElementAttrs<TransformReact2VueType<MapProps>>
|
|
265
|
+
/** 画布 */
|
|
266
|
+
canvas: ElementAttrs<TransformReact2VueType<CanvasProps>>
|
|
267
|
+
'taro-canvas-core': ElementAttrs<TransformReact2VueType<CanvasProps>>
|
|
268
|
+
/** 开放能力 */
|
|
269
|
+
ad: ElementAttrs<TransformReact2VueType<AdProps>>
|
|
270
|
+
'taro-ad-core': ElementAttrs<TransformReact2VueType<AdProps>>
|
|
271
|
+
'ad-custom': ElementAttrs<TransformReact2VueType<AdCustomProps>>
|
|
272
|
+
'taro-ad-custom-core': ElementAttrs<TransformReact2VueType<AdCustomProps>>
|
|
273
|
+
'official-account': ElementAttrs<TransformReact2VueType<OfficialAccountProps>>
|
|
274
|
+
'taro-official-account-core': ElementAttrs<TransformReact2VueType<OfficialAccountProps>>
|
|
275
|
+
'open-data': ElementAttrs<TransformReact2VueType<OpenDataProps>>
|
|
276
|
+
'taro-open-data-core': ElementAttrs<TransformReact2VueType<OpenDataProps>>
|
|
277
|
+
'web-view': ElementAttrs<TransformReact2VueType<WebViewProps>>
|
|
278
|
+
'taro-web-view-core': ElementAttrs<TransformReact2VueType<WebViewProps>>
|
|
279
|
+
/** 配置节点 */
|
|
280
|
+
'page-meta': ElementAttrs<TransformReact2VueType<PageMetaProps>>
|
|
281
|
+
'taro-page-meta-core': ElementAttrs<TransformReact2VueType<PageMetaProps>>
|
|
282
|
+
|
|
283
|
+
'custom-wrapper': ElementAttrs<TransformReact2VueType<CustomWrapperProps>>
|
|
284
|
+
'taro-custom-wrapper-core': ElementAttrs<TransformReact2VueType<CustomWrapperProps>>
|
|
285
|
+
'slot': ElementAttrs<TransformReact2VueType<SlotProps>>
|
|
286
|
+
'taro-slot-core': ElementAttrs<TransformReact2VueType<SlotProps>>
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,g as h,H as e}from"./p-059912fd.js";var n=function(t,s,i,h){return new(i||(i=Promise))((function(e,n){function a(t){try{r(h.next(t))}catch(t){n(t)}}function o(t){try{r(h.throw(t))}catch(t){n(t)}}function r(t){var s;t.done?e(t.value):(s=t.value,s instanceof i?s:new i((function(t){t(s)}))).then(a,o)}r((h=h.apply(t,s||[])).next())}))};let a=class{constructor(i){t(this,i),this.onChange=s(this,"change",7),this.onScale=s(this,"scale",7),this.onHTouchMove=s(this,"htouchmove",7),this.onVTouchMove=s(this,"vtouchmove",7),this.x=0,this.y=0,this.direction="none",this.outOfBounds=!1,this.inertia=!1,this.friction=2,this.damping=20,this.disabled=!1,this.scale=!1,this.scaleMin=.5,this.scaleMax=10,this.scaleValue=1,this.animation=!0,this.translateX=0,this.translateY=0,this.origin={x:0,y:0},this.area={width:0,height:0},this.originScale=1,this.currentScale=1,this.width=0,this.height=0,this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.baseX=0,this.baseY=0,this.offset={x:0,y:0},this.scaleOffset={x:0,y:0},this.getLimitXY=(t,s)=>{let i=!1;return t>this.maxX?(t=this.maxX,i=!0):t<this.minX&&(t=this.minX,i=!0),s>this.maxY?(s=this.maxY,i=!0):s<this.minY&&(s=this.minY,i=!0),{x:t,y:s,outOfBounds:i}},this.animationTo=(t,s,i,h,e,n,a)=>{this.animation?(this.setTransform(t,s,i,h,e,n),null==a||a()):this.setTransform(t,s,i,h,e,n)},this.setTransform=(t,s,i,h,e,n)=>{if(t=Number(t.toFixed(1)),s=Number(s.toFixed(1)),i=Number((null!=i?i:this.currentScale).toFixed(3)),!this.outOfBounds){const i=this.getLimitXY(t,s);t=i.x,s=i.y}const a=(t,s)=>+((1e3*t-1e3*s)/1e3).toFixed(1),o=a(t,this.scaleOffset.x),r=a(s,this.scaleOffset.y);this.translateX===t&&this.translateY===s||!e&&this.onChange.emit({x:o,y:r,source:h}),i!==this.currentScale&&n&&this.onScale.emit({scale:i,x:o,y:r});const c=`translateX(${t}px) translateY(${s}px) translateZ(0px) scale(${i})`;this.element.style.transform=c,this.element.style.webkitTransform=c,this.translateX=t,this.translateY=s,this.currentScale=i},this.updateOffset=()=>{const t=(s,i)=>{if(s===i||!s.offsetParent)return{left:0,top:0};const h=t(s.offsetParent,i);return{left:s.offsetLeft+h.left,top:s.offsetTop+h.top}};if(!this.parent)return;const s=t(this.element,this.parent);this.offset.x=s.left,this.offset.y=s.top},this.updateScaleOffset=(t=this.currentScale)=>{const s=this.element.getBoundingClientRect();this.height=s.height/this.currentScale,this.width=s.width/this.currentScale,this.scaleOffset.x=(this.width*t-this.width)/2,this.scaleOffset.y=(this.height*t-this.height)/2},this.updateBoundary=()=>{const t=0-this.offset.x+this.scaleOffset.x,s=this.area.width-this.width-this.offset.x-this.scaleOffset.x;this.minX=Math.min(t,s),this.maxX=Math.max(t,s);const i=0-this.offset.y+this.scaleOffset.y,h=this.area.height-this.height-this.offset.y-this.scaleOffset.y;this.minY=Math.min(i,h),this.maxY=Math.max(i,h)},this.updateScale=(t,s,i)=>{if(!this.scale)return;const h=this.adjustScale(t);this.updateScaleOffset(h),this.updateBoundary();const{x:e,y:n}=this.getLimitXY(this.translateX,this.translateY);s?this.animationTo(e,n,h,"",!0,!0,i):this.updating||(this.updating=!0,requestAnimationFrame((()=>{this.setTransform(e,n,h,"",!0,!0),this.updating=!1})))},this.setOriginScale=t=>{this.originScale=t},this.adjustScale=t=>Math.min(10,this.scaleMax,Math.max(.5,this.scaleMin,t)),this.handleTouchStart=t=>{const s=t.touches;if(this.disabled||s.length>1||!this.element)return;const i=s[0];this.touching=!0,this.firstMoveFireEvent=!1,this.origin.x=i.screenX,this.origin.y=i.screenY,this.baseX=this.translateX,this.baseY=this.translateY,this.element.style.willChange="transform"},this.handleTouchMove=t=>{const s=t.touches;if(this.disabled||!this.element||this.scaling||!this.touching||s.length>1)return;t.preventDefault();const i=s[0],h=i.screenX-this.origin.x,e=i.screenY-this.origin.y;this.setTransform(this.xMove?h+this.baseX:0,this.yMove?e+this.baseY:0),this.firstMoveFireEvent||(this.firstMoveFireEvent=!0,(Math.abs(h)>Math.abs(e)?this.onHTouchMove:this.onVTouchMove).emit({originalEvent:t,bubbles:!1,capturePhase:!1,composed:!0,extraFields:{touches:t.touches||{},changedTouches:t.changedTouches||{}}}))},this.handleTouchEnd=t=>{const s=t.changedTouches[0];!this.disabled&&this.touching&&s&&(this.touching=!1,this.setTransform(this.xMove?s.screenX-this.origin.x+this.baseX:0,this.yMove?s.screenY-this.origin.y+this.baseY:0))}}watchX(t){this.setTransform(parseFloat(`${t||0}`),this.translateY)}watchY(t){this.setTransform(this.translateX,parseFloat(`${t||0}`))}watchScaleMinOrMax(){if(!this.scale)return!1;this.updateScale(this.currentScale,!0),this.setOriginScale(this.currentScale)}watchScaleValue(t){return!!this.scale&&(this.updateScale(t,!0),this.setOriginScale(t),t)}setParent({element:t,area:s}){return n(this,void 0,void 0,(function*(){const i=this.scale?this.scaleValue:1;this.area=s,this.parent=t,this.updateOffset(),this.updateScaleOffset(i),this.updateBoundary(),this.setTransform(Number(this.x)+this.scaleOffset.x,Number(this.y)+this.scaleOffset.y,i,"",!0),this.setOriginScale(i)}))}endScale(){return n(this,void 0,void 0,(function*(){this.scaling=!1,this.setOriginScale(this.currentScale)}))}setScale(t){return n(this,void 0,void 0,(function*(){this.scale&&(this.scaling=!0,this.updateScale(t*this.originScale))}))}connectedCallback(){this.observer=new MutationObserver((t=>{t.forEach((t=>{const s=t.attributeName;if(s&&["class","style"].includes(s)){const i=t.oldValue,h=t.target.getAttribute(s);if(i===h)return;const e=t=>null==t?void 0:t.split(";").filter((t=>!["transform","will-change"].find((s=>t.trim().startsWith(s))))).join(";");if("style"===s&&e(h)===e(i))return;this.updateOffset(),this.updateScaleOffset(),this.updateBoundary(),this.setTransform(this.translateX,this.translateY)}}))})),this.observer.observe(this.element,{attributes:!0,attributeOldValue:!0})}disconnectedCallback(){var t;null===(t=this.observer)||void 0===t||t.disconnect()}componentDidLoad(){if(this.element.style.transformOrigin="center",this.xMove=["horizontal","all"].includes(this.direction),this.yMove=["vertical","all"].includes(this.direction),this.friction<=0&&(this.friction=2),this.x||this.y){const t=parseFloat(`${this.x||0}`),s=parseFloat(`${this.y||0}`);this.setTransform(t,s)}}render(){return i(e,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})}get element(){return h(this)}static get watchers(){return{x:["watchX"],y:["watchY"],scaleMin:["watchScaleMinOrMax"],scaleMax:["watchScaleMinOrMax"],scaleValue:["watchScaleValue"]}}};a.style="taro-movable-view-core{display:inline-block;position:absolute;left:0;top:0;width:10px;height:10px}";export{a as taro_movable_view_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,c as t,h as r,H as a,g as e}from"./p-059912fd.js";import{c as i}from"./p-76724e58.js";let n=class{constructor(r){o(this,r),this.onSubmit=t(this,"tarobuttonsubmit",7),this.onReset=t(this,"tarobuttonreset",7),this.hoverClass="button-hover",this.type="",this.hoverStartTime=20,this.hoverStayTime=70,this.loading=!1,this.formType=null,this.hover=!1,this.touch=!1}onTouchStart(){this.disabled||(this.touch=!0,this.hoverClass&&!this.disabled&&setTimeout((()=>{this.touch&&(this.hover=!0)}),this.hoverStartTime))}onTouchEnd(){this.disabled||(this.touch=!1,this.hoverClass&&!this.disabled&&setTimeout((()=>{this.touch||(this.hover=!1)}),this.hoverStayTime),"submit"===this.formType?this.onSubmit.emit():"reset"===this.formType&&this.onReset.emit())}render(){const{disabled:o,hoverClass:t,type:e,size:n,plain:b,loading:c,hover:d}=this,l=i({[`${t}`]:d&&!o});return r(a,{class:l,type:e,plain:b,loading:c,size:n,disabled:o},c&&r("i",{class:"weui-loading"}),r("slot",null))}get el(){return e(this)}};n.style='taro-button-core{display:block;overflow:hidden;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;border-width:0;border-radius:5px;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;background-color:#f8f8f8;line-height:2.55555556;text-decoration:none;text-align:center;font-size:18px;color:#000;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}taro-button-core:focus{outline:0}taro-button-core:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core::after{position:absolute;left:0;top:0;-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid rgba(0, 0, 0, 0.2);border-radius:10px;width:200%;height:200%;content:" ";-webkit-transform:scale(0.5);transform:scale(0.5);-webkit-transform-origin:0 0;transform-origin:0 0}taro-button-core+taro-button-core{margin-top:15px}taro-button-core[type=default]{background-color:#f8f8f8;color:#000}taro-button-core[type=default]:not([disabled]):visited{color:#000}taro-button-core[type=default]:not([disabled]):active{background-color:#dedede;color:rgba(0, 0, 0, 0.6)}taro-button-core[size=mini]{display:inline-block;padding:0 1.32em;width:auto;line-height:2.3;font-size:13px}taro-button-core[plain],taro-button-core[plain][type=default],taro-button-core[plain][type=primary]{border-width:1px;background-color:transparent}taro-button-core[disabled]{color:rgba(255, 255, 255, 0.6)}taro-button-core[disabled][type=default]{background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[disabled][type=primary]{background-color:#9ed99d}taro-button-core[disabled][type=warn]{background-color:#ec8b89}taro-button-core[loading] .weui-loading{margin:-0.2em 0.34em 0 0}taro-button-core[loading][type=primary],taro-button-core[loading][type=warn]{color:rgba(255, 255, 255, 0.6)}taro-button-core[loading][type=primary]{background-color:#179b16}taro-button-core[loading][type=warn]{background-color:#ce3c39}taro-button-core[plain][type=primary]{border:1px solid #1aad19;color:#1aad19}taro-button-core[plain][type=primary]:not([disabled]):active{border-color:rgba(26, 173, 25, 0.6);background-color:transparent;color:rgba(26, 173, 25, 0.6)}taro-button-core[plain][type=primary]::after{border-width:0}taro-button-core[plain],taro-button-core[plain][type=default]{border:1px solid #353535;color:#353535}taro-button-core[plain]:not([disabled]):active,taro-button-core[plain][type=default]:not([disabled]):active{border-color:rgba(53, 53, 53, 0.6);background-color:transparent;color:rgba(53, 53, 53, 0.6)}taro-button-core[plain]::after,taro-button-core[plain][type=default]::after{border-width:0}taro-button-core[type=primary]{background-color:#1aad19;color:#fff}taro-button-core[type=primary]:not([disabled]):visited{color:#fff}taro-button-core[type=primary]:not([disabled]):active{background-color:#179b16;color:rgba(255, 255, 255, 0.6)}taro-button-core[type=warn]{background-color:#e64340;color:#fff}taro-button-core[type=warn]:not([disabled]):visited{color:#fff}taro-button-core[type=warn]:not([disabled]):active{background-color:#ce3c39;color:rgba(255, 255, 255, 0.6)}taro-button-core[plain][disabled]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}taro-button-core[plain][disabled][type=primary]{border:1px solid rgba(0, 0, 0, 0.2);background-color:#f7f7f7;color:rgba(0, 0, 0, 0.3)}';export{n as taro_button_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,r,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(t){return function(e){return u([t,e])}}function u(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(a=s[0]&2?r["return"]:s[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,s[1])).done)return a;if(r=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=e.call(t,n)}catch(t){s=[6,t];r=0}finally{i=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-44cbb351.system.js"],(function(t){"use strict";var e,n,i,r,a;return{setters:[function(t){e=t.r;n=t.c;i=t.h;r=t.g;a=t.H}],execute:function(){var s="taro-movable-view-core{display:inline-block;position:absolute;left:0;top:0;width:10px;height:10px}";var o=undefined&&undefined.__awaiter||function(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function s(t){try{u(i.next(t))}catch(t){a(t)}}function o(t){try{u(i["throw"](t))}catch(t){a(t)}}function u(t){t.done?n(t.value):r(t.value).then(s,o)}u((i=i.apply(t,e||[])).next())}))};var u=t("taro_movable_view_core",function(){function t(t){var i=this;e(this,t);this.onChange=n(this,"change",7);this.onScale=n(this,"scale",7);this.onHTouchMove=n(this,"htouchmove",7);this.onVTouchMove=n(this,"vtouchmove",7);this.x=0;this.y=0;this.direction="none";this.outOfBounds=false;this.inertia=false;this.friction=2;this.damping=20;this.disabled=false;this.scale=false;this.scaleMin=.5;this.scaleMax=10;this.scaleValue=1;this.animation=true;this.translateX=0;this.translateY=0;this.origin={x:0,y:0};this.area={width:0,height:0};this.originScale=1;this.currentScale=1;this.width=0;this.height=0;this.minX=0;this.minY=0;this.maxX=0;this.maxY=0;this.baseX=0;this.baseY=0;this.offset={x:0,y:0};this.scaleOffset={x:0,y:0};this.getLimitXY=function(t,e){var n=false;t>i.maxX?(t=i.maxX,n=true):t<i.minX&&(t=i.minX,n=true);e>i.maxY?(e=i.maxY,n=true):e<i.minY&&(e=i.minY,n=true);return{x:t,y:e,outOfBounds:n}};this.animationTo=function(t,e,n,r,a,s,o){if(i.animation){i.setTransform(t,e,n,r,a,s);o===null||o===void 0?void 0:o()}else{i.setTransform(t,e,n,r,a,s)}};this.setTransform=function(t,e,n,r,a,s){t=Number(t.toFixed(1));e=Number(e.toFixed(1));n=Number((n!==null&&n!==void 0?n:i.currentScale).toFixed(3));if(!i.outOfBounds){var o=i.getLimitXY(t,e);t=o.x;e=o.y}var u=function(t,e){return+((1e3*t-1e3*e)/1e3).toFixed(1)};var c=u(t,i.scaleOffset.x);var l=u(e,i.scaleOffset.y);if(i.translateX!==t||i.translateY!==e){!a&&i.onChange.emit({x:c,y:l,source:r})}if(n!==i.currentScale){s&&i.onScale.emit({scale:n,x:c,y:l})}var h="translateX("+t+"px) translateY("+e+"px) translateZ(0px) scale("+n+")";i.element.style.transform=h;i.element.style.webkitTransform=h;i.translateX=t;i.translateY=e;i.currentScale=n};this.updateOffset=function(){var t=function(e,n){if(e===n||!e.offsetParent){return{left:0,top:0}}var i=t(e.offsetParent,n);return{left:e.offsetLeft+i.left,top:e.offsetTop+i.top}};if(!i.parent){return}var e=t(i.element,i.parent);i.offset.x=e.left;i.offset.y=e.top};this.updateScaleOffset=function(t){if(t===void 0){t=i.currentScale}var e=i.element.getBoundingClientRect();i.height=e.height/i.currentScale;i.width=e.width/i.currentScale;i.scaleOffset.x=(i.width*t-i.width)/2;i.scaleOffset.y=(i.height*t-i.height)/2};this.updateBoundary=function(){var t=0-i.offset.x+i.scaleOffset.x;var e=i.area.width-i.width-i.offset.x-i.scaleOffset.x;i.minX=Math.min(t,e);i.maxX=Math.max(t,e);var n=0-i.offset.y+i.scaleOffset.y;var r=i.area.height-i.height-i.offset.y-i.scaleOffset.y;i.minY=Math.min(n,r);i.maxY=Math.max(n,r)};this.updateScale=function(t,e,n){if(!i.scale){return}var r=i.adjustScale(t);i.updateScaleOffset(r);i.updateBoundary();var a=i.getLimitXY(i.translateX,i.translateY),s=a.x,o=a.y;if(e){i.animationTo(s,o,r,"",true,true,n)}else if(!i.updating){i.updating=true;requestAnimationFrame((function(){i.setTransform(s,o,r,"",true,true);i.updating=false}))}};this.setOriginScale=function(t){i.originScale=t};this.adjustScale=function(t){return Math.min(10,i.scaleMax,Math.max(.5,i.scaleMin,t))};this.handleTouchStart=function(t){var e=t.touches;if(i.disabled||e.length>1||!i.element){return}var n=e[0];i.touching=true;i.firstMoveFireEvent=false;i.origin.x=n.screenX;i.origin.y=n.screenY;i.baseX=i.translateX;i.baseY=i.translateY;i.element.style.willChange="transform"};this.handleTouchMove=function(t){var e=t.touches;if(i.disabled||!i.element||i.scaling||!i.touching||e.length>1){return}t.preventDefault();var n=e[0];var r=n.screenX-i.origin.x;var a=n.screenY-i.origin.y;i.setTransform(i.xMove?r+i.baseX:0,i.yMove?a+i.baseY:0);if(!i.firstMoveFireEvent){i.firstMoveFireEvent=true;var s=Math.abs(r)>Math.abs(a)?i.onHTouchMove:i.onVTouchMove;s.emit({originalEvent:t,bubbles:false,capturePhase:false,composed:true,extraFields:{touches:t.touches||{},changedTouches:t.changedTouches||{}}})}};this.handleTouchEnd=function(t){var e=t.changedTouches[0];if(i.disabled||!i.touching||!e){return}i.touching=false;var n=e.screenX-i.origin.x;var r=e.screenY-i.origin.y;i.setTransform(i.xMove?n+i.baseX:0,i.yMove?r+i.baseY:0)}}t.prototype.watchX=function(t){this.setTransform(parseFloat(""+(t||0)),this.translateY)};t.prototype.watchY=function(t){this.setTransform(this.translateX,parseFloat(""+(t||0)))};t.prototype.watchScaleMinOrMax=function(){if(!this.scale)return false;this.updateScale(this.currentScale,true);this.setOriginScale(this.currentScale)};t.prototype.watchScaleValue=function(t){if(!this.scale){return false}this.updateScale(t,true);this.setOriginScale(t);return t};t.prototype.setParent=function(t){var e=t.element,n=t.area;return o(this,void 0,void 0,(function(){var t;return __generator(this,(function(i){t=this.scale?this.scaleValue:1;this.area=n;this.parent=e;this.updateOffset();this.updateScaleOffset(t);this.updateBoundary();this.setTransform(Number(this.x)+this.scaleOffset.x,Number(this.y)+this.scaleOffset.y,t,"",true);this.setOriginScale(t);return[2]}))}))};t.prototype.endScale=function(){return o(this,void 0,void 0,(function(){return __generator(this,(function(t){this.scaling=false;this.setOriginScale(this.currentScale);return[2]}))}))};t.prototype.setScale=function(t){return o(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.scale){return[2]}this.scaling=true;this.updateScale(t*this.originScale);return[2]}))}))};t.prototype.connectedCallback=function(){var t=this;this.observer=new MutationObserver((function(e){e.forEach((function(e){var n=e.attributeName;if(n&&["class","style"].includes(n)){var i=e.oldValue;var r=e.target.getAttribute(n);if(i===r){return}var a=function(t){return t===null||t===void 0?void 0:t.split(";").filter((function(t){return!["transform","will-change"].find((function(e){return t.trim().startsWith(e)}))})).join(";")};if(n==="style"&&a(r)===a(i)){return}t.updateOffset();t.updateScaleOffset();t.updateBoundary();t.setTransform(t.translateX,t.translateY)}}))}));this.observer.observe(this.element,{attributes:true,attributeOldValue:true})};t.prototype.disconnectedCallback=function(){var t;(t=this.observer)===null||t===void 0?void 0:t.disconnect()};t.prototype.componentDidLoad=function(){this.element.style.transformOrigin="center";this.xMove=["horizontal","all"].includes(this.direction);this.yMove=["vertical","all"].includes(this.direction);if(this.friction<=0){this.friction=2}if(this.x||this.y){var t=parseFloat(""+(this.x||0));var e=parseFloat(""+(this.y||0));this.setTransform(t,e)}};t.prototype.render=function(){return i(a,{onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd})};Object.defineProperty(t.prototype,"element",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{x:["watchX"],y:["watchY"],scaleMin:["watchScaleMinOrMax"],scaleMax:["watchScaleMinOrMax"],scaleValue:["watchScaleValue"]}},enumerable:false,configurable:true});return t}());u.style=s}}}));
|