mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
fix: update type annotations for art and container in Player.vue
fix: remove beta version entry from changelog fix: simplify i18n import in CHANGELOG.md
This commit is contained in:
1 parent
92ff80d285
commit
eb015c7fac
2 files changed
+18
-6
No files matched your search
+14
-2
@@ -6,8 +6,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## [5.3.0-beta.0] - 2025-09-03
|
|
||||||
|
|
||||||
- Rename `.esm.js` to `.mjs`
|
- Rename `.esm.js` to `.mjs`
|
||||||
- Remove the default `fill` color value of `svg`
|
- Remove the default `fill` color value of `svg`
|
||||||
- Optimize the `autoOrientation` logic
|
- Optimize the `autoOrientation` logic
|
||||||
@@ -25,6 +23,20 @@ const option: Option = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- Simplify `i18n` import
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import fr from 'artplayer/i18n/fr'
|
||||||
|
import id from 'artplayer/i18n/id'
|
||||||
|
|
||||||
|
const option = {
|
||||||
|
container: '.artplayer-app',
|
||||||
|
url: './assets/sample/video.mp4',
|
||||||
|
i18n: { id, fr },
|
||||||
|
lang: 'fr',
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
## [5.2.5] - 2025-08-01
|
## [5.2.5] - 2025-08-01
|
||||||
|
|
||||||
- Add `ESM` version for all packages, such as `artplayer/dist/artplayer.esm.js`
|
- Add `ESM` version for all packages, such as `artplayer/dist/artplayer.esm.js`
|
||||||
|
|||||||
@@ -15,14 +15,14 @@ import artplayerPluginDanmuku from 'artplayer-plugin-danmuku'
|
|||||||
const props = defineProps<{ option: Partial<Option> }>()
|
const props = defineProps<{ option: Partial<Option> }>()
|
||||||
const emit = defineEmits(['getInstance'])
|
const emit = defineEmits(['getInstance'])
|
||||||
|
|
||||||
const art = shallowRef<Artplayer>(null)
|
const art = shallowRef<Artplayer | null>(null)
|
||||||
const $container = ref(null)
|
const $container = ref<HTMLDivElement | null>(null)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
art.value = new Artplayer({
|
art.value = new Artplayer({
|
||||||
...props.option,
|
...props.option,
|
||||||
url: props.option.url,
|
url: props.option.url as string,
|
||||||
container: $container.value,
|
container: $container.value as HTMLDivElement,
|
||||||
i18n: { id, fr },
|
i18n: { id, fr },
|
||||||
lang: 'fr',
|
lang: 'fr',
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|||||||
Reference in new issue
Block a user