Skip to content

NoNetwork

Monitors device network status and displays a friendly prompt when offline, with support for manual and automatic retry.

Platform Compatibility

App(vue)App(nvue)H5Mini Programs

Code Examples

Basic Usage

Control visibility with v-model:show. Set autoCheck to false to disable automatic monitoring.

html
<see-no-network v-model:show="show" :auto-check="false" />

Custom Text

Use text and retryText to customize the prompt message and retry button label.

html
<see-no-network
  v-model:show="show"
  text="Oops, network is unavailable~"
  retry-text="Tap to retry"
  :auto-check="false"
/>

Fullscreen Mode

Set isFullscreen to true to display the component as a fullscreen overlay.

html
<see-no-network v-model:show="show" is-fullscreen :auto-check="false" />

Retry Event

Listen to the onRetry event to execute custom logic when the retry button is tapped.

html
<see-no-network v-model:show="show" :auto-check="false" @on-retry="handleRetry" />

Auto Network Monitoring

autoCheck defaults to true. The component automatically monitors network changes. It shows when offline and hides when back online.

html
<see-no-network v-model:show="show" />

Auto Retry

Set retryInterval in milliseconds to automatically trigger network checks while offline.

html
<see-no-network v-model:show="show" :retry-interval="5000" />

API

Props

PropDescriptionTypeDefaultAccepted Values
showVisibility (v-model)booleanfalsetrue / false
textPrompt messagestring'Network error, please check your connection'-
retryTextRetry button labelstring'Retry'-
isFullscreenWhether to display fullscreenbooleanfalsetrue / false
iconIcon namestring'📡'-
autoCheckAuto monitor network statusbooleantruetrue / false
retryIntervalAuto retry interval (ms), 0 to disablenumber0-

Events

EventDescriptionCallback Parameters
onRetryEmitted when retry button is tapped-
onNetworkChangeEmitted when network status changesonline: boolean
update:showEmitted when visibility changes (v-model)value: boolean

Liao ICP No. 2025070134