diff --git a/ucStoryEditor/ucStoryEditor.vue b/ucStoryEditor/ucStoryEditor.vue
index 2715866..1cc406c 100644
--- a/ucStoryEditor/ucStoryEditor.vue
+++ b/ucStoryEditor/ucStoryEditor.vue
@@ -12,26 +12,35 @@ export default {
props: {
storyContent: {
type: Array,
- default: ()=>[],
+ default: [],
+ },
+ allowText: {
+ type: [Boolean, String],
+ default: true,
},
allowImage: {
- type: Boolean,
+ type: [Boolean, String],
default: true,
},
allowVideo: {
- type: Boolean,
- default: false,
+ type: [Boolean, String],
+ default: true,
+ },
+ showSubmitButton: {
+ type: [Boolean, String],
+ default: true,
+ },
+ onClick: {
+ type: Function,
+ default: null,
},
- // onClick: {
- // type: Function,
- // default: null,
- // },
},
data() {
- return {}
+ return {
+ }
+ },
+ computed: {
},
- onLoad() {},
- onShow() {},
methods: {
addText() {
if (!Array.isArray(this.storyContent)) {
@@ -61,8 +70,8 @@ export default {
deleteSection(index) {
if (this.storyContent[index].text || this.storyContent[index].image || this.storyContent[index].video) {
uni.showModal({
- title: this.$ll({deDE:'Sind Sie sicher den Abschnitt zu entfernen?', enUS:'Are you sure to delete this section?', zhCN:'真的要删除这个段落吗?'}),
- content: this.storyContent[index].text ? this.storyContent[index].text : '',
+ title: this.$ll({ zhCN: '真的要删除这个段落吗?', enUS: 'Are you sure to delete this section?' }),
+ content: this.storyContent[index].text ? this.storyContent[index].text.substr(0, 10) : '',
success: ({ confirm, cancel }) => {
if (confirm) {
this.storyContent.splice(index, 1)
@@ -76,7 +85,7 @@ export default {
if (this.storyContent.length > 1) {
this.storyContent.splice(index, 1)
} else {
- this.$message({ type: 'warning', message: this.$ll({zhCN:'不能删除唯一的段落', enUS:'Cannot delete the last section', deDE:'Der letzte Abschnitt kann nicht entfernen'}) })
+ this.$T.showToast({ type: this.$T.YELLOW, title: this.$ll({ zhCN: '不能删除唯一的段落!', enUS: 'Cannot delete the last section!' }) })
}
}
},
@@ -96,42 +105,51 @@ export default {
v-model="section.text"
maxlength="-1"
auto-height="true"
- style="box-sizing: border-box; line-height: 1.5em; min-height: 3em; width: 100%; padding: 0 5px; border: 1px solid #eee; background: white"
- placeholder=""
+ style="width: inherit; min-height: 3em; line-height: 1.5em; padding: 5px; border: 1px solid #eee; background: white"
+ :placeholder="$ll({zhCN:'新的段落', enUS:'New Section'})"
placeholder-style="font-size:small"
>
-
-
+
+ >
-
-
- {{ $ll({deDE:'Text', enUS:'Text', zhCN:'文字'}) }}
- {{ $ll({deDE:'Bild', enUS:'Image', zhCN:'图片'}) }}
- {{ $ll({deDE:'Video', enUS:'Video', zhCN:'视频'}) }}
+
+
+
+
+
+ {{ $ll({ zhCN:'文字', enUS:'Text' }) || 'Text' }}
+
+
+
+ {{ $ll({ zhCN:'照片', enUS:'Photo' }) || 'Photo' }}
+
+
+
+ {{ $ll({ zhCN:'视频', enUS:'Video' }) || 'Video' }}
+
+
+
+ {{ $ll({zhCN:'发表', enUS:'Publish'}) || 'Publish' }}
+
diff --git a/ucStoryReader/ucStoryReader.vue b/ucStoryReader/ucStoryReader.vue
index 78b4fbf..562fd4b 100644
--- a/ucStoryReader/ucStoryReader.vue
+++ b/ucStoryReader/ucStoryReader.vue
@@ -3,7 +3,7 @@ export default {
props: {
storyContent: {
type: Array,
- default: ()=>[],
+ default: [],
},
},
data() {
@@ -12,27 +12,18 @@ export default {
},
computed: {
},
- onLoad() {},
- onShow() {
- },
methods: {},
}
-
-
- {{ section.text }}
-
-
-
+
+
+ {{ section.text }}
+
+
+
-
+