提交 b6c6217c 编写于 作者: Mr.奇淼('s avatar Mr.奇淼(

适配vite基本完成

上级 129bbfdc
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</template> </template>
<script> <script>
const path = import.meta.env.VITE_BASE_API const path = process.env.VUE_APP_BASE_API
import { getFileList } from '@/api/fileUploadAndDownload' import { getFileList } from '@/api/fileUploadAndDownload'
export default { export default {
props: { props: {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
require('echarts/theme/macarons') import 'echarts/theme/macarons'
var dataAxis = [] var dataAxis = []
for (var i = 1; i < 21; i++) { for (var i = 1; i < 21; i++) {
......
const modules = import.meta.glob('../../view/**/*.vue') const modules = import.meta.glob('../view/**/*.vue')
export const asyncRouterHandle = (asyncRouter) => { export const asyncRouterHandle = (asyncRouter) => {
asyncRouter.map(item => { asyncRouter.map(item => {
...@@ -20,11 +20,10 @@ function dynamicImport( ...@@ -20,11 +20,10 @@ function dynamicImport(
) { ) {
const keys = Object.keys(dynamicViewsModules) const keys = Object.keys(dynamicViewsModules)
const matchKeys = keys.filter((key) => { const matchKeys = keys.filter((key) => {
let k = key.replace('../../view', '') const k = key.replace('../', '')
const lastIndex = k.lastIndexOf('.')
k = k.substring(0, lastIndex)
return k === component return k === component
}) })
const matchKey = matchKeys[0] const matchKey = matchKeys[0]
return dynamicViewsModules[matchKey] return dynamicViewsModules[matchKey]
} }
...@@ -72,7 +72,7 @@ import { mapGetters } from 'vuex' ...@@ -72,7 +72,7 @@ import { mapGetters } from 'vuex'
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
import { getFileList, deleteFile } from '@/api/fileUploadAndDownload' import { getFileList, deleteFile } from '@/api/fileUploadAndDownload'
import { downloadImage } from '@/utils/downloadImg' import { downloadImage } from '@/utils/downloadImg'
import CustomPic from '@/components/customPic' import CustomPic from '@/components/customPic/index.vue'
import UploadImage from '@/components/upload/image.vue' import UploadImage from '@/components/upload/image.vue'
export default { export default {
name: 'Upload', name: 'Upload',
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
</template> </template>
<script> <script>
import MenuItem from './menuItem' import MenuItem from './menuItem.vue'
import AsyncSubmenu from './asyncSubmenu' import AsyncSubmenu from './asyncSubmenu.vue'
export default { export default {
name: 'AsideComponent', name: 'AsideComponent',
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<script> <script>
import { mapGetters, mapMutations } from 'vuex' import { mapGetters, mapMutations } from 'vuex'
import AsideComponent from '@/view/layout/aside/asideComponent' import AsideComponent from '@/view/layout/aside/asideComponent/index.vue'
import { emitter } from '@/utils/bus.js' import { emitter } from '@/utils/bus.js'
export default { export default {
......
...@@ -100,14 +100,14 @@ ...@@ -100,14 +100,14 @@
</template> </template>
<script> <script>
import Aside from '@/view/layout/aside' import Aside from '@/view/layout/aside/index.vue'
import HistoryComponent from '@/view/layout/aside/historyComponent/history' import HistoryComponent from '@/view/layout/aside/historyComponent/history.vue'
import Screenfull from '@/view/layout/screenfull' import Screenfull from '@/view/layout/screenfull/index.vue'
import Search from '@/view/layout/search/search' import Search from '@/view/layout/search/search.vue'
import BottomInfo from '@/view/layout/bottomInfo/bottomInfo' import BottomInfo from '@/view/layout/bottomInfo/bottomInfo.vue'
import { mapGetters, mapActions } from 'vuex' import { mapGetters, mapActions } from 'vuex'
import CustomPic from '@/components/customPic' import CustomPic from '@/components/customPic/index.vue'
import Setting from './setting' import Setting from './setting/index.vue'
import { setUserAuthority } from '@/api/user' import { setUserAuthority } from '@/api/user'
import { emitter } from '@/utils/bus.js' import { emitter } from '@/utils/bus.js'
export default { export default {
......
...@@ -102,8 +102,8 @@ ...@@ -102,8 +102,8 @@
</template> </template>
<script> <script>
import ChooseImg from '@/components/chooseImg' import ChooseImg from '@/components/chooseImg/index.vue'
import { setUserInfo, changePassword } from '@/api/user' import { setUserInfo, changePassword } from '@/api/user.js'
import { mapGetters, mapMutations } from 'vuex' import { mapGetters, mapMutations } from 'vuex'
const path = import.meta.env.VITE_BASE_API const path = import.meta.env.VITE_BASE_API
......
...@@ -99,9 +99,9 @@ import { ...@@ -99,9 +99,9 @@ import {
copyAuthority copyAuthority
} from '@/api/authority' } from '@/api/authority'
import Menus from '@/view/superAdmin/authority/components/menus' import Menus from '@/view/superAdmin/authority/components/menus.vue'
import Apis from '@/view/superAdmin/authority/components/apis' import Apis from '@/view/superAdmin/authority/components/apis.vue'
import Datas from '@/view/superAdmin/authority/components/datas' import Datas from '@/view/superAdmin/authority/components/datas.vue'
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
export default { export default {
......
...@@ -193,7 +193,7 @@ import { ...@@ -193,7 +193,7 @@ import {
getBaseMenuById getBaseMenuById
} from '@/api/menu' } from '@/api/menu'
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
import icon from '@/view/superAdmin/menu/icon' import icon from '@/view/superAdmin/menu/icon.vue'
export default { export default {
name: 'Menus', name: 'Menus',
components: { components: {
......
...@@ -106,8 +106,8 @@ import { ...@@ -106,8 +106,8 @@ import {
import { getAuthorityList } from '@/api/authority' import { getAuthorityList } from '@/api/authority'
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import CustomPic from '@/components/customPic' import CustomPic from '@/components/customPic/index.vue'
import ChooseImg from '@/components/chooseImg' import ChooseImg from '@/components/chooseImg/index.vue'
export default { export default {
name: 'Api', name: 'Api',
components: { CustomPic, ChooseImg }, components: { CustomPic, ChooseImg },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册