格式化

This commit is contained in:
satori 2022-02-05 16:36:14 +08:00
parent ff8037baaf
commit 8c02b1e72f
3 changed files with 51 additions and 41 deletions

View File

@ -1,22 +1,42 @@
<template lang="pug"> <template lang="pug">
.chat-index .chat-index
.circumscription
p Chat 频道列表 {{ chatlist.length }}
ul(v-if="chatlist.length")
li(v-for="item in chatlist", :key="item._id")
p {{ item }}
span {{ item.name }}
i(v-if="true") (已订阅)
i(v-else) (未订阅)
button(@click="create") 创建频道
.ceremony .ceremony
.circumscription .circumscription
span chat .flex
DialogueList(:data="chatactive") .index
textarea.dialogue(v-model="chat.data", rows="12") p Chat 频道列表 {{ chatlist.length }}
button.submit(@click="submit") 发表 ul(v-if="chatlist.length")
li(v-for="item in chatlist", :key="item._id")
span {{ item.name }}
i(v-if="true") (已订阅)
i(v-else) (未订阅)
button(@click="create") 创建频道
.content
DialogueList(:data="chatactive")
textarea.dialogue(v-model="chat.data", rows="12")
button.submit(@click="submit") 发表
</template> </template>
<style lang="sass">
.chat-index
textarea.dialogue
display: block
width: 32rem
padding: 1rem
border: 1px solid #eee
border-radius: .5rem
box-sizing: border-box
.flex
display: flex
.index
width: 24rem
.content
flex: 1
</style>
<script> <script>
import socket from "@/assets/js/socket.js"; import socket from "@/assets/js/socket.js";
@ -89,14 +109,3 @@ export default {
}, },
}; };
</script> </script>
<style lang="sass">
.chat-index
textarea.dialogue
display: block
width: 32rem
padding: 1rem
border: 1px solid #eee
border-radius: .5rem
box-sizing: border-box
</style>

View File

@ -1,18 +1,20 @@
<template lang="pug"> <template lang="pug">
.docs-index .docs-index
.docs.circumscription .ceremony
.outline .circumscription
ul .docs
li(v-for="item in list", :key="item._id") .outline
NuxtLink(:to="`/docs/${item._id}`") {{ item.name }} ul
i.fas.fa-sort-numeric-up-alt( li(v-for="item in list", :key="item._id")
@click="settop(item, true)", NuxtLink(:to="`/docs/${item._id}`") {{ item.name }}
v-if="account.gid" i.fas.fa-sort-numeric-up-alt(
) {{ item.top || 0 }} @click="settop(item, true)",
.create-doc(v-if="account.gid") v-if="account.gid"
button(@click="submit()") Create ) {{ item.top || 0 }}
.content .create-doc(v-if="account.gid")
Nuxt button(@click="submit()") Create
.content
Nuxt
</template> </template>
<script> <script>
@ -64,18 +66,17 @@ export default {
<style lang="sass"> <style lang="sass">
.docs-index .docs-index
margin: 8rem 4rem
.docs .docs
display: flex display: flex
width: 100% width: 100%
.outline .outline
width: 12rem width: 12rem
padding: 2rem padding: 2rem
background: #ccefef //background: #ccefef
.content .content
padding: 2rem padding: 2rem
background: #ffefef
flex: 1 flex: 1
//background: #ffefef
input.title, textarea.data input.title, textarea.data
width: 100% width: 100%