Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
4bb9ccb2
提交
4bb9ccb2
编写于
11月 03, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
44035a82
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
255 行增加
和
98 行删除
+255
-98
app-preset-qrcode.vue
...ement/interactive/app-preset-qrcode/app-preset-qrcode.vue
+22
-3
app-preset-switch.vue
...ement/interactive/app-preset-switch/app-preset-switch.vue
+26
-5
app-preset-text-input.vue
...teractive/app-preset-text-input/app-preset-text-input.vue
+41
-9
app-preset-caption.vue
...ut-element/text/app-preset-caption/app-preset-caption.vue
+23
-4
app-preset-text.vue
...s/layout-element/text/app-preset-text/app-preset-text.vue
+74
-72
app-preset-title.vue
...layout-element/text/app-preset-title/app-preset-title.vue
+22
-3
panel-raw-item.ts
src/model/panel-detail/panel-raw-item.ts
+47
-2
未找到文件。
src/components/layout-element/interactive/app-preset-qrcode/app-preset-qrcode.vue
浏览文件 @
4bb9ccb2
<
template
>
<div
:class=
"c
lassNam
e"
>
<div
:class=
"c
urClassName"
:style=
"curStyl
e"
>
<template
v-if=
"QRCodeConfig.url"
>
<ibiz-qr-code
:size=
"QRCodeConfig.size"
...
...
@@ -40,13 +40,32 @@ export default class AppPresetQrCode extends Vue {
*/
@
Prop
()
public
name
!
:
string
;
/**
* 布局模型详情
*
* @type {*}
* @memberof AppPresetQrCode
*/
@
Prop
()
public
layoutModelDetails
:
any
;
/**
* 类名
*
* @memberof AppPresetQrCode
*/
get
className
():
string
{
return
`app-preset-qrcode
${
this
.
name
}
`
;
get
curClassName
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-preset-qrcode
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 当前容器样式
*
* @memberof AppPresetQrCode
*/
get
curStyle
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getElementStyle
();
}
/**
...
...
src/components/layout-element/interactive/app-preset-switch/app-preset-switch.vue
浏览文件 @
4bb9ccb2
<
template
>
<el-switch
:class=
"classNam
e"
v-model=
"curValue"
:disabled=
"disabled"
></el-switch>
<el-switch
:class=
"curClassName"
:style=
"curStyl
e"
v-model=
"curValue"
:disabled=
"disabled"
></el-switch>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -24,20 +24,41 @@ export default class AppPresetSwitch extends Vue {
@
Prop
()
public
name
!
:
string
/**
*
名称
*
布局模型详情
*
* @type {*}
* @memberof AppPresetSwitch
*/
@
Prop
(
{
default
:
false
})
public
disabled
?:
boolean
@
Prop
(
)
public
layoutModelDetails
:
any
;
/**
* 类名
*
* @memberof AppPresetSwitch
*/
get
className
():
string
{
return
`app-preset-switch
${
this
.
name
}
`
;
get
curClassName
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-preset-switch
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 当前容器样式
*
* @memberof AppPresetSwitch
*/
get
curStyle
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getElementStyle
();
}
/**
* 禁用
*
* @memberof AppPresetSwitch
*/
get
disabled
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
disabled
;
}
/**
...
...
src/components/layout-element/interactive/app-preset-text-input/app-preset-text-input.vue
浏览文件 @
4bb9ccb2
<
template
>
<div
:class=
"c
lassNam
e"
>
<div
:class=
"c
urClassName"
:style=
"curStyl
e"
>
<el-input
v-model=
"curValue"
:placeholder=
"placeholder"
></el-input>
</div>
</
template
>
...
...
@@ -26,20 +26,52 @@ export default class AppPresetTextInput extends Vue {
@
Prop
()
public
name
!
:
string
;
/**
*
禁用
*
布局模型详情
*
* @type {
boolean
}
* @memberof AppPreset
TextInput
* @type {
*
}
* @memberof AppPreset
Switch
*/
@
Prop
()
public
disabled
?:
boolean
;
@
Prop
()
public
layoutModelDetails
:
any
;
/**
*
占位文本
*
类名
*
* @type {string}
* @memberof AppPresetTextInput
* @memberof AppPresetSwitch
*/
@
Prop
({
default
:
''
})
public
placeholder
?:
string
;
get
curClassName
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-preset-text-input
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 禁用
*
* @memberof AppPresetSwitch
*/
get
disabled
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
disabled
;
}
/**
* 当前容器样式
*
* @memberof AppPresetSwitch
*/
get
curStyle
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getElementStyle
();
}
/**
* 占位提示
*
* @memberof AppPresetSwitch
*/
get
placeholder
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
placeholder
||
''
;
}
/**
* 类名
...
...
src/components/layout-element/text/app-preset-caption/app-preset-caption.vue
浏览文件 @
4bb9ccb2
<
template
>
<div
:class=
"c
lassNam
e"
>
<div
:class=
"c
urClassName"
:style=
"curStyl
e"
>
<slot></slot>
</div>
</
template
>
...
...
@@ -18,13 +18,32 @@ export default class AppPresetCaption extends Vue {
*/
@
Prop
()
public
name
!
:
string
;
/**
* 布局模型详情
*
* @type {*}
* @memberof AppPresetCaption
*/
@
Prop
()
public
layoutModelDetails
:
any
;
/**
* 类名
*
* @memberof AppPresetText
* @memberof AppPresetCaption
*/
get
curClassName
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-preset-caption
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 当前容器样式
*
* @memberof AppPresetCaption
*/
get
className
():
string
{
return
`app-preset-caption
${
this
.
name
}
`
;
get
curStyle
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getElementStyle
();
}
}
</
script
>
...
...
src/components/layout-element/text/app-preset-text/app-preset-text.vue
浏览文件 @
4bb9ccb2
<
template
>
<div
:class=
"c
lassNam
e"
>
<div
:class=
"c
urClassName"
:style=
"curStyl
e"
>
<!-- 直接内容类型 -->
<template
v-if=
"Object.is(contentType, 'RAW')"
>
<template
v-if=
"Object.is(renderMode, 'TEXT')"
>
<span
:style=
"c
ss
Style"
>
{{
content
}}
</span>
<span
:style=
"c
ontent
Style"
>
{{
content
}}
</span>
</
template
>
<
template
v-else-if=
"Object.is(renderMode, 'HEADING1')"
>
<h1
:style=
"c
ss
Style"
>
{{
content
}}
</h1>
<h1
:style=
"c
ontent
Style"
>
{{
content
}}
</h1>
</
template
>
<
template
v-else-if=
"Object.is(renderMode, 'HEADING2')"
>
<h2
:style=
"c
ss
Style"
>
{{
content
}}
</h2>
<h2
:style=
"c
ontent
Style"
>
{{
content
}}
</h2>
</
template
>
<
template
v-else-if=
"Object.is(renderMode, 'HEADING3')"
>
<h3
:style=
"c
ss
Style"
>
{{
content
}}
</h3>
<h3
:style=
"c
ontent
Style"
>
{{
content
}}
</h3>
</
template
>
<
template
v-else-if=
"Object.is(renderMode, 'HEADING4')"
>
<h4
:style=
"c
ss
Style"
>
{{
content
}}
</h4>
<h4
:style=
"c
ontent
Style"
>
{{
content
}}
</h4>
</
template
>
<
template
v-else-if=
"Object.is(renderMode, 'HEADING5')"
>
<h5
:style=
"c
ss
Style"
>
{{
content
}}
</h5>
<h5
:style=
"c
ontent
Style"
>
{{
content
}}
</h5>
</
template
>
<
template
v-else-if=
"Object.is(renderMode, 'HEADING6')"
>
<h6
:style=
"c
ss
Style"
>
{{
content
}}
</h6>
<h6
:style=
"c
ontent
Style"
>
{{
content
}}
</h6>
</
template
>
<
template
v-else-if=
"Object.is(renderMode, 'PARAGRAPH')"
>
<p
:style=
"c
ss
Style"
>
{{
content
}}
</p>
<p
:style=
"c
ontent
Style"
>
{{
content
}}
</p>
</
template
>
</template>
<!-- 图片类型 -->
<
template
v-else-if=
"Object.is(contentType, 'IMAGE')"
>
<img
:style=
"c
ssStyle"
v-if=
"imgUrl"
:src=
"imgUrl
"
/>
<i
:style=
"c
ssStyle"
v-else
:class=
"imageClass ? imageClass : ''
"
></i>
<img
:style=
"c
ontentStyle"
v-if=
"imagePath"
:src=
"imagePath
"
/>
<i
:style=
"c
ontentStyle"
v-else
:class=
"cssClass
"
></i>
</
template
>
<!-- HTML类型 -->
<
template
v-else-if=
"Object.is(contentType, 'HTML')"
>
<div
:style=
"c
ss
Style"
v-html=
"content"
/>
<div
:style=
"c
ontent
Style"
v-html=
"content"
/>
</
template
>
<!-- MARKDOWN类型 -->
<
template
v-else-if=
"Object.is(contentType, 'MARKDOWN')"
>
MARKDOWN暂未支持
<!--
<app-markdown-editor
:style=
"c
ss
Style"
mode=
"PREVIEWONLY"
:itemValue=
"value"
></app-markdown-editor>
-->
<!--
<app-markdown-editor
:style=
"c
ontent
Style"
mode=
"PREVIEWONLY"
:itemValue=
"value"
></app-markdown-editor>
-->
</
template
>
</div>
</template>
...
...
@@ -67,109 +67,111 @@ export default class AppPresetText extends Vue {
@
Prop
()
public
name
!
:
string
;
/**
*
内容类型
*
布局模型详情
*
* @type {
string
}
* @memberof AppPresetT
ext
* @type {
*
}
* @memberof AppPresetT
itle
*/
@
Prop
(
{
default
:
'RAW'
})
public
contentType
!
:
'RAW'
|
'HTML'
|
'IMAGE'
|
'MARKDOWN'
;
@
Prop
(
)
public
layoutModelDetails
:
any
;
/**
*
绘制模式
*
图标
*
* @type {string}
* @memberof AppPresetText
*/
@
Prop
(
{
default
:
'TEXT'
})
public
renderMode
!
:
'TEXT'
|
'HEADING1'
|
'HEADING2'
|
'HEADING3'
|
'HEADING4'
|
'HEADING5'
|
'HEADING6'
|
'PARAGRAPH'
;
@
Prop
(
)
public
imageClass
?:
string
;
/**
*
内容样式
*
图片路径
*
* @type {string}
* @memberof AppPresetText
*/
@
Prop
()
public
contentStyle
?:
string
;
get
imagePath
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
imagePath
;
}
/**
*
预置类型
*
图标
*
* @type {string}
* @memberof AppPresetText
* @memberof AppPresetTitle
*/
@
Prop
({
default
:
'STATIC_TEXT'
})
public
predefinedType
!
:
'FIELD_TEXT_DYNAMIC'
|
'STATIC_LABEL'
|
'STATIC_TEXT'
;
get
cssClass
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
iconcls
;
}
/**
*
图标
*
类名
*
* @memberof AppPresetT
ext
* @memberof AppPresetT
itle
*/
@
Prop
()
public
imageClass
?:
string
;
get
curClassName
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-preset-text app-preset-text--
${
layoutModel
.
contentType
.
toLowerCase
()}
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
*
图片路径
*
* @memberof AppPresetT
ext
*
当前容器样式
*
* @memberof AppPresetT
itle
*/
@
Prop
()
public
imgUrl
?:
string
;
get
curStyle
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getElementStyle
();
}
/**
*
样
式
*
* @memberof AppPresetT
ext
*
绘制模
式
*
* @memberof AppPresetT
itle
*/
protected
cssStyle
:
string
=
''
;
get
renderMode
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
renderMode
;
}
/**
* 内容
*
* @memberof AppPresetText
*/
get
content
():
string
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
let
content
=
this
.
value
;
if
(
this
.
contentType
==
'HTML'
)
{
const
items
=
content
.
match
(
/
\{
{
(
.+
?)\}
}/g
);
if
(
items
)
{
items
.
forEach
((
item
:
string
)
=>
{
content
=
content
.
replace
(
/
\{
{
(
.+
?)\}
}/
,
eval
(
item
.
substring
(
2
,
item
.
length
-
2
)));
});
if
(
layoutModel
.
predefinedType
!==
'FIELD_TEXT_DYNAMIC'
)
{
if
(
layoutModel
.
contentType
==
'ROW'
)
{
content
=
layoutModel
.
rawContent
;
}
else
if
(
layoutModel
.
contentType
==
'HTML'
)
{
content
=
layoutModel
.
htmlContent
;
const
items
=
content
.
match
(
/
\{
{
(
.+
?)\}
}/g
);
if
(
items
)
{
items
.
forEach
((
item
:
string
)
=>
{
content
=
content
.
replace
(
/
\{
{
(
.+
?)\}
}/
,
eval
(
item
.
substring
(
2
,
item
.
length
-
2
)));
});
}
content
=
content
.
replaceAll
(
'<'
,
'<'
);
content
=
content
.
replaceAll
(
'>'
,
'>'
);
content
=
content
.
replaceAll
(
'&nbsp;'
,
' '
);
content
=
content
.
replaceAll
(
' '
,
' '
);
}
content
=
content
.
replaceAll
(
'<'
,
'<'
);
content
=
content
.
replaceAll
(
'>'
,
'>'
);
content
=
content
.
replaceAll
(
'&nbsp;'
,
' '
);
content
=
content
.
replaceAll
(
' '
,
' '
);
}
return
content
;
}
/**
* 类名
*
* @memberof AppPresetText
*/
get
className
():
string
{
return
`app-preset-text app-preset-text--
${
this
.
contentType
.
toLowerCase
()}
${
this
.
name
}
`
;
}
/**
* Vue生命周期 --- Created
*
* @memberof AppPresetText
*/
created
()
{
this
.
handleText
();
}
/**
* 处理文本
* 内容样式
*
* @memberof AppPresetText
*/
protected
handleText
()
{
if
(
this
.
predefinedType
===
'STATIC_LABEL'
)
{
this
.
cssStyle
+=
"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
;
get
contentStyle
():
string
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
let
contentStyle
=
layoutModel
.
contentStyle
;
if
(
layoutModel
.
predefinedType
===
'STATIC_LABEL'
)
{
contentStyle
+=
"white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"
;
}
return
contentStyle
;
}
}
</
script
>
<
style
lang=
"less"
>
...
...
src/components/layout-element/text/app-preset-title/app-preset-title.vue
浏览文件 @
4bb9ccb2
<
template
>
<h1
:class=
"c
lassNam
e"
>
{{
curValue
}}
</h1>
<h1
:class=
"c
urClassName"
:style=
"curStyl
e"
>
{{
curValue
}}
</h1>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -16,13 +16,32 @@ export default class AppPresetTitle extends Vue {
*/
@
Prop
()
public
name
!
:
string
;
/**
* 布局模型详情
*
* @type {*}
* @memberof AppPresetTitle
*/
@
Prop
()
public
layoutModelDetails
:
any
;
/**
* 类名
*
* @memberof AppPresetTitle
*/
get
className
():
string
{
return
`app-preset-title
${
this
.
name
}
`
;
get
curClassName
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-preset-title
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 当前容器样式
*
* @memberof AppPresetTitle
*/
get
curStyle
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getElementStyle
();
}
/**
...
...
src/model/panel-detail/panel-raw-item.ts
浏览文件 @
4bb9ccb2
...
...
@@ -27,6 +27,48 @@ export class PanelRawitemModel extends PanelDetailModel {
*/
private
readonly
viewType
:
string
;
/**
* 绘制模式
*
* @private
* @type {('TEXT' | 'HEADING1' | 'HEADING2' | 'HEADING3' | 'HEADING4' | 'HEADING5' | 'HEADING6' | 'PARAGRAPH')}
* @memberof PanelRawitemModel
*/
public
renderMode
:
'TEXT'
|
'HEADING1'
|
'HEADING2'
|
'HEADING3'
|
'HEADING4'
|
'HEADING5'
|
'HEADING6'
|
'PARAGRAPH'
=
'TEXT'
;
/**
* 内容类型
*
* @private
* @type {('RAW' | 'HTML' | 'IMAGE' | 'MARKDOWN')}
* @memberof PanelRawitemModel
*/
public
contentType
:
'RAW'
|
'HTML'
|
'IMAGE'
|
'MARKDOWN'
=
'RAW'
;
/**
* 内容样式
*
* @type {string}
* @memberof PanelRawitemModel
*/
public
contentStyle
!
:
string
;
/**
* 直接内容
*
* @type {string}
* @memberof PanelRawitemModel
*/
public
rawContent
!
:
string
;
/**
* html内容
*
* @type {string}
* @memberof PanelRawitemModel
*/
public
htmlContent
!
:
string
;
/**
* Creates an instance of PanelRawitemModel.
* @param {*} [opts={}]
...
...
@@ -35,6 +77,11 @@ export class PanelRawitemModel extends PanelDetailModel {
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
this
.
viewType
=
opts
.
viewType
;
this
.
renderMode
=
opts
.
renderMode
?
opts
.
renderMode
:
'TEXT'
;
this
.
contentType
=
opts
.
contentType
?
opts
.
contentType
:
'RAW'
;
this
.
contentStyle
=
opts
.
contentStyle
;
this
.
rawContent
=
opts
.
rawContent
;
this
.
htmlContent
=
opts
.
htmlContent
;
}
/**
...
...
@@ -83,6 +130,4 @@ export class PanelRawitemModel extends PanelDetailModel {
}
return
false
;
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录