Skip to content

Commit

Permalink
style: remove fullScreen component
Browse files Browse the repository at this point in the history
  • Loading branch information
hq001 committed Nov 12, 2020
1 parent 4c60cc4 commit bebec1d
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 25 deletions.
7 changes: 2 additions & 5 deletions src/app/app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { defineComponent, toRefs } from 'vue'
import { defineComponent } from 'vue'
import { ErrorBoundary } from '@/components/error-boundary/index'
import { Container } from '@/layout/container'
import { FullScreen } from '@/components/full-screen'
import { useRoute } from '@/hooks'

import '@/theme/index'
import './app.less'
Expand All @@ -11,10 +9,9 @@ import './app.less'
export default defineComponent({
name: 'APP',
setup() {
const { meta } = toRefs(useRoute())
return () => (
<ErrorBoundary ref="ErrorBoundary">
{meta.value.full ? <FullScreen></FullScreen> : <Container></Container>}
<Container />
</ErrorBoundary>
)
}
Expand Down
7 changes: 0 additions & 7 deletions src/components/full-screen/index.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/iconfont/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ import $script from 'scriptjs'
import { noop } from '@/utils/index'

// repair electron packaging '//' protocol problem
$script('https://at.alicdn.com/t/font_2132275_jbky0lkgftf.js', noop)
$script('https://at.alicdn.com/t/font_2132275_qly69ylkk2.js', noop)
6 changes: 3 additions & 3 deletions src/layout/container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ export const Container = defineComponent({
}
)}
>
<Header ref={target}></Header>
<Main></Main>
<Footer></Footer>
<Header ref={target} />
<Main />
<Footer />
</div>
)
}
Expand Down
3 changes: 3 additions & 0 deletions src/pages/404/view/index.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.not-found {
text-align: center;
}
18 changes: 18 additions & 0 deletions src/pages/404/view/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { defineComponent } from 'vue'
import './index.less'

export const $404 = defineComponent({
name: '$404',
setup() {
return () => (
<div class="not-found">
<icon icon="not-found" size={480} color="var(--base-color)"></icon>
<div>
<router-link to="/music/recommend" replace>
去听会歌
</router-link>
</div>
</div>
)
}
})
2 changes: 1 addition & 1 deletion src/pages/footer/component/lyrice/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
onBeforeUnmount
} from 'vue'
import { on, off } from '@/utils/index'
import { uesModuleStore } from '@/hooks/index'
import { uesModuleStore, useRoute } from '@/hooks/index'
import { TeleportToAny } from '@/components/teleport-layout/index'
import {
NAMESPACED as LayoutNamespace,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/footer/view/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import './index.less'

// Fix JSX element type "AsyncComponent" does not have any construction signature or call signature.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const Com = AsyncComponent as any
const BrowserLyrice = AsyncComponent as any

export const Footer = defineComponent({
name: 'Footer',
Expand Down Expand Up @@ -80,7 +80,7 @@ export const Footer = defineComponent({
</div>
</div>
</div>
<Com visible={visibleLyrice.value} />
<BrowserLyrice visible={visibleLyrice.value} />
<BrowserLyriceFlash />
{/* Failed to locate Teleport target with selector "#cover-container" */}
{/* {<PlayLyrice visible={visibleLyrice.value}></PlayLyrice>} */}
Expand Down
15 changes: 9 additions & 6 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from 'vue-router'
import { ComponentPublicInstance } from 'vue'
import { hook } from './hook'
import { TestFull } from '@/pages/test/view/index'
import { $404 } from '@/pages/404/view/index'
import { FindMusic, Recommend, SongList } from '@/pages/news/index'
import { Video, Mv } from '@/pages/video/index'
import { Platform } from '@/config/build'
Expand All @@ -29,12 +29,16 @@ export const LYRICE_PATH = '/electron-lyrice-flash'
// Internationalization is not currently supported
const baseRouter: RouteRecordRaw[] = [
{
path: '/',
redirect: '/music'
path: '/:pathMatch(.*)', // https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes
name: $404.name,
meta: {
full: true
},
component: $404
},
{
path: '/403',
component: TestFull
path: '/',
redirect: '/music'
}
]

Expand Down Expand Up @@ -70,7 +74,6 @@ export const navRouter: RouteRecordRaw[] = [
{
path: '/video',
component: Video,
name: Video.name,
meta: {
name: '视频'
},
Expand Down

0 comments on commit bebec1d

Please sign in to comment.