Skip to content

Commit

Permalink
导入weui.js
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderMikeHe committed Jul 24, 2019
1 parent f872411 commit 310cca9
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 57 deletions.
80 changes: 38 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"vue": "^2.6.10",
"vue-router": "^3.0.7",
"vuex": "^3.1.1",
"weui": "^2.0.0"
"weui": "^2.0.1",
"weui.js": "^1.2.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.9.2",
Expand Down
7 changes: 2 additions & 5 deletions src/assets/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,8 @@ a {
} */

body {
line-height: 1;
}

body {
font: 13px/1.5 -apple-system-font, Helvetica Neue, Helvetica, Hiragino Sans GB,
line-height: 1.6;
font-family: -apple-system-font, Helvetica Neue, Helvetica, Hiragino Sans GB,
Microsoft YaHei, Noto Sans CJK SC, WenQuanYi Micro Hei, Arial, sans-serif;
}

Expand Down
15 changes: 6 additions & 9 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ import Mint from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(Mint)

// 导入weui
// 导入weui 样式库
import 'weui'
// 导入weiui js库
import weui from 'weui.js'
// 挂载到Vue 实例上去
Vue.$weui = Vue.prototype.$weui = weui

// 全局app常量css
import './assets/css/common.css'
Expand Down Expand Up @@ -51,11 +55,9 @@ new Vue({
render: h => h(App)
}).$mount('#app')


// 重置根路由
AccountHelper.resetRootRouterView()


// {
// "workbench.iconTheme": "vscode-icons",
// "editor.fontSize": 18,
Expand Down Expand Up @@ -95,7 +97,7 @@ AccountHelper.resetRootRouterView()

// 👉 github 添加 SSH key
// - [github 添加 SSH key](https://www.cnblogs.com/blogzhangwei/p/5944975.html)
//
//

// 👉 网页部署到GitHub Pages
// - [部署到GitHub Pages](https://cli.vuejs.org/zh/guide/deployment.html#github-pages)
Expand All @@ -107,7 +109,6 @@ AccountHelper.resetRootRouterView()
// - [vue-cli3.0 环境变量与模式](https://segmentfault.com/a/1190000015133974?utm_source=tag-newest)
// - [vuecli3.0脚手架搭建及不同的打包环境配置vue.config.js](https://blog.csdn.net/qq_36407748/article/details/82050976)


// - [使用 github pages, 快速部署你的静态网页](https://blog.csdn.net/baidu_25464429/article/details/80805237)
// - [NodeJs/Vue项目中对process.env的使用](https://www.jianshu.com/p/07fda339f57e)

Expand Down Expand Up @@ -363,10 +364,6 @@ AccountHelper.resetRootRouterView()
// - [velocity](https://github.com/julianshapiro/velocity)
// - [dropzone](https://github.com/enyo/dropzone)





// https://github.com/SunshineBrother/JHBlog

/**
Expand Down
5 changes: 5 additions & 0 deletions src/views/login/CurrentLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,13 @@ export default {
login() {
// 按钮不可点击,则过滤
if (this.loginBtnDisabled) return
// 显示loading
let loading = this.$weui.loading('正在加载中...')
// 模拟网络加载
setTimeout(() => {
// 隐藏loading
loading.hide()
// user info
const user = this.user
// 设置登陆模式
Expand Down

0 comments on commit 310cca9

Please sign in to comment.