# auto-column

> 这是一个针对element-ui表格（table）自适应宽度的包

Latest version **0.0.6** (published 2023-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install auto-column
pnpm add auto-column
yarn add auto-column
bun add auto-column
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2023-09-12 |
| First published | 2022-11-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 32.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | yongtay |
| Maintainers | yongtay |
| Keywords | element-ui, el-table, auto width, 自适应表格 |

## Links

- npm: https://www.npmjs.com/package/auto-column
- Repository: https://github.com/YongTay/auto-column
- Homepage: https://github.com/YongTay/auto-column#readme
- Issues: https://github.com/YongTay/auto-column/issues
- npm.io page: https://npm.io/package/auto-column

## Dependencies (4)

- [@babel/core](https://npm.io/package/@babel/core.md) ^7.22.17
- [babel-loader](https://npm.io/package/babel-loader.md) ^9.1.3
- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.12.1
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.22.15

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2023-09-12
- 0.0.5 — 2023-09-08
- 0.0.4 — 2023-09-07
- 0.0.3 — 2023-09-07
- 0.0.2 — 2022-11-03
- 0.0.1 — 2022-11-03

## README

# auto-column
element-ui table 列宽自适应宽度

## 使用方式

### 引入
#### 1. 不使用全局配置参数
```javascript
import AutoColumn from 'auto-column'
Vue.use(AutoColumn)
```


#### 1.1 使用引入全局配置参数
> * minWidth: 列最小宽度
> * maxWidth: 列最大宽度

```javascript
import AutoColumn from 'auto-column'
Vue.use(AutoColumn, { minWidth: 80, maxWidth: 100 })
```

### 2.使用
```vue
<el-table v-auto-column :data="list" >
    <el-table-column prop="date"label="日期"></el-table-column>
    // ...
</el-table>
```
### 3.添加需要忽略的列
> 在指定的列上添加 `class="v-auto-ignore"` 该类名，该列将不会被自动适配
```vue
<el-table v-auto-column :data="list" >
    <el-table-column prop="date"label="日期"></el-table-column>
    <el-table-column prop="description"label="描述" class="v-auto-ignore"></el-table-column>
      
    // ...
</el-table>
```

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