Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 310cca9

Browse files
导入weui.js
1 parent f872411 commit 310cca9

File tree

5 files changed

+53
-57
lines changed

5 files changed

+53
-57
lines changed

‎package-lock.json‎

Lines changed: 38 additions & 42 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"vue": "^2.6.10",
1818
"vue-router": "^3.0.7",
1919
"vuex": "^3.1.1",
20-
"weui": "^2.0.0"
20+
"weui": "^2.0.1",
21+
"weui.js": "^1.2.1"
2122
},
2223
"devDependencies": {
2324
"@vue/cli-plugin-babel": "^3.9.2",

‎src/assets/css/common.css‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,8 @@ a {
209209
} */
210210

211211
body {
212-
line-height: 1;
213-
}
214-
215-
body {
216-
font: 13px/1.5 -apple-system-font, Helvetica Neue, Helvetica, Hiragino Sans GB,
212+
line-height: 1.6;
213+
font-family: -apple-system-font, Helvetica Neue, Helvetica, Hiragino Sans GB,
217214
Microsoft YaHei, Noto Sans CJK SC, WenQuanYi Micro Hei, Arial, sans-serif;
218215
}
219216

‎src/main.js‎

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ import Mint from 'mint-ui'
1919
import 'mint-ui/lib/style.css'
2020
Vue.use(Mint)
2121

22-
// 导入weui
22+
// 导入weui 样式库
2323
import 'weui'
24+
// 导入weiui js库
25+
import weui from 'weui.js'
26+
// 挂载到Vue 实例上去
27+
Vue.$weui = Vue.prototype.$weui = weui
2428

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

54-
5558
// 重置根路由
5659
AccountHelper.resetRootRouterView()
5760

58-
5961
// {
6062
// "workbench.iconTheme": "vscode-icons",
6163
// "editor.fontSize": 18,
@@ -95,7 +97,7 @@ AccountHelper.resetRootRouterView()
9597

9698
// 👉 github 添加 SSH key
9799
// - [github 添加 SSH key](https://www.cnblogs.com/blogzhangwei/p/5944975.html)
98-
//
100+
//
99101

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

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

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

366-
367-
368-
369-
370367
// https://github.com/SunshineBrother/JHBlog
371368

372369
/**

‎src/views/login/CurrentLogin.vue‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,13 @@ export default {
169169
login() {
170170
// 按钮不可点击,则过滤
171171
if (this.loginBtnDisabled) return
172+
173+
// 显示loading
174+
let loading = this.$weui.loading('正在加载中...')
172175
// 模拟网络加载
173176
setTimeout(() => {
177+
// 隐藏loading
178+
loading.hide()
174179
// user info
175180
const user = this.user
176181
// 设置登陆模式

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /