Refactor #6408
parent
055732d385
commit
827787ff00
|
@ -84,7 +84,6 @@ export default {
|
||||||
this.rootEl = findSingle(this.$el, `[data-pc-name="${toFlatCase(this.$.type.name)}"]`);
|
this.rootEl = findSingle(this.$el, `[data-pc-name="${toFlatCase(this.$.type.name)}"]`);
|
||||||
|
|
||||||
if (this.rootEl) {
|
if (this.rootEl) {
|
||||||
this.rootEl.setAttribute(this.$attrSelector, '');
|
|
||||||
this.rootEl.$pc = { name: this.$.type.name, attrSelector: this.$attrSelector, ...this.$params };
|
this.rootEl.$pc = { name: this.$.type.name, attrSelector: this.$attrSelector, ...this.$params };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,7 +232,8 @@ export default {
|
||||||
key !== 'transition' && {
|
key !== 'transition' && {
|
||||||
...(key === 'root' && {
|
...(key === 'root' && {
|
||||||
[`${datasetPrefix}name`]: toFlatCase(isExtended ? this.pt?.['data-pc-section'] : this.$.type.name),
|
[`${datasetPrefix}name`]: toFlatCase(isExtended ? this.pt?.['data-pc-section'] : this.$.type.name),
|
||||||
...(isExtended && { [`${datasetPrefix}extend`]: toFlatCase(this.$.type.name) })
|
...(isExtended && { [`${datasetPrefix}extend`]: toFlatCase(this.$.type.name) }),
|
||||||
|
[`${this.$attrSelector}`]: ''
|
||||||
}),
|
}),
|
||||||
[`${datasetPrefix}section`]: toFlatCase(key)
|
[`${datasetPrefix}section`]: toFlatCase(key)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue