1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-08-08 20:29:00 +08:00

style: lint fix

This commit is contained in:
zclzone 2025-05-19 11:20:51 +08:00
parent 5178b70aca
commit 7243f4f38e
17 changed files with 21 additions and 20 deletions

View File

@ -29,9 +29,9 @@
</template> </template>
<script setup> <script setup>
import { darkTheme, dateZhCN, zhCN } from 'naive-ui'
import { LayoutSetting } from '@/components' import { LayoutSetting } from '@/components'
import { useAppStore, useTabStore } from '@/store' import { useAppStore, useTabStore } from '@/store'
import { darkTheme, dateZhCN, zhCN } from 'naive-ui'
import { layoutSettingVisible } from './settings' import { layoutSettingVisible } from './settings'
const layouts = new Map() const layouts = new Map()

View File

@ -17,8 +17,8 @@
</template> </template>
<script setup> <script setup>
import { useAppStore } from '@/store'
import { getPresetColors } from '@arco-design/color' import { getPresetColors } from '@arco-design/color'
import { useAppStore } from '@/store'
const appStore = useAppStore() const appStore = useAppStore()

View File

@ -8,8 +8,8 @@
</template> </template>
<script setup> <script setup>
import { useAppStore } from '@/store'
import { useDark, useToggle } from '@vueuse/core' import { useDark, useToggle } from '@vueuse/core'
import { useAppStore } from '@/store'
const appStore = useAppStore() const appStore = useAppStore()
const isDark = useDark() const isDark = useDark()

View File

@ -6,8 +6,8 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/ **********************************/
import { router } from '@/router'
import { withDirectives } from 'vue' import { withDirectives } from 'vue'
import { router } from '@/router'
const permission = { const permission = {
mounted(el, binding) { mounted(el, binding) {

View File

@ -54,7 +54,8 @@ function handleMenuSelect(key, item) {
}) })
} }
else { else {
if(!item.path) return if (!item.path)
return
router.push(item.path) router.push(item.path)
} }
} }

View File

