Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-Mob-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-Mob-R7-Res
提交
15bab80f
提交
15bab80f
编写于
9月 27, 2020
作者:
zhujiamin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
侧滑菜单支持左滑退出
上级
fabc525d
变更
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
37 行增加
和
47 行删除
+37
-47
app-mob-menu-sideslip-view.vue
...app-mob-menu-sideslip-view/app-mob-menu-sideslip-view.vue
+37
-47
未找到文件。
src/components/app-mob-menu-sideslip-view/app-mob-menu-sideslip-view.vue
浏览文件 @
15bab80f
<
template
>
<
template
>
<div
class=
"app-mob-menu-sideslip-view"
>
<div
class=
"app-mob-menu-sideslip-view"
>
<van-popup
v-model=
"showPopup"
get-container=
"#app"
position=
"left"
:style=
"
{ height: '100%',width: '80%' }" duration="0.2">
<van-popup
v-model=
"showPopup"
get-container=
"#app"
position=
"left"
:style=
"
{ height: '100%',width: '80%' }" duration="0.2">
<div
class=
"app-menu-plugin"
>
<v-touch
v-on:swipeleft=
"onSwipeLeft"
style=
"height:100%;"
>
<div
class=
"header"
>
<div
class=
"app-menu-plugin"
>
<img
src=
"assets/images/logo.png"
class=
"ibizLogo"
/>
<div
class=
"header"
>
<div
class=
"title"
>
iBizPMS
</div>
<img
src=
"assets/images/logo.png"
class=
"ibizLogo"
/>
<div
class=
"text"
>
登录·试用测试版
</div>
<div
class=
"title"
>
iBizPMS
</div>
<div
class=
"notice"
><ion-icon
name=
"megaphone-outline"
></ion-icon>
#最新通知——更新/下载
</div>
<div
class=
"text"
>
登录·试用测试版
</div>
</div>
<div
class=
"notice"
><ion-icon
name=
"megaphone-outline"
></ion-icon>
#最新通知——更新/下载
</div>
<div
class=
"top"
>
</div>
<div
class=
"title"
>
Menu
</div>
<div
class=
"top"
>
<template
v-for=
"item in items"
>
<div
class=
"title"
>
Menu
</div>
<template
v-if=
"!item.hidden"
>
<template
v-for=
"item in items"
>
<div
class=
"list"
:key=
"item.index"
@
click=
"active(item)"
>
<template
v-if=
"!item.hidden"
>
<ion-icon
:name=
" item.iconcls ? item.iconcls : 'home' "
></ion-icon>
<div
class=
"list"
:key=
"item.index"
@
click=
"active(item)"
>
<div
class=
"text"
>
<ion-icon
:name=
" item.iconcls ? item.iconcls : 'home' "
></ion-icon>
<ion-label
v-if=
"item.appfunctag != 'settings'"
>
{{
$t
(
`app.menus.${menuName
}
.${item.name
}
`
)
}}
<
/ion-label
>
<div
class=
"text"
>
<
ion
-
label
v
-
else
>
{{
item
.
text
}}
<
/ion-label
>
<ion-label
v-if=
"item.appfunctag != 'settings'"
>
{{
$t
(
`app.menus.${menuName
}
.${item.name
}
`
)
}}
<
/ion-label
>
<
ion
-
badge
color
=
"danger"
v
-
if
=
"counterServide && counterServide.counterData && counterServide.counterData[item.counterid]"
><
ion
-
label
>
{{
counterServide
.
counterData
[
item
.
counterid
]
}}
<
/ion-label></i
on
-
badge
>
<
ion
-
label
v
-
else
>
{{
item
.
text
}}
<
/ion-label
>
<
ion
-
badge
color
=
"danger"
v
-
if
=
"counterServide && counterServide.counterData && counterServide.counterData[item.counterid]"
><
ion
-
label
>
{{
counterServide
.
counterData
[
item
.
counterid
]
}}
<
/ion-label></i
on
-
badge
>
<
/div
>
<
/div
>
<
/div
>
<
/
div
>
<
/
template
>
<
/template
>
<
/template
>
<
/
template
>
<
/
div
>
<
/div
>
<
/div
>
<
/
div>
<
/
v-touch
>
<
/van-popup
>
<
/van-popup
>
<
v
-
touch
v
-
on
:
swiperight
=
"onSwipe
Lef
t"
style
=
"height:100%;"
>
<
v
-
touch
v
-
on
:
swiperight
=
"onSwipe
Righ
t"
style
=
"height:100%;"
>
<
template
v
-
for
=
"item in items"
>
<
template
v
-
for
=
"item in items"
>
<
template
v
-
if
=
"!item.hidden"
>
<
template
v
-
if
=
"!item.hidden"
>
<
component
:
key
=
"item.id"
v
-
if
=
"item.id == activeId"
:
is
=
"item.componentname"
viewDefaultUsage
=
"indexView"
><
/component
>
<
component
:
key
=
"item.id"
v
-
if
=
"item.id == activeId"
:
is
=
"item.componentname"
viewDefaultUsage
=
"indexView"
><
/component
>
...
@@ -43,15 +45,25 @@ import { Environment } from '@/environments/environment';
...
@@ -43,15 +45,25 @@ import { Environment } from '@/environments/environment';
}
}
}
)
}
)
export
default
class
AppMobMenuSideslipView
extends
Vue
{
export
default
class
AppMobMenuSideslipView
extends
Vue
{
/**
/**
*
滑动打开
弹出层
*
向左滑动关闭
弹出层
*
*
* @type {*
}
* @type {*
}
* @memberof AppMobMenuSideslipView
* @memberof AppMobMenuSideslipView
*/
*/
public
onSwipeLeft
(){
public
onSwipeLeft
(){
this
.
showPopup
=
true
;
this
.
showPopup
=
false
;
}
/**
* 向右滑动打开弹出层
*
* @type {*
}
* @memberof AppMobMenuSideslipView
*/
public
onSwipeRight
(){
this
.
showPopup
=
true
;
}
}
/**
/**
...
@@ -212,13 +224,11 @@ export default class AppMobMenuSideslipView extends Vue {
...
@@ -212,13 +224,11 @@ export default class AppMobMenuSideslipView extends Vue {
* @memberof AppMobMenuSideslipView
* @memberof AppMobMenuSideslipView
*/
*/
public
mounted
()
{
public
mounted
()
{
let
ionNav
:
any
=
this
.
$refs
.
ionNav
;
let
currPage
=
sessionStorage
.
getItem
(
"currId"
);
let
currPage
=
sessionStorage
.
getItem
(
"currId"
);
if
(
currPage
){
if
(
currPage
){
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
this
.
items
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
if
(
item
.
id
==
currPage
){
if
(
item
.
id
==
currPage
){
this
.
activeId
=
item
.
id
this
.
activeId
=
item
.
id
;
ionNav
.
select
(
item
.
name
);
}
}
}
)
}
)
}
}
...
@@ -283,26 +293,6 @@ export default class AppMobMenuSideslipView extends Vue {
...
@@ -283,26 +293,6 @@ export default class AppMobMenuSideslipView extends Vue {
return
val
;
return
val
;
}
}
/**
* 选中菜单项
*
* @param {*
}
$event
* @returns {void
}
* @memberof AppMobMenuSideslipView
*/
public
selectItem
(
$event
:
any
):
void
{
if
(
!
$event
)
{
return
;
}
let
{
detail
}
=
$event
;
if
(
!
detail
)
{
return
;
}
let
{
tab
}
=
detail
;
if
(
!
tab
)
{
return
;
}
}
}
}
<
/script
>
<
/script
>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录