mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
59 lines
1.5 KiB
Vue
59 lines
1.5 KiB
Vue
<template>
|
|
<div>
|
|
<div class="custom-black-list-extra-options">
|
|
<VButton ref="button" @mouseover="loadNameBlackListSettings()" @click="toggleNameSettings()">
|
|
精确匹配列表<VIcon icon="right-arrow" :size="16"></VIcon>
|
|
</VButton>
|
|
</div>
|
|
<div class="custom-black-list-extra-options">
|
|
<VButton @mouseover="loadRegexBlackListSettings()" @click="toggleRegexSettings()">
|
|
正则匹配列表<VIcon icon="right-arrow" :size="16"></VIcon>
|
|
</VButton>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script lang="ts">
|
|
import { VIcon, VButton } from '@/ui'
|
|
import {
|
|
loadNameSettings,
|
|
loadRegexSettings,
|
|
setNameProps,
|
|
setRegexProps,
|
|
toggleNameSettings,
|
|
toggleRegexSettings,
|
|
} from './vm'
|
|
|
|
export default Vue.extend({
|
|
components: {
|
|
VIcon,
|
|
VButton,
|
|
},
|
|
methods: {
|
|
async loadNameBlackListSettings() {
|
|
const isFirstLoad = await loadNameSettings()
|
|
if (isFirstLoad) {
|
|
const triggerButton = this.$refs.button.$el as HTMLElement
|
|
setNameProps(triggerButton)
|
|
}
|
|
},
|
|
toggleNameSettings,
|
|
async loadRegexBlackListSettings() {
|
|
const isFirstLoad = await loadRegexSettings()
|
|
if (isFirstLoad) {
|
|
const triggerButton = this.$refs.button.$el as HTMLElement
|
|
setRegexProps(triggerButton)
|
|
}
|
|
},
|
|
toggleRegexSettings,
|
|
},
|
|
})
|
|
</script>
|
|
<style lang="scss">
|
|
.custom-black-list-extra-options {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
margin-bottom: 20px;
|
|
}
|
|
</style>
|