fix(detachable): add default value for injected NApp

This commit is contained in:
07akioni 2019-08-20 17:14:57 +08:00
parent 82573a95df
commit 130ab7f843

View File

@ -7,7 +7,11 @@
* @prop {HTMLElement} detachTarget determine where should $refs.contentContainer to be detached
*/
export default {
inject: [ 'NApp' ],
inject: {
NApp: {
default: null
}
},
computed: {
namespace () {
return (this.NApp && this.NApp.namespace) || null