@tarojs/components 3.6.9-alpha.7 → 3.6.9

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.
@@ -22,9 +22,4 @@ components.forEach(params => {
22
22
  }
23
23
  }
24
24
  });
25
- Vue.config.ignoredElements = [
26
- 'root',
27
- 'block',
28
- /^taro-/
29
- ];
30
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../taro-components-library-vue2/src/component-lib/index.ts"],"sourcesContent":["import Vue from 'vue'\n\nimport components from './components'\nimport createComponent from './createComponent'\nimport createFormsComponent from './createFormsComponent'\n\ncomponents.forEach(params => {\n if (typeof params === 'string') {\n Vue.component(params, createComponent(params))\n } else if (params instanceof Array) {\n const [name, props] = params as [string, Record<string, any>]\n const { classNames, type = 'simple' } = props\n\n if (type === 'simple') {\n Vue.component(name, createComponent(name, classNames))\n } else if (type === 'forms') {\n const { event, modelValue } = props\n Vue.component(name, createFormsComponent(name, event, modelValue, classNames))\n } else if (type === 'component') {\n Vue.component(name, props.component)\n }\n }\n})\n\nVue.config.ignoredElements = [\n 'root',\n 'block',\n /^taro-/\n]\n"],"names":[],"mappings":";;;;;AAMA,UAAU,CAAC,OAAO,CAAC,MAAM,IAAG;AAC1B,IAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA;AAC/C,KAAA;SAAM,IAAI,MAAM,YAAY,KAAK,EAAE;AAClC,QAAA,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAuC,CAAA;QAC7D,MAAM,EAAE,UAAU,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAA;QAE7C,IAAI,IAAI,KAAK,QAAQ,EAAE;AACrB,YAAA,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAA;AACvD,SAAA;aAAM,IAAI,IAAI,KAAK,OAAO,EAAE;AAC3B,YAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;AACnC,YAAA,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAA;AAC/E,SAAA;aAAM,IAAI,IAAI,KAAK,WAAW,EAAE;YAC/B,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;AACrC,SAAA;AACF,KAAA;AACH,CAAC,CAAC,CAAA;AAEF,GAAG,CAAC,MAAM,CAAC,eAAe,GAAG;IAC3B,MAAM;IACN,OAAO;IACP,QAAQ;CACT"}
1
+ {"version":3,"file":"index.js","sources":["../../../../taro-components-library-vue2/src/component-lib/index.ts"],"sourcesContent":["import Vue from 'vue'\n\nimport components from './components'\nimport createComponent from './createComponent'\nimport createFormsComponent from './createFormsComponent'\n\ncomponents.forEach(params => {\n if (typeof params === 'string') {\n Vue.component(params, createComponent(params))\n } else if (params instanceof Array) {\n const [name, props] = params as [string, Record<string, any>]\n const { classNames, type = 'simple' } = props\n\n if (type === 'simple') {\n Vue.component(name, createComponent(name, classNames))\n } else if (type === 'forms') {\n const { event, modelValue } = props\n Vue.component(name, createFormsComponent(name, event, modelValue, classNames))\n } else if (type === 'component') {\n Vue.component(name, props.component)\n }\n }\n})\n"],"names":[],"mappings":";;;;;AAMA,UAAU,CAAC,OAAO,CAAC,MAAM,IAAG;AAC1B,IAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA;AAC/C,KAAA;SAAM,IAAI,MAAM,YAAY,KAAK,EAAE;AAClC,QAAA,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAuC,CAAA;QAC7D,MAAM,EAAE,UAAU,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAA;QAE7C,IAAI,IAAI,KAAK,QAAQ,EAAE;AACrB,YAAA,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAA;AACvD,SAAA;aAAM,IAAI,IAAI,KAAK,OAAO,EAAE;AAC3B,YAAA,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;AACnC,YAAA,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,oBAAoB,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAA;AAC/E,SAAA;aAAM,IAAI,IAAI,KAAK,WAAW,EAAE;YAC/B,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAA;AACrC,SAAA;AACF,KAAA;AACH,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/components",
3
- "version": "3.6.9-alpha.7",
3
+ "version": "3.6.9",
4
4
  "description": "Taro 组件库",
5
5
  "browser": "dist/index.js",
6
6
  "main:h5": "dist/index.js",
@@ -37,9 +37,9 @@
37
37
  "resolve-pathname": "^3.0.0",
38
38
  "swiper": "6.8.0",
39
39
  "weui": "^1.1.2",
40
- "@tarojs/components-advanced": "3.6.9-alpha.7",
41
- "@tarojs/router": "3.6.9-alpha.7",
42
- "@tarojs/taro": "3.6.9-alpha.7"
40
+ "@tarojs/components-advanced": "3.6.9",
41
+ "@tarojs/router": "3.6.9",
42
+ "@tarojs/taro": "3.6.9"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@babel/generator": "^7.20.0",
package/types/Button.d.ts CHANGED
@@ -189,6 +189,11 @@ interface ButtonProps extends StandardProps {
189
189
  * @supported weapp, alipay, swan, tt, jd
190
190
  */
191
191
  onGetPhoneNumber?: CommonEventFunction<ButtonProps.onGetPhoneNumberEventDetail>
192
+ /**
193
+ * 手机号实时验证回调,`open-type="getRealtimePhoneNumber"` 时有效
194
+ * @supported weapp
195
+ */
196
+ onGetRealTimePhoneNumber?: CommonEventFunction<ButtonProps.onGetRealTimePhoneNumberEventDetail>
192
197
  /** 当使用开放能力时,发生错误的回调
193
198
  *
194
199
  * 生效时机:`open-type="launchApp"`
@@ -213,6 +218,11 @@ interface ButtonProps extends StandardProps {
213
218
  * @supported weapp
214
219
  */
215
220
  onChooseAvatar?: CommonEventFunction
221
+ /**
222
+ * 用户同意隐私协议事件回调,`open-type="agreePrivacyAuthorization"`时有效
223
+ * @supported weapp
224
+ */
225
+ onAgreePrivacyAuthorization?: CommonEventFunction
216
226
  /** 点击。
217
227
  * 说明: 每点击一次会触发一次事件,建议自行使用代码防止重复点击,可以使用 js 防抖和节流实现。
218
228
  * @supported alipay
@@ -293,6 +303,11 @@ declare namespace ButtonProps {
293
303
  * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getPhoneNumber.html
294
304
  */
295
305
  getPhoneNumber
306
+ /**
307
+ * 手机号实时验证,向用户申请,并在用户同意后,快速填写和实时验证手机号。(*小程序插件中不能使用*)
308
+ * @see https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/getRealtimePhoneNumber.html
309
+ */
310
+ getRealtimePhoneNumber
296
311
  /** 获取用户信息,可以从回调中获取到用户信息 */
297
312
  getUserInfo
298
313
  /** 打开APP,可以通过 app-parameter 属性设定向APP传的参数
@@ -305,6 +320,10 @@ declare namespace ButtonProps {
305
320
  feedback
306
321
  /** 获取用户头像,可以从回调中获得具体信息 */
307
322
  chooseAvatar
323
+ /**
324
+ * 用户同意隐私协议按钮。可通过 bindagreeprivacyauthorization 监听用户同意隐私协议事件
325
+ */
326
+ agreePrivacyAuthorization
308
327
  }
309
328
  /** 支付宝小程序专属的 open-type 合法值
310
329
  * @see https://opendocs.alipay.com/mini/component/button
@@ -426,6 +445,9 @@ declare namespace ButtonProps {
426
445
  */
427
446
  sign: string
428
447
  }
