|
@@ -10,7 +10,7 @@ Affiche une notification globale dans un coin de la page.
|
|
<template>
|
|
<template>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open">
|
|
|
|
|
|
+ @click="open1">
|
|
Se ferme automatiquement
|
|
Se ferme automatiquement
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
@@ -23,7 +23,7 @@ Affiche une notification globale dans un coin de la page.
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
methods: {
|
|
methods: {
|
|
- open() {
|
|
|
|
|
|
+ open1() {
|
|
const h = this.$createElement;
|
|
const h = this.$createElement;
|
|
|
|
|
|
this.$notify({
|
|
this.$notify({
|
|
@@ -49,27 +49,27 @@ Affiche une notification globale dans un coin de la page.
|
|
|
|
|
|
We provide four types: success, warning, info and error.
|
|
We provide four types: success, warning, info and error.
|
|
|
|
|
|
-:::demo Element fournit quatre types de notifications: `success`, `warning`, `info` et `error`. Il sont choisis grâce au champs `type`, et n'importe quelle autre valeur sera ignorée. Il existe des méthodes enregistrées pour chaque type, comme dans `open5` et `open6`, qui ne nécessitent donc pas le champs `type`.
|
|
|
|
|
|
+:::demo Element fournit quatre types de notifications: `success`, `warning`, `info` et `error`. Il sont choisis grâce au champs `type`, et n'importe quelle autre valeur sera ignorée. Il existe des méthodes enregistrées pour chaque type, comme dans `open3` et `open4`, qui ne nécessitent donc pas le champs `type`.
|
|
```html
|
|
```html
|
|
<template>
|
|
<template>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open3">
|
|
|
|
|
|
+ @click="open1">
|
|
Success
|
|
Success
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open4">
|
|
|
|
|
|
+ @click="open2">
|
|
Warning
|
|
Warning
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open5">
|
|
|
|
|
|
+ @click="open3">
|
|
Info
|
|
Info
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open6">
|
|
|
|
|
|
+ @click="open4">
|
|
Error
|
|
Error
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -77,7 +77,7 @@ We provide four types: success, warning, info and error.
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
methods: {
|
|
methods: {
|
|
- open3() {
|
|
|
|
|
|
+ open1() {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: 'Success',
|
|
title: 'Success',
|
|
message: 'Ceci est un message de succès',
|
|
message: 'Ceci est un message de succès',
|
|
@@ -85,7 +85,7 @@ We provide four types: success, warning, info and error.
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- open4() {
|
|
|
|
|
|
+ open2() {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: 'Warning',
|
|
title: 'Warning',
|
|
message: 'Ceci est un avertissement',
|
|
message: 'Ceci est un avertissement',
|
|
@@ -93,14 +93,14 @@ We provide four types: success, warning, info and error.
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- open5() {
|
|
|
|
|
|
+ open3() {
|
|
this.$notify.info({
|
|
this.$notify.info({
|
|
title: 'Info',
|
|
title: 'Info',
|
|
message: 'Ceci est une information'
|
|
message: 'Ceci est une information'
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- open6() {
|
|
|
|
|
|
+ open4() {
|
|
this.$notify.error({
|
|
this.$notify.error({
|
|
title: 'Error',
|
|
title: 'Error',
|
|
message: 'Ceci est une erreur'
|
|
message: 'Ceci est une erreur'
|
|
@@ -121,22 +121,22 @@ La notification peut apparaître dans le coin de votre choix.
|
|
<template>
|
|
<template>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open7">
|
|
|
|
|
|
+ @click="open1">
|
|
Top Right
|
|
Top Right
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open8">
|
|
|
|
|
|
+ @click="open2">
|
|
Bottom Right
|
|
Bottom Right
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open9">
|
|
|
|
|
|
+ @click="open3">
|
|
Bottom Left
|
|
Bottom Left
|
|
</el-button>
|
|
</el-button>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open10">
|
|
|
|
|
|
+ @click="open4">
|
|
Top Left
|
|
Top Left
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -144,14 +144,14 @@ La notification peut apparaître dans le coin de votre choix.
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
methods: {
|
|
methods: {
|
|
- open7() {
|
|
|
|
|
|
+ open1() {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: 'Custom Position',
|
|
title: 'Custom Position',
|
|
message: 'Je suis dans le coin supérieur droit'
|
|
message: 'Je suis dans le coin supérieur droit'
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- open8() {
|
|
|
|
|
|
+ open2() {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: 'Custom Position',
|
|
title: 'Custom Position',
|
|
message: 'Je suis dans le coin inférieur droit',
|
|
message: 'Je suis dans le coin inférieur droit',
|
|
@@ -159,7 +159,7 @@ La notification peut apparaître dans le coin de votre choix.
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- open9() {
|
|
|
|
|
|
+ open3() {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: 'Custom Position',
|
|
title: 'Custom Position',
|
|
message: 'Je suis dans le coin inférieur gauche',
|
|
message: 'Je suis dans le coin inférieur gauche',
|
|
@@ -167,7 +167,7 @@ La notification peut apparaître dans le coin de votre choix.
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
- open10() {
|
|
|
|
|
|
+ open4() {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: 'Custom Position',
|
|
title: 'Custom Position',
|
|
message: 'Je suis dans le coin supérieur gauche',
|
|
message: 'Je suis dans le coin supérieur gauche',
|
|
@@ -189,7 +189,7 @@ Vous pouvez décaler l'emplacement de la notification par rapport au bord de la
|
|
<template>
|
|
<template>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open11">
|
|
|
|
|
|
+ @click="open">
|
|
Notification avec décalage
|
|
Notification avec décalage
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -197,7 +197,7 @@ Vous pouvez décaler l'emplacement de la notification par rapport au bord de la
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
methods: {
|
|
methods: {
|
|
- open11() {
|
|
|
|
|
|
+ open() {
|
|
this.$notify.success({
|
|
this.$notify.success({
|
|
title: 'Success',
|
|
title: 'Success',
|
|
message: 'Ceci est un message de succès',
|
|
message: 'Ceci est un message de succès',
|
|
@@ -220,7 +220,7 @@ L'attribut `message` supporte le HTML.
|
|
<template>
|
|
<template>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open12">
|
|
|
|
|
|
+ @click="open">
|
|
Utiliser du HTML
|
|
Utiliser du HTML
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -228,7 +228,7 @@ L'attribut `message` supporte le HTML.
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
methods: {
|
|
methods: {
|
|
- open12() {
|
|
|
|
|
|
+ open() {
|
|
this.$notify({
|
|
this.$notify({
|
|
title: 'HTML String',
|
|
title: 'HTML String',
|
|
dangerouslyUseHTMLString: true,
|
|
dangerouslyUseHTMLString: true,
|
|
@@ -255,7 +255,7 @@ Il est possible de cacher le bouton de fermeture.
|
|
<template>
|
|
<template>
|
|
<el-button
|
|
<el-button
|
|
plain
|
|
plain
|
|
- @click="open13">
|
|
|
|
|
|
+ @click="open">
|
|
Bouton de fermeture caché
|
|
Bouton de fermeture caché
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
@@ -263,7 +263,7 @@ Il est possible de cacher le bouton de fermeture.
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
methods: {
|
|
methods: {
|
|
- open13() {
|
|
|
|
|
|
+ open() {
|
|
this.$notify.success({
|
|
this.$notify.success({
|
|
title: 'Info',
|
|
title: 'Info',
|
|
message: 'Ceci est un message sans bouton de fermeture',
|
|
message: 'Ceci est un message sans bouton de fermeture',
|