vue

作者: 网网会想念 | 来源:发表于2018-09-11 14:16 被阅读0次

vue:

  (element:元素)

vue:1.vue 2.Angualar 3.React

一个vuede 基本格式

<div id='itany'>
       {{msg}}
       {{arr}}
       {{obj}}
</div>
<script src=''></script>
<script>
    new Vue({
          el:'#itany',
          data:{
                msg:'hello word' ,
                 arr:[1,2,3],
                 obj:{}
             }
     })
</script>

vue的一些用法

  <ul>
        <li v-for="val in arr">{{val}}</li>
        <li v-for="val in obj">{{val}}</li>-->
        <!-- <li v-for="(val,index) in arr">{{index}}-{{val}}</li>
        <li v-for="(val,index) in obj">{{index}}-{{val}}</li>
        <table border="1" cellspacing="0">
            <thead>
                <tr>
                  <th>名字</th>
                    <th>名字</th>
                    <th>名字</th>
                </tr>
            </thead>
            <tbody>
            <tr v-for="(value,index) in arrs">
                <td>{{index+1}}</td>
                <td>{{value.sex}}</td>
                <td>{{value.age}}</td>
            </tr>
            </tbody>
        </table>
    </ul>

生成的结果

无标题.jpg

表格基本元素

<table border="1"   (cellpadding:'0')  cellspacing'0'>
    <thead>
        <tr>
           <th>
           </th>
         </tr>
     </thead>
      <tbody>
      </tbody>
</table>

相关文章

网友评论

      本文标题:vue

      本文链接:https://www.haomeiwen.com/subject/ikdegftx.html