# vteam-ui2-element
**Repository Path**: HandsomeLin/vteam-ui2-element
## Basic Information
- **Project Name**: vteam-ui2-element
- **Description**: vteam-ui2-element组件库,基于Element-ui组件开发的配置项组件
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2024-05-25
- **Last Updated**: 2025-07-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# vteam-ui2-element 组件库
### 快速开始
#### 1.安装组件库
```bash
npm install vteam-ui2-element
yarn add vteam-ui2-element
pnpm install vteam-ui2-element
```
#### 2.引用组件库
```javascript
// 全部引入
import VteamUI from 'vteam-ui2-element';
import 'vteam-ui2-element/dist/css/index.css';
Vue.use(VteamUI);
```
## 介绍
vteam-ui2-element 是一个基于 Element-ui 二次封装UI组件库,主要提供了配置化的组件
1. vt-form
2. vt-render
3. vt-table
### 使用方式
```vue
{{ requestForm }}
```
```javascript
// 驱动组件的配置文件AppConfig.js
export const searchFormConfig = () => {
return {
labelWidth: "100px",
props: [
{
width: "200px",
type: "select",
prop: "approvalStatus",
placeholder: "审核状态",
options: [
{ value: 1, label: "发送" },
{ value: 2, label: "发送中" },
{ value: 3, label: "发送完成" },
],
},
{
width: "200px",
type: "select",
prop: "relatedAppId",
placeholder: "所属应用",
options: [
{ value: 1, label: "发送" },
{ value: 2, label: "发送中" },
{ value: 3, label: "发送完成" },
],
},
{
width: "200px",
type: "select",
prop: "deliveryChannel",
placeholder: "发送渠道",
// label: '发送状态',
options: [
{ value: 1, label: "发送" },
{ value: 2, label: "发送中" },
{ value: 3, label: "发送完成" },
],
},
{
width: "200px",
type: "input",
prop: "msgKey",
placeholder: "输入消息关键字查询",
// label: 'ID查询'
},
],
};
};
export const tableColumnsConfig = (vm) => {
return [
{
type: "selection",
},
{
prop: "id",
label: "ID",
width: 80,
},
{
prop: "manager",
label: "类型",
render: (h, row, index, column) => {
let str = row.type == 1 ? "系统新增" : "三方推送";
return h("span", {}, str || "-");
},
},
{
prop: "userName",
label: "姓名",
},
{
prop: "phoneNumber",
label: "手机号",
width: 150,
},
{
prop: "openId",
label: "微信OPENID",
width: 220,
},
{
prop: "registrationId",
label: "极光唯一标识",
width: 220,
},
{
prop: "deviceId",
label: "阿里唯一标识",
width: 220,
},
{
prop: "updateTime",
label: "更新时间",
width: 170,
},
{
prop: "operate",
label: "操作",
width: 200,
fixed: "right",
operation: [
{
label: "编辑",
showIf: (row) => {
return true;
},
click: (row) => {},
},
{
label: "标签",
showIf: (row) => {
return true;
},
click: (row) => {},
},
{
label: "删除",
showIf: (row) => {
return true;
},
click: (row) => {},
},
],
},
];
};
```