zoukankan      html  css  js  c++  java
  • axios

    <template lang="html">
      <div>
        <div v-for="(val,index) in artical">
          <h1>{{val.title}}</h1>
          <img :src="val.author_face" alt="" width="30" height="30">
          <p v-html=val.content></p>
        </div>
    
     </div>
    </template>
    
    <script type="text/ecmascript-6">
    export default {
      data(){
        return{
          artical:[]
        }
      },
      mounted(){
        this.fitchData(),
        this.fitchData1()
      },
      methods:{
        fitchData(){
          // console.log(this.$http.get)
    
          this.$http.get('index.data').then(function(res){
            console.log(res.data[0].content)
            this.artical=res.data
          }.bind(this)).catch(function(error){
            console.log('home',error)
          })
        }
      }
    }
    </script>
    
    <style>
    p{
      text-indent: 2em;
      color: blue;
      font-family: "微软雅黑";
      text-align:left;
    }
    </style>
    
    You can change the world with your heart,even a lot of changes sometimes unless you won't geiv up....
  • 相关阅读:
    oracle的over函数应用(转载)
    Oracle decode()函数应用
    EL表达式显示数据取整问题
    null值与空值比较
    case when语句的应用
    堆排序
    希尔排序
    插入排序
    异或运算
    选择排序
  • 原文地址:https://www.cnblogs.com/xiongwei2017/p/6663447.html
Copyright © 2011-2022 走看看