Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
1aef406f
提交
1aef406f
编写于
11月 03, 2022
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
a6436eee
变更
11
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
372 行增加
和
46 行删除
+372
-46
app-register.ts
src/app-register.ts
+6
-1
app-preset-qrcode.less
...ment/interactive/app-preset-qrcode/app-preset-qrcode.less
+9
-0
app-preset-qrcode.vue
...ement/interactive/app-preset-qrcode/app-preset-qrcode.vue
+139
-0
app-preset-switch.less
...ment/interactive/app-preset-switch/app-preset-switch.less
+4
-0
app-preset-switch.vue
...ement/interactive/app-preset-switch/app-preset-switch.vue
+67
-0
app-preset-text-input.less
...eractive/app-preset-text-input/app-preset-text-input.less
+10
-0
app-preset-text-input.vue
...teractive/app-preset-text-input/app-preset-text-input.vue
+75
-0
app-preset-caption.vue
...ut-element/text/app-preset-caption/app-preset-caption.vue
+21
-3
app-preset-text.less
.../layout-element/text/app-preset-text/app-preset-text.less
+2
-2
app-preset-text.vue
...s/layout-element/text/app-preset-text/app-preset-text.vue
+21
-38
app-preset-title.vue
...layout-element/text/app-preset-title/app-preset-title.vue
+18
-2
未找到文件。
src/app-register.ts
浏览文件 @
1aef406f
...
@@ -128,7 +128,9 @@ import AppLoginNoteVerify from './components/layout-element/login/app-login-note
...
@@ -128,7 +128,9 @@ import AppLoginNoteVerify from './components/layout-element/login/app-login-note
import
AppRawItemImage
from
'./components/layout-element/media/app-rawitem-image/app-rawitem-image.vue'
;
import
AppRawItemImage
from
'./components/layout-element/media/app-rawitem-image/app-rawitem-image.vue'
;
import
AppRawItemCarousel
from
'./components/layout-element/media/app-rawitem-carousel/app-rawitem-carousel.vue'
;
import
AppRawItemCarousel
from
'./components/layout-element/media/app-rawitem-carousel/app-rawitem-carousel.vue'
;
import
AppRawItemVideo
from
'./components/layout-element/media/app-rawitem-video/app-rawitem-video.vue'
;
import
AppRawItemVideo
from
'./components/layout-element/media/app-rawitem-video/app-rawitem-video.vue'
;
import
AppPresetQrCode
from
'./components/layout-element/interactive/app-preset-qrcode/app-preset-qrcode.vue'
;
import
AppPresetSwitch
from
'./components/layout-element/interactive/app-preset-switch/app-preset-switch.vue'
;
import
AppPresetTextInput
from
'./components/layout-element/interactive/app-preset-text-input/app-preset-text-input.vue'
;
// 全局挂载UI实体服务注册中心
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
// 全局挂载实体权限服务注册中心
// 全局挂载实体权限服务注册中心
...
@@ -271,5 +273,8 @@ export const AppComponents = {
...
@@ -271,5 +273,8 @@ export const AppComponents = {
v
.
component
(
'app-rawitem-image'
,
AppRawItemImage
);
v
.
component
(
'app-rawitem-image'
,
AppRawItemImage
);
v
.
component
(
'app-rawitem-carousel'
,
AppRawItemCarousel
);
v
.
component
(
'app-rawitem-carousel'
,
AppRawItemCarousel
);
v
.
component
(
'app-rawitem-video'
,
AppRawItemVideo
);
v
.
component
(
'app-rawitem-video'
,
AppRawItemVideo
);
v
.
component
(
'app-preset-qr-code'
,
AppPresetQrCode
);
v
.
component
(
'app-preset-switch'
,
AppPresetSwitch
);
v
.
component
(
'app-preset-text-input'
,
AppPresetTextInput
);
},
},
};
};
\ No newline at end of file
src/components/layout-element/interactive/app-preset-qrcode/app-preset-qrcode.less
0 → 100644
浏览文件 @
1aef406f
.app-preset-qr-code {
width: 100%;
height: 100%;
.ibiz-qr-code {
width: 100%;
height: 100%;
}
}
\ No newline at end of file
src/components/layout-element/interactive/app-preset-qrcode/app-preset-qrcode.vue
0 → 100644
浏览文件 @
1aef406f
<
template
>
<div
:class=
"className"
>
<template
v-if=
"QRCodeConfig.url"
>
<ibiz-qr-code
:size=
"QRCodeConfig.size"
:url=
"QRCodeConfig.url"
:bgSrc=
"QRCodeConfig.bgSrc"
:margin=
"QRCodeConfig.margin"
:backgroundColor=
"QRCodeConfig.backgroundColor"
:logoSrc=
"QRCodeConfig.logoSrc"
:logoMargin=
"QRCodeConfig.logoMargin"
:logoBgColor=
"QRCodeConfig.logoBgColor"
:logoRadius=
"QRCodeConfig.logoRadius"
:whiteMargin=
"QRCodeConfig.whiteMargin"
class=
"ibiz-qr-code"
:callback=
"callback"
>
</ibiz-qr-code>
</
template
>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppPresetQrCode
extends
Vue
{
/**
* 内容 value数据格式:对象类型的JSON字符串,参数类型与QRCodeConfig一致:"{ "url": "http://www.baidu.com" }"
*
* @type {string}
* @memberof AppPresetQrCode
*/
@
Prop
()
public
value
?:
any
;
/**
* 名称
*
* @type {string}
* @memberof AppPresetQrCode
*/
@
Prop
()
public
name
!
:
string
;
/**
* 类名
*
* @memberof AppPresetQrCode
*/
get
className
():
string
{
return
`app-preset-qr-code
${
this
.
name
}
`
;
}
/**
* ibiz-qr-code组件可传参数
* @param {number} size 二维码大小,包含边框
* @param {string} url 二维码内容
* @param {string} bgSrc 背景图片
* @param {number} margin 二维码外边距
* @param {string} backgroundColor 背景颜色
* @param {string} logoSrc 中央图标logo地址
* @param {number} logoMargin logo周围的空白边框
* @param {string} logoBgColor logo边框的背景色
* @param {number} logoRadius logo边框圆角半径
* @param {boolean} whiteMargin 背景图外是否设置白色边框
* @type {*}
* @memberof AppPresetQrCode
*/
public
QRCodeConfig
:
{
size
?:
number
,
url
?:
string
,
bgSrc
?:
string
,
margin
?:
number
,
backgroundColor
?:
string
,
logoSrc
?:
string
,
logoMargin
?:
number
,
logoBgColor
?:
string
,
logoRadius
?:
number
,
whiteMargin
?:
boolean
,
}
=
{}
/**
* 二维码生成的回调函数
* @type {*}
* @memberof AppPresetQrCode
*/
public
callback
(
event
:
any
)
{
// TODO
}
/**
* 获取二维码数据
*
* @memberof AppPresetQrCode
*/
public
created
()
{
this
.
getQRCodeData
();
}
/**
* 获取二维码绘制数据
*
* @type {*}
* @memberof AppPresetQrCode
*/
public
getQRCodeData
()
{
if
(
this
.
value
&&
typeof
(
this
.
value
)
==
'string'
)
{
const
value
=
JSON
.
parse
(
this
.
value
);
const
{
size
,
url
,
bgSrc
,
margin
,
backgroundColor
,
logoSrc
,
logoMargin
,
logoBgColor
,
logoRadius
,
whiteMargin
,
}
=
value
;
this
.
QRCodeConfig
=
{
size
,
url
,
bgSrc
,
margin
,
backgroundColor
,
logoSrc
,
logoMargin
,
logoBgColor
,
logoRadius
,
whiteMargin
,
};
// TODO
}
}
}
</
script
>
<
style
lang=
'less'
>
@import './app-preset-qrcode.less';
</
style
>
\ No newline at end of file
src/components/layout-element/interactive/app-preset-switch/app-preset-switch.less
0 → 100644
浏览文件 @
1aef406f
.app-preset-switch {
min-width: 40px;
height: 100%;
}
\ No newline at end of file
src/components/layout-element/interactive/app-preset-switch/app-preset-switch.vue
0 → 100644
浏览文件 @
1aef406f
<
template
>
<el-switch
:class=
"className"
v-model=
"curValue"
:disabled=
"disabled"
></el-switch>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppPresetSwitch
extends
Vue
{
/**
* 开关值
*
* @type {*}
* @memberof AppPresetSwitch
*/
@
Prop
()
public
value
!
:
any
/**
* 名称
*
* @type {*}
* @memberof AppPresetSwitch
*/
@
Prop
()
public
name
!
:
string
/**
* 名称
*
* @type {*}
* @memberof AppPresetSwitch
*/
@
Prop
({
default
:
false
})
public
disabled
?:
boolean
/**
* 类名
*
* @memberof AppPresetSwitch
*/
get
className
():
string
{
return
`app-preset-switch
${
this
.
name
}
`
;
}
/**
* 获取开关状态
*
* @type {*}
* @memberof AppPresetSwitch
*/
get
curValue
():
boolean
{
return
!!
this
.
value
;
}
/**
* 开关状态发生变化
*
* @type {*}
* @memberof AppPresetSwitch
*/
set
curValue
(
value
:
boolean
)
{
this
.
$emit
(
'valueChange'
,
{
name
:
this
.
name
,
value
});
}
}
</
script
>
<
style
lang=
'less'
>
@import './app-preset-switch.less';
</
style
>
\ No newline at end of file
src/components/layout-element/interactive/app-preset-text-input/app-preset-text-input.less
0 → 100644
浏览文件 @
1aef406f
.app-preset-text-input {
width: 100%;
height: 32px;
.el-input,
.el-input__inner {
width: 100%;
height: 32px;
}
}
\ No newline at end of file
src/components/layout-element/interactive/app-preset-text-input/app-preset-text-input.vue
0 → 100644
浏览文件 @
1aef406f
<
template
>
<div
:class=
"className"
>
<el-input
v-model=
"curValue"
:placeholder=
"placeholder"
></el-input>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppPresetTextInput
extends
Vue
{
/**
* 输入值
*
* @type {*}
* @memberof AppPresetTextInput
*/
@
Prop
()
public
value
!
:
any
;
/**
* 名称
*
* @type {string}
* @memberof AppPresetTextInput
*/
@
Prop
()
public
name
!
:
string
;
/**
* 禁用
*
* @type {boolean}
* @memberof AppPresetTextInput
*/
@
Prop
()
public
disabled
?:
boolean
;
/**
* 占位文本
*
* @type {string}
* @memberof AppPresetTextInput
*/
@
Prop
({
default
:
''
})
public
placeholder
?:
string
;
/**
* 类名
*
* @memberof AppPresetSwitch
*/
get
className
():
string
{
return
`app-preset-text-input
${
this
.
name
}
`
;
}
/**
* 当前值
*
* @memberof AppPresetTextInput
*/
get
curValue
()
{
return
this
.
value
;
}
/**
* 值变化
*
* @memberof AppPresetTextInput
*/
set
curValue
(
val
:
any
)
{
this
.
$emit
(
'valueChange'
,
{
name
:
this
.
name
,
value
:
val
});
}
}
</
script
>
<
style
lang=
'less'
>
@import './app-preset-text-input.less';
</
style
>
\ No newline at end of file
src/components/layout-element/text/app-preset-caption/app-preset-caption.vue
浏览文件 @
1aef406f
<
template
>
<
template
>
<div
class=
"app-preset-caption
"
>
<div
:class=
"className
"
>
<slot></slot>
<slot></slot>
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Vue
,
Component
}
from
"vue-property-decorator"
;
import
{
Vue
,
Component
,
Prop
}
from
"vue-property-decorator"
;
@
Component
({})
@
Component
({})
export
default
class
AppPresetCaption
extends
Vue
{}
export
default
class
AppPresetCaption
extends
Vue
{
/**
* 名称
*
* @type {string}
* @memberof AppPresetCaption
*/
@
Prop
()
public
name
!
:
string
;
/**
* 类名
*
* @memberof AppPresetText
*/
get
className
():
string
{
return
`app-preset-caption
${
this
.
name
}
`
;
}
}
</
script
>
</
script
>
<
style
lang=
'less'
>
<
style
lang=
'less'
>
...
...
src/components/layout-element/text/app-preset-text/app-preset-text.less
浏览文件 @
1aef406f
src/components/layout-element/text/app-preset-text/app-preset-text.vue
浏览文件 @
1aef406f
<
template
>
<
template
>
<div
:class=
"
['app-preset-text', `app-preset-text--$
{contentType.toLowerCase()}`]
">
<div
:class=
"
className
"
>
<!-- 直接内容类型 -->
<!-- 直接内容类型 -->
<template
v-if=
"Object.is(contentType, 'RAW')"
>
<template
v-if=
"Object.is(contentType, 'RAW')"
>
<template
v-if=
"Object.is(renderMode, 'TEXT')"
>
<template
v-if=
"Object.is(renderMode, 'TEXT')"
>
...
@@ -58,6 +58,14 @@ export default class AppPresetText extends Vue {
...
@@ -58,6 +58,14 @@ export default class AppPresetText extends Vue {
*/
*/
@
Prop
()
public
value
!
:
any
;
@
Prop
()
public
value
!
:
any
;
/**
* 名称
*
* @type {string}
* @memberof AppPresetText
*/
@
Prop
()
public
name
!
:
string
;
/**
/**
* 内容类型
* 内容类型
*
*
...
@@ -98,11 +106,11 @@ export default class AppPresetText extends Vue {
...
@@ -98,11 +106,11 @@ export default class AppPresetText extends Vue {
@
Prop
()
public
imageClass
?:
string
;
@
Prop
()
public
imageClass
?:
string
;
/**
/**
*
动态
图片路径
* 图片路径
*
*
* @memberof AppPresetText
* @memberof AppPresetText
*/
*/
protected
dynaImgUrl
:
string
=
''
;
@
Prop
()
public
imgUrl
?:
string
;
/**
/**
* 样式
* 样式
...
@@ -111,15 +119,6 @@ export default class AppPresetText extends Vue {
...
@@ -111,15 +119,6 @@ export default class AppPresetText extends Vue {
*/
*/
protected
cssStyle
:
string
=
''
;
protected
cssStyle
:
string
=
''
;
/**
* 图片路径
*
* @memberof AppPresetText
*/
get
imgUrl
():
string
{
return
this
.
dynaImgUrl
;
}
/**
/**
* 内容
* 内容
*
*
...
@@ -142,6 +141,15 @@ export default class AppPresetText extends Vue {
...
@@ -142,6 +141,15 @@ export default class AppPresetText extends Vue {
return
content
;
return
content
;
}
}
/**
* 类名
*
* @memberof AppPresetText
*/
get
className
():
string
{
return
`app-preset-text app-preset-text--
${
this
.
contentType
.
toLowerCase
()}
${
this
.
name
}
`
;
}
/**
/**
* Vue生命周期 --- Created
* Vue生命周期 --- Created
*
*
...
@@ -149,7 +157,6 @@ export default class AppPresetText extends Vue {
...
@@ -149,7 +157,6 @@ export default class AppPresetText extends Vue {
*/
*/
created
()
{
created
()
{
this
.
handleText
();
this
.
handleText
();
this
.
handleDynaImg
();
}
}
/**
/**
...
@@ -163,30 +170,6 @@ export default class AppPresetText extends Vue {
...
@@ -163,30 +170,6 @@ export default class AppPresetText extends Vue {
}
}
}
}
/**
* 处理动态图片
*
* @memberof AppPresetText
*/
protected
handleDynaImg
()
{
// TODO 动态图片
// if (this.value && typeof this.value == 'string') {
// // 默认识别文件对象形式,识别失败则为全路径模式
// try {
// const _files = JSON.parse(this.value);
// const file = _files instanceof Array ? _files[0] : null;
// const url = file && file.id ? `${this.downloadUrl}/${file.id}` : '';
// ImgurlBase64.getInstance()
// .getImgURLOfBase64(url)
// .then((res: any) => {
// this.dynaImgUrl = res;
// });
// } catch (error) {
// this.dynaImgUrl = this.value;
// }
// }
}
}
}
</
script
>
</
script
>
<
style
lang=
"less"
>
<
style
lang=
"less"
>
...
...
src/components/layout-element/text/app-preset-title/app-preset-title.vue
浏览文件 @
1aef406f
<
template
>
<
template
>
<h1
class=
"app-preset-titl
e"
>
{{
curValue
}}
</h1>
<h1
:class=
"classNam
e"
>
{{
curValue
}}
</h1>
</
template
>
</
template
>
<
script
lang=
"ts"
>
<
script
lang=
"ts"
>
import
{
Environment
}
from
"@/environments/environment"
;
import
{
Environment
}
from
"@/environments/environment"
;
import
{
Vue
,
Component
}
from
'vue-property-decorator'
;
import
{
Vue
,
Component
,
Prop
}
from
'vue-property-decorator'
;
@
Component
({})
@
Component
({})
export
default
class
AppPresetTitle
extends
Vue
{
export
default
class
AppPresetTitle
extends
Vue
{
/**
* 名称
*
* @type {string}
* @memberof AppPresetTitle
*/
@
Prop
()
public
name
!
:
string
;
/**
* 类名
*
* @memberof AppPresetTitle
*/
get
className
():
string
{
return
`app-preset-title
${
this
.
name
}
`
;
}
/**
/**
* 当前值
* 当前值
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录