sks-plugin-el-erp 1.0.4-beta.13 → 1.0.4-beta.16
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/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
setSksTableDataByPage,
|
|
20
20
|
strIfEmpty,
|
|
21
21
|
strIsEmpty,
|
|
22
|
-
strLength, generateUUID, initListVueVirtualUUID
|
|
22
|
+
strLength, generateUUID, initListVueVirtualUUID, genRowVueVirtualUUID
|
|
23
23
|
} from "./lib/core";
|
|
24
24
|
import {newTableColumnList} from "./lib/sks-model-utils";
|
|
25
25
|
import './lib/style/sks-main.css'
|
|
@@ -67,6 +67,7 @@ const sksUtils={
|
|
|
67
67
|
rowStyleElTable,
|
|
68
68
|
generateUUID,
|
|
69
69
|
initListVueVirtualUUID,
|
|
70
|
+
genRowVueVirtualUUID,
|
|
70
71
|
|
|
71
72
|
//modal
|
|
72
73
|
msgError,
|
package/lib/core.js
CHANGED
|
@@ -997,6 +997,21 @@ export function initRowVueVirtualUUID(item){
|
|
|
997
997
|
}
|
|
998
998
|
|
|
999
999
|
|
|
1000
|
+
/**
|
|
1001
|
+
* 如果 vueVirtualUUID 不存在则生成
|
|
1002
|
+
* 主要用于组件中 for循环需要一个key
|
|
1003
|
+
* @param item
|
|
1004
|
+
* @return {string} vueVirtualUUID 的值
|
|
1005
|
+
*/
|
|
1006
|
+
export function genRowVueVirtualUUID(item){
|
|
1007
|
+
let vueVirtualUUID=item.vueVirtualUUID
|
|
1008
|
+
if(isNullOrUndefined(vueVirtualUUID)){
|
|
1009
|
+
vueVirtualUUID=generateUUID();
|
|
1010
|
+
item.vueVirtualUUID=vueVirtualUUID
|
|
1011
|
+
}
|
|
1012
|
+
return vueVirtualUUID;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1000
1015
|
/**
|
|
1001
1016
|
* 清除属性校验错误信息
|
|
1002
1017
|
* @param propName
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
<!-- </el-table-column>-->
|
|
64
64
|
<!-- 动态列,列显示错位,官方建议增加一个 width为1的列-->
|
|
65
65
|
<!-- <el-table-column width="1"></el-table-column>-->
|
|
66
|
-
<template v-for="(item,itemIndex) in mainTable.tableColumnList" :key="sksUtils.
|
|
66
|
+
<template v-for="(item,itemIndex) in mainTable.tableColumnList" :key="sksUtils.genRowVueVirtualUUID(item)">
|
|
67
67
|
<template v-if="sksUtils.strIsEmpty(item.slot)" >
|
|
68
68
|
<!-- 当表格列项动态显示时,多次刷新,造成渲染时出现列项错乱现象
|
|
69
69
|
加上 key="itemIndex"
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<span v-if="queryParams" >
|
|
3
3
|
<el-form :key="showParams" :model="queryParams.sksParams" ref="queryForm" :inline="true" v-show="showSearch" :label-width="labelWidth" @submit.native.prevent>
|
|
4
4
|
<slot name="default"></slot>
|
|
5
|
-
<template v-for="(item,index) in queryParamsColumnList">
|
|
6
|
-
<template v-if="strIsEmpty(item.slot)" >
|
|
5
|
+
<template v-for="(item,index) in queryParamsColumnList" :key="sksUtils.genRowVueVirtualUUID(item)">
|
|
6
|
+
<template v-if="sksUtils.strIsEmpty(item.slot)" >
|
|
7
7
|
<el-form-item v-if="item.visible" :style="item.itemStyle" :label="item.label" :prop="item.prop" >
|
|
8
8
|
<template v-if="item.htmlType=='none'">
|
|
9
9
|
<slot :name="`none-${item.prop}`" :queryItem="item">
|