|
@@ -22,6 +22,8 @@ import 'swiper/css/pagination'
|
|
|
import 'swiper/css/scrollbar'
|
|
|
import { ElTabPane, ElTabs } from 'element-plus'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
+import { SubjectEnum, useSubjectId } from '@/helpers/hooks'
|
|
|
+import { useAsyncState, useLocalStorage } from '@vueuse/core'
|
|
|
export default defineComponent({
|
|
|
name: 'searchdetail',
|
|
|
components: {
|
|
@@ -32,6 +34,7 @@ export default defineComponent({
|
|
|
searchMusic
|
|
|
},
|
|
|
setup() {
|
|
|
+ const subjects: any = useSubjectId(SubjectEnum.SEARCH)
|
|
|
const state = reactive({
|
|
|
albumList: [],
|
|
|
musicList: [],
|
|
@@ -39,7 +42,7 @@ export default defineComponent({
|
|
|
searchs: {
|
|
|
albumTagIds: '',
|
|
|
search: '',
|
|
|
- subject: ''
|
|
|
+ subject: subjects.id || ''
|
|
|
}
|
|
|
})
|
|
|
const route = useRoute()
|
|
@@ -97,14 +100,12 @@ export default defineComponent({
|
|
|
watch(
|
|
|
() => state.chiose,
|
|
|
chiose => {
|
|
|
- console.log(chiose)
|
|
|
nextTick(() => {
|
|
|
search()
|
|
|
})
|
|
|
}
|
|
|
)
|
|
|
onMounted(() => {
|
|
|
- console.log(route.name)
|
|
|
if (route.params.search) {
|
|
|
state.searchs.search = route.params.search as string
|
|
|
}
|
|
@@ -140,6 +141,9 @@ export default defineComponent({
|
|
|
<searchInput
|
|
|
isWhile={true}
|
|
|
searchVal={{ ...this.searchs }}
|
|
|
+ onUpdate:searchVal={(val: any) => {
|
|
|
+ console.log(val, '1212')
|
|
|
+ }}
|
|
|
type="search"
|
|
|
onStartSearch={(val: any) => {
|
|
|
this.startSearch(val)
|