@jx3box/jx3box-common-ui 6.4.5 → 6.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/left-sidebar.less +105 -68
- package/package.json +1 -1
- package/src/App.vue +285 -214
- package/src/LeftSidebar.vue +62 -57
- package/src/author/Avatar.vue +37 -2
- package/src/interact/Fav2.vue +68 -53
- package/src/single/cms-single.vue +4 -0
- package/src/single/right-affix.vue +106 -0
|
@@ -1,98 +1,135 @@
|
|
|
1
1
|
.c-sidebar-left {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
.w(@aside-left - 40px);
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
padding: 10px;
|
|
5
|
+
.pf;
|
|
6
|
+
.z(600);
|
|
7
|
+
left: 0;
|
|
8
|
+
top: @header-height + @bread-height;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
background-color: @bg-light;
|
|
11
|
+
border-right: 1px solid #eee;
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
|
|
14
|
+
.c-sidebar-left.without-bread {
|
|
15
|
+
top: @header-height;
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
.c-sidebar-left-inner {
|
|
19
|
+
.size(100%);
|
|
20
|
+
overflow-y: hidden;
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
18
23
|
overflow-y: auto;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&::-webkit-scrollbar {
|
|
27
|
+
width: 4px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::-webkit-scrollbar-track,
|
|
31
|
+
&::-webkit-scrollbar-track-piece {
|
|
32
|
+
background-color: #fafafa;
|
|
33
|
+
border-radius: 6px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::-webkit-scrollbar-thumb {
|
|
37
|
+
background-color: #eee;
|
|
38
|
+
border-radius: 6px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&::-webkit-scrollbar-button,
|
|
42
|
+
&::-webkit-scrollbar-corner,
|
|
43
|
+
&::-webkit-resizer {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
36
46
|
}
|
|
37
47
|
|
|
38
48
|
// 笔记本<1440 缩小双边栏
|
|
39
49
|
@media screen and (max-width: @smallpc) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
50
|
+
.c-sidebar-left {
|
|
51
|
+
.w(@aside-left - 40px);
|
|
52
|
+
}
|
|
43
53
|
}
|
|
44
54
|
|
|
45
55
|
// 平板横屏
|
|
46
56
|
@media screen and (max-width: @notebook) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
57
|
+
.c-sidebar-left {
|
|
58
|
+
.w(@aside-left - 60px);
|
|
59
|
+
}
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
// 折叠相关逻辑
|
|
53
63
|
.c-sidebar-left-toggle {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
display: block;
|
|
65
|
+
.pa;
|
|
66
|
+
.rb(-21px, calc(50% - 20px));
|
|
67
|
+
width: 20px;
|
|
68
|
+
height: 40px;
|
|
69
|
+
line-height: 40px;
|
|
70
|
+
.pointer;
|
|
71
|
+
text-align: center;
|
|
72
|
+
background-color: @bg-light;
|
|
73
|
+
border-right: 1px solid #eee;
|
|
74
|
+
border-top: 1px solid #eee;
|
|
75
|
+
border-bottom: 1px solid #eee;
|
|
76
|
+
border-radius: 0px 2px 2px 0px;
|
|
77
|
+
font-size: 16px;
|
|
78
|
+
color: #999;
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
color: #222;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.close-sidebar-left {
|
|
85
|
+
right: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
svg {
|
|
89
|
+
fill: @color;
|
|
90
|
+
}
|
|
62
91
|
}
|
|
92
|
+
|
|
63
93
|
.closeLeftSidebar() {
|
|
64
|
-
|
|
65
|
-
|
|
94
|
+
transition: 0.2s ease-in-out;
|
|
95
|
+
transform: translateX(-100%);
|
|
66
96
|
}
|
|
97
|
+
|
|
67
98
|
.openLeftSidebar() {
|
|
68
|
-
|
|
69
|
-
|
|
99
|
+
transition: 0.2s ease-in-out;
|
|
100
|
+
transform: translateX(0);
|
|
70
101
|
}
|
|
102
|
+
|
|
71
103
|
.c-sidebar-left.isclose {
|
|
72
|
-
|
|
104
|
+
.closeLeftSidebar();
|
|
73
105
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
106
|
+
.c-sidebar-left-toggle {
|
|
107
|
+
transition: 0.2s ease-in-out;
|
|
108
|
+
transform: translateX(100%);
|
|
109
|
+
}
|
|
78
110
|
}
|
|
111
|
+
|
|
79
112
|
.c-sidebar-left.isopen {
|
|
80
|
-
|
|
113
|
+
.openLeftSidebar();
|
|
81
114
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
115
|
+
.c-sidebar-left-toggle {
|
|
116
|
+
transition: 0.2s ease-in-out;
|
|
117
|
+
transform: translateX(0);
|
|
118
|
+
}
|
|
86
119
|
}
|
|
87
120
|
|
|
88
121
|
@media screen and (max-width: @ipad) {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
122
|
+
.c-sidebar-left-toggle {
|
|
123
|
+
.none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.c-sidebar-left.isopen {
|
|
127
|
+
box-shadow: 2px 0 3px rgba(0, 0, 0, .1);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media print {
|
|
132
|
+
.c-sidebar-left {
|
|
133
|
+
.none;
|
|
134
|
+
}
|
|
95
135
|
}
|
|
96
|
-
@media print{
|
|
97
|
-
.c-sidebar-left{.none;}
|
|
98
|
-
}
|
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,127 +1,198 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
<div class="container-page">
|
|
3
|
+
<Header></Header>
|
|
4
|
+
<Breadcrumb
|
|
5
|
+
name="频道名称"
|
|
6
|
+
slug="slug"
|
|
7
|
+
root="/slug"
|
|
8
|
+
:publishEnable="true"
|
|
9
|
+
:feedbackEnable="true"
|
|
10
|
+
:adminEnable="true"
|
|
11
|
+
>
|
|
12
|
+
<img
|
|
13
|
+
slot="logo"
|
|
14
|
+
svg-inline
|
|
15
|
+
src="../assets/img/jx3.svg"
|
|
16
|
+
/>
|
|
17
|
+
bread info
|
|
18
|
+
</Breadcrumb>
|
|
19
|
+
|
|
20
|
+
<LeftSidebar :open="true">
|
|
21
|
+
<LeftSideToggle :mobileOnly="true" />
|
|
22
|
+
<Author
|
|
23
|
+
:author="author"
|
|
24
|
+
:uid="8"
|
|
25
|
+
/>
|
|
26
|
+
</LeftSidebar>
|
|
27
|
+
|
|
28
|
+
<Main
|
|
29
|
+
:withoutLeft="false"
|
|
30
|
+
:withoutRight="false"
|
|
31
|
+
>
|
|
32
|
+
<el-tabs
|
|
33
|
+
v-model="tab"
|
|
34
|
+
type="card"
|
|
35
|
+
>
|
|
36
|
+
<el-tab-pane
|
|
37
|
+
label="CMS作品"
|
|
38
|
+
name="post"
|
|
11
39
|
>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
<
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
40
|
+
<el-radio-group v-model="post_id">
|
|
41
|
+
<el-radio label="41346">临时测试</el-radio>
|
|
42
|
+
<el-radio label="35605">Markdown</el-radio>
|
|
43
|
+
<el-radio label="32035">仅小册</el-radio>
|
|
44
|
+
<el-radio label="30017">仅联合创作者</el-radio>
|
|
45
|
+
<el-radio label="30582">小册和联合创作者</el-radio>
|
|
46
|
+
<el-radio label="31129">无小册和联合创作者</el-radio>
|
|
47
|
+
</el-radio-group>
|
|
48
|
+
<singlebox
|
|
49
|
+
:post="post"
|
|
50
|
+
@extendUpdate="updateExtend"
|
|
51
|
+
/>
|
|
52
|
+
</el-tab-pane>
|
|
53
|
+
<el-tab-pane
|
|
54
|
+
label="通用组件"
|
|
55
|
+
name="widget"
|
|
56
|
+
>
|
|
57
|
+
<PostHeader :post="post" />
|
|
58
|
+
<Creators
|
|
59
|
+
:postId="30432"
|
|
60
|
+
style="margin-bottom: 10px"
|
|
61
|
+
/>
|
|
62
|
+
<Collection
|
|
63
|
+
:id="59"
|
|
64
|
+
:defaultVisible="true"
|
|
65
|
+
/>
|
|
66
|
+
<UserPop
|
|
67
|
+
title="添加用户"
|
|
68
|
+
v-model="visible"
|
|
69
|
+
@confirm="addUser"
|
|
70
|
+
/>
|
|
71
|
+
<el-button @click="visible = true">用户POP</el-button>
|
|
72
|
+
|
|
73
|
+
<Thx
|
|
74
|
+
:postId="23865"
|
|
75
|
+
postType="bbs"
|
|
76
|
+
postTitle="bbs23865的标题"
|
|
77
|
+
:userId="7"
|
|
78
|
+
:adminBoxcoinEnable="true"
|
|
79
|
+
:userBoxcoinEnable="true"
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
<hr />
|
|
83
|
+
|
|
84
|
+
<Like
|
|
85
|
+
mode="heart"
|
|
86
|
+
:count="100"
|
|
87
|
+
:showCount="true"
|
|
88
|
+
/>
|
|
89
|
+
<Down
|
|
90
|
+
:count="100"
|
|
91
|
+
:showCount="true"
|
|
92
|
+
/>
|
|
93
|
+
<Mark
|
|
94
|
+
label="KEY"
|
|
95
|
+
value="VALUE"
|
|
96
|
+
BGL="#000"
|
|
97
|
+
BGR="#F39"
|
|
98
|
+
/>
|
|
99
|
+
<Fav
|
|
100
|
+
post-id="90"
|
|
101
|
+
post-type="jx3dat"
|
|
102
|
+
post-title="jx3dat测试标题"
|
|
103
|
+
/>
|
|
104
|
+
<Feed
|
|
105
|
+
post-id="90"
|
|
106
|
+
post-type="jx3dat"
|
|
107
|
+
/>
|
|
108
|
+
<Print title="传入标题" />
|
|
109
|
+
<QRcode />
|
|
110
|
+
<Sharing />
|
|
111
|
+
|
|
112
|
+
<hr />
|
|
113
|
+
|
|
114
|
+
<markBy />
|
|
115
|
+
<menuBy :data="['test1', 'test2']" />
|
|
116
|
+
<orderBy />
|
|
117
|
+
<tagBy
|
|
118
|
+
:data="['PVE', 'PVX']"
|
|
119
|
+
:type="tag"
|
|
120
|
+
/>
|
|
121
|
+
<clientBy type="" />
|
|
122
|
+
<zlpBy />
|
|
123
|
+
|
|
124
|
+
<hr />
|
|
125
|
+
<uploadImage
|
|
126
|
+
v-model="upload"
|
|
127
|
+
info="非必选。首页海报尺寸1100*300(推荐2200*600支持高分屏),最大20M。"
|
|
128
|
+
></uploadImage>
|
|
129
|
+
<AuthorMedal :author-id="8"></AuthorMedal>
|
|
130
|
+
</el-tab-pane>
|
|
131
|
+
<el-tab-pane
|
|
132
|
+
label="百科组件"
|
|
133
|
+
name="wiki"
|
|
134
|
+
>
|
|
135
|
+
<WikiPanel :wiki-post="wikiPost">
|
|
136
|
+
<template slot="head-title">
|
|
137
|
+
<i class="el-icon-location-information"></i>
|
|
138
|
+
<span class="u-title">通识正文</span>
|
|
139
|
+
</template>
|
|
140
|
+
<template slot="head-actions">
|
|
141
|
+
<a class="el-button el-button--primary u-publish">
|
|
142
|
+
<i class="el-icon-edit"></i>
|
|
143
|
+
<span>完善百科通识</span>
|
|
144
|
+
</a>
|
|
145
|
+
<span class="u-more">查看更多</span>
|
|
146
|
+
</template>
|
|
147
|
+
<template slot="body">正文内容正文内容正文内容正文内容正文内容正文内容正文内容正文内容正文内容</template>
|
|
148
|
+
</WikiPanel>
|
|
149
|
+
<hr />
|
|
150
|
+
|
|
151
|
+
<WikiRevisions
|
|
152
|
+
type="achievement"
|
|
153
|
+
source-id="2996"
|
|
154
|
+
/>
|
|
155
|
+
<hr />
|
|
156
|
+
|
|
157
|
+
<WikiComments
|
|
158
|
+
type="achievement"
|
|
159
|
+
source-id="2996"
|
|
160
|
+
/>
|
|
161
|
+
<hr />
|
|
162
|
+
</el-tab-pane>
|
|
163
|
+
<el-tab-pane
|
|
164
|
+
label="头像"
|
|
165
|
+
name="avatar"
|
|
166
|
+
>
|
|
167
|
+
<el-radio-group v-model="avatar_size">
|
|
168
|
+
<el-radio label="xxs">xxs-36/48</el-radio>
|
|
169
|
+
<el-radio label="xs">xs-48/68</el-radio>
|
|
170
|
+
<el-radio label="s">s-68/88</el-radio>
|
|
171
|
+
<el-radio label="m">m-88/123</el-radio>
|
|
172
|
+
<el-radio label="l">l-120/168</el-radio>
|
|
173
|
+
<el-radio label="xl">xl-150/210</el-radio>
|
|
174
|
+
</el-radio-group>
|
|
175
|
+
<div style="padding:60px">
|
|
176
|
+
<Avatar
|
|
177
|
+
:id="8"
|
|
178
|
+
url="https://qzapp.qlogo.cn/qzapp/101870778/8384D5764DF76997E566D346B3EE78D6/100?x-oss-process=style/avatar_s"
|
|
179
|
+
:size="avatar_size"
|
|
180
|
+
frame="Xmas_2"
|
|
181
|
+
/>
|
|
182
|
+
</div>
|
|
183
|
+
</el-tab-pane>
|
|
184
|
+
</el-tabs>
|
|
185
|
+
|
|
186
|
+
<RightSidebar>
|
|
187
|
+
<RightSideMsg>Hello</RightSideMsg>
|
|
188
|
+
<div id="directory"></div>
|
|
189
|
+
<PostCollection :id="59" />
|
|
190
|
+
</RightSidebar>
|
|
191
|
+
|
|
192
|
+
<Footer></Footer>
|
|
193
|
+
<Bottom></Bottom>
|
|
194
|
+
</Main>
|
|
195
|
+
</div>
|
|
125
196
|
</template>
|
|
126
197
|
|
|
127
198
|
<script>
|
|
@@ -177,102 +248,102 @@ import { __server } from "@jx3box/jx3box-common/data/jx3box.json";
|
|
|
177
248
|
import { wiki } from "@jx3box/jx3box-common/js/wiki";
|
|
178
249
|
|
|
179
250
|
export default {
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
251
|
+
name: "App",
|
|
252
|
+
components: {
|
|
253
|
+
Header,
|
|
254
|
+
Breadcrumb,
|
|
255
|
+
LeftSidebar,
|
|
256
|
+
LeftSideToggle,
|
|
257
|
+
Main,
|
|
258
|
+
Footer,
|
|
259
|
+
Bottom,
|
|
260
|
+
RightSidebar,
|
|
261
|
+
|
|
262
|
+
// cmsList,
|
|
263
|
+
singlebox,
|
|
264
|
+
PostHeader,
|
|
265
|
+
PostCollection,
|
|
266
|
+
|
|
267
|
+
Thx,
|
|
268
|
+
Collection,
|
|
269
|
+
Creators,
|
|
270
|
+
|
|
271
|
+
RightSideMsg,
|
|
272
|
+
Author,
|
|
273
|
+
Avatar,
|
|
274
|
+
|
|
275
|
+
Mark,
|
|
276
|
+
Like,
|
|
277
|
+
Down,
|
|
278
|
+
Fav,
|
|
279
|
+
Feed,
|
|
280
|
+
|
|
281
|
+
Print,
|
|
282
|
+
Sharing,
|
|
283
|
+
QRcode,
|
|
284
|
+
|
|
285
|
+
markBy,
|
|
286
|
+
menuBy,
|
|
287
|
+
orderBy,
|
|
288
|
+
tagBy,
|
|
289
|
+
clientBy,
|
|
290
|
+
zlpBy,
|
|
291
|
+
|
|
292
|
+
uploadImage,
|
|
293
|
+
AuthorMedal,
|
|
294
|
+
|
|
295
|
+
WikiPanel,
|
|
296
|
+
WikiRevisions,
|
|
297
|
+
WikiComments,
|
|
298
|
+
|
|
299
|
+
UserPop,
|
|
300
|
+
},
|
|
301
|
+
data: function () {
|
|
302
|
+
return {
|
|
303
|
+
tab: "avatar",
|
|
304
|
+
|
|
305
|
+
post: "",
|
|
306
|
+
post_id: "35605",
|
|
307
|
+
|
|
308
|
+
author: "",
|
|
309
|
+
wikiPost: null,
|
|
310
|
+
tag: "",
|
|
311
|
+
visible: false,
|
|
312
|
+
|
|
313
|
+
avatar_size: 'xl',
|
|
314
|
+
|
|
315
|
+
upload: "",
|
|
316
|
+
text: `<Text>text="使用:<BUFF 3222 1 desc>,持续<BUFF 3222 1 time>。\\\n" font=105 </text><Text>text="红豆沙做馅儿,精致细腻的广式月饼。" font=100 </text><Text>text="使用:能在唐门套装供应商处换取如下装备。\\\n" font=105 </text><Text>text="[燕云·重泉靴]" name="iteminfolink" eventid=513 script="this.nVersion=0 this.dwTabType=7 this.dwIndex=35244 this.OnItemLButtonDown=function() OnItemLinkDown(this) end" font=100 r=255 g=40 b=255 </text><Text>text="," font=105 </text><Text>text="[燕云·铭松靴]" name="iteminfolink" eventid=513 script="this.nVersion=0 this.dwTabType=7 this.dwIndex=35245 this.OnItemLButtonDown=function() OnItemLinkDown(this) end" font=100 r=255 g=40 b=255 </text><Text>text="。" font=100 </text>`,
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
created: function () {
|
|
320
|
+
wiki.getById(25594).then((res) => {
|
|
321
|
+
res = res.data;
|
|
322
|
+
this.wikiPost = res.data;
|
|
323
|
+
});
|
|
324
|
+
},
|
|
325
|
+
methods: {
|
|
326
|
+
addUser: function (val) {
|
|
327
|
+
console.log(val);
|
|
247
328
|
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
329
|
+
loadPost: function () {
|
|
330
|
+
axios.get(`/api/cms/post/${this.post_id}`).then((res) => {
|
|
331
|
+
this.post = res.data.data;
|
|
332
|
+
this.$forceUpdate();
|
|
333
|
+
});
|
|
253
334
|
},
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
console.log(val);
|
|
257
|
-
},
|
|
258
|
-
loadPost: function () {
|
|
259
|
-
axios.get(`/api/cms/post/${this.post_id}`).then((res) => {
|
|
260
|
-
this.post = res.data.data;
|
|
261
|
-
this.$forceUpdate();
|
|
262
|
-
});
|
|
263
|
-
},
|
|
264
|
-
updateExtend: function (val) {
|
|
265
|
-
console.log(val);
|
|
266
|
-
},
|
|
335
|
+
updateExtend: function (val) {
|
|
336
|
+
console.log(val);
|
|
267
337
|
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
338
|
+
},
|
|
339
|
+
watch: {
|
|
340
|
+
post_id: {
|
|
341
|
+
immediate: true,
|
|
342
|
+
handler: function (val) {
|
|
343
|
+
this.loadPost();
|
|
344
|
+
},
|
|
275
345
|
},
|
|
346
|
+
},
|
|
276
347
|
};
|
|
277
348
|
</script>
|
|
278
349
|
|
package/src/LeftSidebar.vue
CHANGED
|
@@ -1,77 +1,82 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
<aside
|
|
3
|
+
class="c-sidebar-left c-sidebar"
|
|
4
|
+
:class="{
|
|
5
5
|
isclose: !isOpen,
|
|
6
6
|
isopen: isOpen,
|
|
7
7
|
'without-bread': withoutBread,
|
|
8
8
|
}"
|
|
9
|
-
|
|
9
|
+
v-if="!isApp"
|
|
10
|
+
>
|
|
11
|
+
<div class="c-sidebar-left-inner">
|
|
12
|
+
<slot></slot>
|
|
13
|
+
</div>
|
|
14
|
+
<span
|
|
15
|
+
class="c-sidebar-left-toggle"
|
|
16
|
+
:class="!isOpen && 'close-sidebar-left'"
|
|
17
|
+
@click="toggleLeftSide"
|
|
18
|
+
:title="isOpen ? '收起侧边栏' : '打开侧边栏'"
|
|
10
19
|
>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
src="../assets/img/leftsidebar/open.svg"
|
|
26
|
-
/>
|
|
27
|
-
</span>
|
|
28
|
-
</aside>
|
|
20
|
+
<!-- <img
|
|
21
|
+
v-show="isOpen"
|
|
22
|
+
svg-inline
|
|
23
|
+
src="../assets/img/leftsidebar/close.svg"
|
|
24
|
+
/> -->
|
|
25
|
+
<span v-show="isOpen"><i class="el-icon-arrow-left"></i></span>
|
|
26
|
+
<span v-show="!isOpen"><i class="el-icon-arrow-right"></i></span>
|
|
27
|
+
<!-- <img
|
|
28
|
+
v-show="!isOpen"
|
|
29
|
+
svg-inline
|
|
30
|
+
src="../assets/img/leftsidebar/open.svg"
|
|
31
|
+
/> -->
|
|
32
|
+
</span>
|
|
33
|
+
</aside>
|
|
29
34
|
</template>
|
|
30
35
|
|
|
31
36
|
<script>
|
|
32
37
|
import Bus from "../service/bus";
|
|
33
38
|
import { isApp } from "../assets/js/app.js";
|
|
34
39
|
export default {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
name: "LeftSidebar",
|
|
41
|
+
props: ["open", "withoutBread"],
|
|
42
|
+
data: function () {
|
|
43
|
+
return {
|
|
44
|
+
isOpen: true,
|
|
45
|
+
isApp: isApp(),
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
computed: {
|
|
49
|
+
stickyHeader: function () {
|
|
50
|
+
return this.withoutBread;
|
|
42
51
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
open: function (newval) {
|
|
55
|
+
this.isOpen = newval === undefined ? true : !!newval;
|
|
47
56
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
57
|
+
},
|
|
58
|
+
methods: {
|
|
59
|
+
toggleLeftSide: function () {
|
|
60
|
+
let status = !this.isOpen;
|
|
61
|
+
Bus.$emit("toggleLeftSide", status);
|
|
52
62
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
mounted: function() {
|
|
60
|
-
Bus.$on("toggleLeftSide", (data) => {
|
|
61
|
-
this.isOpen = data;
|
|
62
|
-
});
|
|
63
|
+
},
|
|
64
|
+
mounted: function () {
|
|
65
|
+
Bus.$on("toggleLeftSide", (data) => {
|
|
66
|
+
this.isOpen = data;
|
|
67
|
+
});
|
|
63
68
|
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
if (window.innerWidth < 1024) {
|
|
70
|
+
this.isOpen = false;
|
|
66
71
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
document.addEventListener("click", function () {
|
|
73
|
+
Bus.$emit("toggleLeftSide", false);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
created: function () {
|
|
78
|
+
this.isOpen = this.open === undefined ? true : this.open;
|
|
79
|
+
},
|
|
75
80
|
};
|
|
76
81
|
</script>
|
|
77
82
|
|
package/src/author/Avatar.vue
CHANGED
|
@@ -36,9 +36,12 @@ export default {
|
|
|
36
36
|
return {
|
|
37
37
|
frames: [],
|
|
38
38
|
styles : {
|
|
39
|
+
xxs : 36,
|
|
40
|
+
xs : 48,
|
|
39
41
|
s : 68,
|
|
40
42
|
m : 88,
|
|
41
|
-
l : 120
|
|
43
|
+
l : 120,
|
|
44
|
+
xl : 150
|
|
42
45
|
}
|
|
43
46
|
};
|
|
44
47
|
},
|
|
@@ -60,7 +63,17 @@ export default {
|
|
|
60
63
|
.c-avatar {
|
|
61
64
|
.pr;
|
|
62
65
|
.dbi;
|
|
63
|
-
|
|
66
|
+
&.xl{
|
|
67
|
+
@pic:150px;
|
|
68
|
+
@frame:210px;
|
|
69
|
+
.c-avatar-pic{.size(@pic);}
|
|
70
|
+
.c-avatar-frame{
|
|
71
|
+
.size(@frame);
|
|
72
|
+
.lt(@pic / 2);
|
|
73
|
+
margin-left:-@frame / 2;
|
|
74
|
+
margin-top:-@frame / 2;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
64
77
|
&.l{
|
|
65
78
|
@pic:120px;
|
|
66
79
|
@frame:168px;
|
|
@@ -96,6 +109,28 @@ export default {
|
|
|
96
109
|
margin-top:-@frame / 2;
|
|
97
110
|
}
|
|
98
111
|
}
|
|
112
|
+
&.xs{
|
|
113
|
+
@pic:48px;
|
|
114
|
+
@frame:68px;
|
|
115
|
+
.c-avatar-pic{.size(@pic);}
|
|
116
|
+
.c-avatar-frame{
|
|
117
|
+
.size(@frame);
|
|
118
|
+
.lt(@pic / 2);
|
|
119
|
+
margin-left:-@frame / 2;
|
|
120
|
+
margin-top:-@frame / 2;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
&.xxs{
|
|
124
|
+
@pic:36px;
|
|
125
|
+
@frame:48px;
|
|
126
|
+
.c-avatar-pic{.size(@pic);}
|
|
127
|
+
.c-avatar-frame{
|
|
128
|
+
.size(@frame);
|
|
129
|
+
.lt(@pic / 2);
|
|
130
|
+
margin-left:-@frame / 2;
|
|
131
|
+
margin-top:-@frame / 2;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
99
134
|
}
|
|
100
135
|
.c-avatar-pic {
|
|
101
136
|
.db;
|
package/src/interact/Fav2.vue
CHANGED
|
@@ -1,67 +1,82 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="w-fav2"
|
|
4
|
+
:class="{ disabled: favorite }"
|
|
5
|
+
@click="doFav"
|
|
6
|
+
>
|
|
7
|
+
<el-tooltip
|
|
8
|
+
effect="dark"
|
|
9
|
+
:content="favContent"
|
|
10
|
+
placement="top-start"
|
|
11
|
+
>
|
|
12
|
+
<div>
|
|
13
|
+
<img
|
|
14
|
+
class="u-icon"
|
|
15
|
+
svg-inline
|
|
16
|
+
src="../../assets/img/widget/star.svg"
|
|
17
|
+
/>
|
|
18
|
+
<span
|
|
19
|
+
class="u-count"
|
|
20
|
+
v-if="!hiddenNum && total"
|
|
21
|
+
>{{ total }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
</el-tooltip>
|
|
24
|
+
</div>
|
|
10
25
|
</template>
|
|
11
26
|
|
|
12
27
|
<script>
|
|
13
28
|
import User from "@jx3box/jx3box-common/js/user";
|
|
14
29
|
import { hasFav, addFav, delFav } from "../../service/fav";
|
|
15
30
|
export default {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
31
|
+
name: "Fav2",
|
|
32
|
+
props: ["postType", "postId", "postTitle", "hiddenNum"],
|
|
33
|
+
data: function () {
|
|
34
|
+
return {
|
|
35
|
+
login: User.isLogin(),
|
|
36
|
+
favorite: false,
|
|
37
|
+
total: 0,
|
|
38
|
+
};
|
|
39
|
+
},
|
|
40
|
+
computed: {
|
|
41
|
+
favContent () {
|
|
42
|
+
return this.favorite ? "取消收藏" : "收藏";
|
|
24
43
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
44
|
+
},
|
|
45
|
+
methods: {
|
|
46
|
+
doFav: function () {
|
|
47
|
+
if (this.login) {
|
|
48
|
+
this.favorite ? this.delFav() : this.addFav();
|
|
49
|
+
} else {
|
|
50
|
+
User.toLogin();
|
|
51
|
+
}
|
|
29
52
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
User.toLogin();
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
hasFav: function () {
|
|
39
|
-
hasFav(this.postType, this.postId).then((res) => {
|
|
40
|
-
this.favorite = res.id || false;
|
|
41
|
-
this.total = res.totalFavorites || 0;
|
|
42
|
-
});
|
|
43
|
-
},
|
|
44
|
-
addFav: function () {
|
|
45
|
-
addFav(this.postType, this.postId, this.postTitle).then((res) => {
|
|
46
|
-
this.favorite = res.id;
|
|
47
|
-
this.total++;
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
delFav: function () {
|
|
51
|
-
delFav(this.favorite).then(() => {
|
|
52
|
-
this.favorite = false;
|
|
53
|
-
this.total && this.total--;
|
|
54
|
-
});
|
|
55
|
-
},
|
|
53
|
+
hasFav: function () {
|
|
54
|
+
hasFav(this.postType, this.postId).then((res) => {
|
|
55
|
+
this.favorite = res.id || false;
|
|
56
|
+
this.total = res.totalFavorites || 0;
|
|
57
|
+
});
|
|
56
58
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
},
|
|
59
|
+
addFav: function () {
|
|
60
|
+
addFav(this.postType, this.postId, this.postTitle).then((res) => {
|
|
61
|
+
this.favorite = res.id;
|
|
62
|
+
this.total++;
|
|
63
|
+
});
|
|
64
64
|
},
|
|
65
|
+
delFav: function () {
|
|
66
|
+
delFav(this.favorite).then(() => {
|
|
67
|
+
this.favorite = false;
|
|
68
|
+
this.total && this.total--;
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
watch: {
|
|
73
|
+
postId: {
|
|
74
|
+
immediate: true,
|
|
75
|
+
handler () {
|
|
76
|
+
if (this.postType && this.postId) this.hasFav();
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
65
80
|
};
|
|
66
81
|
</script>
|
|
67
82
|
|
|
@@ -61,6 +61,8 @@
|
|
|
61
61
|
<footer class="m-single-footer">
|
|
62
62
|
<slot name="single-footer"></slot>
|
|
63
63
|
</footer>
|
|
64
|
+
|
|
65
|
+
<right-affix :postId="id" :postType="post_type" :postTitle="post_title"></right-affix>
|
|
64
66
|
</div>
|
|
65
67
|
</template>
|
|
66
68
|
|
|
@@ -69,6 +71,7 @@ import PostHeader from "./PostHeader.vue";
|
|
|
69
71
|
import Creators from "./Creators.vue";
|
|
70
72
|
import Collection from "./Collection.vue";
|
|
71
73
|
import Thx from "./Thx.vue";
|
|
74
|
+
import RightAffix from "./right-affix.vue";
|
|
72
75
|
import Article from "@jx3box/jx3box-editor/src/Article.vue";
|
|
73
76
|
import ArticleMarkdown from "@jx3box/jx3box-editor/src/ArticleMarkdown.vue";
|
|
74
77
|
import Comment from "@jx3box/jx3box-comment-ui/src/Comment.vue";
|
|
@@ -84,6 +87,7 @@ export default {
|
|
|
84
87
|
Article,
|
|
85
88
|
ArticleMarkdown,
|
|
86
89
|
Comment,
|
|
90
|
+
RightAffix,
|
|
87
91
|
},
|
|
88
92
|
props: ["post", "stat"],
|
|
89
93
|
data: function () {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="right-affix">
|
|
3
|
+
<div class="item">
|
|
4
|
+
<fav :postId="postId" :postType="postType" :postTitle="postTitle" :hiddenNum="true"></fav>
|
|
5
|
+
</div>
|
|
6
|
+
<el-tooltip effect="dark" content="回到顶部" placement="bottom">
|
|
7
|
+
<div class="item" v-show="scrollBtnShow" @click="goTop">
|
|
8
|
+
<div class="to-top"></div>
|
|
9
|
+
</div>
|
|
10
|
+
</el-tooltip>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import Fav from "../interact/Fav2.vue";
|
|
16
|
+
export default {
|
|
17
|
+
name: "RightAffix",
|
|
18
|
+
props: ["postId", "postType", "postTitle"],
|
|
19
|
+
data() {
|
|
20
|
+
return {
|
|
21
|
+
scrollToptimer: null,
|
|
22
|
+
scrollBtnShow: false,
|
|
23
|
+
isTop: true,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
components: {
|
|
27
|
+
Fav,
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
goTop() {
|
|
31
|
+
//设置定时器
|
|
32
|
+
const self = this;
|
|
33
|
+
this.scrollToptimer = setInterval(function () {
|
|
34
|
+
//获取滚动条距离顶部高度
|
|
35
|
+
var osTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
36
|
+
var ispeed = Math.floor(-osTop / 7);
|
|
37
|
+
document.documentElement.scrollTop = document.body.scrollTop = osTop + ispeed;
|
|
38
|
+
//到达顶部,清除定时器
|
|
39
|
+
if (osTop === 0) {
|
|
40
|
+
clearInterval(self.scrollToptimer);
|
|
41
|
+
}
|
|
42
|
+
self.isTop = true;
|
|
43
|
+
}, 30);
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
mounted() {
|
|
47
|
+
//获取页面可视区高度
|
|
48
|
+
var clientHeight = document.documentElement.clientHeight;
|
|
49
|
+
const self = this;
|
|
50
|
+
window.addEventListener("scroll", function () {
|
|
51
|
+
//显示回到顶部按钮
|
|
52
|
+
var osTop = document.documentElement.scrollTop || document.body.scrollTop;
|
|
53
|
+
if (osTop >= clientHeight) {
|
|
54
|
+
self.scrollBtnShow = true;
|
|
55
|
+
} else {
|
|
56
|
+
self.scrollBtnShow = false;
|
|
57
|
+
}
|
|
58
|
+
//回到顶部过程中用户滚动滚动条,停止定时器
|
|
59
|
+
if (!self.isTop) {
|
|
60
|
+
clearInterval(self.scrollToptimer);
|
|
61
|
+
}
|
|
62
|
+
self.isTop = false;
|
|
63
|
+
});
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
</script>
|
|
67
|
+
|
|
68
|
+
<style lang="less" scoped>
|
|
69
|
+
.right-affix {
|
|
70
|
+
position: fixed;
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
right: @aside-right;
|
|
76
|
+
top: @header-height + @bread-height + 100px;
|
|
77
|
+
background-color: #fafbfc;
|
|
78
|
+
padding: 8px 5px;
|
|
79
|
+
z-index: 99999;
|
|
80
|
+
border-top-left-radius: 6px;
|
|
81
|
+
border-bottom-left-radius: 6px;
|
|
82
|
+
.item {
|
|
83
|
+
display: flex;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
align-items: center;
|
|
86
|
+
width: 32px;
|
|
87
|
+
height: 32px;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
&:hover {
|
|
90
|
+
background-color: #f6fcff;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
.to-top {
|
|
94
|
+
width: 0;
|
|
95
|
+
height: 0;
|
|
96
|
+
border-left: 12px solid transparent;
|
|
97
|
+
border-right: 12px solid transparent;
|
|
98
|
+
border-bottom: 18px solid skyblue;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
@media screen and (max-width:@smallpc){
|
|
102
|
+
.right-affix{
|
|
103
|
+
right:0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
</style>
|