
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@ubrorg/card
Advanced tools
在页面的 page.json
中配置:
{
"usingComponents": {
"card": "@ubrorg/card/lib/index"
}
}
在页面的 page.axml
中使用:
<view class="card-wrapper" a:for="{{items}}">
<card
title="abc"
index="{{index}}"
onLikeTap="handleLikeTap"
dataItem="{{item}}"
>
</card>
</view>
在页面中声明 handleLikeTap
方法处理喜欢状态:
Page({
handleLikeTap(e){
const { index } = e.target.dataset;
const {items} = this.data
items[index].favoriteStatus= !items[index].favoriteStatus
this.setData({
items
})
},
});
可直接传dataItem="{{item}}" 也可使用具体属性去覆盖data里的属性值
属性 | 类型 | 默认值 | 解释 |
---|---|---|---|
type | string | large | 卡片类型 |
backgroupImgUrl | string | null | 头图 |
projectName | string | '' | 卡片名称 |
description | string | '' | 描述 |
extra | string | '' | 附加描述 |
projectTag | string | '' | 图标 |
favoriteStatus | boolean | false | 是否喜欢 |
showLike | boolean | true | 是否展示喜欢图标 |
index | string | null | 列表索引 |
cardTagName | string | null | 标签 |
projectTypeName | string | '' | 分类类型 |
type
可选值
icon
及 tagType
可选值
miapp newbranch
: 新建分支miapp push
: 提交代码miapp prepub
: 预发(发布 beta 版本)miapp publish
: 正式发布FAQs
card
The npm package @ubrorg/card receives a total of 1 weekly downloads. As such, @ubrorg/card popularity was classified as not popular.
We found that @ubrorg/card demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.