Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
9f2c3b80
提交
9f2c3b80
编写于
6月 06, 2020
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
调整分页栏
上级
f760fd9a
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
160 行增加
和
35 行删除
+160
-35
tab-page-exp.less
src/components/tab-page-exp/tab-page-exp.less
+88
-20
tab-page-exp.vue
src/components/tab-page-exp/tab-page-exp.vue
+71
-14
edit-view-engine.ts
src/engine/view/edit-view-engine.ts
+1
-1
未找到文件。
src/components/tab-page-exp/tab-page-exp.less
浏览文件 @
9f2c3b80
...
...
@@ -87,28 +87,96 @@
// opacity: 0;
// }
.ibiz-page-tag {
.el-tabs{
.el-tabs__nav{
padding:0px 10px;
border:none;
}
.el-tabs__item{
color:#ccc;
border:none;
}
.el-tabs__item:hover{
color:#409eff;
}
.is-active{
color:#409eff;
border-bottom:2px solid #409eff !important;
}
.el-tabs__nav-scroll{
background-color: white;
position: relative;
.contextmenu {
margin: 0;
background: #fff;
z-index: 3000;
position: absolute;
list-style-type: none;
padding: 5px 0;
border-radius: 4px;
font-size: 12px;
font-weight: 400;
color: #333;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
li {
margin: 0;
padding: 7px 16px;
cursor: pointer;
&:hover {
background: #eee;
}
}
}
.left{
.el-tabs__header{
box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);
margin:0 0 1 0;
padding-right:120px;
}
}
.right{
position: absolute;
right:0px;
top:0px;
width:120px;
margin:5px 0px;
display: flex;
justify-content: center;
}
>.tag-tabs{
background-color: #F0F0F0 !important;
.el-tabs{
.el-tabs__nav-scroll{
}
.el-tabs__nav{
padding:0px 10px;
border:none;
}
.el-tabs__active-bar{
background-color: transparent !important;
}
.el-tabs__item{
height: 32px;
line-height: 32px;
border: 1px solid #e8eaec!important;
color: #515a6e!important;
background: #fff!important;
padding: 0 12px;
display: inline-block;
margin: 4px 4px 4px 0;
border-radius: 3px;
font-size: 12px;
vertical-align: middle;
opacity: 1;
overflow: hidden;
.ivu-tag-dot-inner{
display: inline-block;
width: 12px;
height: 12px;
margin-right: 8px;
border-radius: 50%;
background: #e8eaec;
position: relative;
top: 1px;
}
}
.el-tabs__item:hover{
color:#409eff;
}
.is-active{
color:#409eff;
.ivu-tag-dot-inner{
background-color:#409eff !important;
}
border-bottom:2px solid transparent !important;
}
.el-tabs__header{
box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);
margin:0 0 1 0;
}
}
}
}
\ No newline at end of file
src/components/tab-page-exp/tab-page-exp.vue
浏览文件 @
9f2c3b80
<
template
>
<div
class=
"ibiz-page-tag"
>
<el-tabs
type=
"card"
@
tab-click=
"changePage"
v-model=
"editableTabsValue"
closable
@
tab-remove=
"onClose"
<div
class=
"tag-tabs left"
>
<el-tabs
type=
"card"
@
tab-click=
"changePage"
v-model=
"editableTabsValue"
closable
@
tab-remove=
"onClose"
@
contextmenu
.
prevent
.
native=
"openMenu($event)"
>
<el-tab-pane
v-for=
"(meta, index) of $store.state.pageMetas"
:name=
"index+''"
:key=
"index+''"
>
<span
slot=
"label"
><span
class=
"ivu-tag-dot-inner"
></span>
{{
getCaption
(
meta
.
caption
,
meta
.
info
)
}}
</span>
</el-tab-pane>
</el-tabs>
</div>
<ul
v-show=
"visible"
:style=
"
{left: left+'px', top: top+'px'}"
class="contextmenu"
>
<el-tab-pane
v-for=
"(meta, index) of $store.state.pageMetas"
:label=
"getCaption(meta.caption, meta.info)"
:name=
"index+''"
:key=
"index+''"
></el-tab-pane>
</el-tabs>
<li
v-for=
"(item,index) in actions"
@
click=
"handlerClose(item)"
>
{{
$t
(
item
.
text
)
}}
</li>
</ul>
<div
v-show=
"$store.state.pageMetas.length > 0"
class=
"right"
>
<el-dropdown
@
command=
"handlerClose"
>
<el-button
size=
"mini"
type=
"primary"
>
更多
<i
class=
"el-icon-arrow-down el-icon--right"
></i>
</el-button>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
:command=
"item"
v-for=
"(item,index) in actions"
>
{{
$t
(
item
.
text
)
}}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</
template
>
...
...
@@ -23,16 +47,49 @@ import { Environment } from "../../environments/environment";
@
Component
({})
export
default
class
TabPageExp
extends
Vue
{
@
Provide
()
public
styleLeft
:
number
=
0
;
private
visible
=
false
;
//右键菜单显示状态
private
top
=
0
;
//菜单距离顶部位置
private
left
=
0
;
//菜单距离左侧位置
@
Provide
()
public
actions
:
any
[]
=
[
{
text
:
"app.tabpage.closeall"
,
value
:
"closeAll"
},
{
text
:
"app.tabpage.closeother"
,
value
:
"closeOther"
}
];
public
editableTabsValue
:
any
=
""
;
/**
* 关闭tab页方法
*/
public
handlerClose
(
item
:
any
){
this
.
visible
=
false
;
this
.
doTagAction
(
item
.
value
);
}
/**
* 打开右键菜单
*/
private
openMenu
(
e
:
MouseEvent
)
{
const
menuMinWidth
=
105
;
const
offsetLeft
=
this
.
$el
.
getBoundingClientRect
().
left
;
const
offsetWidth
=
(
this
.
$el
as
HTMLElement
).
offsetWidth
;
const
maxLeft
=
offsetWidth
-
menuMinWidth
;
const
left
=
e
.
clientX
-
offsetLeft
-
15
;
if
(
left
>
maxLeft
)
{
this
.
left
=
maxLeft
;
}
else
{
this
.
left
=
left
;
}
this
.
top
=
e
.
clientY
-
45
;
this
.
visible
=
true
;
}
public
editableTabsValue
:
any
=
""
;
//tabs页绑定值
@
Watch
(
"$route"
)
public
onRouteChange
(
newVal
:
any
)
{
...
...
src/engine/view/edit-view-engine.ts
浏览文件 @
9f2c3b80
...
...
@@ -248,7 +248,7 @@ export default class EditViewEngine extends ViewEngine {
public
setTabCaption
(
info
:
string
):
void
{
let
viewdata
:
any
=
this
.
view
.
model
;
if
(
viewdata
&&
info
&&
!
Object
.
is
(
info
,
''
)
&&
this
.
view
.
$tabPageExp
&&
(
viewdata
.
srfTitle
.
indexOf
(
" - "
)
===
-
1
))
{
this
.
view
.
$tabPageExp
.
setCurPageCaption
(
viewdata
.
srf
Caption
,
viewdata
.
srfTitle
,
info
);
this
.
view
.
$tabPageExp
.
setCurPageCaption
(
viewdata
.
srf
Title
,
viewdata
.
srfTitle
,
info
);
this
.
view
.
model
.
srfTitle
=
`
${
this
.
view
.
$t
(
viewdata
.
srfTitle
)}
-
${
viewdata
.
dataInfo
}
`
;
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录