StarGazer
This commit is contained in:
12
.babelrc
Normal file
12
.babelrc
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
"presets": [["es2015", { "modules": false }]],
|
||||
"plugins": [
|
||||
[
|
||||
"component",
|
||||
{
|
||||
"libraryName": "element-ui",
|
||||
"styleLibraryName": "theme-chalk"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
63
.vuepress/components/StarGazer.vue
Normal file
63
.vuepress/components/StarGazer.vue
Normal file
@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="感谢阅读"
|
||||
:visible.sync="dialogVisible"
|
||||
width="50%"
|
||||
:before-close="handleClose">
|
||||
<span>如果这篇文档有帮到您,劳烦移步 github 给一个 star,谢谢!</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="waitAMoment">一会儿再说</el-button>
|
||||
<el-button type="primary" @click="gotoStar">现在就去</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import { Dialog, Button } from 'element-ui';
|
||||
|
||||
Vue.component(Dialog.name, Dialog)
|
||||
Vue.component(Button.name, Button)
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false
|
||||
};
|
||||
},
|
||||
mounted () {
|
||||
this.waitAMoment()
|
||||
},
|
||||
methods: {
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
},
|
||||
waitAMoment() {
|
||||
if (localStorage.getItem('stared')) {
|
||||
return
|
||||
}
|
||||
this.dialogVisible = false
|
||||
let _this = this
|
||||
setTimeout(_ => {
|
||||
_this.dialogVisible = true
|
||||
}, 10000) //60000 * 5)
|
||||
},
|
||||
gotoStar() {
|
||||
this.dialogVisible = false
|
||||
window.open('https://github.com/eip-work/kuboard-press')
|
||||
localStorage.setItem('stared', true)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
93
package-lock.json
generated
93
package-lock.json
generated
@ -1727,6 +1727,14 @@
|
||||
"integrity": "sha1-NhIfhFwFeBct5Bmpfb6x0W7DRUI=",
|
||||
"dev": true
|
||||
},
|
||||
"async-validator": {
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npm.taobao.org/async-validator/download/async-validator-1.8.5.tgz?cache=0&sync_timestamp=1565685468183&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fasync-validator%2Fdownload%2Fasync-validator-1.8.5.tgz",
|
||||
"integrity": "sha1-3D4I7B/Q3dtn5ghC8CwM0c7G1/A=",
|
||||
"requires": {
|
||||
"babel-runtime": "6.x"
|
||||
}
|
||||
},
|
||||
"asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz",
|
||||
@ -1775,6 +1783,11 @@
|
||||
"integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=",
|
||||
"dev": true
|
||||
},
|
||||
"babel-helper-vue-jsx-merge-props": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-helper-vue-jsx-merge-props/download/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
|
||||
"integrity": "sha1-Iq69OzOQIyjlEyk6jkmSs4T58bY="
|
||||
},
|
||||
"babel-loader": {
|
||||
"version": "8.0.6",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-loader/download/babel-loader-8.0.6.tgz",
|
||||
@ -1787,6 +1800,38 @@
|
||||
"pify": "^4.0.1"
|
||||
}
|
||||
},
|
||||
"babel-plugin-component": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-component/-/babel-plugin-component-1.1.1.tgz",
|
||||
"integrity": "sha512-WUw887kJf2GH80Ng/ZMctKZ511iamHNqPhd9uKo14yzisvV7Wt1EckIrb8oq/uCz3B3PpAW7Xfl7AkTLDYT6ag==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/helper-module-imports": "7.0.0-beta.35"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/helper-module-imports": {
|
||||
"version": "7.0.0-beta.35",
|
||||
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0-beta.35.tgz",
|
||||
"integrity": "sha512-vaC1KyIZSuyWb3Lj277fX0pxivyHwuDU4xZsofqgYAbkDxNieMg2vuhzP5AgMweMY7fCQUMTi+BgPqTLjkxXFg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/types": "7.0.0-beta.35",
|
||||
"lodash": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"@babel/types": {
|
||||
"version": "7.0.0-beta.35",
|
||||
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.35.tgz",
|
||||
"integrity": "sha512-y9XT11CozHDgjWcTdxmhSj13rJVXpa5ZXwjjOiTedjaM0ba5ItqdS02t31EhPl7HtOWxsZkYCCUNrSfrOisA6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"esutils": "^2.0.2",
|
||||
"lodash": "^4.2.0",
|
||||
"to-fast-properties": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"babel-plugin-dynamic-import-node": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbabel-plugin-dynamic-import-node%2Fdownload%2Fbabel-plugin-dynamic-import-node-2.3.0.tgz",
|
||||
@ -1809,6 +1854,22 @@
|
||||
"resolve": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"babel-runtime": {
|
||||
"version": "6.26.0",
|
||||
"resolved": "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz",
|
||||
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
|
||||
"requires": {
|
||||
"core-js": "^2.4.0",
|
||||
"regenerator-runtime": "^0.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"regenerator-runtime": {
|
||||
"version": "0.11.1",
|
||||
"resolved": "https://registry.npm.taobao.org/regenerator-runtime/download/regenerator-runtime-0.11.1.tgz",
|
||||
"integrity": "sha1-vgWtf5v30i4Fb5cmzuUBf78Z4uk="
|
||||
}
|
||||
}
|
||||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.0.tgz",
|
||||
@ -2778,8 +2839,7 @@
|
||||
"core-js": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npm.taobao.org/core-js/download/core-js-2.6.9.tgz",
|
||||
"integrity": "sha1-a0shRiDINBUuF5Mjcn/Bl0GwhPI=",
|
||||
"dev": true
|
||||
"integrity": "sha1-a0shRiDINBUuF5Mjcn/Bl0GwhPI="
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@ -3139,8 +3199,7 @@
|
||||
"deepmerge": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz",
|
||||
"integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M=",
|
||||
"dev": true
|
||||
"integrity": "sha1-EEmdhohEza1P7ghC34x/bwyVp1M="
|
||||
},
|
||||
"default-gateway": {
|
||||
"version": "4.2.0",
|
||||
@ -3452,6 +3511,19 @@
|
||||
"integrity": "sha1-ePuFi0ZiaejrRtMaUlYvAMhlEn8=",
|
||||
"dev": true
|
||||
},
|
||||
"element-ui": {
|
||||
"version": "2.11.1",
|
||||
"resolved": "https://registry.npm.taobao.org/element-ui/download/element-ui-2.11.1.tgz?cache=0&sync_timestamp=1564126738326&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felement-ui%2Fdownload%2Felement-ui-2.11.1.tgz",
|
||||
"integrity": "sha1-K2f57uPtouaISHPBxYnL4w2anWA=",
|
||||
"requires": {
|
||||
"async-validator": "~1.8.1",
|
||||
"babel-helper-vue-jsx-merge-props": "^2.0.0",
|
||||
"deepmerge": "^1.2.0",
|
||||
"normalize-wheel": "^1.0.1",
|
||||
"resize-observer-polyfill": "^1.5.0",
|
||||
"throttle-debounce": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"elliptic": {
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npm.taobao.org/elliptic/download/elliptic-6.5.0.tgz?cache=0&sync_timestamp=1561521858170&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Felliptic%2Fdownload%2Felliptic-6.5.0.tgz",
|
||||
@ -6741,6 +6813,11 @@
|
||||
"sort-keys": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"normalize-wheel": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npm.taobao.org/normalize-wheel/download/normalize-wheel-1.0.1.tgz",
|
||||
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU="
|
||||
},
|
||||
"npm-run-path": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npm.taobao.org/npm-run-path/download/npm-run-path-2.0.2.tgz",
|
||||
@ -8477,8 +8554,7 @@
|
||||
"resize-observer-polyfill": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npm.taobao.org/resize-observer-polyfill/download/resize-observer-polyfill-1.5.1.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fresize-observer-polyfill%2Fdownload%2Fresize-observer-polyfill-1.5.1.tgz",
|
||||
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ=",
|
||||
"dev": true
|
||||
"integrity": "sha1-DpAg3T0hAkRY1OvSfiPkAmmBBGQ="
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.11.1",
|
||||
@ -9764,6 +9840,11 @@
|
||||
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
|
||||
"dev": true
|
||||
},
|
||||
"throttle-debounce": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npm.taobao.org/throttle-debounce/download/throttle-debounce-1.1.0.tgz",
|
||||
"integrity": "sha1-UYU9o3vmihVctugns1FKPEIuic0="
|
||||
},
|
||||
"through": {
|
||||
"version": "2.3.8",
|
||||
"resolved": "https://registry.npm.taobao.org/through/download/through-2.3.8.tgz",
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
"@vuepress/plugin-google-analytics": "^1.0.0-rc.1",
|
||||
"@vuepress/plugin-medium-zoom": "^1.0.0-rc.1",
|
||||
"@vuepress/plugin-nprogress": "^1.0.2",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"date-fns": "^1.30.1",
|
||||
"vuepress": "^1.0.2",
|
||||
"vuepress-plugin-baidu-autopush": "^1.0.1",
|
||||
@ -17,5 +18,7 @@
|
||||
"vuepress-plugin-seo": "^0.1.2",
|
||||
"vuepress-plugin-sitemap": "^2.1.2"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {
|
||||
"element-ui": "^2.11.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user