mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-25 16:11:20 -08:00
add danmuku style
This commit is contained in:
1 parent
c9e8d891e1
commit
13ffb722a1
7 files changed
+42
-12
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>{{ test }}</div>
|
||||
<div class="artplayer-plugin-danmuku">{{ test }}</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.option = this.$danmuku.option;
|
||||
this.option = Object.assign(this.option, this.$danmuku.option);
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -1,6 +1,16 @@
|
||||
import style from 'bundle-text:./style.less';
|
||||
import { createApp } from 'vue';
|
||||
import App from './App.vue';
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
if (!document.getElementById('artplayer-plugin-danmuku-style')) {
|
||||
const $style = document.createElement('style');
|
||||
$style.id = 'artplayer-plugin-danmuku-style';
|
||||
$style.textContent = style;
|
||||
document.head.appendChild($style);
|
||||
}
|
||||
}
|
||||
|
||||
export default class Control {
|
||||
constructor(art, danmuku) {
|
||||
this.art = art;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
.artplayer-plugin-danmuku {
|
||||
position: relative;
|
||||
}
|
||||
@@ -223,10 +223,12 @@ Artplayer.FAST_FORWARD_VALUE = 3;
|
||||
Artplayer.FAST_FORWARD_TIME = 1000;
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
const $style = document.createElement('style');
|
||||
$style.dataset.from = 'artplayer';
|
||||
$style.textContent = style;
|
||||
document.head.appendChild($style);
|
||||
if (!document.getElementById('artplayer-style')) {
|
||||
const $style = document.createElement('style');
|
||||
$style.id = 'artplayer-style';
|
||||
$style.textContent = style;
|
||||
document.head.appendChild($style);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
|
||||
Reference in new issue
Block a user