Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
quantum-blocks
Commits
c63699d5
Commit
c63699d5
authored
Sep 14, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(backtop):返回顶部支持分享
parent
77b75f28
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
7 deletions
+39
-7
index.ts
app/web/page/editor/component/BasicPageFormModal/index.ts
+2
-2
index.vue
app/web/page/editor/component/BasicPageFormModal/index.vue
+14
-0
index.vue
...e/editor/component/DynamicForm/component/Upload/index.vue
+5
-1
index.ts
app/web/page/editor/component/DynamicPageForm/index.ts
+5
-0
index.ts
app/web/page/editor/view/dashboard/index.ts
+2
-2
state.ts
app/web/page/store/modules/editor/state.ts
+11
-2
No files found.
app/web/page/editor/component/BasicPageFormModal/index.ts
View file @
c63699d5
...
...
@@ -25,8 +25,8 @@ export default class DynamicForm extends Vue {
@
Watch
(
'
pageData
'
,
{
immediate
:
true
})
onPageDataChange
(
newVal
)
{
const
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
,
isTemplate
}
=
this
.
pageData
;
this
.
formCustom
=
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
:
!!
isPublish
,
isTemplate
:
!!
isTemplate
};
const
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
}
=
this
.
pageData
;
this
.
formCustom
=
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
:
!!
isPublish
,
isTemplate
:
!!
isTemplate
,
shareCoverImage
,
shareOpenMethod
};
}
@
Watch
(
'
value
'
)
...
...
app/web/page/editor/component/BasicPageFormModal/index.vue
View file @
c63699d5
...
...
@@ -10,6 +10,16 @@
<FormItem
label=
"页面关键字"
prop=
"pageKeywords"
>
<Input
v-model=
"formCustom.pageKeywords"
type=
"textarea"
placeholder=
"请输入页面关键字"
:rows=
"3"
></Input>
</FormItem>
<FormItem
label=
"页面缩略图"
prop=
"shareCoverImage"
>
<Upload
v-model=
"formCustom.shareCoverImage"
:show-input=
"false"
/>
<p
class=
"basic-form__tip"
>
可选,默认使用页面缩略图,建议图片比例1:1,图片格式jpg、png
</p>
</FormItem>
<FormItem
label=
"H5打开方式"
prop=
"shareOpenMethod"
>
<RadioGroup
v-model=
"formCustom.shareOpenMethod"
>
<Radio
:label=
"1"
>
小程序
</Radio>
<Radio
:label=
"2"
>
APP
</Radio>
</RadioGroup>
</FormItem>
<FormItem
label=
"是否发布"
prop=
"isPublish"
>
<i-switch
v-model=
"formCustom.isPublish"
></i-switch>
</FormItem>
...
...
@@ -37,5 +47,9 @@
object-fit: contain;
}
}
&__tip {
color: #666;
line-height: 16px;
}
}
</
style
>
\ No newline at end of file
app/web/page/editor/component/DynamicForm/component/Upload/index.vue
View file @
c63699d5
...
...
@@ -16,7 +16,7 @@
</div>
</div>
</div>
<Input
v-model=
"img"
@
input=
"handleImgUrlChange"
></Input>
<Input
v-
if=
"showInput"
v-
model=
"img"
@
input=
"handleImgUrlChange"
></Input>
</div>
</
template
>
<
script
>
...
...
@@ -29,6 +29,10 @@
export
default
{
props
:
{
value
:
String
,
showInput
:
{
type
:
Boolean
,
default
:
true
}
},
data
()
{
return
{
...
...
app/web/page/editor/component/DynamicPageForm/index.ts
View file @
c63699d5
...
...
@@ -60,6 +60,11 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
name
:
'
返回顶部
'
,
type
:
'
checkbox
'
},
{
key
:
'
showShare
'
,
name
:
'
分享按钮
'
,
type
:
'
checkbox
'
},
{
key
:
'
btAttachVal
'
,
name
:
'
添加按钮
'
,
...
...
app/web/page/editor/view/dashboard/index.ts
View file @
c63699d5
...
...
@@ -80,8 +80,8 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
this
.
pageData
.
elements
.
sort
((
a
,
b
)
=>
a
.
point
.
y
-
b
.
point
.
y
);
// 处理商品标签组件
const
pageData
=
this
.
handleGoodsTabs
();
const
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
,
isTemplate
}
=
pageConfig
;
const
pageInfo
=
{
page
:
JSON
.
stringify
(
pageData
),
author
:
user
?.
account
,
isPublish
,
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isTemplate
}
as
pageInfo
;
const
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
}
=
pageConfig
;
const
pageInfo
=
{
page
:
JSON
.
stringify
(
pageData
),
author
:
user
?.
account
,
isPublish
,
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
}
as
pageInfo
;
if
(
this
.
uuid
)
{
pageInfo
.
uuid
=
this
.
uuid
;
}
await
this
.
savePageData
({
pageInfo
,
pageData
:
this
.
pageData
});
if
(
this
.
uuid
)
{
await
this
.
getPageDate
({
pageId
:
this
.
uuid
});
}
...
...
app/web/page/store/modules/editor/state.ts
View file @
c63699d5
...
...
@@ -48,6 +48,8 @@ export interface PageInfo {
enable
?:
number
;
author
?:
string
;
coverImage
?:
string
;
shareCoverImage
?:
string
;
// 分享缩略图
shareOpenMethod
?:
string
;
// 分享后的打开方式
isTemplate
?:
number
|
boolean
;
isPublish
?:
number
|
boolean
;
pageName
?:
string
;
...
...
@@ -87,13 +89,20 @@ export const defaultState = {
pageBottomTxt
:
'
没有更多啦~
'
,
pageBottomColor
:
'
#fff
'
,
showBackTop
:
true
,
showShare
:
true
,
btAttachVal
:
[
{
persets
:
'
购物车
'
,
name
:
'
购物车
'
,
icon
:
'
shopping-cart
-o
'
,
icon
:
'
shopping-cart
'
,
url
:
'
xyqb://shoppingCart?needLogin=1
'
,
color
:
'
#333
'
,
background
:
'
#fff
'
iconColor
:
'
#333
'
,
background
:
'
#fff
'
,
shadow
:
true
,
radius
:
true
,
size
:
46
,
iconSize
:
20
}
],
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment