github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/static_source/admin/src/layout/Landing.vue (about)

     1  <script lang="tsx">
     2  import {computed, defineComponent} from 'vue'
     3  import {useAppStore} from '@/store/modules/app'
     4  import {Backtop} from '@/components/Backtop'
     5  import {useRenderLayout} from './components/useRenderLayout'
     6  import {useDesign} from '@/hooks/web/useDesign'
     7  
     8  const {getPrefixCls} = useDesign()
     9  
    10  const prefixCls = getPrefixCls('layout')
    11  
    12  const appStore = useAppStore()
    13  
    14  const layout = computed(() => appStore.getLayout)
    15  
    16  const renderLayout = () => {
    17    const {renderLanding} = useRenderLayout(false)
    18    return renderLanding()
    19  }
    20  
    21  export default defineComponent({
    22    name: 'Dashboard',
    23    setup() {
    24      return () => (
    25          <section class={[prefixCls, `${prefixCls}__${layout.value}`, 'w-[100%] h-[100%] relative']}>
    26  
    27            {renderLayout()}
    28  
    29            <Backtop></Backtop>
    30  
    31          </section>
    32      )
    33    }
    34  })
    35  </script>
    36  
    37  <style lang="less" scoped>
    38  @prefix-cls: ~'@{namespace}-layout';
    39  
    40  .@{prefix-cls} {
    41    background-color: var(--app-content-bg-color);
    42    :deep(.@{elNamespace}-scrollbar__view) {
    43      height: 100% !important;
    44    }
    45  }
    46  </style>