Skip to content

Commit

Permalink
fix: 不能使用unocss的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
camera-2018 committed Jan 25, 2023
1 parent be7c1cc commit f02843f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
// "prettier.enable": false,
"editor.codeActionsOnSave": {
// "source.fixAll": true
"source.fixAll": true
},
"files.associations": {
"*.css": "postcss"
Expand All @@ -23,9 +23,9 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}
}
16 changes: 8 additions & 8 deletions frontend/components/Articles/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ const artModeHandler = (mode: string) => {
artlistNav.value = mode
const allEl = document.querySelectorAll('.navlist') as unknown as HTMLElement[]
allEl.forEach((item) => {
item.style.color = '#6b7280'
item.classList.remove('text-active')
})
const el = document.getElementById(mode) as unknown as HTMLElement
if (el.style)
el.style.color = '#007fff'
el.classList.add('text-active')
artlistData.value = []
// TODO: 请求数据
artlistData.value = initialItem
Expand All @@ -49,13 +49,13 @@ onUnmounted(() => {
<div class="all-text-black pb-5 box-border w-full">
<div class="flex" style="font-size: 13.67px;" border-b-1>
<ul all-px-7 all-my-4 flex all-cursor-pointer all-text-gray-500>
<li id="recommend" class="navlist border-r-1" @click="artModeHandler('recommend')">
<li id="recommend" class=" text-blue-600 navlist border-r-1 hover:text-[#007fff]" @click="artModeHandler('recommend')">
推荐
</li>
<li id="latest" class="navlist border-r-1" @click="artModeHandler('latest')">
<li id="latest" class="navlist border-r-1 hover:text-[#007fff]" @click="artModeHandler('latest')">
最新
</li>
<li id="hot" class="navlist" @click="artModeHandler('hot')">
<li id="hot" class="navlist hover:text-[#007fff]" @click="artModeHandler('hot')">
热榜
</li>
</ul>
Expand All @@ -74,10 +74,10 @@ onUnmounted(() => {
</template>

<style scoped>
li:hover {
color: #007fff!important;
}
#recommend {
color: #007fff;
}
.text-active {
@apply text-[#007fff]
}
</style>

0 comments on commit f02843f

Please sign in to comment.