Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-easy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
easyUI
hls-easy-ui
Commits
d3559ae3
Commit
d3559ae3
authored
Sep 19, 2024
by
王纵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
低代码组件自定义表单渲染增加样式参数
parent
83114aeb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
DUrl.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DUrl.vue
+2
-2
LayoutBuilder.jsx
src/Dynamic/ConfigRenderComponent/LayoutBuilder.jsx
+7
-4
No files found.
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DUrl.vue
View file @
d3559ae3
...
@@ -2,13 +2,13 @@
...
@@ -2,13 +2,13 @@
* @Author: zong.wang01@hand-china.com
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-01 09:55:12
* @Date: 2024-08-01 09:55:12
* @LastEditors: zong.wang01@hand-china.com
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-21 16:05:36
* @LastEditTime: 2024-0
9-19 16:02:58
* @Version: 1.0.0
* @Version: 1.0.0
* @Description: 动态渲染-超链接组件
* @Description: 动态渲染-超链接组件
* @Copyright: Copyright (c) 2021, Hand-RongJing
* @Copyright: Copyright (c) 2021, Hand-RongJing
-->
-->
<
template
>
<
template
>
<div
:class=
"`$
{fieldConfig.dataClass}
_form
d-form-item`">
<div
:class=
"`$
{fieldConfig.dataClass} d-form-item`">
<van-cell
center
class=
"d-url"
:required=
"required"
>
<van-cell
center
class=
"d-url"
:required=
"required"
>
<template
#
title
>
<template
#
title
>
<d-label
:label=
"label"
:help=
"help"
/>
<d-label
:label=
"label"
:help=
"help"
/>
...
...
src/Dynamic/ConfigRenderComponent/LayoutBuilder.jsx
View file @
d3559ae3
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-30 21:21:37
* @Date: 2024-07-30 21:21:37
* @LastEditors: zong.wang01@hand-china.com
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-21 15:42:05
* @LastEditTime: 2024-0
9-19 16:05:29
* @Version: 1.0.0
* @Version: 1.0.0
* @Description:
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
@@ -97,7 +97,8 @@ export class ColumnBuilder extends BaseBuilder {
...
@@ -97,7 +97,8 @@ export class ColumnBuilder extends BaseBuilder {
const
currentRenderers
=
this
.
getCurrentRenderers
(
columnName
,
this
.
componentRenderers
);
const
currentRenderers
=
this
.
getCurrentRenderers
(
columnName
,
this
.
componentRenderers
);
let
renderer
=
currentRenderers
.
length
>
0
?
currentRenderers
[
0
].
renderer
:
undefined
;
let
renderer
=
currentRenderers
.
length
>
0
?
currentRenderers
[
0
].
renderer
:
undefined
;
let
formRenderer
=
currentRenderers
.
length
>
0
?
currentRenderers
[
0
].
formRenderer
:
undefined
;
let
formRenderer
=
currentRenderers
.
length
>
0
?
currentRenderers
[
0
].
formRenderer
:
undefined
;
return
{
renderer
,
formRenderer
};
let
className
=
currentRenderers
.
length
>
0
?
currentRenderers
[
0
].
className
:
undefined
;
return
{
renderer
,
formRenderer
,
className
};
}
}
getCurrentRenderers
(
columnName
,
renderers
)
{
getCurrentRenderers
(
columnName
,
renderers
)
{
...
@@ -112,12 +113,14 @@ export class ColumnBuilder extends BaseBuilder {
...
@@ -112,12 +113,14 @@ export class ColumnBuilder extends BaseBuilder {
*/
*/
initFields
(
fields
,
cascadeKey
=
''
)
{
initFields
(
fields
,
cascadeKey
=
''
)
{
const
newFields
=
fields
.
map
(
field
=>
{
const
newFields
=
fields
.
map
(
field
=>
{
const
customerRender
=
this
.
getCustomizedRenderer
(
field
.
columnName
);
return
{
return
{
...
field
,
...
field
,
readOnly
:
field
.
inputModeDisplay
===
"READONLY"
,
readOnly
:
field
.
inputModeDisplay
===
"READONLY"
,
required
:
field
.
inputModeDisplay
===
"REQUIRED"
,
required
:
field
.
inputModeDisplay
===
"REQUIRED"
,
clearFlag
:
field
.
clearButton
===
'Y'
,
clearFlag
:
field
.
clearButton
===
'Y'
,
renderer
:
this
.
getCustomizedRenderer
(
field
.
columnName
,
field
).
renderer
,
renderer
:
customerRender
.
renderer
,
dataClass
:
customerRender
.
className
}
}
// if (field.validationTypeDisplay === 'UrlField') {
// if (field.validationTypeDisplay === 'UrlField') {
// const {renderer} = this.getCustomizedRenderer(field.columnName, field);
// const {renderer} = this.getCustomizedRenderer(field.columnName, field);
...
@@ -187,7 +190,7 @@ export class ColumnBuilder extends BaseBuilder {
...
@@ -187,7 +190,7 @@ export class ColumnBuilder extends BaseBuilder {
clearFlag
:
field
.
clearButton
===
'Y'
,
clearFlag
:
field
.
clearButton
===
'Y'
,
renderer
:
customizedRenderer
.
renderer
,
renderer
:
customizedRenderer
.
renderer
,
formRenderer
:
customizedRenderer
.
formRenderer
,
formRenderer
:
customizedRenderer
.
formRenderer
,
dataClass
:
`
${
this
.
layoutCode
}
-
${
this
.
tabCode
}
-
${
field
.
columnName
}
`
.
toLowerCase
(),
dataClass
:
customizedRenderer
.
className
}
}
});
});
// return newFields;
// return newFields;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment