Skip to content

Commit

Permalink
Refactor #4231
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Aug 3, 2023
1 parent 2e9a697 commit dc0e806
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions components/lib/basecomponent/BaseComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,14 @@ export default {
const datasetPrefix = 'data-pc-';
const self = this._getPTClassValue(obj, key, params);
const globalPT = searchInDefaultPT ? (/./g.test(key) && !!params[key.split('.')[0]] ? this._getPTClassValue(this.globalPT, key, params) : this._getPTClassValue(this.defaultPT, key, params)) : undefined;
const merged = mergeProps(self, globalPT, {
...(key === 'root' && { [`${datasetPrefix}name`]: ObjectUtils.toFlatCase(this.$.type.name) }),
[`${datasetPrefix}section`]: ObjectUtils.toFlatCase(key)
});
const merged = mergeProps(
self,
globalPT,
key !== 'transition' && {
...(key === 'root' && { [`${datasetPrefix}name`]: ObjectUtils.toFlatCase(this.$.type.name) }),
[`${datasetPrefix}section`]: ObjectUtils.toFlatCase(key)
}
);
return merged;
/*
Expand Down

0 comments on commit dc0e806

Please sign in to comment.