refactor: vue3

This commit is contained in:
xingyu 2022-07-19 23:03:10 +08:00
parent 9e2e220b69
commit b3913a86f8
5 changed files with 17 additions and 6 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "ruoyi-vue-pro-vue3", "name": "ruoyi-vue-pro-vue3",
"version": "0.0.160", "version": "1.0.160",
"description": "基于vue3、element-plus、typesScript、vite3", "description": "基于vue3、element-plus、typesScript、vite3",
"author": "xingyu", "author": "xingyu",
"private": false, "private": false,
"scripts": { "scripts": {
@ -93,7 +93,7 @@
"typescript": "4.7.4", "typescript": "4.7.4",
"unplugin-vue-define-options": "^0.6.2", "unplugin-vue-define-options": "^0.6.2",
"vite": "3.0.2", "vite": "3.0.2",
"vite-plugin-eslint": "^1.6.1", "vite-plugin-eslint": "^1.7.0",
"vite-plugin-html": "^3.2.0", "vite-plugin-html": "^3.2.0",
"vite-plugin-purge-icons": "^0.8.1", "vite-plugin-purge-icons": "^0.8.1",
"vite-plugin-style-import": "^1.4.1", "vite-plugin-style-import": "^1.4.1",

View File

@ -294,3 +294,9 @@ export default defineComponent({
} }
}) })
</script> </script>
<style lang="less" scoped>
:deep(.el-button.is-text) {
margin-left: 0;
padding: 8px 10px;
}
</style>

View File

@ -29,7 +29,7 @@ const router = createRouter({
scrollBehavior: () => ({ left: 0, top: 0 }) scrollBehavior: () => ({ left: 0, top: 0 })
}) })
// 路由白名单 // 路由不重定向白名单
const whiteList = [ const whiteList = [
'/login', '/login',
'/social-login', '/social-login',
@ -96,7 +96,6 @@ export const resetRouter = (): void => {
router.hasRoute(name) && router.removeRoute(name) router.hasRoute(name) && router.removeRoute(name)
} }
}) })
routes: remainingRouter as RouteRecordRaw[]
} }
export const setupRouter = (app: App<Element>) => { export const setupRouter = (app: App<Element>) => {

View File

@ -79,7 +79,7 @@ const crudSchemas = reactive<CrudSchema[]>([
}, },
{ {
field: 'action', field: 'action',
width: '400px', width: '500px',
label: t('table.action'), label: t('table.action'),
form: { form: {
show: false show: false

View File

@ -9,7 +9,13 @@ declare module '*.vue' {
interface ImportMetaEnv { interface ImportMetaEnv {
readonly VITE_APP_TITLE: string readonly VITE_APP_TITLE: string
readonly VITE_PORT: number
readonly VITE_OPEN: boolean
readonly VITE_APP_TENANT_ENABLE: boolean
readonly VITE_BASE_URL: string
readonly VITE_UPLOAD_URL: string
readonly VITE_API_BASEPATH: string readonly VITE_API_BASEPATH: string
readonly VITE_API_URL: string
readonly VITE_BASE_PATH: string readonly VITE_BASE_PATH: string
readonly VITE_DROP_DEBUGGER: string readonly VITE_DROP_DEBUGGER: string
readonly VITE_DROP_CONSOLE: string readonly VITE_DROP_CONSOLE: string