mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
39 lines
901 B
Vue
39 lines
901 B
Vue
<template>
|
|
<DefaultWidget
|
|
name="记录弹幕"
|
|
icon="mdi-record-rec"
|
|
class="record-live-danmaku"
|
|
@click="startRecord()"
|
|
></DefaultWidget>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { DefaultWidget } from '@/ui'
|
|
|
|
let recorderVM: Vue & { opened: boolean }
|
|
export default Vue.extend({
|
|
components: {
|
|
DefaultWidget,
|
|
},
|
|
methods: {
|
|
async startRecord() {
|
|
if (dq('.live-danmaku-recorder')) {
|
|
recorderVM.opened = !recorderVM.opened
|
|
} else {
|
|
const DanmakuRecorder = await import('./DanmakuRecorder.vue')
|
|
const { mountVueComponent } = await import('@/core/utils')
|
|
recorderVM = mountVueComponent(DanmakuRecorder)
|
|
document.body.insertAdjacentElement('beforeend', recorderVM.$el)
|
|
recorderVM.opened = true
|
|
}
|
|
},
|
|
},
|
|
})
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.record-live-danmaku .be-icon {
|
|
transform: scale(1.2);
|
|
}
|
|
</style>
|