@tongfun/tf-widget 0.1.34 → 0.1.37
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/.eslintignore +10 -0
- package/.eslintrc.js +2 -1
- package/README.md +25 -9
- package/lib/tf-widget.common.js +5797 -2282
- package/lib/tf-widget.css +1 -1
- package/lib/tf-widget.umd.js +5797 -2282
- package/lib/tf-widget.umd.min.js +6 -6
- package/package.json +4 -3
- package/postinstall.js +1 -1
package/.eslintignore
ADDED
package/.eslintrc.js
CHANGED
|
@@ -12,6 +12,7 @@ module.exports = {
|
|
|
12
12
|
},
|
|
13
13
|
rules: {
|
|
14
14
|
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
15
|
-
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
|
|
15
|
+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
|
16
|
+
'space-before-function-paren': [2, 'never'],
|
|
16
17
|
}
|
|
17
18
|
}
|
package/README.md
CHANGED
|
@@ -6,9 +6,14 @@
|
|
|
6
6
|
- [tinput](#21-tinput组件)
|
|
7
7
|
- [FormBody](#22-formbody单据体组件)
|
|
8
8
|
- [FormBodyItem](#23-formbodyitem-组件)
|
|
9
|
+
- [FormBodyItemCustom](#24-formBodyItem组件)
|
|
9
10
|
|
|
10
11
|
## 1 版本更新记录
|
|
11
12
|
|
|
13
|
+
## 🌿 0.1.35
|
|
14
|
+
- 新增formBodyItemcustom组件,用来加入插槽内容
|
|
15
|
+
- 单据体加入modelAdditionalProperties属性,用来配置不列出的属性
|
|
16
|
+
- 单据体的复选框可以隐藏
|
|
12
17
|
## 单据体若干bug 0.1.34
|
|
13
18
|
- 单据体复选框永远在左侧,并可选择不显示复选框
|
|
14
19
|
- 基础资料控件弹窗对外开放是否添加到body的选项
|
|
@@ -244,16 +249,18 @@ notFormBasicAppendBody: tinput基础资料控件的弹窗是否添加到body元
|
|
|
244
249
|
<FormBodyItem title="姓名" field="name" type="input" />
|
|
245
250
|
<FormBodyItem title="出生日期" field="birthDate" type="date" />
|
|
246
251
|
<FormBodyItem title="审核时间" field="auditTime" type="datetime" />
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
<!--
|
|
253
|
+
对于一些需要操作列,即没有实际数据的列,常见于列的相关操作
|
|
254
|
+
不要使用ux-table-column,会导致不能将字段添加到模版,新增行属性不全面
|
|
255
|
+
使用formBodyItemCustom
|
|
256
|
+
|
|
257
|
+
不要在这属性上添加field属性,对于custom组件来说,这是一个无效的属性
|
|
258
|
+
-->
|
|
259
|
+
<FormBodyItemCustom title="操作">
|
|
260
|
+
<template v-slot="{row}">
|
|
261
|
+
<el-button type="danger" size="mini" @click="deleteRow(row.id)">删除</el-button>
|
|
255
262
|
</template>
|
|
256
|
-
</
|
|
263
|
+
</FormBodyItemCustom>
|
|
257
264
|
|
|
258
265
|
<!-- 插槽 -->
|
|
259
266
|
<template v-slot:buttons="{currentRow}">
|
|
@@ -344,3 +351,12 @@ export default {
|
|
|
344
351
|
|
|
345
352
|
#### methods
|
|
346
353
|
|
|
354
|
+
### **2.4 FormBodyItemCustom组件**
|
|
355
|
+
该组件的源码,仅仅提供一个插槽,通过插槽来定义一些右侧的操作类型的固定列<br>
|
|
356
|
+
也可以指定field和title等字段,也会显示出来相关的数据<br>
|
|
357
|
+
但是这个组件指定列,在新增行的时候,不会给新行添加field相关的属性<br>
|
|
358
|
+
如果需要每一行都有额外的属性(不在formBodyItem中,即不需要显示出来)<br>
|
|
359
|
+
有两种方式,一个是通过affterAddRow来进行动态添加属性(不建议)<br>
|
|
360
|
+
另一种是通过modelAddtionalProperties的formbody属性来添加<br>
|
|
361
|
+
|
|
362
|
+
|