• 组件


     
    <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>
  • 相关阅读:
    Linux 配置jdk vim和 Linux 基本操作
    Java02_数据类型
    java01_简介_开发环境
    基于Vue + webpack + Vue-cli 实现分环境打包项目
    理解TCP/IP三次握手与四次挥手的正确姿势
    Vue 项目骨架屏注入与实践
    我的第一个Quartz代码
    hdu5882 Balanced Game
    hdu5883 The Best Path(欧拉路)
    Poj 1273 Drainage Ditches(最大流 Edmonds-Karp )
  • 原文地址:https://www.cnblogs.com/cnchengv/p/9948130.html
Copyright © 2020-2023  润新知