Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
e5c979ce
提交
e5c979ce
编写于
11月 03, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
6679461e
变更
2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
95 行增加
和
41 行删除
+95
-41
app-preset-button.vue
...ement/interactive/app-preset-button/app-preset-button.vue
+67
-39
panel-button.ts
src/model/panel-detail/panel-button.ts
+28
-2
未找到文件。
src/components/layout-element/interactive/app-preset-button/app-preset-button.vue
浏览文件 @
e5c979ce
<
template
>
<i-button
:class=
"className"
:class=
"curClassName"
:style=
"curStyle"
:type=
"buttonType"
:disabled=
"disabled"
:title=
"tooltip"
...
...
@@ -45,67 +46,91 @@ export default class AppPresetButton extends Vue {
@
Prop
()
public
caption
?:
string
;
/**
*
显示标题
*
加载状态
*
* @memberof AppPresetButton
*/
@
Prop
({
default
:
true
})
public
showCaption
!
:
boolean
;
@
Prop
({
default
:
false
})
public
loading
?
:
boolean
;
/**
*
禁用状态
*
布局模型详情
*
* @type {*}
* @memberof AppPresetButton
*/
@
Prop
(
{
default
:
false
})
public
disabled
?:
boolean
;
@
Prop
(
)
public
layoutModelDetails
:
any
;
/**
* 加载状态
*
* @memberof AppPresetButton
*/
@
Prop
({
default
:
false
})
public
loading
?:
boolean
;
/**
* 传入数据
* 显示标题
*
* @memberof AppPresetButton
*/
@
Prop
()
public
data
:
any
;
get
showCaption
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
showCaption
;
}
/**
*
图标
*
类名
*
* @memberof AppPresetButton
*/
@
Prop
()
public
cssClass
?:
string
;
get
curClassName
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-preset-button
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 图片路径
*
* @memberof AppPresetButton
*/
@
Prop
()
public
imagePath
?:
string
;
get
imagePath
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
let
imagePath
=
''
;
if
(
layoutModel
.
sysImage
)
{
imagePath
=
layoutModel
.
sysImage
.
imagePath
;
}
else
if
(
layoutModel
.
uiAction
)
{
imagePath
=
layoutModel
.
uiAction
.
imagePath
;
}
return
imagePath
;
}
/**
*
按钮绘制模式
*
图标
*
* @memberof AppPresetButton
*/
@
Prop
({
default
:
'BUTTON'
})
public
renderMode
!
:
'BUTTON'
|
'LINK'
;
get
cssClass
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
let
cssClass
=
''
;
if
(
layoutModel
.
sysImage
)
{
cssClass
=
layoutModel
.
sysImage
.
iconcls
;
}
else
if
(
layoutModel
.
uiAction
)
{
cssClass
=
layoutModel
.
uiAction
.
iconcls
;
}
return
cssClass
;
}
/**
*
按钮
样式
*
*
当前容器
样式
*
* @memberof AppPresetButton
*/
@
Prop
({
default
:
'DEFAULT'
})
public
buttonStyle
!
:
'DEFAULT'
|
'INVERSE'
|
'PRIMARY'
|
'INFO'
|
'SUCCESS'
|
'WARNING'
|
'DANGER'
|
'STYLE2'
|
'STYLE3'
|
'STYLE4'
;
get
curStyle
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getElementStyle
();
}
/**
*
按钮图标方向
*
*
禁用
*
* @memberof AppPresetButton
*/
@
Prop
({
default
:
'LEFT'
})
public
iconAlign
!
:
'LEFT'
|
'TOP'
|
'RIGHT'
|
'BOTTOM'
;
get
disabled
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
disabled
;
}
/**
* 按钮类型
...
...
@@ -113,42 +138,45 @@ export default class AppPresetButton extends Vue {
* @memberof AppPresetButton
*/
get
buttonType
()
{
if
(
Object
.
is
(
this
.
renderMode
,
'LINK'
))
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
if
(
Object
.
is
(
layoutModel
.
renderMode
,
'LINK'
))
{
return
'text'
;
}
else
{
if
(
Object
.
is
(
this
.
buttonStyle
,
'DEFAULT'
)
||
Object
.
is
(
this
.
buttonStyle
,
'STYLE2'
)
||
Object
.
is
(
this
.
buttonStyle
,
'STYLE3'
)
||
Object
.
is
(
this
.
buttonStyle
,
'STYLE4'
)
Object
.
is
(
layoutModel
.
buttonStyle
,
'DEFAULT'
)
||
Object
.
is
(
layoutModel
.
buttonStyle
,
'STYLE2'
)
||
Object
.
is
(
layoutModel
.
buttonStyle
,
'STYLE3'
)
||
Object
.
is
(
layoutModel
.
buttonStyle
,
'STYLE4'
)
)
{
return
'default'
;
}
else
if
(
Object
.
is
(
this
.
buttonStyle
,
'DANGER'
))
{
}
else
if
(
Object
.
is
(
layoutModel
.
buttonStyle
,
'DANGER'
))
{
return
'error'
;
}
else
if
(
Object
.
is
(
this
.
buttonStyle
,
'INVERSE'
))
{
}
else
if
(
Object
.
is
(
layoutModel
.
buttonStyle
,
'INVERSE'
))
{
return
'primary'
;
}
else
{
return
this
.
buttonStyle
.
toLowerCase
();
return
layoutModel
.
buttonStyle
.
toLowerCase
();
}
}
}
/**
*
按钮幽灵属性,使按钮背景透明
*
图标方向
*
* @memberof AppPresetButton
*/
get
buttonGhost
()
{
return
Object
.
is
(
this
.
buttonStyle
,
'INVERSE'
);
get
iconAlign
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
iconAlign
||
'LEFT'
;
}
/**
*
类名
*
按钮幽灵属性,使按钮背景透明
*
* @memberof AppPresetButton
*/
get
className
():
string
{
return
`app-preset-button
${
this
.
name
}
`
;
get
buttonGhost
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
Object
.
is
(
layoutModel
.
buttonStyle
,
'INVERSE'
);
}
/**
...
...
src/model/panel-detail/panel-button.ts
浏览文件 @
e5c979ce
...
...
@@ -11,9 +11,12 @@ export class PanelButtonModel extends PanelDetailModel {
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
ui
action
=
opts
.
uia
ction
;
this
.
ui
Action
=
opts
.
uiA
ction
;
this
.
buttonStyle
=
opts
.
buttonStyle
;
this
.
renderMode
=
opts
.
renderMode
;
this
.
iconAlign
=
opts
.
iconAlign
||
'LEFT'
;
this
.
showCaption
=
opts
.
showCaption
?
true
:
false
;
this
.
disabled
=
opts
.
disabled
?
true
:
false
;
}
/**
...
...
@@ -22,8 +25,31 @@ export class PanelButtonModel extends PanelDetailModel {
* @type {*}
* @memberof PanelButtonModel
*/
public
ui
a
ction
:
any
;
public
ui
A
ction
:
any
;
/**
* 图标方向
*
* @type {('LEFT' | 'TOP' | 'RIGHT' | 'BOTTOM')}
* @memberof PanelButtonModel
*/
public
iconAlign
:
'LEFT'
|
'TOP'
|
'RIGHT'
|
'BOTTOM'
;
/**
* 是否禁用
*
* @type {boolean}
* @memberof PanelButtonModel
*/
public
disabled
:
boolean
=
false
;
/**
* 显示标题
*
* @type {boolean}
* @memberof PanelButtonModel
*/
public
showCaption
:
boolean
=
true
;
/**
* @description 按钮类型
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录