# ivu-table-merge

> ## Project setup ``` npm install ```

Latest version **1.0.1** (published 2023-10-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install ivu-table-merge
pnpm add ivu-table-merge
yarn add ivu-table-merge
bun add ivu-table-merge
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-10-29 |
| First published | 2019-04-30 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 315.6 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Alone |
| Maintainers | zhouxianjun |
| Keywords | iview, merge, cell, table |

## Links

- npm: https://www.npmjs.com/package/ivu-table-merge
- Repository: https://github.com/zhouxianjun/ivu-table-merge
- Homepage: https://github.com/zhouxianjun/ivu-table-merge#readme
- Issues: https://github.com/zhouxianjun/ivu-table-merge/issues
- npm.io page: https://npm.io/package/ivu-table-merge

## Dependencies (4)

- [vue](https://npm.io/package/vue.md) ^2.6.10
- [iview](https://npm.io/package/iview.md) ^3.4.1
- [core-js](https://npm.io/package/core-js.md) ^2.6.5
- [@babel/plugin-proposal-optional-chaining](https://npm.io/package/@babel/plugin-proposal-optional-chaining.md) ^7.2.0

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2023-10-29
- 1.0.0 — 2019-04-30

## README

# iview-table-merge

## Project setup
```
npm install
```

### Compiles and hot-reloads for development
```
npm run serve
```

### Compiles and minifies for production
```
npm run build
```

### Run your tests
```
npm run test
```

### Lints and fixes files
```
npm run lint
```

## API

### Attributes

| 属性            | 说明                                                                                        | 类型           | 默认值                                                                                                                                                            |
| --------------- | ------------------------------------------------------------------------------------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cell          | 要合并的列，顺序必须以table的columns顺序一致       | String&#124;Object&#124;Array | null                                                                                                                                      |
| columns          | 表格的列                                                                               | Array         | 表格的columns属性                                                                                                                                      |
| data            | 表格的数据                                                                     | Array         | 表格的data属性                                                                                                                                                     |

### Example

```html
<template>
    <div>
        <!-- 这里可以简写为 v-merge-cell="{cell}" 会自动取当前表格实例的columns与data -->
        <Table v-merge-cell="{cell, columns, data}" ref="table" :columns="columns" :data="data"/>
        <Button type="primary" @click="load">加载...</Button>
    </div>
</template>

<script>
import MergeCell from 'ivu-table-merge';

export default {
    name: 'App',
    directives: { MergeCell },
    data () {
        return {
            cell: ['number', { key: 'product', field: 'productId' }],
            columns: [{
                title: '订单号',
                key: 'number'
            }, {
                title: '金额',
                key: 'money'
            }, {
                title: '产品',
                key: 'product'
            }, {
                title: '数量',
                key: 'quantity'
            }],
            data: [{
                number: 123456789,
                money: 1,
                product: 'Mac Air D32',
                productId: 1,
                quantity: 1
            }, {
                number: 123456789,
                money: 2,
                product: 'Mac Air D32',
                productId: 1,
                quantity: 1
            }, {
                number: 123456789,
                money: 2,
                product: 'Mac Air D42',
                productId: 2,
                quantity: 2
            }, {
                number: 987456123,
                money: 20,
                product: 'Mac Air D42',
                productId: 2,
                quantity: 20
            }]
        };
    },
    methods: {
        load () {
            this.data.push({
                number: Date.now(),
                money: 1,
                product: 'Mac Air D42',
                productId: 2,
                quantity: 20
            });
        }
    }
};
</script>
```

---
_Source: https://npm.io/package/ivu-table-merge · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
