mod: use unocss rewrite the demo page

This commit is contained in:
张传龙 2022-06-26 18:25:14 +08:00
parent e465ee50bf
commit 73c82520ca
2 changed files with 11 additions and 30 deletions

View File

@ -1,10 +1,15 @@
<template> <template>
<div p-20> <div p-24>
<div class="header"> <div h-60 pl-20 pr-20 flex items-center bg-white>
<input v-model="post.title" type="text" placeholder="输入文章标题..." class="title" /> <input
v-model="post.title"
class="flex-1 pt-15 pb-15 mr-20 text-20 font-bold color-primary"
type="text"
placeholder="输入文章标题..."
/>
<n-button type="primary" style="width: 80px" :loading="btnLoading" @click="handleSavePost">保存</n-button> <n-button type="primary" style="width: 80px" :loading="btnLoading" @click="handleSavePost">保存</n-button>
</div> </div>
<MdEditor v-model="post.content" style="height: calc(100vh - 210px)" /> <MdEditor v-model="post.content" style="height: calc(100vh - 220px)" />
</div> </div>
</template> </template>
@ -37,21 +42,3 @@ function handleSavePost(e) {
} }
} }
</style> </style>
<style lang="scss" scoped>
.header {
background-color: #fff;
height: 60px;
padding: 0 20px;
display: flex;
align-items: center;
.title {
flex: 1;
padding: 15px 0;
margin-right: 20px;
font-size: 20px;
font-weight: bold;
color: var(--primaryColor);
}
}
</style>

View File

@ -1,6 +1,6 @@
<template> <template>
<div p24> <div p-24>
<div class="action-btns"> <div flex>
<n-button size="small" type="primary" @click="handleCreate">新建文章</n-button> <n-button size="small" type="primary" @click="handleCreate">新建文章</n-button>
</div> </div>
<n-data-table <n-data-table
@ -37,9 +37,3 @@ function handleCheck(rowKeys) {
if (rowKeys.length) $message.info(`选中${rowKeys.join(' ')}`) if (rowKeys.length) $message.info(`选中${rowKeys.join(' ')}`)
} }
</script> </script>
<style lang="scss" scoped>
.action-btns {
display: flex;
}
</style>