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 05b76f73
authored
Nov 02, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
新增 扩展<el-tabs></el-tabs> 缓存当前激活索引和组件
1 parent
a56d3420
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
73 additions
and
32 deletions
vue3-lw-pc/src/components/CacheElTabs.vue
vue3-lw-pc/src/main.js
vue3-lw-pc/src/styles/element-ui.scss
vue3-lw-pc/src/views/communityOperating/newCustomer/detail.vue
vue3-lw-pc/src/views/communityOperating/newCustomer/statistics.vue
vue3-lw-pc/src/views/communityOperating/oldCustomer/detail.vue
vue3-lw-pc/src/components/CacheElTabs.vue
0 → 100644
View file @
05b76f7
<!-- 扩展<el-tabs></el-tabs> 缓存当前激活索引和组件 -->
<
script
>
export
default
{
components
:
{},
data
()
{
return
{
active
:
0
,
opened
:
[],
}
},
computed
:
{},
watch
:
{},
created
()
{
if
(
this
.
$route
.
path
!=
sessionStorage
.
activeTabPagePath
)
{
sessionStorage
.
activeTabIndex
=
''
}
this
.
active
=
sessionStorage
.
activeTabIndex
=
this
.
$route
.
query
.
index
||
sessionStorage
.
activeTabIndex
||
'0'
sessionStorage
.
activeTabPagePath
=
this
.
$route
.
path
this
.
opened
.
push
(
this
.
active
)
},
mounted
()
{},
methods
:
{
tabClick
(
v
)
{
this
.
active
=
sessionStorage
.
activeTabIndex
=
v
.
paneName
this
.
opened
.
includes
(
v
.
paneName
)
||
this
.
opened
.
push
(
v
.
paneName
)
},
},
}
</
script
>
<
template
>
<el-tabs
v-model=
"active"
@
tab-click=
"tabClick"
>
<slot
v-bind=
"
{ active, opened }">
</slot>
</el-tabs>
</
template
>
<
style
lang=
"scss"
scoped
>
.el-tabs--top
{
z-index
:
99
;
position
:
sticky
!important
;
top
:
0
;
::v-deep
.el-tabs__header
{
z-index
:
99
;
position
:
sticky
!important
;
top
:
0
;
background
:
var
(
--bg-white
);
border-radius
:
var
(
--border-radius
);
box-shadow
:
0px
4px
20px
0px
var
(
--bg-black-10
);
overflow
:
hidden
;
}
::v-deep
.el-tabs__item.is-top
:nth-child
(
2
)
{
padding-left
:
20px
;
}
::v-deep
.el-tabs__item.is-top
:last-child
{
padding-right
:
20px
;
}
}
</
style
>
vue3-lw-pc/src/main.js
View file @
05b76f7
...
@@ -47,6 +47,7 @@ let components = {
...
@@ -47,6 +47,7 @@ let components = {
RequestChartTable
:
()
=>
import
(
'./components/RequestChartTable.vue'
),
RequestChartTable
:
()
=>
import
(
'./components/RequestChartTable.vue'
),
SearchResetButton
:
()
=>
import
(
'./components/SearchResetButton.vue'
),
SearchResetButton
:
()
=>
import
(
'./components/SearchResetButton.vue'
),
CustomerRangeForm
:
()
=>
import
(
'./components/CustomerRangeForm.vue'
),
CustomerRangeForm
:
()
=>
import
(
'./components/CustomerRangeForm.vue'
),
CacheElTabs
:
()
=>
import
(
'./components/CacheElTabs.vue'
),
}
}
for
(
const
c
in
components
)
{
for
(
const
c
in
components
)
{
app
.
component
(
c
,
defineAsyncComponent
(
components
[
c
]))
app
.
component
(
c
,
defineAsyncComponent
(
components
[
c
]))
...
...
vue3-lw-pc/src/styles/element-ui.scss
View file @
05b76f7
...
@@ -406,22 +406,6 @@
...
@@ -406,22 +406,6 @@
overflow
:
initial
;
overflow
:
initial
;
}
}
.el-tabs--top.sticky-t
{
z-index
:
99
;
.el-tabs__header
{
background
:
var
(
--
bg-white
);
border-radius
:
var
(
--
border-radius
);
box-shadow
:
0px
4px
20px
0px
var
(
--
bg-black-10
);
overflow
:
hidden
;
}
.el-tabs__item.is-top
:nth-child
(
2
)
{
padding-left
:
20px
;
}
.el-tabs__item.is-top
:last-child
{
padding-right
:
20px
;
}
}
// .diy-theme {
// .diy-theme {
// .el-date-table td.in-range div {
// .el-date-table td.in-range div {
// background-color: #e6f8ef;
// background-color: #e6f8ef;
...
...
vue3-lw-pc/src/views/communityOperating/newCustomer/detail.vue
View file @
05b76f7
...
@@ -6,9 +6,7 @@ export default {
...
@@ -6,9 +6,7 @@ export default {
statistics
:
defineAsyncComponent
(()
=>
import
(
'./statistics'
)),
statistics
:
defineAsyncComponent
(()
=>
import
(
'./statistics'
)),
},
},
data
()
{
data
()
{
return
{
return
{}
active
:
this
.
$route
.
query
.
index
||
'0'
,
}
},
},
computed
:
{},
computed
:
{},
watch
:
{},
watch
:
{},
...
@@ -19,12 +17,14 @@ export default {
...
@@ -19,12 +17,14 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<el-tabs
class=
"sticky-t"
v-model=
"active"
>
<CacheElTabs
#="
{ opened }">
<el-tab-pane
label=
"活码信息"
></el-tab-pane>
<el-tab-pane
label=
"活码信息"
>
<el-tab-pane
label=
"拉群统计"
></el-tab-pane>
<aev
/>
</el-tabs>
</el-tab-pane>
<aev
v-show=
"active == 0"
/>
<el-tab-pane
label=
"拉群统计"
>
<statistics
v-show=
"active == 1"
/>
<statistics
v-if=
"opened.includes('1')"
/>
</el-tab-pane>
</CacheElTabs>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
></
style
>
vue3-lw-pc/src/views/communityOperating/newCustomer/statistics.vue
View file @
05b76f7
...
@@ -174,7 +174,7 @@ function getDataDetail(query) {
...
@@ -174,7 +174,7 @@ function getDataDetail(query) {
return
api
.
getDataDetail
(
query
)
return
api
.
getDataDetail
(
query
)
}
}
/** 获取详情 */
/** 获取详情
中客群列表
*/
;(
function
getDetail
()
{
;(
function
getDetail
()
{
api
.
getDetail
(
id
).
then
(({
data
})
=>
{
api
.
getDetail
(
id
).
then
(({
data
})
=>
{
groups
=
data
.
groups
groups
=
data
.
groups
...
...
vue3-lw-pc/src/views/communityOperating/oldCustomer/detail.vue
View file @
05b76f7
...
@@ -6,9 +6,7 @@ export default {
...
@@ -6,9 +6,7 @@ export default {
statistics
:
defineAsyncComponent
(()
=>
import
(
'./statistics'
)),
statistics
:
defineAsyncComponent
(()
=>
import
(
'./statistics'
)),
},
},
data
()
{
data
()
{
return
{
return
{}
active
:
this
.
$route
.
query
.
index
||
'0'
,
}
},
},
computed
:
{},
computed
:
{},
watch
:
{},
watch
:
{},
...
@@ -19,14 +17,14 @@ export default {
...
@@ -19,14 +17,14 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<
el-tabs
v-model=
"active
"
>
<
CacheElTabs
#="
{ opened }
">
<el-tab-pane
label=
"任务信息"
>
<el-tab-pane
label=
"任务信息"
>
<aev
/>
<aev
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"拉群统计"
>
<el-tab-pane
label=
"拉群统计"
>
<statistics
/>
<statistics
v-if=
"opened.includes('1')"
/>
</el-tab-pane>
</el-tab-pane>
</
el-t
abs>
</
CacheElT
abs>
</
template
>
</
template
>
<
style
lang=
"scss"
scoped
></
style
>
<
style
lang=
"scss"
scoped
></
style
>
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