naive-ui/demo/documentation/components/notification/enUS/scrollable.md
2020-02-04 14:10:35 +08:00

789 B

Scrollable

If there are too many notifications, you can make them scrollable by setting $NNotification.scrollable = true. However, in that case they will overlay a bit more area than them look, which will block some mouse events near notifications. If you don't want the feature, simply not set it.

Change the property will cause all existing notifications to be cleaned, so please make sure you change this property at proper time.

<n-button @click="handleClick(true)">Scrollable(Open some notifications after click)</n-button>
<n-button @click="handleClick(false)">Unscrollable</n-button>
export default {
  methods: {
    handleClick (scrollable) {
      this.$NNotification.scrollable = scrollable
    }
  }
}
.n-button {
  margin: 0 12px 8px 0;
}