@mapomodule/uikit 1.0.0-alpha.4 → 1.0.0-alpha.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +749 -0
- package/components/ConfirmDialog.vue +12 -16
- package/components/Detail/Detail.vue +406 -272
- package/components/Detail/DetailLangSwitch.vue +7 -2
- package/components/DropArea.vue +63 -56
- package/components/Form/Form.vue +218 -0
- package/components/Form/FormField.vue +213 -0
- package/components/Form/FormGroup.vue +146 -0
- package/components/Form/FormTabs.vue +188 -0
- package/components/Form/defaults.js +91 -0
- package/components/Form/fields/ColorField.vue +79 -0
- package/components/{fields → Form/fields}/DateField.vue +20 -11
- package/components/Form/fields/EnhancedMediaField.vue +224 -0
- package/components/Form/fields/FileField.vue +125 -0
- package/components/Form/fields/FksField.vue +88 -0
- package/components/Form/fields/MediaField.vue +159 -0
- package/components/Form/fields/MediaM2mField.vue +149 -0
- package/components/Form/fields/Repeater.vue +593 -0
- package/components/Form/fields/SeoPreview.vue +89 -0
- package/components/Form/fields/wygEditor/defaults.js +25 -0
- package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/events.js +0 -0
- package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/mapomedia.plugin.js +7 -6
- package/components/{fields/TinyMce → Form/fields/wygEditor}/utils/script.injector.js +0 -0
- package/components/Form/fields/wygEditor/wygEditor.vue +285 -0
- package/components/LangSwitcher.vue +44 -0
- package/components/List/List.vue +119 -42
- package/components/List/ListActions.vue +60 -21
- package/components/List/ListFilters.vue +166 -114
- package/components/List/ListHead.vue +30 -12
- package/components/List/ListQuickEdit.vue +130 -61
- package/components/List/ListTable.vue +292 -80
- package/components/Login.vue +17 -7
- package/components/LogoutButton.vue +43 -28
- package/components/MediaManager/MediaBreadcrumbs.vue +45 -0
- package/components/MediaManager/MediaEditor.vue +330 -122
- package/components/MediaManager/MediaFolders.vue +169 -116
- package/components/MediaManager/MediaGallery.vue +151 -146
- package/components/MediaManager/MediaManager.vue +117 -159
- package/components/MediaManager/MediaManagerDialog.vue +36 -31
- package/components/MediaManager/MediaPreview.vue +203 -0
- package/components/MediaManager/MediaUploader.vue +55 -43
- package/components/SnackBar.vue +5 -7
- package/components/ThemeToggle.vue +13 -0
- package/components/layout/Sidebar/Sidebar.vue +61 -30
- package/components/layout/Sidebar/SidebarList.vue +19 -15
- package/components/layout/Sidebar/SidebarListItem.vue +122 -38
- package/components/layout/Sidebar/SidebarProfile.vue +42 -0
- package/components/layout/Sidebar/SidebarTitle.vue +45 -0
- package/components/layout/Topbar/Topbar.vue +11 -42
- package/components/layout/routebuilder.js +3 -3
- package/defaults/i18n.js +37 -0
- package/defaults/vuetify.js +34 -0
- package/layouts/default.vue +33 -18
- package/layouts/empty.vue +10 -0
- package/module.js +7 -5
- package/package.json +6 -4
- package/pages/index.vue +19 -18
- package/static/{favicon.ico → mapo/favicon.ico} +0 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.inline.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/content.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/skin.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-dark/skin.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.inline.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/content.mobile.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/skin.min.css +7 -0
- package/static/mapo/tinymce-skins/mapo-light/skin.mobile.min.css +7 -0
- package/translations/en-US.js +135 -0
- package/translations/it-IT.js +137 -0
- package/components/Detail/DetailField.vue +0 -129
- package/components/Detail/defaults.js +0 -50
- package/components/fields/M2mField.vue +0 -95
- package/components/fields/MediaField.vue +0 -195
- package/components/fields/MediaM2mField.vue +0 -238
- package/components/fields/TinyMce/TinyMce.vue +0 -177
- package/components/fields/TinyMce/defaults.js +0 -55
- package/components/layout/Sidebar/SidebarFooter.vue +0 -75
- package/defaults.js +0 -29
- package/layouts/error.vue +0 -45
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<media-manager-dialog ref="mediaManager"></media-manager-dialog>
|
|
4
|
-
<span v-if="label">{{ label }}:</span>
|
|
5
|
-
<div ref="editorNode">
|
|
6
|
-
<v-skeleton-loader
|
|
7
|
-
type="table-heading, list-item-two-line, list-item-avatar-two-line, list-item-three-lineimage, table-tfoot"
|
|
8
|
-
></v-skeleton-loader>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="mt-2">
|
|
11
|
-
<v-messages :value="errorMessages" color="error"></v-messages>
|
|
12
|
-
</div>
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
import initMapoMedia from "./utils/mapomedia.plugin.js";
|
|
18
|
-
import injectScript from "./utils/script.injector.js";
|
|
19
|
-
import defaults from "./defaults.js";
|
|
20
|
-
import validEvents from "./utils/events.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* This component wraps a [TinyMce](https://www.tiny.cloud/) instance. With the use of the v-model you can use this component to edit any content you like.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
export default {
|
|
27
|
-
name: "TinyMce",
|
|
28
|
-
props: {
|
|
29
|
-
// V-model property. Is the content that will populate the TinyMce instance.
|
|
30
|
-
value: {
|
|
31
|
-
type: String,
|
|
32
|
-
default: "",
|
|
33
|
-
},
|
|
34
|
-
// This is the main configuration of TinyMce. If setted will be merged with this component defaults.
|
|
35
|
-
conf: {
|
|
36
|
-
type: Object,
|
|
37
|
-
default: () => ({}),
|
|
38
|
-
},
|
|
39
|
-
// This label will be shown at the top of the editor.
|
|
40
|
-
label: String,
|
|
41
|
-
// This is an array of validation errors that will be displayed under the editor.
|
|
42
|
-
errorMessages: Array,
|
|
43
|
-
// This set the component status to disabled, stopping the user interaction.
|
|
44
|
-
disabled: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false,
|
|
47
|
-
},
|
|
48
|
-
// Use this prop to bind events. If set to true the component will emit every [TinyMce Event](https://www.tiny.cloud/docs/advanced/events/).
|
|
49
|
-
bindevents: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false,
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
editorInstance: null,
|
|
58
|
-
editorContent: "",
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
computed: {
|
|
63
|
-
editor: {
|
|
64
|
-
cache: false,
|
|
65
|
-
get() {
|
|
66
|
-
return this.editorInstance;
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
mounted() {
|
|
72
|
-
injectScript().then(this.initEditor);
|
|
73
|
-
},
|
|
74
|
-
|
|
75
|
-
methods: {
|
|
76
|
-
initEditor() {
|
|
77
|
-
initMapoMedia(this.insertImgCallback);
|
|
78
|
-
window.tinymce.init(
|
|
79
|
-
Object.assign(defaults, this.conf, {
|
|
80
|
-
target: this.$refs.editorNode,
|
|
81
|
-
readonly: this.disabled,
|
|
82
|
-
setup: (ctx) => this.setupEditor(ctx),
|
|
83
|
-
})
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
setupEditor(editor) {
|
|
87
|
-
this.editorInstance = editor;
|
|
88
|
-
editor.on("init", () => {
|
|
89
|
-
editor.setContent(this.value || "");
|
|
90
|
-
this.emitContent(editor);
|
|
91
|
-
editor.on("change input undo redo keyup", () =>
|
|
92
|
-
this.emitContent(editor)
|
|
93
|
-
);
|
|
94
|
-
});
|
|
95
|
-
this.bindEvents(editor);
|
|
96
|
-
},
|
|
97
|
-
emitContent(editor) {
|
|
98
|
-
this.editorContent = editor.getContent();
|
|
99
|
-
// Fired when the v-model changes
|
|
100
|
-
//@arg Emits the content of the editor
|
|
101
|
-
this.$emit("input", this.editorContent);
|
|
102
|
-
},
|
|
103
|
-
bindEvents(editor) {
|
|
104
|
-
if (this.bindevents) {
|
|
105
|
-
validEvents.forEach((eventName) => {
|
|
106
|
-
// This is a dynamic event emitter. If you activate the bindevents prop, you will be able to listen to every [TinyMce Event](https://www.tiny.cloud/docs/advanced/events/).
|
|
107
|
-
editor.on(eventName, (event) => this.$emit(eventName, event));
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
insertImgCallback: async function () {
|
|
112
|
-
return new Promise((resolve, reject) => {
|
|
113
|
-
this.$refs.mediaManager
|
|
114
|
-
.open()
|
|
115
|
-
.then((result) =>
|
|
116
|
-
result
|
|
117
|
-
? resolve(`<img width="50%" src="${result.file}">`)
|
|
118
|
-
: reject("No image selected")
|
|
119
|
-
)
|
|
120
|
-
.catch((error) => reject(error));
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
beforeDestroy() {
|
|
125
|
-
window && window.tinymce && window.tinymce.remove(this.editor);
|
|
126
|
-
},
|
|
127
|
-
watch: {
|
|
128
|
-
value(val) {
|
|
129
|
-
if (this.editor && this.editor.initialized && val !== this.editorContent) {
|
|
130
|
-
this.editorContent = val
|
|
131
|
-
this.editor.setContent(val);
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
disabled(val) {
|
|
135
|
-
if (this.editor && this.editor.initialized) {
|
|
136
|
-
this.editor.setMode(val ? "readonly" : "design");
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
};
|
|
141
|
-
</script>
|
|
142
|
-
|
|
143
|
-
<style>
|
|
144
|
-
.tox-notifications-container,
|
|
145
|
-
.tox-statusbar__branding {
|
|
146
|
-
display: none;
|
|
147
|
-
}
|
|
148
|
-
</style>
|
|
149
|
-
|
|
150
|
-
<docs>
|
|
151
|
-
|
|
152
|
-
### Defaults
|
|
153
|
-
|
|
154
|
-
This is the default [TinyMce configuration](https://www.tiny.cloud/docs/configure/).
|
|
155
|
-
|
|
156
|
-
```js
|
|
157
|
-
{
|
|
158
|
-
plugins: 'mapomedia preview paste importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons',
|
|
159
|
-
menubar: 'file edit view insert format tools table help',
|
|
160
|
-
toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview | insertfile image mapomedia media template link anchor codesample | ltr rtl',
|
|
161
|
-
toolbar_sticky: true,
|
|
162
|
-
image_advtab: true,
|
|
163
|
-
importcss_append: true,
|
|
164
|
-
template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
|
|
165
|
-
template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
|
|
166
|
-
height: 600,
|
|
167
|
-
image_caption: true,
|
|
168
|
-
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
|
|
169
|
-
noneditable_noneditable_class: 'mceNonEditable',
|
|
170
|
-
toolbar_mode: 'sliding',
|
|
171
|
-
contextmenu: 'link image imagetools table',
|
|
172
|
-
skin: useDarkMode ? 'oxide-dark' : 'oxide',
|
|
173
|
-
content_css: useDarkMode ? 'dark' : 'default',
|
|
174
|
-
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
</docs>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
var useDarkMode = false;
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
plugins: 'mapomedia preview paste importcss searchreplace autolink directionality code visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists wordcount imagetools textpattern noneditable help charmap quickbars emoticons',
|
|
5
|
-
// imagetools_cors_hosts: ['picsum.photos'],
|
|
6
|
-
menubar: 'file edit view insert format tools table help',
|
|
7
|
-
toolbar: 'undo redo | bold italic underline strikethrough | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview | insertfile image mapomedia media template link anchor codesample | ltr rtl',
|
|
8
|
-
toolbar_sticky: true,
|
|
9
|
-
image_advtab: true,
|
|
10
|
-
// link_list: [
|
|
11
|
-
// { title: 'My page 1', value: 'https://www.tiny.cloud' },
|
|
12
|
-
// { title: 'My page 2', value: 'http://www.moxiecode.com' }
|
|
13
|
-
// ],
|
|
14
|
-
// image_list: [
|
|
15
|
-
// { title: 'My page 1', value: 'https://www.tiny.cloud' },
|
|
16
|
-
// { title: 'My page 2', value: 'http://www.moxiecode.com' }
|
|
17
|
-
// ],
|
|
18
|
-
// image_class_list: [
|
|
19
|
-
// { title: 'None', value: '' },
|
|
20
|
-
// { title: 'Some class', value: 'class-name' }
|
|
21
|
-
// ],
|
|
22
|
-
importcss_append: true,
|
|
23
|
-
// file_picker_callback: function (callback, value, meta) {
|
|
24
|
-
// /* Provide file and text for the link dialog */
|
|
25
|
-
// if (meta.filetype === 'file') {
|
|
26
|
-
// callback('https://www.google.com/logos/google.jpg', { text: 'My text' });
|
|
27
|
-
// }
|
|
28
|
-
|
|
29
|
-
// /* Provide image and alt text for the image dialog */
|
|
30
|
-
// if (meta.filetype === 'image') {
|
|
31
|
-
// callback('https://www.google.com/logos/google.jpg', { alt: 'My alt text' });
|
|
32
|
-
// }
|
|
33
|
-
|
|
34
|
-
// /* Provide alternative source and posted for the media dialog */
|
|
35
|
-
// if (meta.filetype === 'media') {
|
|
36
|
-
// callback('movie.mp4', { source2: 'alt.ogg', poster: 'https://www.google.com/logos/google.jpg' });
|
|
37
|
-
// }
|
|
38
|
-
// },
|
|
39
|
-
// templates: [
|
|
40
|
-
// { title: 'New Table', description: 'creates a new table', content: '<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>' },
|
|
41
|
-
// { title: 'Starting my story', description: 'A cure for writers block', content: 'Once upon a time...' },
|
|
42
|
-
// { title: 'New list with dates', description: 'New List with dates', content: '<div class="mceTmpl"><span class="cdate">cdate</span><br /><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>' }
|
|
43
|
-
// ],
|
|
44
|
-
template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
|
|
45
|
-
template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
|
|
46
|
-
height: 600,
|
|
47
|
-
image_caption: true,
|
|
48
|
-
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
|
|
49
|
-
noneditable_noneditable_class: 'mceNonEditable',
|
|
50
|
-
toolbar_mode: 'sliding',
|
|
51
|
-
contextmenu: 'link image imagetools table',
|
|
52
|
-
skin: useDarkMode ? 'oxide-dark' : 'oxide',
|
|
53
|
-
content_css: useDarkMode ? 'dark' : 'default',
|
|
54
|
-
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
|
|
55
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="sidebar__ender">
|
|
3
|
-
<sidebar-list-item
|
|
4
|
-
class="sidebar__ender__item"
|
|
5
|
-
v-for="(item, i) in routes"
|
|
6
|
-
:key="i"
|
|
7
|
-
:link="item.link"
|
|
8
|
-
:label="item.label"
|
|
9
|
-
:childrens="item.childrens"
|
|
10
|
-
:icon="item.icon"
|
|
11
|
-
/>
|
|
12
|
-
<logout-button class="sidebar__ender__item sidebar__ender__item--logout" />
|
|
13
|
-
</div>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<style lang="scss" scoped>
|
|
17
|
-
@import "@mapomodule/uikit/assets/variables.scss";
|
|
18
|
-
|
|
19
|
-
.sidebar {
|
|
20
|
-
&__ender {
|
|
21
|
-
margin-top: auto;
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
&__icon {
|
|
25
|
-
font-size: 1rem;
|
|
26
|
-
margin-right: 0.5rem;
|
|
27
|
-
}
|
|
28
|
-
&__item {
|
|
29
|
-
display: block;
|
|
30
|
-
width: 100%;
|
|
31
|
-
text-decoration: none;
|
|
32
|
-
color: white;
|
|
33
|
-
background: $b-2;
|
|
34
|
-
transition: all linear 0.25s;
|
|
35
|
-
border-radius: 0;
|
|
36
|
-
&:hover {
|
|
37
|
-
background: rgba($b-2, 0.25);
|
|
38
|
-
}
|
|
39
|
-
&--logout {
|
|
40
|
-
background: $black !important;
|
|
41
|
-
&:hover {
|
|
42
|
-
background: rgba($black, 0.25) !important;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
</style>
|
|
49
|
-
|
|
50
|
-
<script>
|
|
51
|
-
import { buildRoutes } from "../routebuilder";
|
|
52
|
-
|
|
53
|
-
// @vuese
|
|
54
|
-
export default {
|
|
55
|
-
name: "SidebarFooter",
|
|
56
|
-
data() {
|
|
57
|
-
return {
|
|
58
|
-
defaultIcon: ({label}) => `mdi-alpha-${label[0]}-box`.toLowerCase(),
|
|
59
|
-
routes: this.routes,
|
|
60
|
-
};
|
|
61
|
-
},
|
|
62
|
-
mounted: function () {
|
|
63
|
-
this.routes = this.buildRoutes(
|
|
64
|
-
this.$router.options.routes.filter(
|
|
65
|
-
(route) => route.meta && route.meta.sidebarFooter === true
|
|
66
|
-
)
|
|
67
|
-
);
|
|
68
|
-
},
|
|
69
|
-
methods: {
|
|
70
|
-
buildRoutes(routes) {
|
|
71
|
-
return buildRoutes(routes, this.defaultIcon);
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
</script>
|
package/defaults.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import colors from 'vuetify/es5/util/colors'
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
customVariables: ['@mapomodule/uikit/assets/variables.scss'],
|
|
5
|
-
theme: {
|
|
6
|
-
dark: true,
|
|
7
|
-
themes: {
|
|
8
|
-
dark: {
|
|
9
|
-
primary: '#309A00',
|
|
10
|
-
accent: colors.grey.darken3,
|
|
11
|
-
secondary: colors.amber.darken3,
|
|
12
|
-
info: colors.teal.lighten1,
|
|
13
|
-
warning: colors.amber.base,
|
|
14
|
-
error: '#FF5252',
|
|
15
|
-
success: colors.green.accent3
|
|
16
|
-
},
|
|
17
|
-
light: {
|
|
18
|
-
primary: '#309A00',
|
|
19
|
-
accent: colors.indigo.accent1,
|
|
20
|
-
secondary: colors.amber.accent2,
|
|
21
|
-
info: colors.teal.lighten1,
|
|
22
|
-
warning: colors.amber.base,
|
|
23
|
-
error: '#FF5252',
|
|
24
|
-
success: colors.green.accent3
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
treeShake: false
|
|
29
|
-
}
|
package/layouts/error.vue
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-app>
|
|
3
|
-
<h1 v-if="error.statusCode === 404">
|
|
4
|
-
{{ pageNotFound }}
|
|
5
|
-
</h1>
|
|
6
|
-
<h1 v-else>
|
|
7
|
-
{{ otherError }}
|
|
8
|
-
</h1>
|
|
9
|
-
<NuxtLink to="/">
|
|
10
|
-
Home page
|
|
11
|
-
</NuxtLink>
|
|
12
|
-
<root-components />
|
|
13
|
-
</v-app>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script>
|
|
17
|
-
export default {
|
|
18
|
-
layout: 'empty',
|
|
19
|
-
props: {
|
|
20
|
-
error: {
|
|
21
|
-
type: Object,
|
|
22
|
-
default: null
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
data () {
|
|
26
|
-
return {
|
|
27
|
-
pageNotFound: '404 Not Found',
|
|
28
|
-
otherError: 'An error occurred'
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
head () {
|
|
32
|
-
const title =
|
|
33
|
-
this.error.statusCode === 404 ? this.pageNotFound : this.otherError
|
|
34
|
-
return {
|
|
35
|
-
title
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
</script>
|
|
40
|
-
|
|
41
|
-
<style scoped>
|
|
42
|
-
h1 {
|
|
43
|
-
font-size: 20px;
|
|
44
|
-
}
|
|
45
|
-
</style>
|