master
parent
472cbb6d65
commit
40a5977d1f
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
@ -1,11 +0,0 @@
|
|||||||
import Vue from 'vue'
|
|
||||||
|
|
||||||
function registerAllComponents(requireContext) {
|
|
||||||
return requireContext.keys().forEach(comp => {
|
|
||||||
const vueComp = requireContext(comp)
|
|
||||||
const compName = vueComp.name ? vueComp.name.toLowerCase() : /\/([\w-]+)\.vue$/.exec(comp)[1]
|
|
||||||
Vue.component(compName, vueComp)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
registerAllComponents(require.context('./', false, /\.vue$/))
|
|
@ -1,52 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="icon-container" :style="containerStyle">
|
|
||||||
<slot class="icon"></slot>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'wscn-icon-stack',
|
|
||||||
props: {
|
|
||||||
width: {
|
|
||||||
type: Number,
|
|
||||||
default: 20
|
|
||||||
},
|
|
||||||
shape: {
|
|
||||||
type: String,
|
|
||||||
default: 'circle',
|
|
||||||
validator: val => {
|
|
||||||
const validShapes = ['circle', 'square']
|
|
||||||
return validShapes.indexOf(val) > -1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
containerStyle() {
|
|
||||||
return {
|
|
||||||
width: `${this.width}px`,
|
|
||||||
height: `${this.width}px`,
|
|
||||||
fontSize: `${this.width * 0.6}px`,
|
|
||||||
borderRadius: `${this.shape === 'circle' && '50%'}`
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.icon-container {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
background: #1482F0;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
position: absolute;
|
|
||||||
color: #ffffff;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,103 +0,0 @@
|
|||||||
$blue:#324157;
|
|
||||||
$light-blue:#3A71A8;
|
|
||||||
$red:#C03639;
|
|
||||||
$pink: #E65D6E;
|
|
||||||
$green: #30B08F;
|
|
||||||
$tiffany: #4AB7BD;
|
|
||||||
$yellow:#FEC171;
|
|
||||||
|
|
||||||
$panGreen: #30B08F;
|
|
||||||
|
|
||||||
@mixin colorBtn($color) {
|
|
||||||
background: $color;
|
|
||||||
&:hover {
|
|
||||||
color: $color;
|
|
||||||
&:before, &:after {
|
|
||||||
background: $color;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.blue-btn {
|
|
||||||
@include colorBtn($blue)
|
|
||||||
}
|
|
||||||
|
|
||||||
.light-blue-btn{
|
|
||||||
@include colorBtn($light-blue)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.red-btn {
|
|
||||||
@include colorBtn($red)
|
|
||||||
}
|
|
||||||
|
|
||||||
.pink-btn {
|
|
||||||
@include colorBtn($pink)
|
|
||||||
}
|
|
||||||
|
|
||||||
.green-btn {
|
|
||||||
@include colorBtn($green)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.tiffany-btn {
|
|
||||||
@include colorBtn($tiffany)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.yellow-btn {
|
|
||||||
@include colorBtn($yellow)
|
|
||||||
}
|
|
||||||
|
|
||||||
.pan-btn {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #fff;
|
|
||||||
padding: 14px 36px;
|
|
||||||
border-radius: 8px;
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
margin-right: 25px;
|
|
||||||
transition: 600ms ease all;
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
&:hover {
|
|
||||||
background: #fff;
|
|
||||||
&:before, &:after {
|
|
||||||
width: 100%;
|
|
||||||
transition: 600ms ease all;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:before, &:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
height: 2px;
|
|
||||||
width: 0;
|
|
||||||
transition: 400ms ease all;
|
|
||||||
}
|
|
||||||
&::after {
|
|
||||||
right: inherit;
|
|
||||||
top: inherit;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.custom-button{
|
|
||||||
display: inline-block;
|
|
||||||
line-height: 1;
|
|
||||||
white-space: nowrap;
|
|
||||||
cursor: pointer;
|
|
||||||
background: #fff;
|
|
||||||
color: #fff;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
text-align: center;
|
|
||||||
box-sizing: border-box;
|
|
||||||
outline: 0;
|
|
||||||
margin: 0;
|
|
||||||
padding: 10px 15px;
|
|
||||||
font-size: 14px;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
/**
|
|
||||||
* Created by jiachenpan on 17/3/8.
|
|
||||||
*/
|
|
||||||
export default function createUniqueString() {
|
|
||||||
const timestamp = +new Date() + '';
|
|
||||||
const randomNum = parseInt((1 + Math.random()) * 65536) + '';
|
|
||||||
return (+(randomNum + timestamp)).toString(32);
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
/**
|
|
||||||
*Created by jiachenpan on 16/11/29.
|
|
||||||
* @param {Sting} url
|
|
||||||
* @param {Sting} title
|
|
||||||
* @param {Number} w
|
|
||||||
* @param {Number} h
|
|
||||||
*/
|
|
||||||
|
|
||||||
export default function openWindow(url, title, w, h) {
|
|
||||||
// Fixes dual-screen position Most browsers Firefox
|
|
||||||
const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left;
|
|
||||||
const dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top;
|
|
||||||
|
|
||||||
const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
|
|
||||||
const height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;
|
|
||||||
|
|
||||||
const left = ((width / 2) - (w / 2)) + dualScreenLeft;
|
|
||||||
const top = ((height / 2) - (h / 2)) + dualScreenTop;
|
|
||||||
const newWindow = window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
|
|
||||||
|
|
||||||
// Puts focus on the newWindow
|
|
||||||
if (window.focus) {
|
|
||||||
newWindow.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class='tabs-view-container'>
|
|
||||||
<router-link class="tabs-view" v-for="tag in Array.from(visitedViews)" :to="tag.path" :key="tag.path">
|
|
||||||
<el-tag :closable="true" @close='closeViewTabs(tag,$event)'>
|
|
||||||
{{tag.name}}
|
|
||||||
</el-tag>
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
computed: {
|
|
||||||
visitedViews() {
|
|
||||||
return this.$store.state.app.visitedViews.slice(-6)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
closeViewTabs(view, $event) {
|
|
||||||
this.$store.dispatch('delVisitedViews', view)
|
|
||||||
$event.preventDefault()
|
|
||||||
},
|
|
||||||
addViewTabs() {
|
|
||||||
this.$store.dispatch('addVisitedViews', this.$route.matched[this.$route.matched.length - 1])
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
$route() {
|
|
||||||
this.addViewTabs()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
.tabs-view-container{
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: top;
|
|
||||||
margin-left: 10px;
|
|
||||||
.tabs-view{
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
|
Loading…
Reference in New Issue