Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
bb21ee4c
提交
bb21ee4c
编写于
12月 24, 2021
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
5ef05d72
变更
50
显示空白字符变更
内嵌
并排
正在显示
50 个修改的文件
包含
309 行增加
和
212 行删除
+309
-212
dropdown-list.hbs
...n/resources/templ/r7/@macro/form-detail/dropdown-list.hbs
+1
-1
include-form.hbs
...in/resources/templ/r7/@macro/form-detail/include-form.hbs
+1
-1
input.hbs
.../src/main/resources/templ/r7/@macro/form-detail/input.hbs
+1
-1
span.hbs
...e/src/main/resources/templ/r7/@macro/form-detail/span.hbs
+1
-1
components.d.ts
.../src/main/resources/templ/r7/app_{{apps}}/components.d.ts
+1
-3
App.vue
...core/src/main/resources/templ/r7/app_{{apps}}/src/App.vue
+2
-0
index.ts
...rces/templ/r7/app_{{apps}}/src/components/custom/index.ts
+0
-3
IbizDropdownList.vue
.../app_{{apps}}/src/components/editors/IbizDropdownList.vue
+0
-0
IbizInput.vue
...empl/r7/app_{{apps}}/src/components/editors/IbizInput.vue
+0
-0
IbizSpan.vue
...templ/r7/app_{{apps}}/src/components/editors/IbizSpan.vue
+0
-0
index.ts
...ces/templ/r7/app_{{apps}}/src/components/editors/index.ts
+0
-9
index.ts
...n/resources/templ/r7/app_{{apps}}/src/components/index.ts
+0
-4
index.ts
...s}}/src/components/layout/DefaultIndexViewLayout/index.ts
+0
-3
index.ts
...{{apps}}/src/components/layout/DefaultViewLayout/index.ts
+0
-3
IbizDefaultIndexViewLayout.vue
...ps}}/src/components/layout/IbizDefaultIndexViewLayout.vue
+3
-0
IbizDefaultViewLayout.vue
..._{{apps}}/src/components/layout/IbizDefaultViewLayout.vue
+0
-2
index.ts
...rces/templ/r7/app_{{apps}}/src/components/layout/index.ts
+0
-2
index.ts
.../r7/app_{{apps}}/src/components/render/FormGroup/index.ts
+0
-3
index.ts
...l/r7/app_{{apps}}/src/components/render/FormItem/index.ts
+0
-3
IbizFormGroup.vue
...l/r7/app_{{apps}}/src/components/render/IbizFormGroup.vue
+0
-0
IbizFormItem.vue
...pl/r7/app_{{apps}}/src/components/render/IbizFormItem.vue
+0
-0
IbizIconText.vue
...pl/r7/app_{{apps}}/src/components/render/IbizIconText.vue
+0
-0
IbizMenuItem.vue
...pl/r7/app_{{apps}}/src/components/render/IbizMenuItem.vue
+9
-5
index.ts
...l/r7/app_{{apps}}/src/components/render/IconText/index.ts
+0
-3
index.ts
...l/r7/app_{{apps}}/src/components/render/MenuItem/index.ts
+0
-3
index.ts
...rces/templ/r7/app_{{apps}}/src/components/render/index.ts
+0
-4
edit-view-prop.ts
...}/src/ibiz-core/modules/views/edit-view/edit-view-prop.ts
+5
-2
edit-view-state.ts
.../src/ibiz-core/modules/views/edit-view/edit-view-state.ts
+5
-2
edit-view.ts
...apps}}/src/ibiz-core/modules/views/edit-view/edit-view.ts
+15
-8
index-view.ts
...ps}}/src/ibiz-core/modules/views/index-view/index-view.ts
+1
-1
main-view-prop.ts
...}/src/ibiz-core/modules/views/main-view/main-view-prop.ts
+4
-1
main-view-state.ts
.../src/ibiz-core/modules/views/main-view/main-view-state.ts
+8
-2
view-base.ts
...apps}}/src/ibiz-core/modules/views/view-base/view-base.ts
+25
-14
view-prop-base.ts
...}/src/ibiz-core/modules/views/view-base/view-prop-base.ts
+16
-5
view-state-base.ts
.../src/ibiz-core/modules/views/view-base/view-state-base.ts
+20
-6
control-base.ts
...rc/ibiz-core/modules/widgets/control-base/control-base.ts
+36
-10
control-prop-base.ts
...iz-core/modules/widgets/control-base/control-prop-base.ts
+14
-5
control-state-base.ts
...z-core/modules/widgets/control-base/control-state-base.ts
+20
-7
form-control-prop.ts
...iz-core/modules/widgets/form-control/form-control-prop.ts
+5
-2
form-control-state.ts
...z-core/modules/widgets/form-control/form-control-state.ts
+4
-1
form-control.ts
...rc/ibiz-core/modules/widgets/form-control/form-control.ts
+15
-11
main-control-prop.ts
...iz-core/modules/widgets/main-control/main-control-prop.ts
+12
-4
main-control-state.ts
...z-core/modules/widgets/main-control/main-control-state.ts
+15
-5
main-control.ts
...rc/ibiz-core/modules/widgets/main-control/main-control.ts
+15
-8
menu-control.ts
...rc/ibiz-core/modules/widgets/menu-control/menu-control.ts
+44
-46
{{pages@APPINDEXVIEW}}.vue.hbs
...e/{{appModules}}/{{pages}}/{{pages@APPINDEXVIEW}}.vue.hbs
+6
-7
{{pages@DEEDITVIEW}}.vue.hbs
...age/{{appModules}}/{{pages}}/{{pages@DEEDITVIEW}}.vue.hbs
+1
-3
{{ctrls@APPMENU}}-menu-config.ts.hbs
...ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
+2
-0
{{ctrls@APPMENU}}-menu.vue.hbs
...s}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
+1
-6
{{ctrls@FORM}}-form.vue.hbs
...ntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
+1
-2
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/dropdown
L
ist.hbs
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/dropdown
-l
ist.hbs
浏览文件 @
bb21ee4c
<
App
DropdownList
<
Ibiz
DropdownList
name=
"
{{
item
.
codeName
}}
"
{{!-- :value="data.{{item.psEditor.name}}" --}}
:data=
"data"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/include-form.hbs
浏览文件 @
bb21ee4c
...
...
@@ -6,4 +6,4 @@
{{#
*
inline
"PASSWORD"
}}{{>
@macro
/
form-detail
/
input
.
hbs
}}{{/
inline
}}
{{#
*
inline
"TEXTAREA"
}}{{>
@macro
/
form-detail
/
input
.
hbs
}}{{/
inline
}}
{{#
*
inline
"SPAN"
}}{{>
@macro
/
form-detail
/
span
.
hbs
}}{{/
inline
}}
{{#
*
inline
"DROPDOWNLIST"
}}{{>
@macro
/
form-detail
/
dropdownList
.
hbs
}}{{/
inline
}}
\ No newline at end of file
{{#
*
inline
"DROPDOWNLIST"
}}{{>
@macro
/
form-detail
/
dropdown-list
.
hbs
}}{{/
inline
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/input.hbs
浏览文件 @
bb21ee4c
<
App
Input
<
Ibiz
Input
{{#if
item
.
psEditor
.
getPlaceHolder
}}
placeholder=
"
{{
item
.
psEditor
.
getPlaceHolder
}}
"
{{/if}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/form-detail/span.hbs
浏览文件 @
bb21ee4c
<
App
Span
<
Ibiz
Span
name=
"
{{
item
.
codeName
}}
"
{{!-- :value="data.{{item.psEditor.name}}" --}}
value=
"标签测试"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/components.d.ts
浏览文件 @
bb21ee4c
...
...
@@ -4,9 +4,7 @@
declare
module
'vue'
{
export
interface
GlobalComponents
{
DefaultViewLayout
:
typeof
import
(
'./src/components/layout/DefaultViewLayout/DefaultViewLayout.vue'
)[
'default'
]
ElButton
:
typeof
import
(
'element-plus/es'
)[
'ElButton'
]
IconText
:
typeof
import
(
'./src/components/render/IconText/IconText.vue'
)[
'default'
]
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/App.vue
浏览文件 @
bb21ee4c
...
...
@@ -16,5 +16,7 @@ import { JobsInfoEditView } from '@page/jobs-info/jobs-info-edit-view';
-moz-osx-font-smoothing
:
grayscale
;
text-align
:
center
;
color
:
#2c3e50
;
height
:
100%
;
width
:
100%
;
}
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/custom/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
// 项目自定义组件文件夹
export
{}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/
app-dropdown-l
ist.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/
IbizDropdownL
ist.vue
浏览文件 @
bb21ee4c
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/
app-i
nput.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/
IbizI
nput.vue
浏览文件 @
bb21ee4c
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/
app-s
pan.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/
IbizS
pan.vue
浏览文件 @
bb21ee4c
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/editors/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
import
AppInput
from
'./app-input.vue'
;
import
AppDropdownList
from
'./app-dropdown-list.vue'
;
import
AppSpan
from
'./app-span.vue'
;
export
{
AppInput
,
AppDropdownList
,
AppSpan
,
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
export
*
from
'./custom'
export
*
from
'./editors'
export
*
from
'./layout'
export
*
from
'./render'
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/DefaultIndexViewLayout/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
import
DefaultIndexViewLayout
from
'./DefaultIndexViewLayout.vue'
export
const
IbizDefaultIndexViewLayout
=
DefaultIndexViewLayout
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/DefaultViewLayout/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
import
DefaultViewLayout
from
'./DefaultViewLayout.vue'
export
const
IbizDefaultViewLayout
=
DefaultViewLayout
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/
DefaultIndexViewLayout/
DefaultIndexViewLayout.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/
Ibiz
DefaultIndexViewLayout.vue
浏览文件 @
bb21ee4c
...
...
@@ -48,5 +48,8 @@ const props = withDefaults(defineProps<LayoutProps>(), {
background-color
:
#fff
;
justify-content
:
space-between
;
}
.ant-layout-sider
{
overflow-y
:
auto
;
}
}
</
style
>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/
DefaultViewLayout/
DefaultViewLayout.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/
Ibiz
DefaultViewLayout.vue
浏览文件 @
bb21ee4c
<
script
setup
lang=
"ts"
>
// props声明和默认值处理
interface
Props
{
viewCaption
?:
string
showHeader
?:
boolean
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
export
*
from
'./DefaultViewLayout'
;
export
*
from
'./DefaultIndexViewLayout'
;
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/FormGroup/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
import
FormGroup
from
'./FormGroup.vue'
export
const
IbizFormGroup
=
FormGroup
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/FormItem/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
import
FormItem
from
'./FormItem.vue'
export
const
IbizFormItem
=
FormItem
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/
FormGroup/
FormGroup.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/
Ibiz
FormGroup.vue
浏览文件 @
bb21ee4c
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/
FormItem/
FormItem.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/
Ibiz
FormItem.vue
浏览文件 @
bb21ee4c
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/I
conText/
IconText.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/I
biz
IconText.vue
浏览文件 @
bb21ee4c
文件已移动
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/
MenuItem/
MenuItem.vue
→
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/
Ibiz
MenuItem.vue
浏览文件 @
bb21ee4c
...
...
@@ -14,18 +14,22 @@ const props = withDefaults(defineProps<Props>(), {});
<template
v-if=
"!item.items"
>
<a-menu-item
v-if=
"!item.hidden"
:key=
"item.name"
>
<template
#
icon
>
<div
class=
"menu-icon"
>
<UserOutlined
/>
</div>
</
template
>
{{item.caption}}
\
{{item.caption}}
</a-menu-item>
</template>
<
template
v-else
>
<a-sub-menu
v-if=
"!item.hidden"
:key=
"item.name"
>
<template
#
icon
>
<div
class=
"menu-icon"
>
<UserOutlined
/>
</div>
</
template
>
<
template
#
title
>
{{
item
.
caption
}}
</
template
>
<
app-menu-i
tem
:items=
"item.items"
/>
<
template
#
title
>
\
{{
item
.
caption
}}
</
template
>
<
IbizMenuI
tem
:items=
"item.items"
/>
</a-sub-menu>
</template>
</template>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/IconText/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
import
IconText
from
'./IconText.vue'
export
const
IbizIconText
=
IconText
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/MenuItem/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
import
MenuItem
from
'./MenuItem.vue'
export
const
IbizMenuItem
=
MenuItem
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/render/index.ts
已删除
100644 → 0
浏览文件 @
5ef05d72
export
*
from
'./IconText'
;
export
*
from
'./FormItem'
;
export
*
from
'./FormGroup'
;
export
*
from
'./MenuItem'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/edit-view/edit-view-prop.ts
浏览文件 @
bb21ee4c
import
{
MainViewProps
}
from
"@ibiz-core"
;
/**
* 编辑视图props
* @description 编辑视图props
* @export
* @interface EditViewProps
* @extends {MainViewProps}
*/
export
interface
EditViewProps
extends
MainViewProps
{
export
interface
EditViewProps
extends
MainViewProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/edit-view/edit-view-state.ts
浏览文件 @
bb21ee4c
import
{
MainViewState
}
from
"@ibiz-core"
;
/**
* 编辑视图状态
* @description 编辑视图状态
* @export
* @interface EditViewState
* @extends {MainViewState}
*/
export
interface
EditViewState
extends
MainViewState
{
export
interface
EditViewState
extends
MainViewState
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/edit-view/edit-view.ts
浏览文件 @
bb21ee4c
import
{
EditViewProps
,
EditViewState
,
MainView
}
from
'@ibiz-core'
;
/**
* 编辑视图
*
@description
编辑视图
* @export
* @class ViewBase
* @class EditView
* @extends {MainView}
*/
export
class
EditView
extends
MainView
{
/**
* 视图状态
* @description 视图状态
* @type {EditViewState}
* @memberof EditView
*/
public
declare
viewState
:
EditViewState
;
/**
* 使用加载功能模块
* @param props 传入的props
* @description 使用加载功能模块
* @param {EditViewProps} props 传入的props
* @memberof EditView
*/
public
useLoad
(
props
:
EditViewProps
){
const
{
viewSubject
}
=
this
.
viewState
;
...
...
@@ -23,9 +28,11 @@ export class EditView extends MainView {
}
/**
* 安装视图所有功能模块的方法
* @param props 传入的Props
* @param [emit] 事件
* @description 安装视图所有功能模块的方法
* @param {EditViewProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof EditView
*/
public
moduleInstall
(
props
:
EditViewProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/index-view/index-view.ts
浏览文件 @
bb21ee4c
...
...
@@ -19,7 +19,7 @@ export class IndexView extends ViewBase {
public
useLoad
(
props
:
IndexViewProps
){
const
{
viewSubject
}
=
this
.
viewState
;
onMounted
(()
=>
{
viewSubject
.
next
({
tag
:
'menu'
,
action
:
"load"
,
data
:
{}})
viewSubject
.
next
({
tag
:
'
app
menu'
,
action
:
"load"
,
data
:
{}})
})
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/main-view/main-view-prop.ts
浏览文件 @
bb21ee4c
import
{
ViewPropsBase
}
from
'@ibiz-core'
;
/**
* 实体部件的props
* @description 实体部件的props
* @export
* @interface MainViewProps
* @extends {ViewPropsBase}
*/
export
interface
MainViewProps
extends
ViewPropsBase
{
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/main-view/main-view-state.ts
浏览文件 @
bb21ee4c
import
{
ControlAction
,
ViewStateBase
}
from
'@ibiz-core'
;
/**
* 实体部件状态
* @description 实体部件状态
* @export
* @interface MainViewState
* @extends {ViewStateBase}
*/
export
interface
MainViewState
extends
ViewStateBase
{
/**
* 视图所有部件的部件行为
* @description 视图所有部件的部件行为
* @type {Record<string,ControlAction>}
* @memberof MainViewState
*/
controlsAction
:
Record
<
string
,
ControlAction
>
;
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-base.ts
浏览文件 @
bb21ee4c
import
{
ViewPropsBase
,
ViewStateBase
,
toOneWayRef
}
from
'@ibiz-core'
;
/**
* 视图基类
* @description 视图基类
* @export
* @class ViewBase
*/
export
class
ViewBase
{
/**
* 视图状态
* @description 视图状态
* @type {ViewStateBase}
* @memberof ViewBase
*/
public
viewState
:
ViewStateBase
;
/**
*
构造方法,初始化状态
*
Creates an instance of ViewBase.
* @param {*} options 配置参数
* @memberof ViewBase
*/
constructor
(
options
:
any
)
{
this
.
viewState
=
reactive
(
options
);
}
/**
* 根据props调整设置部分视图基类
* @param props 传入的Props
* @description 根据props调整设置部分视图基类
* @param {ViewPropsBase} props 传入参数
* @memberof ViewBase
*/
public
setState
(
props
:
ViewPropsBase
)
{
// todo 项目级配置入口,优先级大于平台,提供全局的一次性配置
...
...
@@ -29,8 +36,10 @@ export class ViewBase {
}
/**
* 使用视图上下文参数逻辑块
* @param props 传入的Props
* @description 使用视图上下文参数逻辑块
* @param {ViewPropsBase} props 传入的Props
* @return {*}
* @memberof ViewBase
*/
public
useViewContextParams
(
props
:
ViewPropsBase
)
{
const
context
=
toOneWayRef
(
props
,
'context'
);
...
...
@@ -48,16 +57,18 @@ export class ViewBase {
}
/**
* 使用计数器服务模块
* @
todo
* @
param props
*
@description
使用计数器服务模块
* @
param {ViewPropsBase} props 传入参数
* @
memberof ViewBase
*/
public
useCounterService
(
props
:
ViewPropsBase
){}
/**
* 安装视图所有功能模块的方法
* @param props 传入的Props
* @param [emit] 事件
* @description 安装视图所有功能模块的方法
* @param {ViewPropsBase} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof ViewBase
*/
public
moduleInstall
(
props
:
ViewPropsBase
,
emit
?:
Function
)
{
this
.
setState
(
props
);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-prop-base.ts
浏览文件 @
bb21ee4c
...
...
@@ -2,26 +2,37 @@ import { Subject } from "rxjs";
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
/**
* 视图props的基类
* @description 视图props的基类
* @export
* @interface ViewPropsBase
*/
export
interface
ViewPropsBase
{
/**
* 上下文参数(外部传入)
* @description 上下文参数(外部传入)
* @type {IParam}
* @memberof ViewPropsBase
*/
context
?:
IParam
;
/**
* 视图参数(外部传入)
* @description 视图参数(外部传入)
* @type {IParam}
* @memberof ViewPropsBase
*/
viewParams
?:
IParam
;
/**
* 视图参数(外部传入)
* @description 视图参数(外部传入)
* @type {Subject<IActionParam>}
* @memberof ViewPropsBase
*/
viewSubject
?:
Subject
<
IActionParam
>
;
/**
* 视图打开方式,路由、模态、内嵌,默认为路由方式
* @description 视图打开方式,默认为路由方式
* @type {("ROUTE" | "MODAL" | "EMBED")} 路由 | 模态 | 内嵌
* @memberof ViewPropsBase
*/
openType
?:
"ROUTE"
|
"MODAL"
|
"EMBED"
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/views/view-base/view-state-base.ts
浏览文件 @
bb21ee4c
import
{
Subject
}
from
"rxjs"
;
import
{
IActionParam
,
IParam
}
from
'@ibiz-core'
;
/**
* 视图基类状态
* @description 视图基类状态
* @export
* @interface ViewStateBase
*/
export
interface
ViewStateBase
{
/**
* 视图名称
* @description 视图名称
* @type {string}
* @memberof ViewStateBase
*/
viewName
:
string
;
/**
* 视图代码名称
* @description 视图代码名称
* @type {string}
* @memberof ViewStateBase
*/
viewCodeName
:
string
;
/**
* 上下文参数
* @description 上下文参数
* @type {IParam}
* @memberof ViewStateBase
*/
context
:
IParam
;
/**
* 视图参数
* @description 视图参数
* @type {IParam}
* @memberof ViewStateBase
*/
viewParams
:
IParam
;
/**
* 视图参数(外部传入)
* @description 视图参数(外部传入)
* @type {Subject<IActionParam>}
* @memberof ViewStateBase
*/
viewSubject
:
Subject
<
IActionParam
>
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/control-base/control-base.ts
浏览文件 @
bb21ee4c
import
{
ControlPropsBase
,
ControlStateBase
,
toOneWayRef
}
from
'@ibiz-core'
;
import
{
RouteLocationNormalizedLoaded
,
Router
,
useRoute
,
useRouter
}
from
'vue-router'
;
/**
* 部件基类
* @description 部件基类
* @export
* @class ControlBase
*/
export
class
ControlBase
{
/**
* 部件状态
* @description 部件状态
* @type {ControlStateBase}
* @memberof ControlBase
*/
public
controlState
:
ControlStateBase
;
/**
* 构造方法,初始化状态
* @description 路由器
* @type {Router}
* @memberof ControlBase
*/
public
router
:
Router
=
useRouter
();
/**
* @description 路由
* @type {RouteLocationNormalizedLoaded}
* @memberof ControlBase
*/
public
route
:
RouteLocationNormalizedLoaded
=
useRoute
();
/**
* Creates an instance of ControlBase.
* @param {*} options 配置参数
* @memberof ControlBase
*/
constructor
(
options
:
any
)
{
this
.
controlState
=
reactive
(
options
);
}
/**
* 根据props调整设置部分部件基类
* @param props 传入的Props
* @description 根据props调整设置部分部件基类
* @param {ControlPropsBase} props 传入props
* @memberof ControlBase
*/
public
setState
(
props
:
ControlPropsBase
)
{
// toDo 项目级配置入口,优先级大于平台,提供全局的一次性配置
...
...
@@ -29,8 +51,10 @@ export class ControlBase {
}
/**
* 使用部件上下文参数逻辑块
* @param props 传入的Props
* @description 使用部件上下文参数逻辑块
* @param {ControlPropsBase} props
* @return {*}
* @memberof ControlBase
*/
public
useControlContextParams
(
props
:
ControlPropsBase
)
{
const
context
=
toOneWayRef
(
props
,
'context'
);
...
...
@@ -44,9 +68,11 @@ export class ControlBase {
}
/**
* 安装部件所有功能模块的方法
* @param props 传入的Props
* @param [emit] 事件
* @description 安装部件所有功能模块的方法
* @param {ControlPropsBase} props 传入的Props
* @param {Function} [emit] 事件
* @return {*}
* @memberof ControlBase
*/
public
moduleInstall
(
props
:
ControlPropsBase
,
emit
?:
Function
)
{
this
.
setState
(
props
);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/control-base/control-prop-base.ts
浏览文件 @
bb21ee4c
...
...
@@ -2,21 +2,30 @@ import { Subject } from "rxjs";
import
{
IActionParam
,
IParam
}
from
"@ibiz-core"
;
/**
* 部件props的基类
* @description 部件props的基类
* @export
* @interface ControlPropsBase
*/
export
interface
ControlPropsBase
{
export
interface
ControlPropsBase
{
/**
* 上下文参数(外部传入)
* @description 上下文参数(外部传入)
* @type {IParam}
* @memberof ControlPropsBase
*/
context
?:
IParam
;
/**
* 视图参数(外部传入)
* @description 视图参数(外部传入)
* @type {IParam}
* @memberof ControlPropsBase
*/
viewParams
?:
IParam
;
/**
* 视图参数(外部传入)
* @description 视图参数(外部传入)
* @type {Subject<IActionParam>}
* @memberof ControlPropsBase
*/
viewSubject
:
Subject
<
IActionParam
>
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/control-base/control-state-base.ts
浏览文件 @
bb21ee4c
...
...
@@ -2,31 +2,44 @@ import { IActionParam, IParam } from "@ibiz-core";
import
{
Subject
}
from
"rxjs"
;
/**
* 部件基类状态
* @description 部件状态基类
* @export
* @interface ControlStateBase
*/
export
interface
ControlStateBase
{
export
interface
ControlStateBase
{
/**
* 部件名称
* @description 部件名称
* @type {string}
* @memberof ControlStateBase
*/
controlName
:
string
;
/**
* 部件代码名称
* @description 部件代码名称
* @type {string}
* @memberof ControlStateBase
*/
controlCodeName
:
string
;
/**
* 上下文参数
* @description 上下文参数
* @type {IParam}
* @memberof ControlStateBase
*/
context
:
IParam
;
/**
* 视图参数
* @description 视图参数
* @type {IParam}
* @memberof ControlStateBase
*/
viewParams
:
IParam
;
/**
* 视图参数(外部传入)
* @description 视图订阅对象
* @type {Subject<IActionParam>}
* @memberof ControlStateBase
*/
viewSubject
:
Subject
<
IActionParam
>
;
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/form-control/form-control-prop.ts
浏览文件 @
bb21ee4c
import
{
MainControlProps
}
from
"@ibiz-core"
;
/**
* 表单部件的props
* @description 表单部件的props
* @export
* @interface FormControlProps
* @extends {MainControlProps}
*/
export
interface
FormControlProps
extends
MainControlProps
{
export
interface
FormControlProps
extends
MainControlProps
{
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/form-control/form-control-state.ts
浏览文件 @
bb21ee4c
import
{
IParam
,
MainControlState
}
from
'@ibiz-core'
;
/**
* 表单部件状态
* @description 表单部件状态
* @export
* @interface FormControlState
* @extends {MainControlState}
*/
export
interface
FormControlState
extends
MainControlState
{
/**
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/form-control/form-control.ts
浏览文件 @
bb21ee4c
import
{
deepCopy
,
FormControlProps
,
FormControlState
,
IActionParam
,
MainControl
}
from
'@ibiz-core'
;
/**
* 表单部件
*
@description
表单部件
* @export
* @class FormControl
* @extends {MainControl}
*/
export
class
FormControl
extends
MainControl
{
/**
* 部件状态
* @description 部件状态
* @type {FormControlState}
* @memberof FormControl
*/
public
declare
controlState
:
FormControlState
;
...
...
@@ -22,15 +26,13 @@ export class FormControl extends MainControl {
}
/**
* 使用加载功能模块
* @param props 传入的props
* @description 使用加载功能模块
* @param {FormControlProps} props 传入的props
* @return {*}
* @memberof FormControl
*/
public
useLoad
(
props
:
FormControlProps
){
const
{
viewSubject
,
controlName
}
=
this
.
controlState
;
/**
* 加载方法
* @param [opt={}]
*/
const
load
=
async
(
opt
:
any
=
{})
=>
{
try
{
const
loadAction
=
this
.
controlState
.
controlAction
.
loadAction
;
...
...
@@ -73,9 +75,11 @@ export class FormControl extends MainControl {
}
/**
* 安装部件所有功能模块的方法
* @param props 传入的Props
* @param [emit] 事件
* @description 安装部件所有功能模块的方法
* @param {FormControlProps} props 传入的Props
* @param {Function} [emit]
* @return {*}
* @memberof FormControl [emit] 事件
*/
public
moduleInstall
(
props
:
FormControlProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/main-control/main-control-prop.ts
浏览文件 @
bb21ee4c
import
{
ControlAction
,
ControlPropsBase
}
from
"@ibiz-core"
;
/**
* 实体部件的props
* @description 实体部件的props
* @export
* @interface MainControlProps
* @extends {ControlPropsBase}
*/
export
interface
MainControlProps
extends
ControlPropsBase
{
export
interface
MainControlProps
extends
ControlPropsBase
{
/**
* 是否显示处理提示(外部控制,优先级高于state)
* @description 是否显示处理提示(外部控制,优先级高于state)
* @type {boolean}
* @memberof MainControlProps
*/
showBusyIndicator
?:
boolean
;
/**
* 部件行为
* @description 部件行为
* @type {ControlAction}
* @memberof MainControlProps
*/
controlAction
:
ControlAction
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/main-control/main-control-state.ts
浏览文件 @
bb21ee4c
import
{
ControlAction
,
ControlStateBase
,
IParam
}
from
"@ibiz-core"
;
/**
* 实体部件状态
* @description 实体部件状态
* @export
* @interface MainControlState
* @extends {ControlStateBase}
*/
export
interface
MainControlState
extends
ControlStateBase
{
export
interface
MainControlState
extends
ControlStateBase
{
/**
* 是否显示处理提示
* @description 是否显示处理提示
* @type {boolean}
* @memberof MainControlState
*/
showBusyIndicator
?:
boolean
;
/**
* 部件行为
* @description 部件行为
* @type {ControlAction}
* @memberof MainControlState
*/
controlAction
:
ControlAction
;
/**
* 部件服务
* @description 部件服务
* @type {IParam}
* @memberof MainControlState
*/
controlService
:
IParam
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/main-control/main-control.ts
浏览文件 @
bb21ee4c
import
{
ControlBase
,
MainControlProps
,
MainControlState
}
from
'@ibiz-core'
;
/**
* 实体部件
*
@description
实体部件
* @export
* @class ControlBase
* @class MainControl
* @extends {ControlBase}
*/
export
class
MainControl
extends
ControlBase
{
/**
* 部件状态
* @description 部件状态
* @type {MainControlState}
* @memberof MainControl
*/
public
declare
controlState
:
MainControlState
;
/**
* 根据props调整设置部件state
* @param props 传入的Props
* @description 根据props调整设置部件state
* @param {MainControlProps} props 传入的Props
* @memberof MainControl
*/
public
setState
(
props
:
MainControlProps
)
{
super
.
setState
(
props
);
...
...
@@ -23,9 +28,11 @@ export class MainControl extends ControlBase {
}
/**
* 安装部件所有功能模块的方法
* @param props 传入的Props
* @param [emit] 事件
* @description 安装部件所有功能模块的方法
* @param {MainControlProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof MainControl
*/
public
moduleInstall
(
props
:
MainControlProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/ibiz-core/modules/widgets/menu-control/menu-control.ts
浏览文件 @
bb21ee4c
import
{
Ref
}
from
'vue'
;
import
{
MenuControlProps
,
MenuControlState
,
IActionParam
,
ControlBase
,
IParam
}
from
'@ibiz-core'
;
/**
...
...
@@ -7,14 +8,17 @@ import { MenuControlProps, MenuControlState, IActionParam, ControlBase, IParam }
* @extends {ControlBase}
*/
export
class
MenuControl
extends
ControlBase
{
/**
* 部件状态
* @description 部件状态
* @type {MenuControlState}
* @memberof MenuControl
*/
public
declare
controlState
:
MenuControlState
;
/**
* @description 根据props调整设置部分部件基类
* @param {MenuControlProps} props
* @param {MenuControlProps} props
菜单输入属性
* @memberof MenuControl
*/
public
setState
(
props
:
MenuControlProps
)
{
...
...
@@ -23,16 +27,6 @@ export class MenuControl extends ControlBase {
this
.
controlState
.
menuAlign
=
toRef
(
props
,
'menuAlign'
)
as
any
;
}
/**
* 修改表单的数据对象的某一属性的值。
* 可通过模块扩展增加一系列相关后续操作。
* @param name 属性名称
* @param value 属性值
*/
public
async
formDataChange
(
name
:
string
,
value
:
any
){
this
.
controlState
.
data
[
name
]
=
value
;
}
/**
* @description 计算有效菜单项
* @param {IParam[]} items 菜单项集合
...
...
@@ -41,9 +35,10 @@ export class MenuControl extends ControlBase {
public
computedEffectiveMenus
(
items
:
IParam
[])
{
items
.
forEach
((
item
:
IParam
)
=>
{
const
{
authService
}
=
this
.
controlState
;
if
(
!
authService
?.
getMenusPermission
?.(
item
))
{
item
.
hidden
=
true
;
}
// TODO 获取菜单权限
// if (!authService?.getMenusPermission?.(item)) {
// item.hidden = true;
// }
if
(
item
.
items
?.
length
>
0
)
{
this
.
computedEffectiveMenus
(
item
.
items
);
}
...
...
@@ -52,13 +47,13 @@ export class MenuControl extends ControlBase {
/**
* @description 处理默认展开项
* @param {IParam[]} items
* @param {IParam[]} items
菜单集合
* @memberof MenuControl
*/
public
handleDefaultOpens
(
items
:
IParam
[],
defaultOpens
:
string
[]
)
{
public
handleDefaultOpens
(
items
:
IParam
[],
defaultOpens
:
Ref
<
string
[]
>
)
{
items
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
expanded
)
{
defaultOpens
=
[...
defaultOpens
,
item
.
id
];
defaultOpens
.
value
=
[...
defaultOpens
.
value
,
item
.
name
];
}
if
(
item
.
items
?.
length
>
0
)
{
this
.
handleDefaultOpens
(
item
.
items
,
defaultOpens
);
...
...
@@ -71,11 +66,11 @@ export class MenuControl extends ControlBase {
* @memberof MenuControl
*/
public
handleDefaultSelect
()
{
const
{
route
,
funcs
,
defaultView
,
menuAlign
}
=
this
.
controlState
;
const
{
funcs
,
defaultView
,
menuAlign
}
=
this
.
controlState
;
const
defaultSelectRef
=
toRef
(
this
.
controlState
,
'defaultSelect'
);
const
dataRef
=
toRef
(
this
.
controlState
,
'menus'
);
if
(
route
?.
matched
?.
length
==
2
)
{
const
[{
},
matched
]
=
route
.
matched
;
if
(
this
.
route
?.
matched
?.
length
==
2
)
{
const
[{
},
matched
]
=
this
.
route
.
matched
;
const
appFunc
:
any
=
funcs
.
find
((
func
:
any
)
=>
Object
.
is
(
func
.
routePath
,
matched
.
path
)
&&
Object
.
is
(
func
.
funcType
,
'APPVIEW'
));
if
(
appFunc
)
{
this
.
computeMenuSelect
(
dataRef
.
value
,
appFunc
.
funcTag
);
...
...
@@ -103,10 +98,10 @@ export class MenuControl extends ControlBase {
* @description 计算菜单选中项
* @param {IParam[]} menus 菜单及he
* @param {string} funcTag 应用标识
* @return {
*
}
* @return {
boolean
}
* @memberof MenuControl
*/
public
computeMenuSelect
(
menus
:
IParam
[],
funcTag
:
string
)
{
public
computeMenuSelect
(
menus
:
IParam
[],
funcTag
:
string
)
:
boolean
{
const
{
funcs
}
=
this
.
controlState
;
const
defaultSelectRef
=
toRef
(
this
.
controlState
,
'defaultSelect'
);
const
defaultOpensRef
=
toRef
(
this
.
controlState
,
'defaultOpens'
);
...
...
@@ -139,19 +134,19 @@ export class MenuControl extends ControlBase {
/**
* @description 获取指定菜单项数据
* @param {IParam[]} menus 菜单集合
* @param {string}
id
指定菜单标识
* @param {string}
name
指定菜单标识
* @return {*}
* @memberof MenuControl
*/
public
compute
(
menus
:
IParam
[],
id
:
string
)
{
const
item
:
any
=
{};
public
compute
(
menus
:
IParam
[],
name
:
string
):
IParam
{
const
item
:
IParam
=
{};
menus
.
some
((
_item
:
any
)
=>
{
if
(
Object
.
is
(
_item
.
id
,
id
))
{
if
(
Object
.
is
(
_item
.
name
,
name
))
{
Object
.
assign
(
item
,
_item
);
return
true
;
}
if
(
_item
.
items
?.
length
>
0
)
{
const
subItem
=
this
.
compute
(
_item
.
items
,
id
);
const
subItem
=
this
.
compute
(
_item
.
items
,
name
);
if
(
Object
.
keys
(
subItem
).
length
>
0
)
{
Object
.
assign
(
item
,
subItem
);
return
true
;
...
...
@@ -172,23 +167,20 @@ export class MenuControl extends ControlBase {
}
/**
* 使用加载功能模块
* @param props 传入的props
* @description 使用加载功能模块
* @param {MenuControlProps} props 传入的props
* @return {*}
* @memberof MenuControl
*/
public
useLoad
(
props
:
MenuControlProps
){
const
{
viewSubject
,
controlName
}
=
this
.
controlState
;
/**
* 加载方法
* @param [opt={}]
*/
const
load
=
async
(
opt
:
any
=
{})
=>
{
const
dataRef
=
toRef
(
this
.
controlState
,
'menus'
);
const
defaultOpensRef
=
toRef
(
this
.
controlState
,
'defaultOpens'
);
this
.
computedEffectiveMenus
(
dataRef
.
value
);
this
.
handleDefaultOpens
(
dataRef
.
value
,
defaultOpensRef
.
value
);
this
.
handleDefaultOpens
(
dataRef
.
value
,
defaultOpensRef
);
this
.
handleDefaultSelect
();
}
// 订阅viewSubject,监听load行为
if
(
viewSubject
){
let
subscription
=
viewSubject
.
subscribe
(({
tag
,
action
,
data
}:
IActionParam
)
=>
{
...
...
@@ -206,28 +198,34 @@ export class MenuControl extends ControlBase {
}
}
public
menuSelect
(
$event
:
any
)
{
console
.
log
(
$event
);
/**
* @description 菜单项选中
* @param {IParam} $event 选中项数据
* @memberof MenuControl
*/
public
menuSelect
(
$event
:
IParam
)
{
const
{
key
}
=
$event
;
const
dataRef
=
toRef
(
this
.
controlState
,
'menus'
);
let
item
=
this
.
compute
(
dataRef
.
value
,
''
);
let
item
=
this
.
compute
(
dataRef
.
value
,
key
);
if
(
Object
.
keys
(
item
).
length
>
0
)
{
this
.
menuClick
(
item
);
}
}
/**
* 安装部件所有功能模块的方法
* @param props 传入的Props
* @param [emit] 事件
* @description 安装部件所有功能模块的方法
* @param {MenuControlProps} props 传入的Props
* @param {Function} [emit] [emit] 事件
* @return {*}
* @memberof MenuControl
*/
public
moduleInstall
(
props
:
MenuControlProps
,
emit
?:
Function
)
{
const
superParams
=
super
.
moduleInstall
(
props
,
emit
);
const
{
load
}
=
this
.
useLoad
(
props
)
const
menuSelect
=
this
.
menuSelect
.
bind
(
this
);
this
.
menuSelect
=
(
$event
:
any
)
=>
{
menuSelect
(
$event
)
this
.
menuSelect
=
(
$event
:
IParam
)
=>
{
menuSelect
(
$event
)
;
}
return
{
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@APPINDEXVIEW}}.vue.hbs
浏览文件 @
bb21ee4c
...
...
@@ -3,13 +3,15 @@ import { Subject } from 'rxjs'
import
{
Ref
}
from
'vue'
;
import
{
IndexView
,
IActionParam
,
IParam
}
from
'@ibiz-core'
;
import
{
ViewConfig
}
from
'./
{{
page
.
codeName
.
spinalCase
}}
-config'
;
import
{
IbizDefaultIndexViewLayout
}
from
'@components'
;
{{#
page
.
ctrls
}}
{{#
eq
controlType
"APPMENU"
}}
import
{
{{
codeName
}}
Menu
}
from
'@widgets/app/
{{
codeName
.
spinalCase
}}
-menu'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
// props声明和默认值处理
import
{
MenuUnfoldOutlined
,
MenuFoldOutlined
}
from
'@ant-design/icons-vue'
;
interface
Props
{
context
:
IParam
;
viewParams
?:
IParam
;
...
...
@@ -22,8 +24,7 @@ const props = withDefaults(defineProps<Props>(), {
})
interface
ViewEmit
{
(
name
:
"CLOSE"
,
value
:
IActionParam
):
void
;
(
name
:
"VIEWCHANGE"
,
value
:
IActionParam
):
void
;
(
name
:
"viewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
...
...
@@ -37,9 +38,7 @@ const collapsed: Ref<boolean> = ref(false);
<IbizDefaultIndexViewLayout
class=
"ibiz-index-view"
:menuAlign=
"state.menuAlign"
:collapsed=
"collapsed"
>
<template
#
header
>
<div
class=
"index-view-header"
>
{{{
{
raw-loud
}}}
}
{{
state
.
viewCaption
}}
{{{
{
/
raw-loud
}}}
}
\{{state.viewCaption}}
<MenuUnfoldOutlined
v-if=
"collapsed"
class=
"trigger"
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/page/{{appModules}}/{{pages}}/{{pages@DEEDITVIEW}}.vue.hbs
浏览文件 @
bb21ee4c
...
...
@@ -7,7 +7,6 @@ import { ViewConfig } from './{{page.codeName.spinalCase}}-config';
import
{
{{
codeName
}}
Form
}
from
'@widgets/
{{
appEntity
.
codeName
.
spinalCase
}}
/
{{
codeName
.
spinalCase
}}
-form'
;
{{/
eq
}}
{{/
page
.
ctrls
}}
import
{
IbizDefaultViewLayout
,
IbizIconText
}
from
'@components'
;
// props声明和默认值处理
interface
Props
{
...
...
@@ -24,8 +23,7 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
ViewEmit
{
(
name
:
"CLOSE"
,
value
:
IActionParam
):
void
;
(
name
:
"VIEWCHANGE"
,
value
:
IActionParam
):
void
;
(
name
:
"viewEvent"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
ViewEmit
>
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu-config.ts.hbs
浏览文件 @
bb21ee4c
...
...
@@ -2,6 +2,8 @@
export const CtrlConfig = {
controlCodeName: '
{{
ctrl
.
codeName
}}
',
controlName: '
{{
ctrl
.
name
}}
',
defaultOpens: [],
defaultSelect: [],
menus: [
{{#
each
ctrl
.
pSAppMenuItems
as
|
item
|
}}
{{>
(
lookup
'MENUITEM'
)
item
=
item
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
浏览文件 @
bb21ee4c
...
...
@@ -2,8 +2,6 @@
import
{
Subject
}
from
"rxjs"
;
import
{
CtrlConfig
}
from
"./
{{
ctrl
.
codeName
.
spinalCase
}}
-menu-config"
;
import
{
IParam
,
IActionParam
,
MenuControl
}
from
"@ibiz-core"
;
import
{
IbizMenuItem
}
from
"@components"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
interface
Props
{
context
:
IParam
;
defaultView
:
string
;
...
...
@@ -17,11 +15,8 @@ const props = withDefaults(defineProps<Props>(), {
collapsed
:
false
,
});
const
router
=
useRouter
();
const
route
=
useRoute
();
interface
CtrlEmit
{
(
name
:
"
Ctrl
"
,
value
:
IActionParam
):
void
;
(
name
:
"
ctrlEvent
"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@FORM}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
bb21ee4c
...
...
@@ -3,7 +3,6 @@
import
{
Subject
}
from
'rxjs'
;
import
{
CtrlConfig
}
from
'./
{{
ctrl
.
codeName
.
spinalCase
}}
-form-config'
;
import
{
FormControl
,
IActionParam
,
IParam
,
ControlAction
}
from
'@ibiz-core'
;
import
{
IbizFormItem
,
IbizFormGroup
}
from
'@components'
;
interface
Props
{
context
:
IParam
;
...
...
@@ -20,7 +19,7 @@ const props = withDefaults(defineProps<Props>(), {
// emit声明
interface
CtrlEmit
{
(
name
:
"
Ctrl
"
,
value
:
IActionParam
):
void
;
(
name
:
"
ctrlEvent
"
,
value
:
IActionParam
):
void
;
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录