@huilian/components-tms 1.2.1 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/bundle.esm.js +67 -24
- package/package.json +1 -1
- package/readme.md +33 -1
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -96,4 +96,36 @@ export default {
|
|
|
96
96
|
]
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
```
|
|
99
|
+
```
|
|
100
|
+
eventName 回掉函数名称
|
|
101
|
+
|
|
102
|
+
取决于值的具体处理 比如操作拦的 定义了钩子 actionBtn 但是对于别的处理没有太好的办法 只是做了一个约定 根据索引key 来进行操作
|
|
103
|
+
|
|
104
|
+
```html
|
|
105
|
+
<template #actionBtn="{props}">
|
|
106
|
+
<el-button v-if="props.applyStatus === 'TO_AUDIT'" type="text" icon="el-icon-download" @click="cancel(props)">撤回申请</el-button>
|
|
107
|
+
</template>
|
|
108
|
+
// settleType 一般情况下如下可以忽略 因为formatSwitch 方法自动提供了这种check类型的值处理
|
|
109
|
+
<template #settleType="{props,queryConfig}">
|
|
110
|
+
{{ queryConfig.rule.option.find(i => i.value == props.settleType).label }}
|
|
111
|
+
</template>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
queryConfig 配置约定以下几个是常用的 完全可以自己约定
|
|
115
|
+
|
|
116
|
+
```javascript
|
|
117
|
+
queryConfig:{
|
|
118
|
+
"type": "date", // 组件类型
|
|
119
|
+
"rule": {
|
|
120
|
+
"name": "合同起始日期",
|
|
121
|
+
//数据的处理格式 各种类型不同
|
|
122
|
+
"format": "YYYY-MM-DD HH:mm:ss",
|
|
123
|
+
// 数据的检索key 比如字段叫contractStartDate 但是在列表中需要叫contractStartDateForm
|
|
124
|
+
"searchKey": "contractStartDateFrom",
|
|
125
|
+
// 检索的数据源 比如对应check类型 就是[{label:'状态1',value:'1'}] 的数据渲染项目 不同类型的不一样 比如date类型就不太用的上 这个字段
|
|
126
|
+
"option":[],
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
|