style: update prettier format rules

This commit is contained in:
张传龙 2022-07-03 14:52:49 +08:00
parent f97beeb54b
commit 7f97dd2f5a
10 changed files with 13 additions and 24 deletions

View File

@ -3,4 +3,5 @@ module.exports = {
singleQuote: true, singleQuote: true,
semi: false, semi: false,
endOfLine: 'lf', endOfLine: 'lf',
bracketSameLine: true,
} }

View File

@ -16,8 +16,7 @@
:style="{ :style="{
height: height + 'px', height: height + 'px',
transform: `translateX(${translateX}px)`, transform: `translateX(${translateX}px)`,
}" }">
>
<slot /> <slot />
</div> </div>
</div> </div>

View File

@ -7,8 +7,7 @@
:collapsed-width="64" :collapsed-width="64"
:options="menuOptions" :options="menuOptions"
:value="(currentRoute.meta && currentRoute.meta.activeMenu) || currentRoute.name" :value="(currentRoute.meta && currentRoute.meta.activeMenu) || currentRoute.name"
@update:value="handleMenuSelect" @update:value="handleMenuSelect" />
/>
</template> </template>
<script setup> <script setup>

View File

@ -6,8 +6,7 @@
:y="y" :y="y"
placement="bottom-start" placement="bottom-start"
@clickoutside="handleHideDropdown" @clickoutside="handleHideDropdown"
@select="handleSelect" @select="handleSelect" />
/>
</template> </template>
<script setup> <script setup>

View File

@ -7,8 +7,7 @@
:closable="tagsStore.tags.length > 1" :closable="tagsStore.tags.length > 1"
@click="handleTagClick(tag.path)" @click="handleTagClick(tag.path)"
@close.stop="tagsStore.removeTag(tag.path)" @close.stop="tagsStore.removeTag(tag.path)"
@contextmenu.prevent="handleContextMenu($event, tag)" @contextmenu.prevent="handleContextMenu($event, tag)">
>
{{ tag.title }} {{ tag.title }}
</n-tag> </n-tag>
</ScrollX> </ScrollX>
@ -17,8 +16,7 @@
v-model:show="contextMenuOption.show" v-model:show="contextMenuOption.show"
:current-path="contextMenuOption.currentPath" :current-path="contextMenuOption.currentPath"
:x="contextMenuOption.x" :x="contextMenuOption.x"
:y="contextMenuOption.y" :y="contextMenuOption.y" />
/>
</template> </template>
<script setup name="Tags"> <script setup name="Tags">

View File

@ -6,8 +6,7 @@
:collapsed-width="64" :collapsed-width="64"
:width="220" :width="220"
:native-scrollbar="false" :native-scrollbar="false"
:collapsed="appStore.collapsed" :collapsed="appStore.collapsed">
>
<SideBar /> <SideBar />
</n-layout-sider> </n-layout-sider>
<n-layout> <n-layout>
@ -22,8 +21,7 @@
:style="{ :style="{
height: `calc(100% - ${useTheme.tags.visible ? useTheme.tags.height : 0}px)`, height: `calc(100% - ${useTheme.tags.visible ? useTheme.tags.height : 0}px)`,
overflow: 'auto', overflow: 'auto',
}" }" />
/>
</n-layout> </n-layout>
</n-layout> </n-layout>
</n-layout> </n-layout>

View File

@ -36,8 +36,7 @@
class="w-300 flex-shrink-0 mt-10 mb-10 cursor-pointer" class="w-300 flex-shrink-0 mt-10 mb-10 cursor-pointer"
hover:card-shadow hover:card-shadow
title="Vue Naive Admin" title="Vue Naive Admin"
size="small" size="small">
>
<p op-60>一个基于 Vue3.0ViteNaive UI 的轻量级后台管理模板</p> <p op-60>一个基于 Vue3.0ViteNaive UI 的轻量级后台管理模板</p>
</n-card> </n-card>
<div w-300 h-0></div> <div w-300 h-0></div>

View File

@ -5,8 +5,7 @@
v-model="post.title" v-model="post.title"
class="flex-1 pt-15 pb-15 mr-20 text-20 font-bold color-primary" class="flex-1 pt-15 pb-15 mr-20 text-20 font-bold color-primary"
type="text" type="text"
placeholder="输入文章标题..." 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 - 220px)" /> <MdEditor v-model="post.content" style="height: calc(100vh - 220px)" />

View File

@ -11,8 +11,7 @@
:columns="columns" :columns="columns"
:pagination="pagination" :pagination="pagination"
:row-key="(row) => row.id" :row-key="(row) => row.id"
@update:checked-row-keys="handleCheck" @update:checked-row-keys="handleCheck" />
/>
</div> </div>
</template> </template>

View File

@ -16,8 +16,7 @@
autofocus autofocus
class="text-16 items-center h-50 pl-10" class="text-16 items-center h-50 pl-10"
placeholder="admin" placeholder="admin"
:maxlength="20" :maxlength="20">
>
</n-input> </n-input>
</div> </div>
<div mt-30 w-full max-w-360> <div mt-30 w-full max-w-360>
@ -28,8 +27,7 @@
show-password-on="mousedown" show-password-on="mousedown"
placeholder="123456" placeholder="123456"
:maxlength="20" :maxlength="20"
@keydown.enter="handleLogin" @keydown.enter="handleLogin" />
/>
</div> </div>
<div mt-20 w-full max-w-360> <div mt-20 w-full max-w-360>