primevue-mirror/doc/message/StickyDoc.vue

56 lines
1.9 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
<p>
Messages are sticky by default, if you require them to be cleared automatically, disable <i>sticky</i> property and optionally configure the <i>life</i> property to specify how long the message should be displayed which is 3000 ms by
default.
</p>
</DocSectionText>
<div class="card">
<Message severity="success" sticky>Success Message Content</Message>
<Message severity="info" sticky>Info Message Content</Message>
<Message severity="warn" sticky>Warning Message Content</Message>
<Message severity="error" sticky>Error Message Content</Message>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
code: {
2023-09-22 12:54:14 +00:00
basic: `
<Message severity="success" sticky>Success Message Content</Message>
2023-02-28 08:29:30 +00:00
<Message severity="info" sticky>Info Message Content</Message>
<Message severity="warn" sticky>Warning Message Content</Message>
<Message severity="error" sticky>Error Message Content</Message>`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Message severity="success" sticky>Success Message Content</Message>
<Message severity="info" sticky>Info Message Content</Message>
<Message severity="warn" sticky>Warning Message Content</Message>
<Message severity="error" sticky>Error Message Content</Message>
</div>
</template>
<script>
<\/script>`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card">
<Message severity="success" sticky>Success Message Content</Message>
<Message severity="info" sticky>Info Message Content</Message>
<Message severity="warn" sticky>Warning Message Content</Message>
<Message severity="error" sticky>Error Message Content</Message>
</div>
</template>
<script setup>
<\/script>`
}
};
}
};
</script>