Skip to content

Commit 4be85ad

Browse files
committed
Update mpvue-wxParse
1 parent 73e013f commit 4be85ad

File tree

5 files changed

+55
-59
lines changed

5 files changed

+55
-59
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"mpvue": "^1.0.7",
1515
"timeago.js": "^3.0.2",
1616
"flyio": "^0.4.3",
17-
"mpvue-wxparse": "^0.4.5"
17+
"mpvue-wxparse": "^0.4.8"
1818
},
1919
"devDependencies": {
2020
"mpvue-loader": "^1.0.9",

src/App.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ navigator {
9090
.icon-sina-weibo:before{
9191
content: "\ea9a";
9292
}
93-
.pre {
93+
94+
/* .pre {
9495
background:#f6f8fa;
9596
padding: 16px;
96-
}
97+
} */
9798
9899
</style>

src/pages/blog/blog.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@
288288
right: 0
289289
width: 100%
290290
height: 100%
291-
-webkit-transform: rotate(45deg) scale(.8)
292291
transform: rotate(45deg) scale(.8)
293292
text-align: center
294293
line-height: 15px
@@ -298,9 +297,8 @@
298297
line-height: 20px
299298
a
300299
font-size: 20px
301-
font-weight: 600
302-
color: #3d464d!important
303-
cursor: pointer
300+
font-weight: 700
301+
color: #3d464d !important
304302
.introduction
305303
margin: 15px 0
306304
.icon-user, .icon-clock, .icon-eye
@@ -313,6 +311,8 @@
313311
margin-left: 5px
314312
font-size: 14px
315313
line-height: 14px
314+
.article-content
315+
line-height: 1.2
316316
.readmore
317317
width: 100%
318318
margin-top: 15px

src/pages/blogdetail/blogdetail.vue

Lines changed: 44 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
<div class="article-section">
1111
<div class="caption">
1212
<h1 class="titl">{{articledetail.title}}</h1>
13-
<p class="time">发布时间<span>{{articledetail.created_at}}</span></p>
13+
<p class="time">发布时间:<span>{{articledetail.created_at}}</span></p>
1414
</div>
1515
<div class="article markdown-body">
16-
<!-- {{articledetail.body}} -->
1716
<wxParse :content="articledetail.body" />
1817
</div>
1918
<div class="sns-share">
@@ -54,16 +53,15 @@
5453
import Footer from '@/components/footer'
5554
import Navigation from '@/components/navigation'
5655
import { getArticledetail } from '@/utils/article'
57-
import timeago from 'timeago.js'
56+
// import timeago from 'timeago.js'
5857
import wxParse from 'mpvue-wxparse'
59-
// import prism from '@/utils/prism'
6058
6159
export default {
6260
data () {
6361
return {
6462
detailShow: false,
6563
articledetail: [],
66-
show: false,
64+
show: false
6765
}
6866
},
6967
mounted () {
@@ -81,7 +79,7 @@
8179
},
8280
_getArticledetail (id) {
8381
getArticledetail(id).then((res) => {
84-
res.created_at = timeago().format(res.created_at, 'zh_CN')
82+
// res.created_at = timeago().format(res.created_at, 'zh_CN')
8583
this.articledetail = res
8684
// this.$nextTick(() => {
8785
// prism.highlightAll()
@@ -98,10 +96,6 @@
9896
</script>
9997

10098
<style scoped lang="stylus" rel="stylesheet/stylus">
101-
// @import '../../common/css/prism.css'
102-
// @import '../../../node_modules/github-markdown-css/github-markdown.css'
103-
// @import '../../../node_modules/simplemde-theme-base/dist/simplemde-theme-base.min.css'
104-
10599
.blogdetail
106100
position:relative
107101
min-height:100%
@@ -124,7 +118,7 @@
124118
max-width: 1000px
125119
margin: 0 auto
126120
background: #fff
127-
padding-bottom: 50px
121+
// padding-bottom: 50px
128122
.header
129123
position: relative
130124
padding-top: 44%
@@ -146,46 +140,47 @@
146140
.caption
147141
padding: 0 20px
148142
.titl
149-
margin-bottom: .4em
143+
margin-bottom: 20px
150144
font-size: 20px
151-
font-weight:600
145+
font-weight: 700
152146
color:#3d464d !important
153147
.time
154-
font-size: 14px
148+
font-size: 15px
149+
color: #95a5a6
155150
.article
156-
padding: 40px 20px;
157-
font-size: 20;
158-
background: #fff;
151+
padding: 20px
152+
font-size: 20
153+
background: #fff
159154
&:before
160-
display: table;
161-
content: "";
155+
display: table
156+
content: ""
162157
.sns-share
163158
padding: 2em 0 2em
164159
text-align: center
165160
div
166-
display: inline-block;
167-
width: 80px;
168-
height: 80px;
169-
margin: 0 1em;
170-
border-radius: 50%;
171-
font-size: 1.2rem;
172-
color: #fff;
173-
background: #fa7d3c;
161+
display: inline-block
162+
width: 80px
163+
height: 80px
164+
margin: 0 1em
165+
border-radius: 50%
166+
font-size: 1.2rem
167+
color: #fff
168+
background: #fa7d3c
174169
i
175-
display: block;
176-
padding-top: 10px;
177-
line-height: 30px;
178-
font-size: 30px;
170+
display: block
171+
padding-top: 10px
172+
line-height: 30px
173+
font-size: 30px
179174
.l-icon
180-
font-family: layIcon;
181-
font-style: normal;
175+
font-family: layIcon
176+
font-style: normal
182177
span
183-
display: block;
184-
line-height: 30px;
185-
font-size: 14px;
178+
display: block
179+
line-height: 30px
180+
font-size: 14px
186181
.comments-section
187182
position: relative
188-
padding: 2em 1em;
183+
padding: 2em 1em
189184
background: #f5f8fa
190185
&:before
191186
position: absolute
@@ -287,11 +282,11 @@
287282
&.fade-enter, &.fade-leave-to
288283
opacity: 0
289284
.modal-dialog
290-
width: 350px;
291-
position: absolute;
292-
top: 45%;
293-
left: 50%;
294-
transform: translate(-50%,-50%);
285+
width: 350px
286+
position: absolute
287+
top: 45%
288+
left: 50%
289+
transform: translate(-50%,-50%)
295290
margin: 30px auto
296291
z-index: 100
297292
text-align: center
@@ -300,13 +295,13 @@
300295
&.fade-enter, &.fade-leave-to
301296
opacity: 0
302297
.modal-content
303-
box-shadow: 0 5px 25px rgba(0,0,0,.1);
304-
border: 1px solid rgba(0,0,0,.1);
305-
overflow: hidden;
306-
position: relative;
307-
background-color: #fff;
308-
border-radius: 6px;
309-
background-clip: padding-box;
298+
box-shadow: 0 5px 25px rgba(0,0,0,.1)
299+
border: 1px solid rgba(0,0,0,.1)
300+
overflow: hidden
301+
position: relative
302+
background-color: #fff
303+
border-radius: 6px
304+
background-clip: padding-box
310305
outline: 0;
311306
.modal-header
312307
float: right

yarn.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3738,9 +3738,9 @@ mpvue-webpack-target@^1.0.0:
37383738
dependencies:
37393739
webpack "^3.4.0"
37403740

3741-
mpvue-wxparse@^0.4.5:
3742-
version "0.4.5"
3743-
resolved "http://registry.npm.taobao.org/mpvue-wxparse/download/mpvue-wxparse-0.4.5.tgz#099ffbfc1bdab2684f42ef7a3f5375db54713d27"
3741+
mpvue-wxparse@^0.4.8:
3742+
version "0.4.8"
3743+
resolved "http://registry.npm.taobao.org/mpvue-wxparse/download/mpvue-wxparse-0.4.8.tgz#f6fe3f5bb59c40448ab88b657acc15d32d177d62"
37443744

37453745
mpvue@^1.0.7:
37463746
version "1.0.7"

0 commit comments

Comments
 (0)