mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 11:19:56 +00:00
41 lines
1.3 KiB
Vue
41 lines
1.3 KiB
Vue
<template>
|
|
<div class="content-text content-word-chain no-dark-content">
|
|
<pre v-html="$A.formatTextMsg(msg.text, userId)"></pre>
|
|
<ul :class="{'expand': unfoldWordChainData.indexOf(msgId) !== -1 }">
|
|
<li v-for="(item) in (msg.list || []).filter(h=>h.type == 'case')">
|
|
{{ $L('例') }} {{ item.text }}
|
|
</li>
|
|
<li v-for="(item, index) in (msg.list || []).filter(h=>h.type != 'case' && h.text)">
|
|
<span class="expand" v-if="index == 2 && msg.list.length > 4" @click="unfoldWordChain">
|
|
...{{ $L('展开') }}...
|
|
</span>
|
|
<span :class="{'shrink': index >= 2 && msg.list.length > 4 } ">
|
|
{{ index + 1 }}. {{ item.text }}
|
|
</span>
|
|
</li>
|
|
<li @click="onWordChain" class="participate">
|
|
{{ $L('参与接龙') }}
|
|
<i class="taskfont"></i>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
msg: Object,
|
|
msgId: Number,
|
|
unfoldWordChainData: Array,
|
|
},
|
|
methods: {
|
|
unfoldWordChain() {
|
|
this.$emit('unfoldWordChain');
|
|
},
|
|
onWordChain() {
|
|
this.$emit('onWordChain');
|
|
},
|
|
},
|
|
}
|
|
</script>
|