Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
T
TrainSys
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
苏州培训方案
TrainSys
提交
8db7eb97
提交
8db7eb97
编写于
5月 13, 2025
作者:
jlj05024111@163.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 更新支持实体HTML视图
上级
e5d7de5b
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
96 行增加
和
0 行删除
+96
-0
app-register.ts
app_Web/src/app-register.ts
+2
-0
html-view.scss
app_Web/src/components/views/html-view/html-view.scss
+10
-0
html-view.tsx
app_Web/src/components/views/html-view/html-view.tsx
+68
-0
index.ts
app_Web/src/components/views/index.ts
+1
-0
html-view-provider.ts
app_Web/src/provider/view/html-view-provider.ts
+12
-0
index.ts
app_Web/src/provider/view/index.ts
+3
-0
未找到文件。
app_Web/src/app-register.ts
浏览文件 @
8db7eb97
...
...
@@ -63,6 +63,7 @@ import {
TreeExpView
,
PickupView2
,
MPickupView2
,
HtmlView
,
}
from
'./components/views'
;
import
{
IndexView
}
from
'./views'
;
import
AppKeepAlive
from
'./components/common/app-keep-alive/app-keep-alive.vue'
;
...
...
@@ -164,6 +165,7 @@ export const AppRegister = {
v
.
component
(
'TreeExpView'
,
TreeExpView
);
v
.
component
(
'PickupView2'
,
PickupView2
);
v
.
component
(
'MPickupView2'
,
MPickupView2
);
v
.
component
(
'HtmlView'
,
HtmlView
);
// 注册部件组件
v
.
component
(
'AppMenu'
,
AppMenu
);
v
.
component
(
'GridControl'
,
GridControl
);
...
...
app_Web/src/components/views/html-view/html-view.scss
0 → 100644
浏览文件 @
8db7eb97
@include
b
(
view-dehtmlview
)
{
width
:
100%
;
overflow
:
hidden
;
height
:
100%
;
>
iframe
{
width
:
100%
;
height
:
100%
;
border
:
0
;
}
}
app_Web/src/components/views/html-view/html-view.tsx
0 → 100644
浏览文件 @
8db7eb97
import
{
PropType
,
defineComponent
,
getCurrentInstance
,
ref
,
watch
}
from
'vue'
;
import
{
useHtmlViewController
,
useNamespace
}
from
'@ibiz-template/vue-util'
;
import
{
IModal
}
from
'@ibiz-template/runtime'
;
import
{
StringUtil
}
from
'@ibiz-template/core'
;
import
_404View
from
'../../../views/404-view/404-view'
;
import
'./html-view.scss'
;
export
const
HtmlView
=
defineComponent
({
name
:
'IBizHtmlView'
,
props
:
{
context
:
Object
as
PropType
<
IContext
>
,
params
:
{
type
:
Object
as
PropType
<
IParams
>
,
default
:
()
=>
({})
},
modelPath
:
{
type
:
String
,
required
:
true
},
modal
:
{
type
:
Object
as
PropType
<
IModal
>
},
state
:
{
type
:
Object
as
PropType
<
IData
>
},
},
setup
(
props
)
{
const
ns
=
useNamespace
(
'view'
);
const
{
proxy
}
=
getCurrentInstance
()
!
;
const
c
=
useHtmlViewController
(
proxy
,
props
.
modelPath
);
const
url
=
ref
(
''
);
watch
(
()
=>
c
,
()
=>
{
if
(
c
.
model
&&
c
.
model
.
htmlUrl
)
{
url
.
value
=
StringUtil
.
fill
(
c
.
model
.
htmlUrl
,
c
.
context
,
c
.
params
);
}
else
{
url
.
value
=
''
;
}
},
{
immediate
:
true
,
deep
:
true
,
},
);
c
.
beginViewLoading
();
const
onLoad
=
()
=>
{
c
.
endViewLoading
();
};
return
{
c
,
ns
,
url
,
onLoad
};
},
render
()
{
if
(
this
.
url
)
{
return
(
<
view
-
base
class=
{
this
.
ns
.
b
()
}
controller=
{
this
.
c
}
>
<
div
class=
{
[
this
.
ns
.
b
(
'dehtmlview'
)]
}
>
<
iframe
src=
{
this
.
url
}
onLoad=
{
()
=>
this
.
onLoad
()
}
onError=
{
()
=>
this
.
onLoad
()
}
></
iframe
>
</
div
>
</
view
-
base
>
);
}
return
(
<
div
class=
{
this
.
ns
.
b
()
}
>
<
_404View
></
_404View
>
</
div
>
);
},
});
app_Web/src/components/views/index.ts
浏览文件 @
8db7eb97
...
...
@@ -16,3 +16,4 @@ export * from './list-view/list-view';
export
*
from
'./tree-exp-view/tree-exp-view'
;
export
*
from
'./pickup-view2/pickup-view2'
;
export
*
from
'./mpickup-view2/mpickup-view2'
;
export
*
from
'./html-view/html-view'
;
app_Web/src/provider/view/html-view-provider.ts
0 → 100644
浏览文件 @
8db7eb97
import
{
IViewProvider
}
from
'@ibiz-template/controller'
;
/**
* html视图适配器
*
* @export
* @class HtmlViewProvider
* @implements {IViewProvider}
*/
export
class
HtmlViewProvider
implements
IViewProvider
{
component
:
string
=
'HtmlView'
;
}
app_Web/src/provider/view/index.ts
浏览文件 @
8db7eb97
...
...
@@ -18,6 +18,7 @@ import { WFDynaStartViewProvider } from './wf-dyna-start-view-provider';
import
{
WFStepTraceViewProvider
}
from
'./wf-step-trace-view-provider'
;
import
{
PickupView2Provider
}
from
'./pickup-view2-provider'
;
import
{
MPickupView2Provider
}
from
'./mpickup-view2-provider'
;
import
{
HtmlViewProvider
}
from
'./html-view-provider'
;
/**
* 预置默认的视图适配器
...
...
@@ -58,6 +59,7 @@ export function presetViewProvider(): void {
view
.
register
(
ViewType
.
DE_LIST_EXP_VIEW
,
new
ListExpViewProvider
());
view
.
register
(
ViewType
.
DE_LIST_VIEW
,
new
ListViewProvider
());
view
.
register
(
ViewType
.
DE_TREE_EXP_VIEW
,
new
TreeExpViewProvider
());
view
.
register
(
ViewType
.
DE_HTML_VIEW
,
new
HtmlViewProvider
());
}
export
{
...
...
@@ -79,4 +81,5 @@ export {
TabExpViewProvider
,
TreeExpViewProvider
,
PickupView2Provider
,
HtmlViewProvider
,
};
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录