mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-05-05 18:34:50 +08:00
调整搜索配置
This commit is contained in:
@@ -150,7 +150,9 @@
|
||||
prop="name"
|
||||
label="片名">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<el-table-column v-if="searchGroup !== '站内'"
|
||||
sortable
|
||||
:sort-method="(a , b) => sortByLocaleCompare(a.site.name, b.site.name)"
|
||||
prop="site"
|
||||
label="源站"
|
||||
width="120">
|
||||
@@ -204,7 +206,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations } from 'vuex'
|
||||
import { star, history, search, sites } from '../lib/dexie'
|
||||
import { star, history, search, sites, setting } from '../lib/dexie'
|
||||
import zy from '../lib/site/tools'
|
||||
import Waterfall from 'vue-waterfall-plugin'
|
||||
import InfiniteLoading from 'vue-infinite-loading'
|
||||
@@ -560,8 +562,12 @@ export default {
|
||||
},
|
||||
searchEvent () {
|
||||
const wd = this.searchTxt
|
||||
this.setting.searchAllSites = this.searchGroup === '全部'
|
||||
if (this.setting.searchAllSites) {
|
||||
if (this.setting.searchGroup !== this.searchGroup) {
|
||||
this.setting.searchGroup = this.searchGroup
|
||||
setting.update(this.setting)
|
||||
}
|
||||
if (!wd) return
|
||||
if (this.searchGroup === '全部') {
|
||||
this.searchAllSitesEvent(this.sites, wd)
|
||||
} else {
|
||||
this.searchSingleSiteEvent(this.site, wd)
|
||||
@@ -643,9 +649,12 @@ export default {
|
||||
this.selectedSiteName = this.sites[0].name
|
||||
}
|
||||
}
|
||||
this.searchGroups = [...new Set(this.sites.map(site => site.group))]
|
||||
this.searchGroups.unshift('站内')
|
||||
this.searchGroups.push('全部')
|
||||
this.searchGroup = this.setting.searchGroup
|
||||
if (this.searchGroup === undefined) setting.find().then(res => { this.searchGroup = res.searchGroup })
|
||||
})
|
||||
this.searchGroups = ['站内', '全部']
|
||||
this.searchGroup = this.setting.searchAllSites ? '全部' : '站内'
|
||||
}
|
||||
},
|
||||
created () {
|
||||
|
||||
@@ -243,6 +243,10 @@ export default {
|
||||
this.setting = this.d
|
||||
setting.update(this.d)
|
||||
},
|
||||
toggleExcludeR18Films () {
|
||||
this.d.excludeR18Films = !this.d.excludeR18Films
|
||||
this.updateSettingEvent()
|
||||
},
|
||||
toggleExcludeRootClasses () {
|
||||
this.d.excludeRootClasses = !this.d.excludeRootClasses
|
||||
this.updateSettingEvent()
|
||||
@@ -450,11 +454,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
.search{
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.site{
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
|
||||
@@ -6,7 +6,7 @@ const db = new Dexie('zy')
|
||||
db.version(4).stores({
|
||||
search: '++id, keywords',
|
||||
iptvSearch: '++id, keywords',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommendationViewMode, historyViewMode, password',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, searchGroup, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommandationViewMode, password',
|
||||
shortcut: 'name, key, desc',
|
||||
star: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
recommendation: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
|
||||
@@ -5,6 +5,7 @@ const setting = [
|
||||
shortcut: true,
|
||||
view: 'picture',
|
||||
externalPlayer: '',
|
||||
searchGroup: '站内',
|
||||
excludeRootClasses: true,
|
||||
excludeR18Films: true,
|
||||
forwardTimeInSec: 5,
|
||||
|
||||
Reference in New Issue
Block a user