@@ -124,24 +124,24 @@ export class JwcComponent extends HTMLElement implements JwcElement {
124
124
const { attr : name , default : defaultValue } = prop ;
125
125
if ( attrs [ name ] ) {
126
126
this . previousProps [ name ] = attrs [ name ] ;
127
- this . props [ name ] = attrs [ name ] ;
127
+ this [ name ] = attrs [ name ] ;
128
128
} else {
129
129
this . previousProps [ name ] = defaultValue ;
130
- this . props [ name ] = defaultValue ;
130
+ this [ name ] = defaultValue ;
131
131
}
132
132
} ) ;
133
133
}
134
134
135
135
private init ( ) {
136
136
this . props = this . getMetaList ( COMPONENT_PROP_METADATA_KEY ) || [ ] ;
137
- const propsList : PropOptions [ ] = Object . values ( this . props ) ;
137
+ this . propsList = Object . values ( this . props ) ;
138
138
const that = this ;
139
139
// define the default value of the props.
140
- propsList . forEach ( ( prop : PropOptions ) => {
140
+ this . propsList . forEach ( ( prop : PropOptions ) => {
141
141
const { attr : name , default : defaultValue } = prop ;
142
142
this . previousProps [ name ] = defaultValue ;
143
143
// getAttribute
144
- this . props [ name ] = defaultValue ;
144
+ this [ name ] = defaultValue ;
145
145
defineProxy ( that , name , prop ) ;
146
146
} ) ;
147
147
this . initWatcher ( ) ;
@@ -201,10 +201,7 @@ export class JwcComponent extends HTMLElement implements JwcElement {
201
201
this . $lastRender = removeAttrs ( rendered ) ;
202
202
}
203
203
204
- public disconnectedCallback ( ) {
205
- this . $options . isMounted = false ;
206
- this . rootNode && this . rootNode . remove ( ) ;
207
- }
204
+ public disconnectedCallback ( ) { }
208
205
209
206
public attributeChangedCallback (
210
207
name : string ,
0 commit comments