uniapp使用抖音微信自定义组件

tt.vue中使用video-player组件

用到的目录如下:

uniapp使用抖音微信自定义组件_第1张图片

pages.json

uniapp使用抖音微信自定义组件_第2张图片

{
			"path": "pages/Tabbar/tt/tt",
			"style": {
				"navigationBarTitleText": "",
				"enablePullDownRefresh": false,
				// 使用自定义组件
				"usingComponents": {
					"video-player-dy": "/ttcomponents/videoPlayer/index"
				}
			}
		}

tt.vue

uniapp使用抖音微信自定义组件_第3张图片

index.json

uniapp使用抖音微信自定义组件_第4张图片

{
  "component": true,
  "usingComponents": {
	  "video-player":"ext://industry/video-player"
  }
}

index.ttml

index.js

uniapp使用抖音微信自定义组件_第5张图片

Component({
	

	methods: {
		
	},
});

你可能感兴趣的:(uni-app)