@ -6,10 +6,10 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/ **********************************/
import { defaultLayout, defaultPrimaryColor, naiveThemeOverrides } from '@/settings'
import { generate, getRgbStr } from '@arco-design/color' import { generate, getRgbStr } from '@arco-design/color'
import { useDark } from '@vueuse/core' import { useDark } from '@vueuse/core'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { defaultLayout, defaultPrimaryColor, naiveThemeOverrides } from '@/settings'
export const useAppStore = defineStore('app', { export const useAppStore = defineStore('app', {
state: () => ({ state: () => ({

View File

@ -6,8 +6,8 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/ **********************************/
import { usePermissionStore, useRouterStore, useTabStore, useUserStore } from '@/store'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { usePermissionStore, useRouterStore, useTabStore, useUserStore } from '@/store'
export const useAuthStore = defineStore('auth', { export const useAuthStore = defineStore('auth', {
state: () => ({ state: () => ({

View File

@ -6,9 +6,9 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/ **********************************/
import { isExternal } from '@/utils'
import { hyphenate } from '@vueuse/core' import { hyphenate } from '@vueuse/core'
import { defineStore } from 'pinia' import { defineStore } from 'pinia'
import { isExternal } from '@/utils'
export const usePermissionStore = defineStore('permission', { export const usePermissionStore = defineStore('permission', {
state: () => ({ state: () => ({

View File

@ -7,9 +7,9 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/ **********************************/
import * as NaiveUI from 'naive-ui'
import { useAppStore } from '@/store' import { useAppStore } from '@/store'
import { isNullOrUndef } from '@/utils' import { isNullOrUndef } from '@/utils'
import * as NaiveUI from 'naive-ui'
export function setupMessage(NMessage) { export function setupMessage(NMessage) {
class Message { class Message {

View File

@ -159,13 +159,13 @@
</template> </template>
<script setup> <script setup>
import { useUserStore } from '@/store'
import { BarChart, LineChart, PieChart } from 'echarts/charts' import { BarChart, LineChart, PieChart } from 'echarts/charts'
import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components' import { GridComponent, LegendComponent, TooltipComponent } from 'echarts/components'
import * as echarts from 'echarts/core' import * as echarts from 'echarts/core'
import { UniversalTransition } from 'echarts/features' import { UniversalTransition } from 'echarts/features'
import { CanvasRenderer } from 'echarts/renderers' import { CanvasRenderer } from 'echarts/renderers'
import VChart from 'vue-echarts' import VChart from 'vue-echarts'
import { useUserStore } from '@/store'
const userStore = useUserStore() const userStore = useUserStore()

View File

@ -101,9 +101,9 @@
</template> </template>
<script setup> <script setup>
import { useStorage } from '@vueuse/core'
import { useAuthStore } from '@/store' import { useAuthStore } from '@/store'
import { lStorage, throttle } from '@/utils' import { lStorage, throttle } from '@/utils'
import { useStorage } from '@vueuse/core'
import api from './api' import api from './api'
const authStore = useAuthStore() const authStore = useAuthStore()

View File

@ -6,8 +6,8 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top * Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/ **********************************/
import { request } from '@/utils'
import axios from 'axios' import axios from 'axios'
import { request } from '@/utils'
export default { export default {
getMenuTree: () => request.get('/permission/menu/tree'), getMenuTree: () => request.get('/permission/menu/tree'),

View File

@ -159,10 +159,10 @@
</template> </template>
<script setup> <script setup>
import { MeModal } from '@/components'
import { useForm, useModal } from '@/composables'
import icons from 'isme:icons' import icons from 'isme:icons'
import pagePathes from 'isme:page-pathes' import pagePathes from 'isme:page-pathes'
import { MeModal } from '@/components'
import { useForm, useModal } from '@/composables'
import api from '../api' import api from '../api'
import QuestionLabel from './QuestionLabel.vue' import QuestionLabel from './QuestionLabel.vue'

View File

@ -92,8 +92,8 @@
</template> </template>
<script setup> <script setup>
import { MeCrud } from '@/components'
import { NButton, NSwitch } from 'naive-ui' import { NButton, NSwitch } from 'naive-ui'
import { MeCrud } from '@/components'
import api from './api' import api from './api'
import MenuTree from './components/MenuTree.vue' import MenuTree from './components/MenuTree.vue'
import ResAddOrEdit from './components/ResAddOrEdit.vue' import ResAddOrEdit from './components/ResAddOrEdit.vue'

View File

@ -75,7 +75,7 @@
:checked-keys="modalForm.permissionIds" :checked-keys="modalForm.permissionIds"
:on-update:checked-keys="(keys) => (modalForm.permissionIds = keys)" :on-update:checked-keys="(keys) => (modalForm.permissionIds = keys)"
default-expand-all checkable check-on-click checkable check-on-click default-expand-all
class="cus-scroll max-h-200 w-full" class="cus-scroll max-h-200 w-full"
/> />
</n-form-item> </n-form-item>
@ -95,9 +95,9 @@
</template> </template>
<script setup> <script setup>
import { NButton, NSwitch } from 'naive-ui'
import { MeCrud, MeModal, MeQueryItem } from '@/components' import { MeCrud, MeModal, MeQueryItem } from '@/components'
import { useCrud } from '@/composables' import { useCrud } from '@/composables'
import { NButton, NSwitch } from 'naive-ui'
import api from './api' import api from './api'
defineOptions({ name: 'RoleMgt' }) defineOptions({ name: 'RoleMgt' })

View File

@ -67,10 +67,10 @@
</template> </template>
<script setup> <script setup>
import { MeCrud, MeQueryItem } from '@/components'
import { formatDateTime } from '@/utils'
import { NAvatar, NButton, NSwitch, NTag } from 'naive-ui' import { NAvatar, NButton, NSwitch, NTag } from 'naive-ui'
import { h } from 'vue' import { h } from 'vue'
import { MeCrud, MeQueryItem } from '@/components'
import { formatDateTime } from '@/utils'
import api from './api' import api from './api'
defineOptions({ name: 'RoleUser' }) defineOptions({ name: 'RoleUser' })

View File

@ -110,11 +110,11 @@
</template> </template>
<script setup> <script setup>
import { NAvatar, NButton, NSwitch, NTag } from 'naive-ui'
import { MeCrud, MeModal, MeQueryItem } from '@/components' import { MeCrud, MeModal, MeQueryItem } from '@/components'
import { useCrud } from '@/composables' import { useCrud } from '@/composables'
import { withPermission } from '@/directives' import { withPermission } from '@/directives'
import { formatDateTime } from '@/utils' import { formatDateTime } from '@/utils'
import { NAvatar, NButton, NSwitch, NTag } from 'naive-ui'
import api from './api' import api from './api'
defineOptions({ name: 'UserMgt' }) defineOptions({ name: 'UserMgt' })