File tree 1 file changed +22
-17
lines changed
1 file changed +22
-17
lines changed Original file line number Diff line number Diff line change 9
9
convertAttributeValue
10
10
} from './utils.js'
11
11
12
- export default function wrap ( Vue , Component ) {
12
+ export default function wrap ( Vue , Component , vueAttributeBeforeRender ) {
13
13
const isAsync = typeof Component === 'function' && ! Component . cid
14
14
let isInitialized = false
15
15
let hyphenatedPropsList
@@ -83,23 +83,28 @@ export default function wrap (Vue, Component) {
83
83
const self = super ( )
84
84
self . attachShadow ( { mode : 'open' } )
85
85
86
- const wrapper = self . _wrapper = new Vue ( {
87
- name : 'shadow-root' ,
88
- customElement : self ,
89
- shadowRoot : self . shadowRoot ,
90
- data ( ) {
91
- return {
92
- props : { } ,
93
- slotChildren : [ ]
86
+ const wrapper = self . _wrapper = new Vue (
87
+ Object . assign (
88
+ vueAttributeBeforeRender , {
89
+ name : 'shadow-root' ,
90
+ customElement : self ,
91
+ shadowRoot : self . shadowRoot ,
92
+
93
+ data ( ) {
94
+ return {
95
+ props : { } ,
96
+ slotChildren : [ ]
97
+ }
98
+ } ,
99
+
100
+ render ( h ) {
101
+ return h ( Component , {
102
+ ref : 'inner' ,
103
+ props : this . props
104
+ } , this . slotChildren )
105
+ }
94
106
}
95
- } ,
96
- render ( h ) {
97
- return h ( Component , {
98
- ref : 'inner' ,
99
- props : this . props
100
- } , this . slotChildren )
101
- }
102
- } )
107
+ ) )
103
108
104
109
// Use MutationObserver to react to future attribute & slot content change
105
110
const observer = new MutationObserver ( mutations => {
You can’t perform that action at this time.
0 commit comments