/** * {} * @author yutent * @date 2023/12/19 16:53:27 */ import { html, css, Component, range } from 'wkit' import { watch } from 'wkitd' import '../components/titlebar.js' import '../components/app-menu.js' import '../components/slider.js' import '../components/list.js' class Home extends Component { static animation = { type: 'scale', immediate: true } static styles = [ css` :host { display: flex; position: fixed; left: calc(50vw - 512px); top: calc(50vh - 380px); z-index: 2; width: 1024px; height: 760px; font-size: 14px; color: var(--color-dark-1); -webkit-user-select: none; user-select: none; } .container { display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: 8px; background: rgba(233, 233, 233, 0.9); box-shadow: 0 0 12px rgba(0, 0, 0, 0.1); --titlebar-background: linear-gradient( 90deg, transparent 180px, #fff 180px ); } ul, menu, li { list-style: none; } `, css` .body { flex: 1; display: flex; height: calc(100% - 48px); line-height: 1.5; } .sidebar { flex-shrink: 0; width: 180px; height: 100%; border-radius: 0 0 0 8px; backdrop-filter: blur(5px); } .content { flex: 1; height: 100%; padding: 0 8px 8px 0; border-radius: 0 0 8px 0; background: #fff; } .wrapper { overflow: hidden auto; height: 100%; padding: 0 32px 32px; &::-webkit-scrollbar { width: 3px; height: 3px; background-color: transparent; } &::-webkit-scrollbar-thumb { background-color: #c6c7ca; border-radius: 10px; } &::-webkit-scrollbar-thumb:hover { background-color: #a1a1a1; } &::-webkit-scrollbar-track { background-color: transparent; } } `, css`` ] #hide() { this.$store.storeAppShow = false } mounted() { // this.$store.storeAppShow = true watch('$store.storeAppShow', v => { this.$animate(!v) }) } render() { return html`
` } } Home.reg('home')