🚀. Socket Launch Week Day 4:Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection.Learn more
Sign In

hm-news-card

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hm-news-card

毫末uni-app新闻卡片组件。支持H5/小程序(微信、支付宝、头条、百度、QQ)/App;组件可自适应各种屏幕大小的手机。

latest
npmnpm
Version
0.0.3
Version published
Weekly downloads
7
-41.67%
Maintainers
1
Weekly downloads
 
Created
Source

官网: https://haomo-tech.com

作者: 毫末科技

邮箱: hxg@haomo-studio.com

预览

预览图片

在线效果预览

更多毫末科技的uni-app跨端模板,请见毫末科技uni-app跨端模板

技术支持

毫末科技将长期迭代本组件。需要技术支持,请进钉钉群:

概述

毫末uni-app新闻卡片组件。支持H5/小程序(微信、支付宝、头条、百度、QQ)/App;组件可自适应各种屏幕大小的手机。

使用

请使用HBuilderX导入组件。

在script中引用:

import HmNewsCard from '@/components/hm-news-card/index.vue'
export default {
    components: {HmNewsCard}
}

在template中使用:

<template>
  <div class="test-component">
    <hm-news-card :options="options" @click="onClick"></hm-news-card>
  </div>
</template>
<script>
import HmNewsCard from '@/components/hm-components/hm-news-card/index.vue'

export default {
  components: {HmNewsCard},
  data() {
    return {
      options: {
          img: '/static/hm-news-card/images/img_22726_0_0.png',
          title: '新闻标题',
          author: '作者',
          date: '16 MAY 2016',
          summary:
            '新闻概要。新闻概要长度最好控制在50字符以内',
          comments: "14 评论",
          likes: "254 喜欢",
          url: '',
          showComments: true,
          showLikes: true
        }
    };
  },
  methods: {
    onClick: function(e) {
      console.log('onClick');
    }
  }
};
</script>
<style>
</style>

属性说明

属性名类型默认值说明
optionsObject-卡片属性

options对象各个属性说明如下:

属性名类型默认值说明
titleString-标题文字
authorString-作者
summaryString-摘要
dateString-日期
imgString-新闻图片
showCommentsBooleantrue是否显示评论数
showLikesBooleantrue是否显示喜欢数
commentsString-评论
likesString-喜欢

事件说明

事件称名事件说明返回参数
@click点击 Card 触发事件-

更新日志

0.0.1(2020-03-07)

  • 完成第一个版本

Keywords

毫末

FAQs

Package last updated on 08 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts