
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
hm-news-card
Advanced tools
作者: 毫末科技

更多毫末科技的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>
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| options | Object | - | 卡片属性 |
options对象各个属性说明如下:
| 属性名 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| title | String | - | 标题文字 |
| author | String | - | 作者 |
| summary | String | - | 摘要 |
| date | String | - | 日期 |
| img | String | - | 新闻图片 |
| showComments | Boolean | true | 是否显示评论数 |
| showLikes | Boolean | true | 是否显示喜欢数 |
| comments | String | - | 评论 |
| likes | String | - | 喜欢 |
| 事件称名 | 事件说明 | 返回参数 |
|---|---|---|
| @click | 点击 Card 触发事件 | - |
FAQs
毫末uni-app新闻卡片组件。支持H5/小程序(微信、支付宝、头条、百度、QQ)/App;组件可自适应各种屏幕大小的手机。
The npm package hm-news-card receives a total of 7 weekly downloads. As such, hm-news-card popularity was classified as not popular.
We found that hm-news-card demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.