调整自动引入
This commit is contained in:
14
bin/comps.js
Normal file
14
bin/comps.js
Normal 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()
|
||||||
@@ -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: "欢迎使用"}},
|
||||||
|
|||||||
@@ -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",
|
||||||
Reference in New Issue
Block a user