1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2026-01-09 09:40:21 +08:00

style: lint

This commit is contained in:
zclzone
2024-06-06 18:05:36 +08:00
parent 98f9d5893a
commit a67510fe34
72 changed files with 542 additions and 389 deletions

View File

@@ -12,10 +12,10 @@
<h3>菜单</h3>
<div class="flex">
<n-input v-model:value="pattern" placeholder="搜索" clearable />
<n-button class="ml-12" type="primary" @click="handleAdd()">
<NButton class="ml-12" type="primary" @click="handleAdd()">
<i class="i-material-symbols:add mr-4 text-14" />
新增
</n-button>
</NButton>
</div>
<n-tree
@@ -28,8 +28,8 @@
:on-update:selected-keys="onSelect"
key-field="code"
label-field="name"
block-line
default-expand-all
block-line default-expand-all
/>
</n-space>
@@ -39,9 +39,9 @@
<script setup>
import { withModifiers } from 'vue'
import ResAddOrEdit from './ResAddOrEdit.vue'
import { NButton } from 'naive-ui'
import api from '../api'
import ResAddOrEdit from './ResAddOrEdit.vue'
defineProps({
treeData: {
@@ -86,7 +86,7 @@ function renderSuffix({ option }) {
size: 'tiny',
onClick: withModifiers(() => handleAdd({ parentId: option.id }), ['stop']),
},
{ default: () => '新增' }
{ default: () => '新增' },
),
h(
@@ -98,7 +98,7 @@ function renderSuffix({ option }) {
style: 'margin-left: 12px;',
onClick: withModifiers(() => handleDelete(option), ['stop']),
},
{ default: () => '删除' }
{ default: () => '删除' },
),
]
}
@@ -113,7 +113,8 @@ function handleDelete(item) {
$message.success('删除成功', { key: 'deleteMenu' })
emit('refresh')
emit('update:currentMenu', null)
} catch (error) {
}
catch (error) {
$message.destroy('deleteMenu')
}
},