Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
浙江兰德纵横网络技术股份有限公司
o2oa
提交
a5fae3f4
o2oa
项目概览
浙江兰德纵横网络技术股份有限公司
/
o2oa
通知
338
Star
10
Fork
6
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
a5fae3f4
编写于
8月 18, 2021
作者:
NoSubject
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加VUE-Element组件 common
上级
4d6a66d8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
114 addition
and
35 deletion
+114
-35
o2web/source/x_component_process_FormDesigner/Module/$ElElement.js
...rce/x_component_process_FormDesigner/Module/$ElElement.js
+9
-4
o2web/source/x_component_process_FormDesigner/Module/Elcommon.js
...ource/x_component_process_FormDesigner/Module/Elcommon.js
+2
-29
o2web/source/x_component_process_FormDesigner/Module/Elcommon/default/css.wcss
...ent_process_FormDesigner/Module/Elcommon/default/css.wcss
+1
-1
o2web/source/x_component_process_FormDesigner/Module/Elcommon/template.json
...ponent_process_FormDesigner/Module/Elcommon/template.json
+1
-1
o2web/source/x_component_process_Xform/Elcommon.js
o2web/source/x_component_process_Xform/Elcommon.js
+101
-0
未找到文件。
o2web/source/x_component_process_FormDesigner/Module/$ElElement.js
浏览文件 @
a5fae3f4
...
@@ -5,7 +5,7 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
...
@@ -5,7 +5,7 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
Implements
:
[
Options
,
Events
],
Implements
:
[
Options
,
Events
],
_initModuleType
:
function
(){
_initModuleType
:
function
(){
this
.
className
=
"
Elbutton
"
this
.
className
=
"
Elbutton
"
;
this
.
moduleType
=
"
element
"
;
this
.
moduleType
=
"
element
"
;
this
.
moduleName
=
"
elbutton
"
;
this
.
moduleName
=
"
elbutton
"
;
},
},
...
@@ -134,6 +134,7 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
...
@@ -134,6 +134,7 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
_setOtherNodeEvent
:
function
(){},
_setOtherNodeEvent
:
function
(){},
_setEditStyle_custom
:
function
(
name
){
_setEditStyle_custom
:
function
(
name
){
debugger
;
switch
(
name
){
switch
(
name
){
case
"
name
"
:
this
.
setPropertyName
();
break
;
case
"
name
"
:
this
.
setPropertyName
();
break
;
case
"
id
"
:
this
.
setPropertyId
();
break
;
case
"
id
"
:
this
.
setPropertyId
();
break
;
...
@@ -143,12 +144,16 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
...
@@ -143,12 +144,16 @@ MWF.xApplication.process.FormDesigner.Module.$ElElement = MWF.FC$ElElement = new
setPropertyName
:
function
(){},
setPropertyName
:
function
(){},
setPropertyId
:
function
(){},
setPropertyId
:
function
(){},
resetElement
:
function
(){
resetElement
:
function
(){
this
.
_createVueAppNode
();
//this._createVueAppNode();
//this.node.inject(this.vm.$el,"before");
// var node = this.vm.$el;
// this.vm.$destroy();
// node.destroy();
this
.
node
.
inject
(
this
.
vm
.
$el
,
"
before
"
);
var
node
=
this
.
vm
.
$el
;
var
node
=
this
.
vm
.
$el
;
this
.
vm
.
$destroy
();
this
.
vm
.
$destroy
();
node
.
destroy
();
node
.
empty
();
this
.
vm
=
null
;
this
.
vm
=
null
;
this
.
isSetEvents
=
false
;
this
.
isSetEvents
=
false
;
...
...
o2web/source/x_component_process_FormDesigner/Module/Elcommon.js
浏览文件 @
a5fae3f4
...
@@ -5,7 +5,7 @@ MWF.xApplication.process.FormDesigner.Module.Elcommon = MWF.FCElcommon = new Cla
...
@@ -5,7 +5,7 @@ MWF.xApplication.process.FormDesigner.Module.Elcommon = MWF.FCElcommon = new Cla
Implements
:
[
Options
,
Events
],
Implements
:
[
Options
,
Events
],
options
:
{
options
:
{
"
style
"
:
"
default
"
,
"
style
"
:
"
default
"
,
"
propertyPath
"
:
"
../x_component_process_FormDesigner/Module/El
input/elinput
.html
"
"
propertyPath
"
:
"
../x_component_process_FormDesigner/Module/El
common/elcommon
.html
"
},
},
_initModuleType
:
function
(){
_initModuleType
:
function
(){
...
@@ -14,34 +14,7 @@ MWF.xApplication.process.FormDesigner.Module.Elcommon = MWF.FCElcommon = new Cla
...
@@ -14,34 +14,7 @@ MWF.xApplication.process.FormDesigner.Module.Elcommon = MWF.FCElcommon = new Cla
this
.
moduleName
=
"
elcommon
"
;
this
.
moduleName
=
"
elcommon
"
;
},
},
_createElementHtml
:
function
(){
_createElementHtml
:
function
(){
var
html
=
""
;
var
html
=
this
.
json
.
vueTemplate
||
""
;
// var html = "<el-button";
// if (this.json.size && this.json.size!=="auto") html += " size=\""+this.json.size+"\"";
// if (this.json.bttype && this.json.bttype!=="default") html += " type=\""+this.json.bttype+"\"";
// if (this.json.plain===true) html += " plain";
// if (this.json.round===true) html += " round";
// if (this.json.circle===true) html += " circle";
// if (this.json.icon) html += " icon=\""+this.json.icon+"\"";
// if (this.json.disabled===true) html += " disabled";
// if (this.json.loading===true) html += " loading";
// if (this.json.autofocus===true) html += " autofocus";
//
// 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){
// var style = "";
// Object.keys(this.json.elStyles).forEach(function(k){
// if (this.json.elStyles[k]) style += k+":"+this.json.elStyles[k]+";";
// }, this);
// html += " style=\""+style+"\"";
// }
//
// html += ">"+((this.json.circle!==true && this.json.isText!==false) ? (this.json.name || this.json.id) : "")+"</el-button>";
return
html
;
return
html
;
},
},
_createCopyNode
:
function
(){
_createCopyNode
:
function
(){
...
...
o2web/source/x_component_process_FormDesigner/Module/Elcommon/default/css.wcss
浏览文件 @
a5fae3f4
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
"top": "auto",
"top": "auto",
"left": "auto",
"left": "auto",
"opacity": 1,
"opacity": 1,
"display": "
inline-
block",
"display": "block",
"min-width": "60px"
"min-width": "60px"
}
}
...
...
o2web/source/x_component_process_FormDesigner/Module/Elcommon/template.json
浏览文件 @
a5fae3f4
{
{
"id"
:
""
,
"id"
:
""
,
"name"
:
""
,
"name"
:
""
,
"type"
:
"El
butt
on"
,
"type"
:
"El
comm
on"
,
"description"
:
""
,
"description"
:
""
,
"events"
:
{
"events"
:
{
"queryLoad"
:
{
"queryLoad"
:
{
...
...
o2web/source/x_component_process_Xform/Elcommon.js
0 → 100644
浏览文件 @
a5fae3f4
o2
.
xDesktop
.
requireApp
(
"
process.Xform
"
,
"
$Module
"
,
null
,
false
);
/** @class Elcommon 基于Element UI的通用组件。
* @example
* //可以在脚本中获取该组件
* //方法1:
* var button = this.form.get("name"); //获取组件
* //方法2
* var button = this.target; //在组件事件脚本中获取
* @extends o2.xApplication.process.Xform.$Module
* @o2category FormComponents
* @o2range {Process|CMS|Portal}
* @hideconstructor
*/
o2
.
xApplication
.
process
.
Xform
.
Elcommon
=
o2
.
APPElcommon
=
new
Class
(
/** @lends o2.xApplication.process.Xform.Elbutton# */
{
Implements
:
[
Events
],
Extends
:
o2
.
APP$Module
,
/**
* @summary 组件的配置信息,同时也是Vue组件的data。
* @member o2.xApplication.process.Xform.Elbutton#json {JsonObject}
* @example
* //可以在脚本中获取此对象,下面两行代码是等价的,它们获取的是同一个对象
* var json = this.form.get("elcommon").json; //获取组件的json对象
* var json = this.form.get("elcommon").vm.$data; //获取Vue组件的data数据,
*
* //通过json对象操作Element组件
* json.bttype = "success"; //将按钮样式改为success
* json.loading = true; //将按钮显示为加载中状态
* json.disabled = true; //将按钮设置为禁用
*/
load
:
function
(){
this
.
_loadModuleEvents
();
if
(
this
.
fireEvent
(
"
queryLoad
"
)){
this
.
_queryLoaded
();
this
.
_loadUserInterface
();
}
},
_loadUserInterface
:
function
(){
this
.
node
.
appendHTML
(
this
.
_createElementHtml
());
this
.
node
.
set
({
"
id
"
:
this
.
json
.
id
,
"
MWFType
"
:
this
.
json
.
type
});
this
.
_createVueApp
();
},
_createVueApp
:
function
(){
if
(
!
this
.
vm
)
this
.
_loadVue
(
this
.
_mountVueApp
.
bind
(
this
));
},
_loadVue
:
function
(
callback
){
if
(
!
window
.
Vue
){
o2
.
loadAll
({
"
css
"
:
"
../o2_lib/vue/element/index.css
"
,
"
js
"
:
[
"
vue
"
,
"
elementui
"
]},
{
"
sequence
"
:
true
},
callback
);
}
else
{
if
(
callback
)
callback
();
}
},
_mountVueApp
:
function
(){
if
(
!
this
.
vueApp
)
this
.
vueApp
=
this
.
_createVueExtend
();
/**
* @summary Vue对象实例
* @see https://vuejs.org/
* @member {VueInstance}
*/
this
.
vm
=
new
Vue
(
this
.
vueApp
).
$mount
(
this
.
node
);
},
_createVueExtend
:
function
(){
var
_self
=
this
;
return
{
data
:
this
.
_createVueData
(),
mounted
:
function
(){
_self
.
_afterMounted
(
this
.
$el
);
}
};
},
_createVueData
:
function
(){
if
(
this
.
json
.
vueData
&&
this
.
json
.
vueData
.
code
){
var
d
=
this
.
form
.
Macro
.
exec
(
this
.
json
.
vueData
.
code
,
this
);
this
.
json
=
Object
.
merge
(
d
,
this
.
json
);
}
return
this
.
json
;
},
_afterMounted
:
function
(
el
){
this
.
node
=
el
;
this
.
node
.
set
({
"
id
"
:
this
.
json
.
id
,
"
MWFType
"
:
this
.
json
.
type
});
this
.
_loadDomEvents
();
this
.
_afterLoaded
();
this
.
fireEvent
(
"
postLoad
"
);
this
.
fireEvent
(
"
load
"
);
},
_createElementHtml
:
function
(){
var
html
=
this
.
json
.
vueTemplate
||
""
;
return
html
;
}
});
liyi_hz2008
@liyi_hz2008
mentioned in commit
b315532b
·
8月 24, 2021
mentioned in commit
b315532b
mentioned in commit b315532b267c8652d8169ab21b15fc9200a78502
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录