0.0.6-TEST • Published 3 years ago
ca-table-pro-test v0.0.6-TEST
ca-table-pro
Project setup
npm install
Compiles and hot-reloads for development
npm serve
Compiles and minifies for production
npm build
使用
安装
npm i ca-table-pro
引入
引入element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
引入tablepro
import tableproplugin from "ca-table-pro-test/src/lib";
Vue.use(tableproplugin);
使用
<table-pro></table-pro>
Attribute
- tableData
tableField //表格展示的字段
data //表格展示的数据
searchField //表格搜索的字段信息
url //表格相关的操作链接
- add 添加数据操作链接
- del 删除数据操作链接
- update 更新数据操作链接
- select 查询数据操作链接
{
"tableField": [
{
"field": "field",
"title": "标题"
}
],
"data": [
{
"id": "dsafdsa",
"name": "测试",
"phone": "13555555555",
"area": "马卡鲁"
}
],
"searchField": [
{
"title": "错误类型",
->
label展示
==
可为空
"filed": "type",
->
绑定数据得到的字段名
(
点击搜索按钮后返回的数据字段名
)
==
必须
"message": "请输入错误类型",
->
如果是text类型
,
在输入框中的提示语
==
可为空
"type": "select",
->
搜索组件类型select
、
text
默认是text
==
可为空
"labelKey": "typeName",
->
type为select有效
:
展示的键字段名
:
对应data属性中需要展示的key
==
type为select必须
"valueKey": "id",
->
type为select有效
:
select组件的value字段名
:
对应data属性中返回的值的key
==
type为select必须
"explain": "错误编码使用场景",
->
后面跟着的提示
==
可为空
"default": "",
->
默认值
==
可为空
"data": [
->
type为select有效
:
select组件的相关数据
{
"id": 0,
"typeName": "全部"
},
{
"id": 0,
"typeName": "用户相关"
}
]
}
],
"url": {
"add": "",
"del": "",
"update": "",
"select": ""
}
}
Methods
方法名 | 说明 |
---|---|
save | 保存数据方法,回调参数为定义的字段 |
0.0.6-TEST
3 years ago
0.0.5-TEST
3 years ago
0.0.4-TEST
3 years ago
0.0.3-TEST
3 years ago
0.0.2-TEST
3 years ago
0.0.1-TEST
3 years ago