把基于elementUI的 StoryReader/Editor 改为基于 uview 的

This commit is contained in:
luk.lu
2021-10-15 13:42:43 +08:00
parent 7da341fe27
commit c6f4c9ba6e
2 changed files with 61 additions and 52 deletions

View File

@@ -3,7 +3,7 @@ export default {
props: {
storyContent: {
type: Array,
default: ()=>[],
default: [],
},
},
data() {
@@ -12,27 +12,18 @@ export default {
},
computed: {
},
onLoad() {},
onShow() {
},
methods: {},
}
</script>
<template>
<view style="display: flex; flex-flow: column nowrap;">
<view
v-for="(section, index) of storyContent"
:key="index"
style="display: flex; flex-flow: column nowrap; padding: 5px; position: relative;"
>
<text v-if="section.text !== undefined" style="box-sizing: border-box; width: 100%; padding: 5px;">{{ section.text }}</text>
<img v-if="section.image" :src="section.image" style="width: 100%;" />
<video v-if="section.video" :src="section.video" style="width: 100%;" autoplay></video>
</view>
<view style="display: flex; flex-flow: column nowrap">
<view v-for="(section, index) of storyContent" :key="index" style="display: flex; flex-flow: column nowrap; padding: 5px; position: relative">
<text v-if="section.text !== undefined" style="box-sizing: border-box; width: 100%">{{ section.text }}</text>
<img v-if="section.image" :src="section.image" style="width: 100%" />
<video v-if="section.video" :src="section.video" style="width: 100%" autoplay :controls="true"></video>
</view>
</view>
</template>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>