zoukankan      html  css  js  c++  java
  • 组件

     
    <template>
        <div class="am-list-news-bd" style=" border-bottom: 1px solid #dedede;margin-bottom: 0.6em ">
          <el-row>
    
    
          <el-col :span="2">
             <img style="  40px; height: 40px;border-radius:15px" src="https://tvax2.sinaimg.cn/crop.0.0.512.512.180/006ZKmjSly8foxqbsvp5aj30e80e8wey.jpg" class="image">
            </el-col>
           <el-col :span="17">
            centos 7.5.1804, 把自带的 python2.7.5 删除了之后 yum 无法启动,该如何拯救
            </el-col>
            <el-col :span="3">
                <el-badge :value="3" class="item">
                  
                  </el-badge>
             </el-col>
          </el-row>
      
          <el-row style="margin-top:0.1em;margin-bottom: 0.6em ">
            <el-col :span="5">
              <small> linux</small>           
            </el-col>
            
            <el-col :span="5">
                <small> <strong>yuoboo</strong></small>            
            </el-col>
          
            <el-col :span="5">
                <small>3分钟前回复</small>            
            </el-col>
              
            <el-col :span="5">
                <small>2天前发表</small>            
            </el-col>
        </el-row>
                   
        </div>
      </template>
      
      <script>
        export default {
          name: 'ArticleItem',
          props:['num','name','posttime','text'],
          data () {
            return {
              //msg: '敬请期待'
            }
          }
        }
      </script>
      
      <!-- Add "scoped" attribute to limit CSS to this component only -->
      <style scoped>
        .am-list-news-bd {text-align:left;margin-top:0.8em;padding-bottom: 0.2em; }
      </style>

    一个vue里

    调用

    <script>
    import ArticleItem from './ArticleItem.vue'
      export default {
    
          components : {
            "ArticleItem":ArticleItem
          },

    使用

      <el-row id="Homepan" :gutter="10">
    
    
    
        <el-col :xs="0" :sm="1" :md="2" :lg="2">.</el-col>
        <el-col :xs="24" :sm="22" :md="20" :lg="20">.
    
      <ArticleItem>11</ArticleItem>
      <ArticleItem>21</ArticleItem>
  • 相关阅读:
    windows命令行下导入excel数据到SQLite数据库
    Android Studio如何提示函数用法
    在不root手机的情况上读取Data目录上的文件
    OSI七层模型
    设计模式之代理模式
    Android中Javascript中的调用
    cf #205 B Codeforces Round #205 (Div. 2) B. Two Heaps
    uva 10600 次小生成树
    防2B && 图论模板 && 7788
    最大匹配 && 最佳完美匹配 模板
  • 原文地址:https://www.cnblogs.com/cnchengv/p/9948130.html
Copyright © 2011-2022 走看看