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:
@@ -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, '/')}`)
|
||||
}
|
||||
|
||||
@@ -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())}`
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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())}`
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user