1.1.1 • Published 7 years ago

hjdtl-news v1.1.1

Weekly downloads
20
License
ISC
Repository
-
Last release
7 years ago

vue-news-panel

a vue component for news list

使用说明

下载

在项目的根目录下安装改组件:

npm install hjdtl-news -s

使用

  1. 在Vue组件的script中引入该组件:
import News from 'hjdtl-news'
  1. 在Vue组件的template中实例化:
<news :newsObj=news />
  1. props数据说明

在实例的组件通过newsObj接收数据,数据类型要求:

data() {
  return {
    news: {
          type: 5,
          imgList: ["https://p3.pstatp.com/list/6ec60003439bd0e04b45", "https://p3.pstatp.com/list/6ec60003439bd0e04b45", "https://p3.pstatp.com/list/6ec60003439bd0e04b45"],
          title:'这是你的标题部分',
          time: '这里显示时间',
          author: '作者姓名等其他内容'
      },
    }
}

数据格式和属性:

  • type: Number 面板类型,1.左图片,右标题 2.左标题,右图片 3.无图片 4.上标题,下图片列表 5.上标题,下大图
  • imgList: Array 图片列表
  • title: String 文章标题
  • time: String 文章时间
  • author: String 作者等其他信息

其他

该组件还在更新中,欢迎issues。

2018年3月12日

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago