This commit is contained in:
陆柯 2022-05-03 15:14:01 +08:00
parent ca97a2af62
commit 3bd1924a4d

View File

@ -53,7 +53,7 @@ export default {
if (!Array.isArray(this.storyContent)) {
this.storyContent = []
}
let { _state, fileUrl, ...rest } = await this.$T.pickupFile2Cloud({ mediaType: 'image' })
let { _state, fileUrl, ...rest } = await wo.pickupFile2Cloud({ mediaType: 'image' })
if (_state === 'SUCCESS') {
this.storyContent.push({ image: fileUrl })
}
@ -62,7 +62,7 @@ export default {
if (!Array.isArray(this.storyContent)) {
this.storyContent = []
}
let { _state, fileUrl, ...rest } = await this.$T.pickupFile2Cloud({ mediaType: 'video' })
let { _state, fileUrl, ...rest } = await wo.pickupFile2Cloud({ mediaType: 'video' })
if (_state === 'SUCCESS') {
this.storyContent.push({ video: fileUrl })
}
@ -85,7 +85,7 @@ export default {
if (this.storyContent.length > 1) {
this.storyContent.splice(index, 1)
} else {
this.$T.showToast({ type: this.$T.YELLOW, title: this.$ll({ zhCN: '不能删除唯一的段落!', enUS: 'Cannot delete the last section!' }) })
wo.showToast({ type: wo.YELLOW, title: this.$ll({ zhCN: '不能删除唯一的段落!', enUS: 'Cannot delete the last section!' }) })
}
}
},
@ -127,21 +127,21 @@ export default {
<view style="width: 100%; display: flex; flex-flow: column nowrap; align-items: flex-start; padding: 5px;">
<view style="display: flex; flex-flow: row nowrap; justify-content: space-between; align-items: center; width: 100%">
<view>
<u-button shape="circle" size="mini" :type="$T.WHITE_BUTTON" @click="addText" v-if="allowText === true || allowText === 'true'" style="margin: 0 5px">
<u-button shape="circle" size="mini" :type="wo.WHITE_BUTTON" @click="addText" v-if="allowText === true || allowText === 'true'" style="margin: 0 5px">
<u-icon name="edit-pen-fill"></u-icon>
{{ $ll({ zhCN:'文字', enUS:'Text' }) || 'Text' }}
</u-button>
<u-button shape="circle" size="mini" :type="$T.WHITE_BUTTON" @click="addImage" v-if="allowImage === true || allowImage === 'true'" style="margin: 0 5px">
<u-button shape="circle" size="mini" :type="wo.WHITE_BUTTON" @click="addImage" v-if="allowImage === true || allowImage === 'true'" style="margin: 0 5px">
<u-icon name="camera-fill"></u-icon>
{{ $ll({ zhCN:'照片', enUS:'Photo' }) || 'Photo' }}
</u-button>
<u-button shape="circle" size="mini" :type="$T.WHITE_BUTTON" @click="addVideo" v-if="allowVideo === true || allowVideo === 'true'" style="margin: 0 5px">
<u-button shape="circle" size="mini" :type="wo.WHITE_BUTTON" @click="addVideo" v-if="allowVideo === true || allowVideo === 'true'" style="margin: 0 5px">
<u-icon name="videocamera-fill" custom-prefix="custom-iconfont"></u-icon>
{{ $ll({ zhCN:'视频', enUS:'Video' }) || 'Video' }}
</u-button>
</view>
<view v-if="showSubmitButton===true || showSubmitButton==='true'">
<u-button size="mini" :type="$T.RED" @click="onClick"><u-icon name="checkbox-mark"></u-icon> {{ $ll({zhCN:'发表', enUS:'Publish'}) || 'Publish' }}</u-button>
<u-button size="mini" :type="wo.RED" @click="onClick"><u-icon name="checkbox-mark"></u-icon> {{ $ll({zhCN:'发表', enUS:'Publish'}) || 'Publish' }}</u-button>
</view>
</view>
</view>