448
+ interface onGetRealTimePhoneNumberEventDetail {
449
+ code: string
450
+ }
429
451
  interface onOpenSettingEventDetail {
430
452
  /* 打开授权设置页的调用状态 */
431
453
  errMsg: string
@@ -18,9 +18,9 @@ import { AdCustomProps } from './AdCustom'
18
18
  import { AudioProps } from './Audio'
19
19
  import { ButtonProps } from './Button'
20
20
  import { CameraProps } from './Camera'
21
+ import { CanvasProps } from './Canvas'
21
22
  import { ChannelLiveProps } from './ChannelLive'
22
23
  import { ChannelVideoProps } from './ChannelVideo'
23
- import { CanvasProps } from './Canvas'
24
24
  import { CheckboxProps } from './Checkbox'
25
25
  import { CheckboxGroupProps } from './CheckboxGroup'
26
26
  import { StandardProps } from './common'
@@ -30,17 +30,20 @@ import { CustomWrapperProps } from './CustomWrapper'
30
30
  import { EditorProps } from './Editor'
31
31
  import { FormProps } from './Form'
32
32
  import { FunctionalPageNavigatorProps } from './FunctionalPageNavigator'
33
+ import { GridViewProps } from './GridView'
33
34
  import { IconProps } from './Icon'
34
35
  import { ImageProps } from './Image'
35
36
  import { InputProps } from './Input'
36
37
  import { KeyboardAccessoryProps } from './KeyboardAccessory'
37
38
  import { LabelProps } from './Label'
39
+ import { ListViewProps } from './ListView'
38
40
  import { LivePlayerProps } from './LivePlayer'
39
41
  import { LivePusherProps } from './LivePusher'
40
42
  import { MapProps } from './Map'
41
43
  import { MatchMediaProps } from './MatchMedia'
42
44
  import { MovableAreaProps } from './MovableArea'
43
45
  import { MovableViewProps } from './MovableView'
46
+ import { NativeSlotProps } from './NativeSlot'
44
47
  import { NavigationBarProps } from './NavigationBar'
45
48
  import { NavigatorProps } from './Navigator'
46
49
  import { OfficialAccountProps } from './OfficialAccount'
@@ -52,14 +55,18 @@ import {
52
55
  PickerRegionProps, PickerSelectorProps, PickerTimeProps
53
56
  } from './Picker'
54
57
  import { PickerViewProps } from './PickerView'
58
+ import { PickerViewColumnProps } from './PickerViewColumn'
55
59
  import { ProgressProps } from './Progress'
56
60
  import { RadioProps } from './Radio'
57
61
  import { RadioGroupProps } from './RadioGroup'
58
62
  import { RichTextProps } from './RichText'
63
+ import { RootPortalProps } from './RootPortal'
59
64
  import { ScrollViewProps } from './ScrollView'
60
65
  import { ShareElementProps } from './ShareElement'
61
66
  import { SliderProps } from './Slider'
62
67
  import { SlotProps } from './Slot'
68
+ import { StickyHeaderProps } from './StickyHeader'
69
+ import { StickySectionProps } from './StickySection'
63
70
  import { SwiperProps } from './Swiper'
64
71
  import { SwiperItemProps } from './SwiperItem'
65
72
  import { SwitchProps } from './Switch'
@@ -69,16 +76,18 @@ import { VideoProps } from './Video'
69
76
  import { ViewProps } from './View'
70
77
  import { VoipRoomProps } from './VoipRoom'
71
78
  import { WebViewProps } from './WebView'
72
- import { RootPortalProps } from './RootPortal'
73
- import { PickerViewColumnProps } from './PickerViewColumn'
74
- import { NativeSlotProps } from './NativeSlot'
75
- import { GridViewProps } from './GridView'
76
- import { ListViewProps } from './ListView'
77
- import { StickyHeaderProps } from './StickyHeader'
78
- import { StickySectionProps } from './StickySection'
79
+
80
+ /** 因为react的事件是CamelCase而vue得是Camelcase, 所以需要转换 */
81
+ type OnCamelCaseToOnCamelcase<T extends string> = T extends `on${infer Rest}`
82
+ ? `on${Capitalize<Lowercase<Rest>>}`
83
+ : T;
84
+
85
+ type TransformCamelCase<T extends Record<string, any>> = {
86
+ [key in keyof T as OnCamelCaseToOnCamelcase<key>]: T[key]
87
+ }
79
88
 
80
89
  /** 联合类型不能用omit(比如picker) */
81
- type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never
90
+ type DistributiveOmit<T, K extends keyof T> = T extends unknown ? TransformCamelCase<Omit<T, K>> : never
82
91
 
83
92
  interface SlimProps {
84
93
  class?: any