<template>
  <div class="wrap">
    <div class="actions">
      <p class="page-name">页面设置/关于IASF-发展历程</p>
      <div>
        <el-button type="primary" @click="preview">预览</el-button>
        <el-button @click="save(0)">保存为草稿</el-button>
        <el-button type="primary" @click="save(1)">发布</el-button>
        <el-button @click="back">放弃编辑</el-button>
      </div>
    </div>
    
    <div class="modules">
      <div class="relative">
        <div class="single-banner">
          <img class="banner-img" :src="modules[0].form.pic" alt="" />
          <div class="texts">
            <h6 class="banner-title">{{ modules[0].form.title }}</h6>
          </div>
        </div>
        <div class="cover" @click="toSet(0)">点击更换banner与链接</div>
      </div>

      <div class="block history">
        <div class="inner">
          <div class="c-wrap">
            <h6>{{ modules[1].form.title }}</h6>
            <p class="en">{{ modules[1].form.subTitle }}</p>
            <div class="text" v-html="modules[1].form.des"></div>
            <div class="cover" @click="toSet(1)">点击更换标题、小标题与概述</div>
          </div>

          <div class="c-wrap">
            <h6 style="font-size: 1.6rem">{{ modules[2].form.title }}</h6>
            <p class="en" style="margin-top: -15px;font-size: 1.6rem">{{ modules[2].form.subTitle }}</p>
            <div class="text" v-html="modules[2].form.des"></div>
            <div class="cover" @click="toSet(2)">点击更换标题、小标题与概述</div>
          </div>
        </div>
      </div>
    </div>
    
    <Module ref="module" :data.sync="curData" :visible.sync="diaVisible" @moduleSubmit="moduleSubmit" />
  </div>
</template>

<script>
import mixins from '@/mixins/page'
import Modules from '@/const/modules'
export default {
  mixins: [mixins],
  data() {
    return {
      modules: Modules.devHistory
    }
  },
  mounted() {
    this.$store.commit('user/setCrumbs', [
      {
        name: '站点管理',
        route: '/site'
      },
      {
        name: '内容管理',
        route: '/column'
      },
      {
        name: '栏目管理',
        route: '/column'
      },
      {
        name: '关于IASF-发展历程'
      }
    ])
  },
  methods: {
    
  }
};
</script>

<style lang="scss" scoped>
@import "../../../styles/page/page.scss";
.history {
  h6 {
    position: relative;
    font-size: 2.4rem;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #333333;
  }
  .en {
    margin-top: -25px;
    font-size: 2.4rem;
    font-family: PingFangSC-Light, PingFang SC;
    font-weight: 300;
    color: #E3E3E3;
  }
  .text {
    margin: 30px 0;
  }
}
</style>
