Refactor #4473
parent
c634ad5dfe
commit
44212378dc
|
@ -487,8 +487,6 @@ export default {
|
||||||
return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? { class: value } : value;
|
return ObjectUtils.isString(value) || ObjectUtils.isArray(value) ? { class: value } : value;
|
||||||
},
|
},
|
||||||
_getPT(pt, key = '', callback) {
|
_getPT(pt, key = '', callback) {
|
||||||
const _usept = pt?.['_usept'];
|
|
||||||
|
|
||||||
const getValue = (value, checkSameKey = false) => {
|
const getValue = (value, checkSameKey = false) => {
|
||||||
const computedValue = callback ? callback(value) : value;
|
const computedValue = callback ? callback(value) : value;
|
||||||
const _key = ObjectUtils.toFlatCase(key);
|
const _key = ObjectUtils.toFlatCase(key);
|
||||||
|
@ -497,9 +495,9 @@ export default {
|
||||||
return (checkSameKey ? (_key !== _cKey ? computedValue?.[_key] : undefined) : computedValue?.[_key]) ?? computedValue;
|
return (checkSameKey ? (_key !== _cKey ? computedValue?.[_key] : undefined) : computedValue?.[_key]) ?? computedValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
return ObjectUtils.isNotEmpty(_usept)
|
return pt?.hasOwnProperty('_usept')
|
||||||
? {
|
? {
|
||||||
_usept,
|
_usept: pt['_usept'],
|
||||||
originalValue: getValue(pt.originalValue),
|
originalValue: getValue(pt.originalValue),
|
||||||
value: getValue(pt.value)
|
value: getValue(pt.value)
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,6 @@ const BaseDirective = {
|
||||||
return mergeSections || (!mergeSections && self) ? (useMergeProps ? mergeProps(global, self, datasets) : { ...global, ...self, ...datasets }) : { ...self, ...datasets };
|
return mergeSections || (!mergeSections && self) ? (useMergeProps ? mergeProps(global, self, datasets) : { ...global, ...self, ...datasets }) : { ...self, ...datasets };
|
||||||
},
|
},
|
||||||
_getPT: (pt, key = '', callback) => {
|
_getPT: (pt, key = '', callback) => {
|
||||||
const _usept = pt?.['_usept'];
|
|
||||||
|
|
||||||
const getValue = (value) => {
|
const getValue = (value) => {
|
||||||
const computedValue = callback ? callback(value) : value;
|
const computedValue = callback ? callback(value) : value;
|
||||||
const _key = ObjectUtils.toFlatCase(key);
|
const _key = ObjectUtils.toFlatCase(key);
|
||||||
|
@ -42,9 +40,9 @@ const BaseDirective = {
|
||||||
return computedValue?.[_key] ?? computedValue;
|
return computedValue?.[_key] ?? computedValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
return ObjectUtils.isNotEmpty(_usept)
|
return pt?.hasOwnProperty('_usept')
|
||||||
? {
|
? {
|
||||||
_usept,
|
_usept: pt['_usept'],
|
||||||
originalValue: getValue(pt.originalValue),
|
originalValue: getValue(pt.originalValue),
|
||||||
value: getValue(pt.value)
|
value: getValue(pt.value)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue