Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
61b2ab25
提交
61b2ab25
authored
8月 31, 2021
作者:
fit2cloud-chenyw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 仪表板新增tabs选项卡
上级
d974e217
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
102 行增加
和
1 行删除
+102
-1
component-list.js
.../src/components/canvas/custom-component/component-list.js
+25
-0
DeTabs.vue
frontend/src/components/widget/DeWidget/DeTabs.vue
+76
-0
index.vue
frontend/src/views/panel/AssistComponent/index.vue
+1
-1
没有找到文件。
frontend/src/components/canvas/custom-component/component-list.js
浏览文件 @
61b2ab25
...
...
@@ -27,6 +27,14 @@ export const assistList = [
label
:
'矩形'
,
icon
:
'iconfont icon-juxing'
,
defaultClass
:
'text-filter'
},
{
id
:
'10006'
,
component
:
'de-tabs'
,
type
:
'de-tabs'
,
label
:
'选项卡'
,
icon
:
'iconfont icon-juxing'
,
defaultClass
:
'text-filter'
}
]
...
...
@@ -139,6 +147,23 @@ const list = [
borderRadius
:
''
}
},
{
id
:
'10006'
,
component
:
'de-tabs'
,
label
:
'选项卡'
,
propValue
:
''
,
icon
:
'juxing'
,
type
:
'de-tabs'
,
style
:
{
width
:
200
,
height
:
200
,
borderStyle
:
'solid'
,
borderWidth
:
1
,
borderColor
:
'#000000'
,
backgroundColor
:
'#ffffff'
,
borderRadius
:
0
}
},
{
id
:
'20001'
,
component
:
'picture-add'
,
...
...
frontend/src/components/widget/DeWidget/DeTabs.vue
0 → 100644
浏览文件 @
61b2ab25
<
template
>
<el-tabs
v-model=
"editableTabsValue"
type=
"card"
editable
@
edit=
"handleTabsEdit"
>
<el-tab-pane
v-for=
"(item, index) in editableTabs"
:key=
"item.name"
:label=
"item.title"
:name=
"item.name"
>
{{
item
.
content
}}
</el-tab-pane>
</el-tabs>
</
template
>
<
script
>
export
default
{
name
:
'DeTabls'
,
props
:
{
element
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
return
{
editableTabsValue
:
'1'
,
editableTabs
:
[{
title
:
'Tab 1'
,
name
:
'1'
,
content
:
''
}],
tabIndex
:
1
}
},
created
()
{
},
methods
:
{
handleTabsEdit
(
targetName
,
action
)
{
if
(
action
===
'add'
)
{
const
newTabName
=
++
this
.
tabIndex
+
''
this
.
editableTabs
.
push
({
title
:
'New Tab'
,
name
:
newTabName
,
content
:
'New Tab content'
})
this
.
editableTabsValue
=
newTabName
}
if
(
action
===
'remove'
)
{
const
tabs
=
this
.
editableTabs
let
activeName
=
this
.
editableTabsValue
if
(
activeName
===
targetName
)
{
tabs
.
forEach
((
tab
,
index
)
=>
{
if
(
tab
.
name
===
targetName
)
{
const
nextTab
=
tabs
[
index
+
1
]
||
tabs
[
index
-
1
]
if
(
nextTab
)
{
activeName
=
nextTab
.
name
}
}
})
}
this
.
editableTabsValue
=
activeName
this
.
editableTabs
=
tabs
.
filter
(
tab
=>
tab
.
name
!==
targetName
)
}
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
frontend/src/views/panel/AssistComponent/index.vue
浏览文件 @
61b2ab25
...
...
@@ -61,7 +61,7 @@ import { commonStyle, commonAttr } from '@/components/canvas/custom-component/co
import
generateID
from
'@/components/canvas/utils/generateID'
export
default
{
name
:
'
FilterGroup
'
,
name
:
'
AssisComponent
'
,
data
()
{
return
{
assistList
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论