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
693214fa
Commit
693214fa
authored
Jun 23, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加自由容器上传视频功能
parent
369f6095
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
333 additions
and
37201 deletions
+333
-37201
config.ts
app/web/lib/config.ts
+1
-1
index.vue
...e/editor/component/DynamicForm/component/Upload/index.vue
+5
-1
index.vue
app/web/page/editor/component/DynamicForm/index.vue
+1
-1
index.vue
app/web/page/editor/component/FreedomContainer/index.vue
+1
-1
package-lock.json
package-lock.json
+325
-37197
No files found.
app/web/lib/config.ts
View file @
693214fa
...
@@ -14,7 +14,7 @@ export const basicComponents = [
...
@@ -14,7 +14,7 @@ export const basicComponents = [
type
:
'
text
'
type
:
'
text
'
},
},
{
{
key
:
'
v
ideo
'
,
key
:
'
freedomV
ideo
'
,
name
:
'
视频背景
'
,
name
:
'
视频背景
'
,
desc
:
'
视频背景
'
,
desc
:
'
视频背景
'
,
type
:
'
upload
'
type
:
'
upload
'
...
...
app/web/page/editor/component/DynamicForm/component/Upload/index.vue
View file @
693214fa
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<div>
<div>
<div
class=
"upload"
>
<div
class=
"upload"
>
<div
class=
"upload-img"
v-if=
"img"
>
<div
class=
"upload-img"
v-if=
"img"
>
<img
:src=
"
fileType === 'v
ideo' ? `$
{img}?vframe/jpg/offset/1` : img" v-if="isUrl">
<img
:src=
"
componentKey === 'freedomV
ideo' ? `$
{img}?vframe/jpg/offset/1` : img" v-if="isUrl">
<cr-icon
:type=
"img"
class=
"upload-img-none-icon"
v-else
/>
<cr-icon
:type=
"img"
class=
"upload-img-none-icon"
v-else
/>
<!--
<Icon
type=
"image"
size=
"20"
class=
"upload-img-none-icon"
></Icon>
-->
<!--
<Icon
type=
"image"
size=
"20"
class=
"upload-img-none-icon"
></Icon>
-->
<div
class=
"upload-img-cover"
>
<div
class=
"upload-img-cover"
>
...
@@ -32,6 +32,10 @@
...
@@ -32,6 +32,10 @@
showInput
:
{
showInput
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
true
default
:
true
},
componentKey
:
{
type
:
String
,
default
:
''
}
}
},
},
data
()
{
data
()
{
...
...
app/web/page/editor/component/DynamicForm/index.vue
View file @
693214fa
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<
/FormItem
>
<
/FormItem
>
<
/div
>
<
/div
>
<
FormItem
class
=
"
Df-component-formitem
"
v
-
else
:
label
=
"
item.name
"
:
title
=
"
item.desc || ''
"
>
<
FormItem
class
=
"
Df-component-formitem
"
v
-
else
:
label
=
"
item.name
"
:
title
=
"
item.desc || ''
"
>
<
component
:
hide3Column
=
"
curElement.name === 'cs-discount' && item.key ==='column'
"
:
is
=
"
getComponent(item.type)
"
:
options
=
"
item.options
"
:
formControl
=
"
item.formControl
"
:
limit
-
name
=
"
item.type === 'ComponentSelect' && curElement.name === 'cs-goods-tabs' ? 'cs-goods' : ''
"
v
-
model
=
"
form[item.key]
"
/>
<
component
:
componentKey
=
"
item.key
"
:
hide3Column
=
"
curElement.name === 'cs-discount' && item.key ==='column'
"
:
is
=
"
getComponent(item.type)
"
:
options
=
"
item.options
"
:
formControl
=
"
item.formControl
"
:
limit
-
name
=
"
item.type === 'ComponentSelect' && curElement.name === 'cs-goods-tabs' ? 'cs-goods' : ''
"
v
-
model
=
"
form[item.key]
"
/>
<
/FormItem
>
<
/FormItem
>
<
/template
>
<
/template
>
<
/Form
>
<
/Form
>
...
...
app/web/page/editor/component/FreedomContainer/index.vue
View file @
693214fa
<
template
>
<
template
>
<div
class=
"freedom"
:ref=
"`freedomContainer$
{containerIndex}`" @click.stop="handleElementClick(containerIndex)">
<div
class=
"freedom"
:ref=
"`freedomContainer$
{containerIndex}`" @click.stop="handleElementClick(containerIndex)">
<video
width=
"100%"
@
loadeddata=
"videoOnload"
ref=
"videoBackground"
height=
"auto"
style=
"position: absolute; top: 0; left: 0"
v-if=
"childItem.props.video"
:src=
"childItem.props.video"
autoplay
loop
muted
/>
<div
class=
"freedom-body"
:data-index=
"containerIndex"
>
<div
class=
"freedom-body"
:data-index=
"containerIndex"
>
<video
width=
"100%"
@
loadeddata=
"videoOnload"
ref=
"videoBackground"
height=
"auto"
style=
"z-index: -10; osition: absolute; top: 0; left: 0"
v-if=
"childItem.props.freedomVideo"
:src=
"childItem.props.freedomVideo"
autoplay
loop
muted
/>
<div
v-for=
"(item, index) in childItem.child"
:style=
"transformStyle(item.commonStyle, 'container')"
:class=
"['freedom-body-item',
{ 'Fb-item_selected': curChildIndex === index }]" :key="index" @click.stop="handleElementClick(containerIndex, index)" @mousedown.stop.prevent="mousedown(index, $event)" @contextmenu.prevent.stop="show($event, containerIndex, index)">
<div
v-for=
"(item, index) in childItem.child"
:style=
"transformStyle(item.commonStyle, 'container')"
:class=
"['freedom-body-item',
{ 'Fb-item_selected': curChildIndex === index }]" :key="index" @click.stop="handleElementClick(containerIndex, index)" @mousedown.stop.prevent="mousedown(index, $event)" @contextmenu.prevent.stop="show($event, containerIndex, index)">
<component
ref=
"childComponent"
:style=
"transformStyle(item.commonStyle, 'component')"
:is=
"item.name"
v-bind=
"item.props"
></component>
<component
ref=
"childComponent"
:style=
"transformStyle(item.commonStyle, 'component')"
:is=
"item.name"
v-bind=
"item.props"
></component>
<div
class=
"freedom-body-dot"
<div
class=
"freedom-body-dot"
...
...
package-lock.json
View file @
693214fa
This diff is collapsed.
Click to expand it.
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