Временный коммит
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main">
|
<div class="main">
|
||||||
<pre>{{ parsedBook }}</pre>
|
<p v-for="item in items" :key="item.id">
|
||||||
|
{{ item.text }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -13,7 +15,7 @@ import bookManager from '../share/bookManager';
|
|||||||
export default @Component({
|
export default @Component({
|
||||||
})
|
})
|
||||||
class TextPage extends Vue {
|
class TextPage extends Vue {
|
||||||
parsedBook = null;
|
items = null;
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.commit = this.$store.commit;
|
this.commit = this.$store.commit;
|
||||||
@@ -35,6 +37,13 @@ class TextPage extends Vue {
|
|||||||
}
|
}
|
||||||
const book = await bookManager.getBook(last);
|
const book = await bookManager.getBook(last);
|
||||||
this.book = book.parsed;
|
this.book = book.parsed;
|
||||||
|
|
||||||
|
let lines = [];
|
||||||
|
const len = (this.book.para.length > 50 ? 50 : this.book.para.length);
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
lines.push({key: i, text: this.book.para[i].text});
|
||||||
|
}
|
||||||
|
this.items = lines;
|
||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,4 +63,10 @@ class TextPage extends Vue {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
text-indent: 3%;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user