调整自动引入

This commit is contained in:
aixianling
2024-10-31 16:22:41 +08:00
parent 37c4ff83cb
commit d6a5246f17
53 changed files with 15 additions and 2 deletions

14
bin/comps.js Normal file
View File

@@ -0,0 +1,14 @@
const { findPages, copyFiles } = require('./tools')
const fse = require('fs-extra')
function handleComps() {
findPages('components', file => {
const match = file.match(/(?<pre>(Ai|V))(?<name>[^\\\/]+)\.vue$/)
if(match?.groups){
const {pre,name} = match.groups
const dest = `components/${pre}${name}`
fse.emptyDirSync(dest)
fse.moveSync(file,`${dest}/${pre}${name}.vue`)
}
})
}
handleComps()

View File

@@ -7,7 +7,6 @@ const init = require("./build")
const json = { const json = {
easycom: { easycom: {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue", "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue",
"^(Ai|V)(.*)": "@/components/$1$2.vue",
}, },
pages: [ pages: [
{path: 'pages/loading', style: {navigationBarTitleText: "欢迎使用"}}, {path: 'pages/loading', style: {navigationBarTitleText: "欢迎使用"}},

View File

@@ -10,7 +10,7 @@
</template> </template>
<script> <script>
import tree from "./AiSelectEnterprise/tree"; import tree from "./tree";
export default { export default {
name: "AiSelectEnterprise", name: "AiSelectEnterprise",