Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
subugoe
emo
TIDO
Commits
96701211
Commit
96701211
authored
Apr 26, 2020
by
schneider210
Browse files
bugfix: json_parse in content.vue finally fixed without catch
parent
699d6427
Pipeline
#132443
passed with stages
in 3 minutes and 23 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
96701211
...
...
@@ -12,8 +12,8 @@
<q-page-container>
<router-view
:collection=
"collection"
:contenturl=
"contenturl"
:imageurl=
"imageurl"
:itemurl=
"itemurl"
:language=
"itemlanguage"
:manifests=
"manifests"
:pagelabel=
"pagelabel"
...
...
src/components/content.vue
View file @
96701211
...
...
@@ -6,7 +6,7 @@
export
default
{
name
:
'
Content
'
,
props
:
{
item
url
:
String
,
content
url
:
String
,
manifests
:
Array
,
request
:
Function
,
},
...
...
@@ -32,17 +32,8 @@ export default {
}
},
},
created
()
{
this
.
request
(
this
.
itemurl
)
.
then
((
data
)
=>
{
this
.
request
(
data
.
content
,
'
text
'
)
.
then
((
content
)
=>
{
this
.
content
=
content
;
});
})
.
catch
(()
=>
{
// nested async request. promise is pending, so JSON_parse fails
});
async
created
()
{
this
.
content
=
await
this
.
request
(
this
.
contenturl
,
'
text
'
).
then
((
data
)
=>
data
);
},
mounted
()
{
this
.
$root
.
$on
(
'
update-sequence-index
'
,
(
index
)
=>
{
...
...
src/views/quasar-mainview.vue
View file @
96701211
...
...
@@ -19,8 +19,8 @@
<q-separator
/>
<Content
:key=
"
item
url"
:
itemurl=
"item
url"
:key=
"
content
url"
:
contenturl=
"content
url"
:manifests=
"manifests"
:request=
"request"
>
...
...
@@ -78,8 +78,8 @@ export default {
},
props
:
{
collection
:
Object
,
contenturl
:
String
,
imageurl
:
String
,
itemurl
:
String
,
language
:
String
,
manifests
:
Array
,
pagelabel
:
String
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment