primevue-mirror/doc/dialog/WithoutModalDoc.vue

117 lines
4.7 KiB
Vue
Raw Normal View History

2023-02-28 08:29:30 +00:00
<template>
<DocSectionText v-bind="$attrs">
2024-01-23 22:25:44 +00:00
<p>Mask layer behind the Dialog is configured with the <i>modal</i> property. By default, no modal layer is added.</p>
2023-02-28 08:29:30 +00:00
</DocSectionText>
<div class="card flex justify-content-center">
2024-01-23 22:25:44 +00:00
<Button label="Show" @click="visible = true" />
2023-02-28 08:29:30 +00:00
2024-01-23 22:25:44 +00:00
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }">
2024-05-13 14:02:20 +00:00
<span class="text-color-secondary block mb-5">Update your information.</span>
2024-01-23 22:25:44 +00:00
<div class="flex align-items-center gap-3 mb-3">
<label for="username" class="font-semibold w-6rem">Username</label>
<InputText id="username" class="flex-auto" autocomplete="off" />
</div>
<div class="flex align-items-center gap-3 mb-5">
<label for="email" class="font-semibold w-6rem">Email</label>
2024-02-13 13:05:25 +00:00
<InputText id="email" class="flex-auto" autocomplete="off" />
2024-01-23 22:25:44 +00:00
</div>
<div class="flex justify-content-end gap-2">
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
<Button type="button" label="Save" @click="visible = false"></Button>
</div>
2023-02-28 08:29:30 +00:00
</Dialog>
</div>
<DocSectionCode :code="code" />
</template>
<script>
export default {
data() {
return {
visible: false,
code: {
2023-09-22 12:54:14 +00:00
basic: `
2024-01-23 22:25:44 +00:00
<Button label="Show" @click="visible = true" />
2023-02-28 08:29:30 +00:00
2024-01-23 22:25:44 +00:00
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }">
2024-05-13 14:02:20 +00:00
<span class="text-color-secondary block mb-5">Update your information.</span>
2024-01-23 22:25:44 +00:00
<div class="flex align-items-center gap-3 mb-3">
<label for="username" class="font-semibold w-6rem">Username</label>
<InputText id="username" class="flex-auto" autocomplete="off" />
</div>
<div class="flex align-items-center gap-3 mb-5">
<label for="email" class="font-semibold w-6rem">Email</label>
2024-02-13 13:05:25 +00:00
<InputText id="email" class="flex-auto" autocomplete="off" />
2024-01-23 22:25:44 +00:00
</div>
<div class="flex justify-content-end gap-2">
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
<Button type="button" label="Save" @click="visible = false"></Button>
</div>
2023-10-15 09:38:39 +00:00
</Dialog>
`,
2023-09-22 12:54:14 +00:00
options: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
2024-01-23 22:25:44 +00:00
<Button label="Show" @click="visible = true" />
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }">
2024-05-13 14:02:20 +00:00
<span class="text-color-secondary block mb-5">Update your information.</span>
2024-01-23 22:25:44 +00:00
<div class="flex align-items-center gap-3 mb-3">
<label for="username" class="font-semibold w-6rem">Username</label>
<InputText id="username" class="flex-auto" autocomplete="off" />
</div>
<div class="flex align-items-center gap-3 mb-5">
<label for="email" class="font-semibold w-6rem">Email</label>
2024-02-13 13:05:25 +00:00
<InputText id="email" class="flex-auto" autocomplete="off" />
2024-01-23 22:25:44 +00:00
</div>
<div class="flex justify-content-end gap-2">
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
<Button type="button" label="Save" @click="visible = false"></Button>
</div>
2023-02-28 08:29:30 +00:00
</Dialog>
</div>
</template>
<script>
export default {
data() {
return {
visible: false
};
}
};
2023-10-15 09:38:39 +00:00
<\/script>
`,
2023-09-22 12:54:14 +00:00
composition: `
<template>
2023-02-28 08:29:30 +00:00
<div class="card flex justify-content-center">
2024-01-23 22:25:44 +00:00
<Button label="Show" @click="visible = true" />
<Dialog v-model:visible="visible" header="Edit Profile" :style="{ width: '25rem' }">
2024-05-13 14:02:20 +00:00
<span class="text-color-secondary block mb-5">Update your information.</span>
2024-01-23 22:25:44 +00:00
<div class="flex align-items-center gap-3 mb-3">
<label for="username" class="font-semibold w-6rem">Username</label>
<InputText id="username" class="flex-auto" autocomplete="off" />
</div>
<div class="flex align-items-center gap-3 mb-5">
<label for="email" class="font-semibold w-6rem">Email</label>
2024-02-13 13:05:25 +00:00
<InputText id="email" class="flex-auto" autocomplete="off" />
2024-01-23 22:25:44 +00:00
</div>
<div class="flex justify-content-end gap-2">
<Button type="button" label="Cancel" severity="secondary" @click="visible = false"></Button>
<Button type="button" label="Save" @click="visible = false"></Button>
</div>
2023-02-28 08:29:30 +00:00
</Dialog>
</div>
</template>
<script setup>
import { ref } from "vue";
const visible = ref(false);
2023-10-15 09:38:39 +00:00
<\/script>
`
2023-02-28 08:29:30 +00:00
}
};
}
};
</script>