Skip to content

Commit

Permalink
fix(prebundle): 优化 vue3 与 prebundle 结合 (#12362)
Browse files Browse the repository at this point in the history
* fix(types): vue3 components types

* fix(prebundle): 优化提示 & 优化 js 加载配置

* fix(vue): prebundle add vue deps includes

* fix(types): 同步类型文件

* feat(types): support vue tpl fix #12090

* fix(ci): fix bot update lockfile

* Update index.ts

Co-authored-by: chenjiajian <798095202@qq.com>
  • Loading branch information
ZakaryCode and Chen-jj authored Sep 5, 2022
1 parent 8e23f27 commit 887c49a
Show file tree
Hide file tree
Showing 9 changed files with 304 additions and 158 deletions.
1 change: 0 additions & 1 deletion .github/workflows/dependabot-update-lockfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
version: 7
run_install: |
- recursive: true
args: [--lockfile-only]
- run: |
git config --global user.name github-actions[bot]
git config --global user.email github-actions[bot]@users.noreply.github.com
Expand Down
7 changes: 3 additions & 4 deletions packages/taro-components/h5/react/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ export const Textarea = reactifyWc('taro-textarea-core')
// 导航
export const FunctionalPageNavigator = reactifyWc('taro-functional-page-navigator-core')
export const Navigator = reactifyWc('taro-navigator-core')
export const NavigationBar = reactifyWc('taro-navigation-bar-core')

// 媒体组件
export const Audio = reactifyWc('taro-audio-core')
export const Camera = reactifyWc('taro-camera-core')
export const Image = reactifyWc('taro-image-core')
export const LivePlayer = reactifyWc('taro-live-player-core')
export const LivePusher = reactifyWc('taro-live-pusher-core')
export const Video = reactifyWc('taro-video-core')
export const VoipRoom = reactifyWc('taro-voip-room-core')

Expand All @@ -59,14 +61,11 @@ export const Map = reactifyWc('taro-map-core')
export const Canvas = reactifyWc('taro-canvas-core')

// 开放能力
export const WebView = reactifyWc('taro-web-view-core')
export const Ad = reactifyWc('taro-ad-core')
export const AdCustom = reactifyWc('taro-ad-custom-core')
export const OfficialAccount = reactifyWc('taro-official-account-core')
export const OpenData = reactifyWc('taro-open-data-core')

// 导航栏
export const NavigationBar = reactifyWc('taro-navigation-bar-core')
export const WebView = reactifyWc('taro-web-view-core')

// 页面属性配置节点
export const PageMeta = reactifyWc('taro-page-meta-core')
Expand Down
9 changes: 4 additions & 5 deletions packages/taro-components/types/Map.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ interface MapProps extends StandardProps {
*/
latitude: number

/** 缩放级别,取值范围为3-20
/** 缩放级别,取值范围为 3-20
* @default 16
* @supported weapp, swan, alipay, tt
* @swan 取值范围为4-21
* @alipay 取值范围为5-18
*/
scale?: number
/** 最小缩放级别3-20
/** 最小缩放级别 3-20
* @default 3
* @supported weapp, tt
*/
minScale?: number
/** 最大缩放级别3-20
* (备注: 字节小程序最大缩放级别 3-19)
* @default 20 (字节小程序默认为19)
/** 最大缩放级别 3-20
* @default 20
* @supported weapp, tt
*/
maxScale?: number
Expand Down
3 changes: 2 additions & 1 deletion packages/taro-components/types/RootPortal.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { ComponentType } from 'react'
/** root-portal
* 使整个子树从页面中脱离出来,类似于在 CSS 中使用 fixed position 的效果。主要用于制作弹窗、弹出层等。
* @see https://developers.weixin.qq.com/miniprogram/dev/component/root-portal.html
* @classification viewContainer
* @supported weapp
* @example
* @example_react
* ```tsx
* import { useState } from 'react'
* import { RootPortal, View, Button } from '@tarojs/components'
Expand Down
17 changes: 12 additions & 5 deletions packages/taro-components/types/Video.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,6 @@ interface VideoProps extends StandardProps {
onEnded?: CommonEventFunction

/** 播放进度变化时触发, 触发频率 250ms 一次
*
* event.detail = {currentTime, duration}
* @supported weapp, h5, swan, alipay, tt, rn
*/
onTimeUpdate?: CommonEventFunction<VideoProps.onTimeUpdateEventDetail>
Expand All @@ -266,13 +264,13 @@ interface VideoProps extends StandardProps {
*/
onProgress?: CommonEventFunction<VideoProps.onProgressEventDetail>

/** 视频元数据加载完成时触发。event.detail = {width, height, duration}
/** 视频元数据加载完成时触发
* @supported weapp, rn, tt
*/
onLoadedMetaData?: CommonEventFunction
onLoadedMetaData?: CommonEventFunction<VideoProps.onLoadedMetaDataEventDetail>

/**
* 切换 controls 显示隐藏时触发。event.detail = {show}
* 切换 controls 显示隐藏时触发
* @supported weapp
*/
onControlsToggle?: CommonEventFunction<VideoProps.onControlsToggleEventDetail>
Expand Down Expand Up @@ -351,6 +349,15 @@ declare namespace VideoProps {
buffered: number
}

interface onLoadedMetaDataEventDetail {
/** 视频宽度 */
width: number
/** 视频高度 */
height: number
/** 持续时间 */
duration: number
}

interface onControlsToggleEventDetail {
/** 是否显示 */
show: boolean
Expand Down
Loading

0 comments on commit 887c49a

Please sign in to comment.