<!-- 全局设置：layout 布局模式 -->
<template>
    <div class="setting-item-box">
        <el-divider content-position="left">布局方式</el-divider>
        <div style="padding-top: 10px; padding-bottom: 20px">

            <!-- ------- 经典布局 ------- -->
            <div
                class="layout-mode-item" :class="themeStore.layoutMode === 'classic' ? 'layout-mode-item-active' : ''"
                @click="themeStore.layoutMode = 'classic' ">
                <div class="mode-name">经典</div>
                <el-container style="height: 50px;">
                    <el-aside width="15px" style=" background-color: #333;"></el-aside>
                    <el-container>
                        <el-header height="8px" style="background-color: #fafafa;"></el-header>
                        <el-main style="background-color: #eee;"></el-main>
                    </el-container>
                </el-container>
            </div>

            <!-- ------- 分栏布局 ------- -->
            <div
                class="layout-mode-item" :class="themeStore.layoutMode === 'column' ? 'layout-mode-item-active' : ''"
                @click="themeStore.layoutMode = 'column' ">
                <div class="mode-name">分栏</div>
                <el-container style="height: 50px;">
                    <el-aside width="8px" style=" background-color: #333;"></el-aside>
                    <el-aside width="15px" style=" background-color: #FFF;"></el-aside>
                    <el-container>
                        <el-header height="8px" style="background-color: #fafafa;"></el-header>
                        <el-main style="background-color: #eee;"></el-main>
                    </el-container>
                </el-container>
            </div>

        </div>
    </div>
</template>

<script setup name="com-setting-layout-mode">
import {useThemeStore} from "../../../store/theme";
const themeStore = useThemeStore();

</script>

<style scoped lang="scss">

.setting-item-box{
  .layout-mode-item{
    width: 70px;
    height: 50px;
    display: inline-block;
    margin-right: 10px;
    border: 1px #e5e5e5 solid;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    border-radius: 1px;
    .mode-name{
      position: absolute;
      line-height: 55px;
      text-align: center;
      width: 100%;
      font-size: 12px;
      color: #bbb;
      transition: all 0.2s;
      text-indent: 1em;
    }
  }
  .layout-mode-item-active{
    border: 1px #2d8cf0 solid;
    box-shadow:  0 0 5px #a6c5e7 inset;
    .mode-name{
      color: #2d8cf0;
    }
  }

}

</style>
