-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
lujiehui
committed
Oct 15, 2019
1 parent
cce97e3
commit 9d89d33
Showing
30 changed files
with
731 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
VUE_CLI_BABEL_TRANSPILE_MODULES = true | ||
NODE_ENV = 'development' | ||
BASE_URL = '/' | ||
VUE_APP_BASE_API = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<template> | ||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" /> | ||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners"> | ||
<use :xlink:href="iconName" /> | ||
</svg> | ||
</template> | ||
|
||
<script> | ||
// doc: https://panjiachen.github.io/vue-element-admin-site/feature/component/svg-icon.html#usage | ||
import { isExternal } from '@/utils/validate' | ||
export default { | ||
name: 'SvgIcon', | ||
props: { | ||
iconClass: { | ||
type: String, | ||
required: true | ||
}, | ||
className: { | ||
type: String, | ||
default: '' | ||
} | ||
}, | ||
computed: { | ||
isExternal () { | ||
return isExternal(this.iconClass) | ||
}, | ||
iconName () { | ||
return `#icon-${this.iconClass}` | ||
}, | ||
svgClass () { | ||
if (this.className) { | ||
return 'svg-icon ' + this.className | ||
} else { | ||
return 'svg-icon' | ||
} | ||
}, | ||
styleExternalIcon () { | ||
return { | ||
mask: `url(${this.iconClass}) no-repeat 50% 50%`, | ||
'-webkit-mask': `url(${this.iconClass}) no-repeat 50% 50%` | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.svg-icon { | ||
width: 1em; | ||
height: 1em; | ||
vertical-align: -0.15em; | ||
fill: currentColor; | ||
overflow: hidden; | ||
} | ||
.svg-external-icon { | ||
background-color: currentColor; | ||
mask-size: cover!important; | ||
display: inline-block; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Vue from 'vue' | ||
import SvgIcon from '@/components/SvgIcon'// svg component | ||
|
||
// register globally | ||
Vue.component('svg-icon', SvgIcon) | ||
|
||
const req = require.context('./svg', false, /\.svg$/) | ||
const requireAll = requireContext => requireContext.keys().map(requireContext) | ||
requireAll(req) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# replace default config | ||
|
||
# multipass: true | ||
# full: true | ||
|
||
plugins: | ||
|
||
# - name | ||
# | ||
# or: | ||
# - name: false | ||
# - name: true | ||
# | ||
# or: | ||
# - name: | ||
# param1: 1 | ||
# param2: 2 | ||
|
||
- removeAttrs: | ||
attrs: | ||
- 'fill' | ||
- 'fill-rule' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
|
||
title: 'h5Vue-cli', | ||
|
||
/** | ||
* @type {boolean} true | false | ||
* @description Whether fix the header | ||
*/ | ||
fixedHeader: false, | ||
|
||
/** | ||
* @type {boolean} true | false | ||
* @description Whether show the logo in sidebar | ||
*/ | ||
sidebarLogo: false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Cookies from 'js-cookie' | ||
|
||
const TokenKey = 'h5-vue-cli_token' | ||
|
||
export function getToken () { | ||
return Cookies.get(TokenKey) | ||
} | ||
|
||
export function setToken (token) { | ||
return Cookies.set(TokenKey, token) | ||
} | ||
|
||
export function removeToken () { | ||
return Cookies.remove(TokenKey) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import defaultSettings from '@/settings' | ||
|
||
const title = defaultSettings.title || 'Vue Admin Template' | ||
|
||
export default function getPageTitle (pageTitle) { | ||
if (pageTitle) { | ||
return `${pageTitle} - ${title}` | ||
} | ||
return `${title}` | ||
} |
Oops, something went wrong.