npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

multiple-check-box

v2.0.1

Published

This project was generated with Angular CLI version 8.1.0.

Downloads

16

Readme

MultipleCheckBox

This project was generated with Angular CLI version 8.1.0.

// 这是一个angular组件,多选框,可用于导出字段..配置等...
npm i/install multiple-check-box
yarn add multiple-check-box
"dependencies" :{"multiple-check-box": <package-version>}

引用模块

import { MultipleCheckBoxModule } from 'multiple-check-box'
@NgModule({
  imports: [
    MultipleCheckBoxModule,
  ]
})

示例

angular.html

<multiple-check-box [checkData]="collection" [(ngModel)]="value" [exreaTitle]="title" [leftSideTitle]="leftSideTitle"></multiple-check-box>
  title = '选择仓库';
  leftSideTitle = '导出字段';
  collection = [
    {
      id: 1,
      title: '商品信息',
      options: [
        { label: '开发平台', value: 'developPlatformDesc'},
      ]
    },
    {
      id: 2,
      title: '人员信息',
      options: [
        { label: '销售经理', value: 'bgSalesManager'},
      ]
    },
    {
      id: 3,
      title: '库存/备货',
      options: [
        { label: '可用库存', value: 'AvailableQty'},
      ],
      exreaOptions: [
        { label: '中仓', value: 'cnStorage', checked: true},
      ],
    },
    {
      id: 4,
      title: '价格/毛利率',
      options: [
        { label: '销售价', value: 'SalesPrice'},
      ],
      exreaOptions: [
        { label: '中仓', value: 'cnStorage', checked: true},
      ]
    },
    {
      id: 5,
      title: '销量',
      options: [
        { label: '最近1天销量', value: 'SalesQtyD1'},
      ],
      exreaOptions: [
        { label: '中仓', value: 'cnStore', checked: true},
      ],
    }
  ];
  value = [{label: '开发平台', value: 'developPlatformDesc' pid: 1}];

API

| 属性 | 说明 | 类型 | 默认值 | | :--- | :--- | :--- | :--- | | [checkData] | check的数据 | {id,title,options,exreaOptions}[] | [] | |[(ngModel)]| 被选中项的对象数据| {label: string, value: string, checked: boolean, id: number}[]|[]| |[exreaTitle]| 额外选项标题| string| '请选择仓库' | |[leftSideTitle]| 左侧栏的标题 | string | '导出字段'|

tips:
1.如果需要传入额外选项则`exreaOptions`一定要加上;
2.`exreaOptions`的checked需要设置为true
3.pid字段对应`collection`id项
4.暂时拥有`exreaOptions`的不可正常运行双向绑定
如
value = [{ label: '最近1天销量', value: 'SalesQtyD1', pid: 5}]

运行项目

ng serve 运行或者 yarn run start 运行你的angular项目