![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
zan-sku-table
Advanced tools
这是一个规格表格组件
选择规格后,生成对应的规格表格
:::demo 基础用法
import SKUTable from 'zan-sku-table';
import SKU from 'zan-sku';
import { Input } from 'zent';
const columns = [
{
title: '价格',
default: 0,
bodyRender(item) {
return <Input value={item.price} />;
}
},
{
title: '库存',
default: 0,
bodyRender(item) {
return <Input value={item.stock_num} />;
}
},
{
title: '商家编码',
name: 'code'
}
];
const SKUTree = [
{
id: 10740,
kdt_id: 18884150,
text: '你好'
},
{
id: 40732,
kdt_id: 18884150,
text: 'hhh'
},
{
id: 512521,
kdt_id: 18884150,
text: 'nihao'
},
{
id: 572390,
kdt_id: 18884150,
text: '会员期限'
},
{
id: 18496487,
kdt_id: 18884150,
text: 'channel'
},
{
id: 19610451,
kdt_id: 18884150,
text: '普通胶水'
},
{
id: 19610484,
kdt_id: 18884150,
text: '高级胶水'
}
];
const SKULeaf = [
{
id: 3,
text: '蓝色'
},
{
id: 10,
text: '红色'
},
{
id: 30,
text: '土豪金'
},
{
id: 137,
text: '黑色'
},
{
id: 138,
text: '灰色'
}
];
class Simple extends Component {
state = {
skuData: []
};
fetchSKUTree() {
return new Promise(resolve => {
resolve(SKUTree);
});
}
fetchSKU() {
return new Promise(resolve => {
resolve(SKULeaf);
});
}
handleSKUChange = data => {
this.setState({
skuData: [].concat(data)
});
};
render() {
let { skuData } = this.state;
return (
<div>
<SKU
value={skuData}
onFetchGroup={this.fetchSKUTree}
onFetchSKU={this.fetchSKU}
onChange={this.handleSKUChange}
/>
<SKUTable data={SKU.flatten(skuData)} columns={columns} />
</div>
);
}
}
ReactDOM.render(
<Simple />
, mountNode
);
:::
参数 | 说明 | 类型 | 默认值 | 备选值 |
---|---|---|---|---|
className | 自定义额外类名 | string | '' | '' |
data | 表格数据 | array | [] | [] |
columns | 表头配置,基本上和zan-table类似,多一个default的属性 | array | [] | [] |
footerRender | 自定义footer | any | null | null |
prefix | 自定义前缀 | string | 'rc-sku-table' | null |
FAQs
这是一个React组件
The npm package zan-sku-table receives a total of 4 weekly downloads. As such, zan-sku-table popularity was classified as not popular.
We found that zan-sku-table demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.