Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4041c13a
authored
Aug 10, 2023
by
ext.wangyuman1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
66c3021b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
vue3-lw-pc/src/views/contentCenter/basicMaterial/index.vue
vue3-lw-pc/src/views/contentCenter/trackMaterial/index.vue
vue3-lw-pc/src/views/contentCenter/basicMaterial/index.vue
View file @
4041c13
...
...
@@ -2,12 +2,7 @@
<div>
<!-- 基础素材 -->
<!--
<div
class=
"g-card"
style=
"padding: 10px"
>
-->
<el-tabs
v-model=
"activeName"
@
tab-click=
"
(v) => ((activeTab = v.paneName) && opened.includes(v.paneName)) || opened.push(v.paneName)
"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"tabClick"
>
{{
activeTab
}}
<el-tab-pane
v-for=
"(item, index) in list"
:key=
"index"
:label=
"item.label"
:name=
"item.name"
>
<component
v-if=
"opened.includes(item.name)"
:is=
"item.component"
></component>
...
...
@@ -40,9 +35,15 @@ export default {
{
label
:
'图文'
,
name
:
'imageText'
,
component
:
MimageText
},
{
label
:
'小程序'
,
name
:
'applet'
,
component
:
Mapplet
},
],
opened
:
[
'text'
],
opened
:
[
activeTab
],
}
},
methods
:
{
tabClick
(
v
)
{
activeTab
=
v
.
paneName
this
.
opened
.
includes
(
v
.
paneName
)
||
this
.
opened
.
push
(
v
.
paneName
)
},
},
created
()
{
this
.
$store
.
setBusininessDesc
(
`
...
...
@@ -51,7 +52,7 @@ export default {
)
let
first
=
'text'
activeTab
||
(
this
.
activeName
=
activeTab
=
first
)
console
.
log
(
54
,
activeTab
)
this
.
opened
.
push
(
activeTab
)
},
}
</
script
>
...
...
vue3-lw-pc/src/views/contentCenter/trackMaterial/index.vue
View file @
4041c13
...
...
@@ -2,10 +2,7 @@
<div>
<!-- 基础素材 -->
<!--
<div
class=
"g-card"
style=
"padding: 10px"
>
-->
<el-tabs
v-model=
"activeName"
@
tab-click=
"(v) => opened.includes(v.paneName) || opened.push(v.paneName)"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"tabClick"
>
<el-tab-pane
v-for=
"(item, index) in list"
:key=
"index"
:label=
"item.label"
:name=
"item.name"
>
<component
v-if=
"opened.includes(item.name)"
:is=
"item.component"
></component>
</el-tab-pane>
...
...
@@ -20,7 +17,7 @@ import Marticle from './article'
import
Mvideo
from
'./video'
import
Mfile
from
'./file'
import
Mposter
from
'./poster'
let
activeTab
=
''
export
default
{
name
:
''
,
components
:
{
...
...
@@ -32,7 +29,7 @@ export default {
},
data
()
{
return
{
activeName
:
'outChain'
,
activeName
:
activeTab
,
list
:
[
{
label
:
'外链'
,
name
:
'outChain'
,
component
:
OutChain
},
{
label
:
'文章'
,
name
:
'article'
,
component
:
Marticle
},
...
...
@@ -40,9 +37,15 @@ export default {
{
label
:
'文件'
,
name
:
'file'
,
component
:
Mfile
},
{
label
:
'海报'
,
name
:
'poster'
,
component
:
Mposter
},
],
opened
:
[
'outChain'
],
opened
:
[
activeTab
],
}
},
methods
:
{
tabClick
(
v
)
{
activeTab
=
v
.
paneName
this
.
opened
.
includes
(
v
.
paneName
)
||
this
.
opened
.
push
(
v
.
paneName
)
},
},
created
()
{
this
.
$store
.
setBusininessDesc
(
`
...
...
@@ -53,6 +56,10 @@ export default {
if
(
activeName
)
{
this
.
activeName
=
activeName
this
.
opened
=
[
'poster'
]
}
else
{
let
first
=
'outChain'
activeTab
||
(
this
.
activeName
=
activeTab
=
first
)
this
.
opened
.
push
(
activeTab
)
}
},
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment