resolver-egretimp-plus 0.1.111 → 0.1.112
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/dist/h5/index.js +1 -1
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/common.scss +7 -1
- package/dist/theme/element/src/components/table.scss +13 -0
- package/dist/web/index.js +13 -13
- package/package.json +1 -1
- package/src/components/packages-web/CustomComponentTable.jsx +10 -6
- package/src/theme/element/components/common.scss +7 -1
- package/src/theme/element/components/table.scss +13 -0
- package/src/utils/render.jsx +24 -28
package/package.json
CHANGED
|
@@ -23,10 +23,14 @@ export default {
|
|
|
23
23
|
triggerRef: null,
|
|
24
24
|
content: ''
|
|
25
25
|
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
|
|
27
|
+
// let pageSize = 10 // 默认每页5条
|
|
28
|
+
// if (props.config?.pageSize) {
|
|
29
|
+
// pageSize = parseInt(props.config.pageSize) || 5
|
|
30
|
+
// }
|
|
31
|
+
const pageSize = computed(() => {
|
|
32
|
+
return parseInt(props.config.pageSize) || 5
|
|
33
|
+
})
|
|
30
34
|
const page = reactive({
|
|
31
35
|
pageNum: 1,
|
|
32
36
|
pageSize,
|
|
@@ -252,6 +256,7 @@ export default {
|
|
|
252
256
|
retObj.className = `${retObj.className || ''} clear-index`
|
|
253
257
|
}
|
|
254
258
|
if (!isVirtualized.value) {
|
|
259
|
+
retObj.className = `${retObj.className} cell-col-ellipsis`
|
|
255
260
|
if (!retObj.prop) {
|
|
256
261
|
retObj.prop = config.metaCode
|
|
257
262
|
}
|
|
@@ -600,7 +605,6 @@ export default {
|
|
|
600
605
|
const dataList = computed(() => {
|
|
601
606
|
return totalRow.value?.length ? [...tableData.value, ...totalRow.value] : tableData.value
|
|
602
607
|
})
|
|
603
|
-
// console.log('dynamicMapComp===:', inject('dynamicMapComp'))
|
|
604
608
|
|
|
605
609
|
function cellMouseEnenter(e) {
|
|
606
610
|
const {overflow, content} = eleIsOverflow(e)
|
|
@@ -676,7 +680,7 @@ export default {
|
|
|
676
680
|
}
|
|
677
681
|
if (isVirtualized.value) {
|
|
678
682
|
retVnode = (
|
|
679
|
-
<div className="table-v2-cell" onMouseenter={(e) => cellMouseEnenter(e)}
|
|
683
|
+
<div className="table-v2-cell" onMouseenter={(e) => cellMouseEnenter(e)} onMouseleave={(e) => cellMouseout(e)}>
|
|
680
684
|
{retVnode}
|
|
681
685
|
</div>
|
|
682
686
|
)
|
|
@@ -154,6 +154,14 @@
|
|
|
154
154
|
.pagination-wrap {
|
|
155
155
|
display: flex;
|
|
156
156
|
}
|
|
157
|
+
.cell-col-ellipsis {
|
|
158
|
+
& > .cell > .el-col {
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
text-overflow: ellipsis;
|
|
161
|
+
white-space: nowrap;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
157
165
|
// table-v2
|
|
158
166
|
.table-border {
|
|
159
167
|
--el-table-header-bg-color: #f5f6f7;
|
|
@@ -181,6 +189,11 @@
|
|
|
181
189
|
.table-v2-cell {
|
|
182
190
|
padding: 0 16px;
|
|
183
191
|
width: 100%;
|
|
192
|
+
& > .el-col {
|
|
193
|
+
overflow: hidden;
|
|
194
|
+
text-overflow: ellipsis;
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
}
|
|
184
197
|
}
|
|
185
198
|
.table-v2-common-row {
|
|
186
199
|
border-bottom: none;
|
package/src/utils/render.jsx
CHANGED
|
@@ -721,6 +721,12 @@ function generateFormItemPc (config, lang, compProps, params,) {
|
|
|
721
721
|
return node
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
+
|
|
725
|
+
// 表格中的列,不需要form-item的时候,就尽可能不要,可以提升性能
|
|
726
|
+
|
|
727
|
+
if (!props?.rules?.length && props?.class?.['hidden-label'] && config.isColumn) {
|
|
728
|
+
return node
|
|
729
|
+
}
|
|
724
730
|
|
|
725
731
|
const slots = {
|
|
726
732
|
error: (info) => createFormLabelErrorTip(info, config, lang)
|
|
@@ -787,6 +793,10 @@ export function generateFormItemPolyfill(config, lang, compProps, _isH5, params)
|
|
|
787
793
|
}
|
|
788
794
|
}
|
|
789
795
|
|
|
796
|
+
function isHiddenLable(config) {
|
|
797
|
+
return (config.labelWidth == 0 || config.labelWidth === '0px' || config.labelHidden == '1') && config.showLabel != '1'
|
|
798
|
+
}
|
|
799
|
+
|
|
790
800
|
function getFormItemExtendProps(config, lang, params, compProps) {
|
|
791
801
|
const prop = config.dynamicHireRelat || ''
|
|
792
802
|
// const propAttr = config.dynamicHireRelat ? config.dynamicHireRelat?.split('->') : []
|
|
@@ -803,7 +813,7 @@ function getFormItemExtendProps(config, lang, params, compProps) {
|
|
|
803
813
|
class: {
|
|
804
814
|
[`vertical-${config['label-vertical'] || config['labelVertical'] || 'center'}`]: true,
|
|
805
815
|
'content-right': config.contentRight,
|
|
806
|
-
'hidden-label': (config
|
|
816
|
+
'hidden-label': isHiddenLable(config),
|
|
807
817
|
[`label-position-${config['label-position'] || config['labelPosition'] || 'right'}`]: true // label-position 支持三个值,right、left、top
|
|
808
818
|
},
|
|
809
819
|
style,
|
|
@@ -818,17 +828,18 @@ export function getFormItemRule(config, lang, params, compProps, fromCustValid)
|
|
|
818
828
|
if (config.showMoney && config.metaType == 'ElInput') {
|
|
819
829
|
trigger = 'blur'
|
|
820
830
|
}
|
|
821
|
-
const rules = [
|
|
831
|
+
const rules = []
|
|
832
|
+
// 是否需要去进行校验
|
|
833
|
+
const needToValid = !(
|
|
834
|
+
(compProps?.disabled || isPlainColumn(config, compProps?.disabled)) && config.alongValidate != '1' ||
|
|
835
|
+
isChainHidden({ config })
|
|
836
|
+
)
|
|
837
|
+
if (!needToValid) {
|
|
838
|
+
return rules
|
|
839
|
+
}
|
|
840
|
+
rules.push({
|
|
822
841
|
// required,
|
|
823
842
|
validator: (rule, value, callback) => {
|
|
824
|
-
if ((compProps?.disabled || isPlainColumn(config, compProps?.disabled)) && config.alongValidate != '1') {
|
|
825
|
-
callback()
|
|
826
|
-
return
|
|
827
|
-
}
|
|
828
|
-
if (isChainHidden({ config })) {
|
|
829
|
-
callback()
|
|
830
|
-
return
|
|
831
|
-
}
|
|
832
843
|
let val = config?.refValue
|
|
833
844
|
if (fromCustValid) {
|
|
834
845
|
val = value
|
|
@@ -850,7 +861,8 @@ export function getFormItemRule(config, lang, params, compProps, fromCustValid)
|
|
|
850
861
|
}
|
|
851
862
|
},
|
|
852
863
|
trigger,
|
|
853
|
-
}
|
|
864
|
+
})
|
|
865
|
+
|
|
854
866
|
let regexPattern = []
|
|
855
867
|
if (config.regexPattern) {
|
|
856
868
|
try {
|
|
@@ -874,14 +886,6 @@ export function getFormItemRule(config, lang, params, compProps, fromCustValid)
|
|
|
874
886
|
if (regexPattern?.length) {
|
|
875
887
|
rules.push({
|
|
876
888
|
validator: (rule, value, callback) => {
|
|
877
|
-
if ((compProps?.disabled || isPlainColumn(config, compProps?.disabled)) && config.alongValidate != '1') {
|
|
878
|
-
callback()
|
|
879
|
-
return
|
|
880
|
-
}
|
|
881
|
-
if (isChainHidden({ config })) {
|
|
882
|
-
callback()
|
|
883
|
-
return
|
|
884
|
-
}
|
|
885
889
|
const bingdValue = config?.refValue
|
|
886
890
|
if (fromCustValid) {
|
|
887
891
|
val = value
|
|
@@ -915,14 +919,6 @@ export function getFormItemRule(config, lang, params, compProps, fromCustValid)
|
|
|
915
919
|
if (isFunction(validator)) {
|
|
916
920
|
rules.push({
|
|
917
921
|
validator: (rule, value, callback) => {
|
|
918
|
-
if ((compProps?.disabled || isPlainColumn(config, compProps?.disabled)) && config.alongValidate != '1') {
|
|
919
|
-
callback()
|
|
920
|
-
return
|
|
921
|
-
}
|
|
922
|
-
if (isChainHidden({ config })) {
|
|
923
|
-
callback()
|
|
924
|
-
return
|
|
925
|
-
}
|
|
926
922
|
return validator(rule, config.refValue, callback, config)
|
|
927
923
|
},
|
|
928
924
|
trigger,
|
|
@@ -995,7 +991,7 @@ function createFormLable(config, lang = 'zh') {
|
|
|
995
991
|
<div title={lang.indexOf('zh') > -1 ? (config.labelZh || config.metaNameZh) : (config.labelEn || config.metaNameEn)} class="custom-label">
|
|
996
992
|
<span
|
|
997
993
|
onMouseenter={(e) => labelMouseEnenter(e, config, lang)}
|
|
998
|
-
|
|
994
|
+
onMouseleave={() => config._labelShowTip = false}
|
|
999
995
|
class={`custom-label-content ${required ? 'custom-label-require' : ''}`} style={config.labelStyle}
|
|
1000
996
|
onClick={() => config.onLabelClick && config.onLabelClick?.(config)}
|
|
1001
997
|
>
|