rename wo.COLOR to wo.c2t.COLOR

This commit is contained in:
陆柯 2022-08-23 11:51:15 +08:00
parent bcffe658b2
commit 7bd9b2e833

View File

@ -85,7 +85,7 @@ export default {
if (this.storyContent.length > 1) {
this.storyContent.splice(index, 1)
} else {
wo.showToast({ type: wo.YELLOW, title: this.$ll({ zhCN: '不能删除唯一的段落!', enUS: 'Cannot delete the last section!' }) })
wo.showToast({ type: wo.c2t.YELLOW, title: this.$ll({ zhCN: '不能删除唯一的段落!', enUS: 'Cannot delete the last section!' }) })
}
}
},
@ -100,24 +100,10 @@ export default {
<draggable v-model="storyContent">
<!-- #endif -->
<view v-for="(section, index) of storyContent" :key="index" style="margin: 5px; position: relative">
<textarea
v-if="section.text !== undefined"
v-model="section.text"
maxlength="-1"
auto-height="true"
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"
></textarea>
<textarea v-if="section.text !== undefined" v-model="section.text" maxlength="-1" auto-height="true" 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"></textarea>
<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>
<u-icon
class="sectionHandler"
name="close-circle-fill"
size="40"
style="position: absolute; top: 0; right: 0; border-radius: 100%; cursor: pointer; color: #909399"
@click="deleteSection(index)"
></u-icon>
<u-icon class="sectionHandler" name="close-circle-fill" size="40" style="position: absolute; top: 0; right: 0; border-radius: 100%; cursor: pointer; color: #909399" @click="deleteSection(index)"></u-icon>
</view>
<!-- #ifdef H5 -->
</draggable>
@ -127,21 +113,23 @@ 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="wo.WHITE_BUTTON" @click="addText" v-if="allowText === true || allowText === 'true'" style="margin: 0 5px">
<u-button shape="circle" size="mini" :type="wo.c2t.uButton.WHITE" @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="wo.WHITE_BUTTON" @click="addImage" v-if="allowImage === true || allowImage === 'true'" style="margin: 0 5px">
<u-button shape="circle" size="mini" :type="wo.c2t.uButton.WHITE" @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="wo.WHITE_BUTTON" @click="addVideo" v-if="allowVideo === true || allowVideo === 'true'" style="margin: 0 5px">
<u-button shape="circle" size="mini" :type="wo.c2t.uButton.WHITE" @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="wo.RED" @click="onClick"><u-icon name="checkbox-mark"></u-icon> {{ $ll({zhCN:'发表', enUS:'Publish'}) || 'Publish' }}</u-button>
<u-button size="mini" :type="wo.c2t.RED" @click="onClick">
<u-icon name="checkbox-mark"></u-icon> {{ $ll({zhCN:'', enUS:'Publish'}) || 'Publish' }}
</u-button>
</view>
</view>
</view>