2020-02-03 19:28:16 +08:00
# Namespace (Class on Detached DOM)
2020-03-08 00:06:05 +08:00
Some parts of component are detached to `document.body` . If you want to add a class to those detached elements, use `namespace` prop of `n-config-provider` . Open devtools to see detached part.
2019-10-12 15:46:02 +08:00
```html
2019-11-09 22:45:07 +08:00
< n-config-provider :namespace = "ns" >
2020-02-03 19:28:16 +08:00
< n-tooltip
placement="bottom"
trigger="click"
2019-10-12 15:46:02 +08:00
>
2020-02-03 19:28:16 +08:00
< template v-slot:activator >
< n-button
@click ="isActive = true"
>
Activate Component with Detached Content
< / n-button >
< / template >
< span >
Detached Part
< / span >
< / n-tooltip >
2019-11-09 22:45:07 +08:00
< / n-config-provider >
2019-10-12 15:46:02 +08:00
```
```js
export default {
data () {
return {
ns: 'custom-app-namespace1',
2020-02-03 19:28:16 +08:00
isActive: false
2019-10-12 15:46:02 +08:00
}
}
}
2020-01-04 17:32:23 +08:00
```