<template>  
  <div class="block">
    <h1>更新日志</h1>
    <div class="changelog">
      <div class="log" v-for="logItem in list" :key="logItem.version">
        <div class="date">{{ logItem.date }}</div>
        <div class="version">版本：v{{ logItem.version }}</div>
        <ul>
          <li v-for="item in logItem.content" :key="item">{{ item }}</li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  mounted() {
    fetch('./changelog.json').then(res => res.json()).then(data => {
      this.list = data
    })
  },
  data() {
    return {
      list: []
    }
  }
}
</script>

<style lang="less" scoped>
p{
  margin: 10px 0;
}
.log{
  margin-bottom: 40px;
  .date, .version{
    font-size: 16px;
    font-weight: bold;
    line-height: 35px;
  }
  li{
    padding-left: 20px;
    line-height: 30px;
  }
}
</style>