-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
246 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,15 @@ | ||
# customize-the-appearance-of-the-vue-dialog-using-templates | ||
# Customize the Appearance of the Vue Dialog Using Templates | ||
|
||
A quick-start project that helps you to customize the Syncfusion Vue Dialog component appearance using templates in a Vue application. This project contains code to customize a header, content and footer of the dialog. | ||
|
||
Refer to the following documentation to learn about the Vue Dialog component: | ||
https://ej2.syncfusion.com/vue/documentation/dialog/template | ||
|
||
Check out this online example of the Vue Dialog component: | ||
https://ej2.syncfusion.com/vue/demos/#/bootstrap5/dialog/template.html | ||
|
||
## Project prerequisites | ||
Make sure that you have the compatible versions of [Visual Studio Code](https://code.visualstudio.com/download ) and [NodeJS](https://nodejs.org/en/download) or later version in your machine before starting to work on this project. | ||
|
||
## How to run this application | ||
To run this application, you need to first clone the `customize-the-appearance-of-the-vue-dialog-using-templates` repository and then open it in Visual Studio Code. Now, simply build and run your project to view the output. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link href="https://cdn.syncfusion.com/ej2/26.2.4/material.css" rel="stylesheet"> | ||
<title>Vite + Vue</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "myvueapp", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@syncfusion/ej2-vue-popups": "^26.2.5", | ||
"vue": "^3.4.31" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "^5.0.5", | ||
"vite": "^5.3.4" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<script setup> | ||
import {DialogComponent as EjsDialog} from '@syncfusion/ej2-vue-popups'; | ||
</script> | ||
|
||
<template> | ||
|
||
<ejs-dialog height="200px" width="370px" :header="'headerTemplate'" :content="'contentTemplate'" | ||
:footerTemplate="'footerTemplate'" | ||
showCloseIcon="true"> | ||
<template v-slot:headerTemplate> | ||
<div class="header"> | ||
<img class="image" src="\logo.png" /> | ||
<span id="template"> Syncfusion </span> | ||
</div> | ||
</template> | ||
<template v-slot:contentTemplate> | ||
<div class="content"> | ||
<span class="dialogText">Want to be alerted when our videos are published? Enter your mail address to be the first notified!</span> | ||
</div> | ||
</template> | ||
<template v-slot:footerTemplate> | ||
<div class="footer"> | ||
<input id='textbox' class='e-input' placeholder='Enter your mail id'/> | ||
<button class='e-info e-btn'>SUBSCRIBE</button> | ||
</div> | ||
</template> | ||
</ejs-dialog> | ||
</template> | ||
|
||
<style scoped> | ||
@import "../node_modules/@syncfusion/ej2-base/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-popups/styles/material.css"; | ||
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css"; | ||
#template { | ||
font-weight: bold; | ||
font-size:20px; | ||
margin:6px; | ||
} | ||
.image{ | ||
width: 40px; | ||
height: 35px; | ||
} | ||
.header{ | ||
display:inline-flex; | ||
} | ||
.content { | ||
font-family: serif; | ||
font-size: 16px; | ||
} | ||
#textbox { | ||
float: left; | ||
width: 65%; | ||
padding:2px; | ||
} | ||
.footer{ | ||
padding: 10px; | ||
} | ||
</style> | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
defineProps({ | ||
msg: String, | ||
}) | ||
const count = ref(0) | ||
</script> | ||
|
||
<template> | ||
<h1>{{ msg }}</h1> | ||
|
||
<div class="card"> | ||
<button type="button" @click="count++">count is {{ count }}</button> | ||
<p> | ||
Edit | ||
<code>components/HelloWorld.vue</code> to test HMR | ||
</p> | ||
</div> | ||
|
||
<p> | ||
Check out | ||
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank" | ||
>create-vue</a | ||
>, the official Vue + Vite starter | ||
</p> | ||
<p> | ||
Learn more about IDE Support for Vue in the | ||
<a | ||
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support" | ||
target="_blank" | ||
>Vue Docs Scaling up Guide</a | ||
>. | ||
</p> | ||
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p> | ||
</template> | ||
|
||
<style scoped> | ||
.read-the-docs { | ||
color: #888; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { createApp } from 'vue' | ||
import './style.css' | ||
import App from './App.vue' | ||
import {registerLicense} from '@syncfusion/ej2-base'; | ||
registerLicense("Ngo9BigBOggjHTQxAR8/V1NCaF1cWWhBYVJxWmFZfVpgdV9EYFZQR2YuP1ZhSXxXdkJhXH9ZdXdVRWFcVkA="); | ||
|
||
createApp(App).mount('#app') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
:root { | ||
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; | ||
line-height: 1.5; | ||
font-weight: 400; | ||
|
||
color-scheme: light dark; | ||
color: rgba(255, 255, 255, 0.87); | ||
background-color: #242424; | ||
|
||
font-synthesis: none; | ||
text-rendering: optimizeLegibility; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
|
||
a { | ||
font-weight: 500; | ||
color: #646cff; | ||
text-decoration: inherit; | ||
} | ||
a:hover { | ||
color: #535bf2; | ||
} | ||
|
||
body { | ||
margin: 0; | ||
display: flex; | ||
place-items: center; | ||
min-width: 320px; | ||
min-height: 100vh; | ||
} | ||
|
||
h1 { | ||
font-size: 3.2em; | ||
line-height: 1.1; | ||
} | ||
|
||
button { | ||
border-radius: 8px; | ||
border: 1px solid transparent; | ||
padding: 0.6em 1.2em; | ||
font-size: 1em; | ||
font-weight: 500; | ||
font-family: inherit; | ||
background-color: #1a1a1a; | ||
cursor: pointer; | ||
transition: border-color 0.25s; | ||
} | ||
button:hover { | ||
border-color: #646cff; | ||
} | ||
button:focus, | ||
button:focus-visible { | ||
outline: 4px auto -webkit-focus-ring-color; | ||
} | ||
|
||
.card { | ||
padding: 2em; | ||
} | ||
|
||
#app { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
|
||
@media (prefers-color-scheme: light) { | ||
:root { | ||
color: #213547; | ||
background-color: #ffffff; | ||
} | ||
a:hover { | ||
color: #747bff; | ||
} | ||
button { | ||
background-color: #f9f9f9; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { defineConfig } from 'vite' | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()], | ||
}) |