File tree Expand file tree Collapse file tree 7 files changed +28
-4
lines changed Expand file tree Collapse file tree 7 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ sidebar_label: request
4949| referrerStrategy | `keyof ReferrerStrategy` | `"querystring"` | 否 | referer 策略,用于控制当前请求 header 对象中 referer 字段格式。该参数默认值可通过 app.json 中的配置进行修改。<br />API 支持度: alipay 支付宝: 10.3.50+ APPX: 2.8.7 开发者工具: 3.5.1<br />[参考地址](https://opendocs.alipay.com/mini/api/owycmh#referrerStrategy%20%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E) |
5050| success | `(result: SuccessCallbackResult<T >) => void` | | 否 | 接口调用成功的回调函数 |
5151| fail | `(res: TaroGeneral.CallbackResult) => void` | | 否 | 接口调用失败的回调函数 |
52- | complete | `(res: TaroGeneral.CallbackResult ) => void` | | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
52+ | complete | `(res: any ) => void` | | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
5353| jsonp | string or boolean | `false` | 否 | 设置是否使用 jsonp 方式获取数据<br />API 支持度: h5 |
5454| jsonpCache | `RequestCache` | | 否 | 设置 jsonp 请求 url 是否需要被缓存<br />API 支持度: h5 |
5555| mode | `keyof CorsMode` | `"same-origin"` | 否 | 设置是否允许跨域请求<br />API 支持度: h5 |
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ export default class PageView extends Component {
242242| VideoProps.onPause | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ |
243243| VideoProps.onEnded | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ |
244244| VideoProps.onTimeUpdate | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ |
245- | VideoProps.onFullscreenChange | | | ✔️ | | | | ✔️ | ✔️ | | ✔️ |
245+ | VideoProps.onFullscreenChange | | | | | | | ✔️ | ✔️ | | ✔️ |
246246| VideoProps.onWaiting | ✔️ | ✔️ | | ✔️ | ✔️ | ✔️ | | | | |
247247| VideoProps.onError | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | ✔️ |
248248| VideoProps.onProgress | ✔️ | | | ✔️ | ✔️ | | ✔️ | | | ✔️ |
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ interface VideoProps extends StandardProps {
315315 onTimeUpdate ?: CommonEventFunction < VideoProps . onTimeUpdateEventDetail >
316316 /** 当视频进入和退出全屏时触发
317317 *
318- * @supported alipay, h5, rn, harmony_hybrid
318+ * @supported h5, rn, harmony_hybrid
319319 */
320320 onFullscreenChange ?: CommonEventFunction < VideoProps . onFullscreenChangeEventDetail >
321321 /** 视频出现缓冲时触发
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ declare module '../../index' {
7878 /** 接口调用失败的回调函数 */
7979 fail ?: ( res : TaroGeneral . CallbackResult ) => void
8080 /** 接口调用结束的回调函数(调用成功、失败都会执行) */
81- complete ?: ( res : TaroGeneral . CallbackResult ) => void
81+ complete ?: ( res : Partial < SuccessCallbackResult > & TaroGeneral . CallbackResult ) => void
8282 /** 设置是否使用 jsonp 方式获取数据
8383 * @default false
8484 * @supported h5
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ export interface IH5RouterConfig {
1414 lazyload ?: boolean | ( ( pagename : string ) => boolean )
1515 renamePagename ?: ( pagename : string ) => string
1616 forcePath ?: string
17+ /** 加上这个参数,可以解决返回页面的时候白屏的问题,但是某些不支持 :has() 选择器的浏览器会有问题 */
18+ enhanceAnimation ?: boolean
1719}
1820
1921export interface IH5Config {
Original file line number Diff line number Diff line change 11export * from './h5'
22export * from './mini'
3+ export * from './rn'
34
45export * from './manifest'
56export * from './project'
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import type Webpack from 'webpack'
22import type Chain from 'webpack-chain'
33import type webpackDevServer from 'webpack-dev-server'
44import type HtmlWebpackPlugin from 'html-webpack-plugin'
5+ import type { RollupOptions } from 'rollup'
56import type { IOption , IPostcssOption } from './util'
67
78export interface IRNConfig {
@@ -61,4 +62,24 @@ export interface IRNConfig {
6162
6263 /** 设计稿尺寸换算规则 */
6364 deviceRatio ?: TaroGeneral . TDeviceRatio
65+
66+ /** 原生组件编译配置 */
67+ nativeComponents ?: {
68+ /**
69+ * 外部依赖
70+ */
71+ external ?: Array < string | RegExp > | ( ( arr : Array < string | RegExp > ) => Array < string | RegExp > )
72+ /**
73+ * 设置外部依赖,如果返回 string, 则将该值作为 external, 我们默认将 node_modules 路径下的文件设置为外部依赖
74+ */
75+ exteranlResolve ?: ( importee : string , importer : string ) => string
76+ /**
77+ * 组件输出路径,默认值为 'dist'
78+ */
79+ output ?: string
80+ /**
81+ * 修改 Rollup 打包配置
82+ */
83+ modifyRollupConfig ?: ( config : RollupOptions , innerPlugins : { taroResolver : typeof taroResolver , styleTransformer : typeof styleTransformer } ) => RollupOptions
84+ }
6485}
You can’t perform that action at this time.
0 commit comments