This commit is contained in:
xingyu
2022-07-18 10:18:46 +08:00
13 changed files with 91 additions and 67 deletions

View File

@@ -30,6 +30,7 @@ export const humpToUnderline = (str: string): string => {
* @returns 字符串驼峰
*/
export const underlineToHump = (str: string): string => {
if (!str) return ''
return str.replace(/\-(\w)/g, (_, letter: string) => {
return letter.toUpperCase()
})

View File

@@ -1,5 +1,11 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import type { Router, RouteLocationNormalized, RouteRecordNormalized, RouteMeta } from 'vue-router'
import type {
Router,
RouteLocationNormalized,
RouteRecordNormalized,
RouteMeta,
RouteRecordRaw
} from 'vue-router'
import { isUrl } from '@/utils/is'
import { omit, cloneDeep } from 'lodash-es'
@@ -154,7 +160,7 @@ const isMultipleRoute = (route: AppRouteRecordRaw) => {
// 生成二级路由
const promoteRouteLevel = (route: AppRouteRecordRaw) => {
let router: Router | null = createRouter({
routes: [route as unknown as RouteRecordNormalized],
routes: [route as RouteRecordRaw],
history: createWebHashHistory()
})

View File

@@ -34,7 +34,10 @@ const schema = reactive<FormSchema[]>([
label: 'option2',
value: '2'
}
]
],
onChange: (value: string) => {
console.log(value)
}
}
},
{

View File

@@ -13,6 +13,7 @@ const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('login')
const appStore = useAppStore()
console.log(appStore)
const { t } = useI18n()