Commit ed9ce360 authored by xhx's avatar xhx

消息跳转

parent 363763e2
...@@ -16,7 +16,11 @@ ...@@ -16,7 +16,11 @@
class="overflow-ellipsis overflow-hidden" class="overflow-ellipsis overflow-hidden"
v-for="item in list" v-for="item in list"
:key="item.uuid" :key="item.uuid"
>{{ item.content }}</van-swipe-item> >
<div @click="$router.push({path: '/msgDetail', query: {info: JSON.stringify(item)}})">
{{ item.content }}
</div>
</van-swipe-item>
</van-swipe> </van-swipe>
</van-notice-bar> </van-notice-bar>
</template> </template>
...@@ -31,7 +35,16 @@ export default defineComponent({ ...@@ -31,7 +35,16 @@ export default defineComponent({
"van-swipe": Swipe, "van-swipe": Swipe,
"van-swipe-item": SwipeItem, "van-swipe-item": SwipeItem,
}, },
props: ['list'] props: ['list'],
setup() {
const goPage = () => {
console.log(1111)
}
return {
goPage
}
}
}); });
</script> </script>
<style> <style>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<nav-bar title="消息" :style="{ 'background-color':'#F7F7FA'}"/> <nav-bar title="消息" :style="{ 'background-color':'#F7F7FA'}"/>
<p class=" text-gray-800 text-sm font-semibold mt-7">{{ info.title }}</p> <p class=" text-gray-800 text-sm font-semibold mt-7">{{ info.title }}</p>
<p class=" text-gray-400 text-xs mt-3">{{ $format(info.created_at, 'YYYY-MM-DD HH:mm:ss') }}</p> <p class=" text-gray-400 text-xs mt-3">{{ $format(info.created_at, 'YYYY-MM-DD HH:mm:ss') }}</p>
<p class=" text-gray-800 text-sm text-justify mx-5 mt-6">{{ info.content }}</p> <p class=" text-gray-800 text-sm text-justify mx-5 mt-6 overflow-hidden break-all">{{ info.content }}</p>
</div> </div>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment