sh-view 2.5.4 → 2.5.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"description": "基于vxe-table二次封装",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"jszip": "^3.10.1",
|
|
30
30
|
"popper.js": "^1.16.1",
|
|
31
31
|
"resize-observer-polyfill": "^1.5.1",
|
|
32
|
-
"sh-tools": "^2.1.
|
|
32
|
+
"sh-tools": "^2.1.5",
|
|
33
33
|
"tinymce": "^5.10.5",
|
|
34
34
|
"vue": "^3.3.4",
|
|
35
35
|
"vue-masonry": "^0.16.0",
|
|
@@ -63,15 +63,8 @@ export default function (props, context, proxy, isForm) {
|
|
|
63
63
|
}
|
|
64
64
|
// 表单项编辑回调
|
|
65
65
|
const onFormEditClosed = async (obj, renderbox) => {
|
|
66
|
-
let { property, data } = obj
|
|
67
|
-
if (props.valid && formRules.value[property]) {
|
|
68
|
-
let valerr = await formRef.value.validateField(property)
|
|
69
|
-
if (!valerr) {
|
|
70
|
-
formRef.value.clearValidate(property)
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
66
|
emit('edit-closed', obj, renderbox)
|
|
74
|
-
Object.assign(props.data, data)
|
|
67
|
+
Object.assign(props.data, obj.data)
|
|
75
68
|
}
|
|
76
69
|
// 表单校验不通过
|
|
77
70
|
const onFormSubmitInvalid = params => {
|
|
@@ -261,7 +261,13 @@ export default function (props, context, proxy, isGrid) {
|
|
|
261
261
|
}
|
|
262
262
|
// 只对 edit-config 配置时有效,单元格编辑状态下被关闭时会触发该事件
|
|
263
263
|
const onEditClosed = params => {
|
|
264
|
-
// 此操作火狐浏览器(bug(vxe):编辑后不触发渲染器的blur
|
|
264
|
+
// 此操作火狐浏览器(bug(vxe):编辑后不触发渲染器的blur问题)
|
|
265
|
+
let { row, column } = params
|
|
266
|
+
let editModel = $vUtils.get(column, 'params.__RowEditModelValue')
|
|
267
|
+
if (editModel !== undefined) {
|
|
268
|
+
$vUtils.set(row, column.property, editModel)
|
|
269
|
+
delete column.params.__RowEditModelValue
|
|
270
|
+
}
|
|
265
271
|
emit('edit-closed', params)
|
|
266
272
|
}
|
|
267
273
|
// 只对 edit-config 配置时有效,单元格被激活编辑时会触发该事件
|
|
@@ -53,7 +53,12 @@ export default function (props, context, proxy) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
// 输入框变化
|
|
56
|
-
const vxeInputChange = async ({ value, $event }) => {
|
|
56
|
+
const vxeInputChange = async ({ value, $event }) => {
|
|
57
|
+
// 此操作火狐浏览器(bug(vxe):编辑后不触发渲染器的blur问题)触发edit-closed,故在edit-close重新赋值
|
|
58
|
+
if (!rform.value) {
|
|
59
|
+
$vUtils.set(props.rparams.column, 'params.__RowEditModelValue', value)
|
|
60
|
+
}
|
|
61
|
+
}
|
|
57
62
|
// 输入框变化回调
|
|
58
63
|
const vxeChangeCallBack = async ({ value, $event }) => {
|
|
59
64
|
setRenderValue(value)
|