New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@wm-hosp/table-dragger-resizable

Package Overview
Dependencies
Maintainers
0
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wm-hosp/table-dragger-resizable

微萌前端公用图片预览组件

  • 1.0.46
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-84.62%
Maintainers
0
Weekly downloads
 
Created
Source

Installation

npm install @wm-hosp/table-dragger-resizable --save

Usage

import * as React from 'react';
import { WmTableDraggerResizable } from '@wm-hosp/sum_react';

const TableDraggerResizable: React.FC<Props> = (props) => {
  return (
    <WmTableDraggerResizable
      bordered
      rowKey="id"
      dataSource={data}
      // loading={loading}
      tableType={'warehouseOrderList'}
      pagination={false}
      propsColumns={
        inboundType === 0
          ? this.columns
          : this.columns.filter((e) => !e.virtualHidden)
      }
      scroll={{ x: 1200 }}
      locale={{
        emptyText: loading ? '加载中...' : '暂无数据',
      }}
      rowClassName={(record: any) => {
        return record.hasRed ? 'hasRedIcon' : '';
      }}
      rowSelection={{
        selectedRowKeys,
        onChange: this.onSelectRowKeysChange,
        fixed: true,
      }}
      otherFetchParams={{
        fetchTableJson,
        fetchUpdateTableJson,
      }}
    >
      <div className="action-btn-radio">
        <div>
          <Button
            ghost
            type="primary"
            style={{ marginRight: 10 }}
            onClick={this.handleBatchOpenPrint}
          >
            批量打印
          </Button>
        </div>
      </div>
    </WmTableDraggerResizable>
  );
};

export default TableDraggerResizable;

Props

propstypedefaultdescriptionrequired
propsColumnscolumnsProps[][]columns source arraytrue
tableTypestring-current table typetrue
defaultcheckedColumnsarray-dataIndex of the column selected by defaultfalse
otherFetchParamsFetchParams[]-function objectfalse
isNotEllipsisbooleanfalsedisplay with ellipsisfalse
updatePropsColumnsbooleantruewheather to show change buttonfalse
isNotShowDraggerboolean-show filter column buttonfalse
paginationobject-同 antdfalse
scrollobject-同 antdfalse
dataSource[]-同 antdtrue

注:其他与 antd 的 Table 属性保持一致

columnsProps

propstypedefaultdescriptionrequired
titlestring-column titletrue
dataIndexstring-descriptionfalse
widthnumber-descriptionfalse
renderReact.ReactNode-ReactNodefalse
draggerTitlestring-Filter column drag namefalse

otherFetchParams

propstypedefaultdescriptionrequired
fetchTableJsonfunction-Get database savefalse
fetchUpdateTableJsonfunction-Update databasefalse
import * as React from 'react';
import { WmShowDraggerColumns } from '@wm-hosp/sum_react';

const ShowDraggerColumns: React.FC<Props> = (props) => {
  return (
    <WmShowDraggerColumns
      tableType={DYNAMIC_TABLE_TYPE.myOrderApplyColumns}
      propsColumns={[...this.columns]}
      defaultcheckedColumns={checkedColumns}
      onChange={(newColumns) => {
        this.setState({ countTime: (this.state.countTime || 0) + 1 });
        this.columns = newColumns;
      }}
      fetchTableJson={fetchTableJson}
      fetchUpdateTableJson={fetchUpdateTableJson}
    />
  );
};

export default ShowDraggerColumns;

Props

propstypedefaultdescriptionrequired
propsColumnscolumnsProps[][]columns source arraytrue
tableTypestring-current table typetrue
defaultcheckedColumnsarray-dataIndex of the column selected by defaultfalse
fetchTableJsonfunction-Get database savefalse
fetchUpdateTableJsonfunction-Update databasefalse
onChangefunction-Update current columnsfalse

注:WmShowDraggerColumns 可与 WmTableDraggerResizable 一起使用,实现卡片表格的拖拽与显示

columnsProps

propstypedefaultdescriptionrequired
titlestring-column titletrue
dataIndexstring-descriptionfalse
widthnumber-descriptionfalse
renderReact.ReactNode-ReactNodefalse
draggerTitlestring-Filter column drag namefalse

Keywords

FAQs

Package last updated on 15 Nov 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc