### 使用组件

```shell
$ npm i --save @tovoo/text-omission
```

注意：本组件依赖 Ant Design Vue 组件库部分组件！！！

需手动引入 Tooltip组件 样式 （如全局已引入，则不需要）
```javascript
import 'ant-design-vue/es/tooltip/style/index.css';
// or
import 'ant-design-vue/es/tooltip/style/index.less';
```

注册 

参考 [Ant Design Vue](https://antdv.com/docs/vue/getting-started-cn) 注册使用方法

如果你使用的 Vite，你可以使用 `unplugin-vue-components` 来进行按需加载，需要向 `plugins` 添加以下方法 可实现自动加载组件及对应

```javascript
import { TextOmission } from '@tovoo/text-omission';
import '@tovoo/text-omission/es/text-omission/style/css'; //vite只能用 @tovoo/text-omission/es 而非 @tovoo/text-omission/lib
```
或者

向 plugins 添加以下方法 可实现自动加载组件及对应样式

```javascript
// vite.config.js
import { defineConfig } from 'vite';
import Components from 'unplugin-vue-components/vite';

import { TovooResolver } from '@tovoo/text-omission/resolver';

export default defineConfig(({ mode }) => {
  return {
    plugins: [
      Components({
        resolvers: [
          TovooResolver(),
        ],
      }),
    ],
  };
});
```

属性说明如下：

| 属性 | 说明 | 类型 | 默认值 |
| :----- | :----- | :----- | :----- |
| lineClamp | 省略行数 | string,number | 1 |
| tooltip | ant-design-vue Tooltip组件[参数](https://3x.antdv.com/components/tooltip-cn) | object |  |
| tooltipSpaceSize | 提示弹窗内容边距 | number[] | [0, 8] |
