A minimal vue admin template with Element UI & axios & iconfont & permission control & lint.
# Clone project
git clone https://github.com/johnnymillergh/jm-vue-admin-template.git
# Install dependencies
npm install
# Serve with hot reload at localhost:9528
npm run dev
# Build for production with minification
npm run build
# Build for production and view the bundle analyzer report
npm run build --report
-
File naming rule: module name with kebab-case naming rule.
-
Standard JavaScript code with export statement. The following JavaScript snippet declares some login APIs that will be used by pages.
import { get, post } from '@/utils/request' // The module to be exported should be named with PascalCase. const Login = { validateUsername: params => get('/auth/validateUsername/' + params, null), login: params => post('/auth/login', params) } // Use `export default` statement to export module. export default Login
Therefore, the import statement to import the Login module should be like following JavaScript snippet.
// The module imported is without mustache brackets. import Login from '@/api/auth/login'
The
@
sign is the alias forsrc
directory. -
…
vue-admin-template by PanJiaChen
Apache license.
Johnny Miller (锺俊) Copyright © 2019-Present