mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-28 18:41:20 -08:00
chore: Update Artplayer option type imports and usage
This commit is contained in:
1 parent
ab109a1acd
commit
8366b0673a
4 files changed
+20
-10
No files matched your search
@@ -251,13 +251,12 @@ art.current = new Artplayer();
|
||||
|
||||
### Option
|
||||
|
||||
you can also separately import the type for options
|
||||
You can also use the option type
|
||||
|
||||
```ts{2,4}
|
||||
```ts{3}
|
||||
import Artplayer from 'artplayer';
|
||||
import { type Option } from 'artplayer/types/option';
|
||||
|
||||
const option: Option = {
|
||||
const option: Artplayer['Option'] = {
|
||||
container: '.artplayer-app',
|
||||
url: './assets/sample/video.mp4',
|
||||
};
|
||||
|
||||
@@ -254,13 +254,12 @@ art.current = new Artplayer();
|
||||
|
||||
### Option
|
||||
|
||||
你也可以单独导入选项的类型
|
||||
你也可以使用选项的类型
|
||||
|
||||
```ts{2,4}
|
||||
```ts{3}
|
||||
import Artplayer from 'artplayer';
|
||||
import { type Option } from 'artplayer/types/option';
|
||||
|
||||
const option: Option = {
|
||||
const option: Artplayer['Option'] = {
|
||||
container: '.artplayer-app',
|
||||
url: './assets/sample/video.mp4',
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user