Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
99b0c85c
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
99b0c85c
编写于
12月 14, 2021
作者:
U
unknown
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
表单增加element颜色选择器
上级
cf537907
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
73 addition
and
0 deletion
+73
-0
o2web/source/x_component_process_Xform/Elcolorpicker.js
o2web/source/x_component_process_Xform/Elcolorpicker.js
+73
-0
未找到文件。
o2web/source/x_component_process_Xform/Elcolorpicker.js
0 → 100644
浏览文件 @
99b0c85c
o2
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Elinput
"
,
null
,
false
);
/** @class Elinput 基于Element UI的输入框组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var input = this.form.get("name"); //获取组件
* //方法2
* var input = this.target; //在组件事件脚本中获取
* @extends MWF.xApplication.process.Xform.$Module
* @o2category FormComponents
* @o2range {Process|CMS|Portal}
* @hideconstructor
*/
MWF
.
xApplication
.
process
.
Xform
.
Elcolorpicker
=
MWF
.
APPElcolorpicker
=
new
Class
(
/** @lends o2.xApplication.process.Xform.Elcolorpicker# */
{
Implements
:
[
Events
],
Extends
:
MWF
.
APP$Elinput
,
options
:
{
"
moduleEvents
"
:
[
"
load
"
,
"
queryLoad
"
,
"
postLoad
"
],
"
elEvents
"
:
[
"
change
"
]
},
_appendVueData
:
function
(){
if
(
!
this
.
json
.
isReadonly
)
this
.
json
.
isReadonly
=
false
;
if
(
!
this
.
json
.
disabled
)
this
.
json
.
disabled
=
false
;
if
(
!
this
.
json
.
showAlpha
)
this
.
json
.
showAlpha
=
false
;
if
(
!
this
.
json
.
colorFormat
)
{
if
(
this
.
json
.
showAlpha
){
this
.
json
.
colorFormat
=
"
hex
"
;
}
else
{
this
.
json
.
colorFormat
=
"
rgb
"
;
}
}
},
// appendVueExtend: function(app){
// if (!app.methods) app.methods = {};
// app.methods.$loadElEvent = function(ev){
// this.validationMode();
// if (ev==="change") this._setBusinessData(this.getInputData());
// if (this.json.events && this.json.events[ev] && this.json.events[ev].code){
// this.form.Macro.fire(this.json.events[ev].code, this, event);
// }
// }.bind(this);
// },
_createElementHtml
:
function
(){
var
html
=
"
<el-color-picker
"
;
html
+=
"
v-model=
\"
"
+
this
.
json
.
$id
+
"
\"
"
;
html
+=
"
:readonly=
\"
isReadonly
\"
"
;
html
+=
"
:disabled=
\"
disabled
\"
"
;
html
+=
"
:show-alpha=
\"
showAlpha
\"
"
;
html
+=
"
:color-format=
\"
colorFormat
\"
"
;
this
.
options
.
elEvents
.
forEach
(
function
(
k
){
html
+=
"
@
"
+
k
+
"
=
\"
$loadElEvent_
"
+
k
.
camelCase
()
+
"
\"
"
;
});
if
(
this
.
json
.
elProperties
){
Object
.
keys
(
this
.
json
.
elProperties
).
forEach
(
function
(
k
){
if
(
this
.
json
.
elProperties
[
k
])
html
+=
"
"
+
k
+
"
=
\"
"
+
this
.
json
.
elProperties
[
k
]
+
"
\"
"
;
},
this
);
}
if
(
this
.
json
.
elStyles
)
html
+=
"
:style=
\"
elStyles
\"
"
;
html
+=
"
>
"
;
if
(
this
.
json
.
vueSlot
)
html
+=
this
.
json
.
vueSlot
;
html
+=
"
</el-color-picker>
"
;
return
html
;
}
});
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录