Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
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-h5
Commits
4fee34f2
Commit
4fee34f2
authored
Sep 30, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(editor): 问题修复
parent
68ecd8f6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
47 deletions
+19
-47
dev.config.ts
app/web/config/dev.config.ts
+1
-1
index.vue
app/web/page/activity/component/BackTop/index.vue
+3
-3
index.ts
app/web/page/activity/view/activity/index.ts
+1
-6
index.vue
app/web/page/activity/view/activity/index.vue
+11
-35
transformStyle.mixin.ts
app/web/page/mixins/transformStyle.mixin.ts
+3
-2
No files found.
app/web/config/dev.config.ts
View file @
4fee34f2
...
...
@@ -6,7 +6,7 @@ const hostMap = {
kdspHost
:
`
${
protocol
}
//talos-test1.liangkebang.net`
,
shenceUrl
:
`
${
protocol
}
//bn.xyqb.com/sa?project=default`
,
mallHost
:
`
${
protocol
}
://mall-test1.liangkebang.net`
,
test
:
fals
e
test
:
tru
e
};
if
(
EASY_ENV_IS_BROWSER
)
{
...
...
app/web/page/activity/component/BackTop/index.vue
View file @
4fee34f2
...
...
@@ -137,12 +137,12 @@ export default {
window
.
location
.
href
=
`
${
cfg
.
mallHost
}
/common/launch?jumpUrl=
${
jumpUrl
}
&terminal=
${
shareOpenMethod
}
&extraInfo=
${
encodeURIComponent
(
JSON
.
stringify
({
url
}))}
`
;
}
},
handleBackTopClick
(
e
)
{
handleBackTopClick
(
e
=
{}
)
{
// ! 此处以1.3为准,但需要对齐分享功能
registeredEvents
(
'
PD_WUXIEC_H5ActivityPageSuspendedBtnClick
'
,
{
activity_id
:
this
.
pageInfo
.
uuid
,
jump_
url
:
e
.
url
,
navigation
_name
:
e
.
name
,
jump_
link
:
e
.
url
,
window
_name
:
e
.
name
,
});
if
(
e
&&
e
.
persets
===
'
分享
'
)
{
if
(
this
.
tipTimer
)
{
...
...
app/web/page/activity/view/activity/index.ts
View file @
4fee34f2
...
...
@@ -105,6 +105,7 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
}
});
}
this
.
layoutReadyEvent
();
}
fetchApi
(
options
)
{
const
{
store
,
route
}
=
options
;
...
...
@@ -152,12 +153,6 @@ export default class Activity extends Mixins(TransformStyleMixin, SaMixin, Disab
return
targetEl
;
});
}
setGridItemTransform
(
index
,
status
)
{
// console.log('setGridItemTransform', index, status);
const
elements
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
pageData
?.
elements
));
elements
[
index
].
noTransforms
=
status
;
this
.
setPageElement
(
elements
);
}
layoutUpdatedEvent
()
{
// console.log('layoutUpdatedEvent');
// 高度更新时重新计算导航组件样式
...
...
app/web/page/activity/view/activity/index.vue
View file @
4fee34f2
<
template
>
<div
class=
"activity"
:style=
"transformStyle(pageData.commonStyle)"
>
<template
v-if=
"!noPageData"
>
<grid-layout
:layout.sync=
"layout"
:isDraggable=
"false"
:isResizable=
"false"
:col-num=
"12"
:row-height=
"rowHeight"
:margin=
"[0, 0]"
:is-draggable=
"true"
:is-resizable=
"true"
:is-mirrored=
"false"
:vertical-compact=
"true"
:use-css-transforms=
"true"
@
layout-mounted=
"layoutReadyEvent"
@
layout-updated=
"layoutUpdatedEvent"
>
<grid-item
:style=
"transformStyle(item.commonStyle)"
v-for=
"(item, index) in pageData.elements"
:x=
"item.point.x"
:y=
"item.point.y"
:w=
"item.point.w"
:h=
"item.point.h"
:i=
"item.point.i"
<div
class=
"layout"
>
<div
:style=
"transformStyle(item.commonStyle, item.point)"
v-for=
"(item, index) in pageData.elements"
:key=
"item.point.i"
:no-transforms=
"item.noTransforms
"
@
click
.native
=
"dot(item.title)"
@
touchend
.native
=
"disTouch"
:id=
"`item_$
{item.id}`
"
@click="dot(item.title)"
@touchend="disTouch"
>
<component
:data-index=
"index"
:
id=
"item.id"
:containerIndex=
"index"
:childItem=
"item"
:is=
"item.name"
:key=
"item.id
"
:sa-info=
"getSaInfo(item)"
v-bind=
"item.props"
></component>
</
grid-item
>
<
grid-item
<component
:data-index=
"index"
:
containerIndex=
"index"
:component-data=
"item"
:childItem=
"item"
:is=
"item.name
"
:sa-info=
"getSaInfo(item)"
v-bind=
"item.props"
></component>
</
div
>
<
div
v-if=
"pageData.props.showPageBottomTip"
:x=
"bottomInfo.x"
:y=
"bottomInfo.y"
:w=
"bottomInfo.w"
:h=
"bottomInfo.h"
:i=
"bottomInfo.i"
:static=
"true"
:id=
"bottomInfo.i + pageData.elements.length"
:key=
"bottomInfo.i + pageData.elements.length"
>
<page-bottom-tip
/>
</
grid-item
>
</
grid-layout
>
</
div
>
</
div
>
<back-top
v-if=
"showBackTop"
:show-back-top=
"showBackTop"
ref=
"backTop"
/>
</
template
>
<empty-state
v-else
/>
...
...
app/web/page/mixins/transformStyle.mixin.ts
View file @
4fee34f2
...
...
@@ -6,7 +6,7 @@ import { Mutation } from 'vuex-class';
export
default
class
TransformStyleMixin
extends
Vue
{
@
Mutation
(
'
SET_ELEMENT_POINT
'
)
setElementPoint
;
transformStyle
(
styleObj
,
eleme
nt
=
{})
{
transformStyle
(
styleObj
,
poi
nt
=
{})
{
const
style
=
{
backgroundRepeat
:
'
no-repeat
'
,
backgroundSize
:
'
cover
'
...
...
@@ -22,7 +22,8 @@ export default class TransformStyleMixin extends Vue {
style
.
backgroundImage
=
`url(
${
style
.
backgroundImage
}
)`
;
}
}
style
.
zIndex
=
2
;
style
.
minHeight
=
point
?.
h
?
`
${(
point
.
h
/
37.5
).
toFixed
(
2
)}
rem`
:
null
;
// style.zIndex = 2;
return
style
;
}
...
...
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