1
lzhe
2024-04-13 2bdbe42d8d4b03b46d2066e50e595a06cebd43c2
src/views/home/widgets/components/ver.vue
@@ -1,41 +1,50 @@
<template>
   <el-card shadow="hover" header="版本信息">
      <div style="height: 210px;text-align: center;">
         <img src="img/ver.svg" style="height:140px"/>
         <h2 style="margin-top: 15px;">SCUI {{$CONFIG.CORE_VER}}</h2>
         <p style="margin-top: 5px;">最新版本 {{ver}}</p>
      </div>
      <div style="margin-top: 20px;">
         <el-button type="primary" plain round @click="golog">更新日志</el-button>
         <el-button type="primary" plain round @click="gogit">gitee</el-button>
      </div>
   </el-card>
   <div>
      <el-card shadow="hover" header="快捷入口">
         <ul>
            <li><div>人工-部门</div></li>
            <li><div class="addMenu" @click="showDrawer">+ 添加菜单</div></li>
         </ul>
      </el-card>
      <el-drawer
        title="我是标题"
        :visible.sync="drawer"
        :direction="direction"
        :before-close="handleClose">
        <span>我来啦!</span>
      </el-drawer>
   </div>
</template>
<script>
   export default {
      title: "版本信息",
      icon: "el-icon-monitor",
      description: "当前项目版本信息",
      data() {
         return {
            ver: 'loading...'
            direction: "rtl",
            drawer: false
         }
      },
      mounted() {
         this.getVer()
      },
      methods: {
         async getVer(){
            const ver = await this.$API.demo.ver.get()
            this.ver = ver.data
         showDrawer() {
            alert(2)
            this.drawer = true;
            alert(3)
         },
         golog(){
            window.open("https://gitee.com/lolicode/scui/releases")
         },
         gogit(){
            window.open("https://gitee.com/lolicode/scui")
         }
         handleClose(done) {
              this.$confirm('确认关闭?').then(_ => {
                  done();
               }).catch(_ => {});
           }
      }
   }
</script>
<style scoped>
   ul {list-style: none;margin-bottom: 10px;overflow: hidden;}
   ul li {float: left;margin-bottom: 8px;}
   ul li div {border: 1px solid #3b8e8e;margin-top: 10px;height: 43px;margin-left: 10px;display: flex;align-items: center;justify-content: center;color: #3b8e8e;padding: 7px 15px;border-radius: 2px;border-radius: 2px;white-space: nowrap;cursor: pointer;}
   ul li div:hover {background-color: #ebf4f4;}
   .addMenu {border: 1px dashed #3b8e8e;}
</style>