1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-12-28 12:10:20 +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

@@ -6,8 +6,8 @@
* Copyright © 2023 Ronnie Zhang(大脸怪) | https://isme.top
**********************************/
import path from 'node:path'
import { globSync } from 'glob'
import path from 'path'
import dynamicIcons from '../src/assets/icons/dynamic-icons'
/**
@@ -35,5 +35,5 @@ export function getIcons() {
*/
export function getPagePathes() {
const files = globSync('src/views/**/*.vue')
return files.map((item) => '/' + path.normalize(item).replace(/\\/g, '/'))
return files.map(item => `/${path.normalize(item).replace(/\\/g, '/')}`)
}

View File

@@ -13,10 +13,11 @@ export function pluginIcons() {
return {
name: 'isme:icons',
resolveId(id) {
if (id === PLUGIN_ICONS_ID) return '\0' + PLUGIN_ICONS_ID
if (id === PLUGIN_ICONS_ID)
return `\0${PLUGIN_ICONS_ID}`
},
load(id) {
if (id === '\0' + PLUGIN_ICONS_ID) {
if (id === `\0${PLUGIN_ICONS_ID}`) {
return `export default ${JSON.stringify(getIcons())}`
}
},

View File

@@ -13,10 +13,11 @@ export function pluginPagePathes() {
return {
name: 'isme:page-pathes',
resolveId(id) {
if (id === PLUGIN_PAGE_PATHES_ID) return '\0' + PLUGIN_PAGE_PATHES_ID
if (id === PLUGIN_PAGE_PATHES_ID)
return `\0${PLUGIN_PAGE_PATHES_ID}`
},
load(id) {
if (id === '\0' + PLUGIN_PAGE_PATHES_ID) {
if (id === `\0${PLUGIN_PAGE_PATHES_ID}`) {
return `export default ${JSON.stringify(getPagePathes())}`
}
},