0.1.37 • Published 4 years ago

@sula/table v0.1.37

Weekly downloads
44
License
-
Repository
-
Last release
4 years ago

哪些属性是响应式的

  • columns.filter
  • columns.sorter
  • pagination
  • rowSelection.selectedRowKeys

tableCore schema

const tableSchema = {
  dataSource: [{name: 'salad'}],  // 静态dataSource,一般不会使用
  title: [  // 默认在右侧
      {
          type: 'link',
          text: 'Invite John Brown', // 不写text直接用data[key]展示
          link: '/task/${to}', // https://cc/bb
          componentProps: {
              style: {marginRight: 16},
          },
          className: 'sd-m-r-xs',
          action: {
              confirm: '是否要跳转?',
          }
      },
      {...}
  ], // 或者 {left: [{...}], right: [{...}]}
  remoteDataSource: {
    // 待sula-plugin-fetch确定
  }
}

tableCore实例API

componentDidMount() {
   lodash.assign(this.tableCore, {
     pagging,
     setProps,
     getProps,
     getControls,
     setControls,
     forceUpdate,
  })
}

paging

强制table进行一次分页动作

  • 格式:(pagination, filters, sorter) => void

setProps

  • 格式:(key: 支持类似字符串路径, value) => void
  • 使用:setProps('column0.title', 'Name');

getProps

  • 格式:(key) => any

🌲controls

controls为tableCore受控管理的antd table props

setControls

  • 格式:(key: 支持类似字符串路径, value) => void
  • 使用:setControls('selectedRowKeys', 'abc');

getControls

  • 格式:(key) => any

forceUpdate

强制tableCore内部执行一次render

  • 格式:(callback: Function) => void
0.1.37

4 years ago

0.1.36

4 years ago

0.1.35

4 years ago

0.1.34

4 years ago

0.1.33

4 years ago

0.1.31

4 years ago

0.1.32

4 years ago

0.1.30

4 years ago

0.1.29

4 years ago

0.1.27

4 years ago

0.1.28

4 years ago

0.1.26

4 years ago

0.1.25

4 years ago

0.1.24

4 years ago

0.1.23

4 years ago

0.1.23-0

4 years ago

0.1.22

4 years ago

0.1.21

4 years ago

0.1.20

4 years ago

0.1.19

4 years ago

0.1.18

4 years ago

0.1.18-0

4 years ago

0.1.17

4 years ago

0.1.16

4 years ago

0.1.16-0

4 years ago

0.1.15

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0-alpha.1

5 years ago

0.1.0-alpha.0

5 years ago

0.1.0

5 years ago