Components: {
Showform: ()=& gt; Import (' components/form/+ String (this. $route. Params. Processid) + 'vue')
},
But found so write words, compile time server will always jammed, the front desk page has also been loading,
Ask what is the place to write wrong? And what better way?
CodePudding user response:
The problem of this pointerTo the top in the script first define variables var _that=null;
Components: {
Custom: ()=& gt; Import (`./component/${_that. Name} `)
},
Second created to _that inside this vue of an assignment for the current instance
CodePudding user response:
Is this change? If not yet<script>
Var FormComponentName=null
Export the default {
Data () {
Return {
TAB: 'showform',
Title: null
}
},
Components: {
Showform: ()=& gt; Import (` components/form/${FormComponentName. $route. Params. Processid}. Vue `),
},
Created: the function () {
FormComponentName=this
}
}
</script>