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
cbd6cce2
Commit
cbd6cce2
authored
Sep 19, 2024
by
王纵
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动态页面表格可编辑
parent
ab9138db
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
15 deletions
+24
-15
DLov.vue
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DLov.vue
+1
-2
index.vue
src/Dynamic/ConfigRenderComponent/DTable/index.vue
+21
-11
edit.png
src/Dynamic/assets/edit.png
+0
-0
testDynamic.vue
src/pages/dynamicTest/testDynamic.vue
+2
-2
No files found.
src/Dynamic/ConfigRenderComponent/DForm/FormItem/DLov.vue
View file @
cbd6cce2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @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-27 17:46:20
* @LastEditTime: 2024-0
9-19 15:26:43
* @Version: 1.0.0
* @Version: 1.0.0
* @Description: 动态渲染-Lov
* @Description: 动态渲染-Lov
* @Copyright: Copyright (c) 2021, Hand-RongJing
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
@@ -100,7 +100,6 @@ import {Cell, Switch, Icon, Popup, Search, Checkbox, Tag, Field} from 'vant';
...
@@ -100,7 +100,6 @@ import {Cell, Switch, Icon, Popup, Search, Checkbox, Tag, Field} from 'vant';
import
DLabel
from
'./DLabel'
;
import
DLabel
from
'./DLabel'
;
import
{
DScroll
}
from
'../../../LayoutComponents'
;
import
{
DScroll
}
from
'../../../LayoutComponents'
;
import
{
getLovConfig
,
getLovData
}
from
'../../../service'
;
import
{
getLovConfig
,
getLovData
}
from
'../../../service'
;
import
{
DScroll
}
from
'../../../LayoutComponents'
;
export
default
{
export
default
{
name
:
'DLov'
,
name
:
'DLov'
,
...
...
src/Dynamic/ConfigRenderComponent/DTable/index.vue
View file @
cbd6cce2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Author: zong.wang01@hand-china.com
* @Date: 2024-07-29 10:51:56
* @Date: 2024-07-29 10:51:56
* @LastEditors: zong.wang01@hand-china.com
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-27 17:50:40
* @LastEditTime: 2024-0
9-19 15:30:46
* @Version: 1.0.0
* @Version: 1.0.0
* @Description: 表格渲染
* @Description: 表格渲染
* @Copyright: Copyright (c) 2021, Hand-RongJing
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
<div
v-for=
"(item, pIndex) in tableData"
:key=
"item[tabInfo.primaryKey]"
class=
"d-table"
>
<div
v-for=
"(item, pIndex) in tableData"
:key=
"item[tabInfo.primaryKey]"
class=
"d-table"
>
<fragment
v-for=
"(column, index) in showColumns"
:key=
"column.columnName"
>
<fragment
v-for=
"(column, index) in showColumns"
:key=
"column.columnName"
>
<div
v-if=
"index === 0"
class=
"d-table-th"
>
<div
v-if=
"index === 0"
class=
"d-table-th"
>
<van-checkbox
:name=
"item[tabInfo.primaryKey]"
>
<van-checkbox
:name=
"item[tabInfo.primaryKey]"
v-if=
"showEdit"
>
{{
column
.
description
}}
:
{{
column
.
description
}}
:
<d-table-td
<d-table-td
:tdRender=
"column.renderer"
:tdRender=
"column.renderer"
...
@@ -32,7 +32,15 @@
...
@@ -32,7 +32,15 @@
:index=
"pIndex"
:index=
"pIndex"
:record=
"item"
/>
:record=
"item"
/>
</van-checkbox>
</van-checkbox>
<van-icon
name=
"records-o"
@
click=
"showRecord(item, pIndex)"
/>
<div
v-else
>
{{
column
.
description
}}
:
<d-table-td
:tdRender=
"column.renderer"
:columnName=
"column.columnName"
:index=
"pIndex"
:record=
"item"
/>
</div>
<img
src=
"../../assets/edit.png"
class=
"td-edit"
@
click=
"showRecord(item, pIndex)"
/>
</div>
</div>
<div
v-else
class=
"d-table-tr"
>
<div
v-else
class=
"d-table-tr"
>
<span>
{{
column
.
description
}}
</span>
<span>
{{
column
.
description
}}
</span>
...
@@ -59,7 +67,7 @@
...
@@ -59,7 +67,7 @@
</div>
</div>
</van-checkbox-group>
</van-checkbox-group>
<van-popup
v-model=
"visible"
position=
"top"
class=
"d-table-form-popup"
get-container=
"body"
>
<van-popup
v-model=
"visible"
position=
"top"
class=
"d-table-form-popup
van-safe-area-bottom
"
get-container=
"body"
>
<div
class=
"form-content"
>
<div
class=
"form-content"
>
<d-form
<d-form
v-if=
"visible"
v-if=
"visible"
...
@@ -302,11 +310,11 @@ export default {
...
@@ -302,11 +310,11 @@ export default {
}
}
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
lang=
"less"
>
@import '../../index.less';
@import '../../index.less';
.d-table {
.d-table {
margin: 0
8px 12px 8
px;
margin: 0
15px 10px 15
px;
padding: 4px 8px 12px 8px;
padding: 4px 8px 12px 8px;
background-color: #fff;
background-color: #fff;
border-radius: 4px;
border-radius: 4px;
...
@@ -316,7 +324,7 @@ export default {
...
@@ -316,7 +324,7 @@ export default {
padding: 10px 16px 0 16px;
padding: 10px 16px 0 16px;
font-family: PingFangSC-Regular;
font-family: PingFangSC-Regular;
font-size: 14px;
font-size: 14px;
color: #
646465
;
color: #
a3a3a3
;
span:nth-child(1){
span:nth-child(1){
min-width: 60px;
min-width: 60px;
& + span {
& + span {
...
@@ -333,12 +341,14 @@ export default {
...
@@ -333,12 +341,14 @@ export default {
padding: 8px 0 12px 8px;
padding: 8px 0 12px 8px;
border-bottom: 1px solid #F3F3F7;;
border-bottom: 1px solid #F3F3F7;;
font-family: PingFangSC-Semibold;
font-family: PingFangSC-Semibold;
font-size: 1
5
px;
font-size: 1
4
px;
color: #4B4A4B;
color: #4B4A4B;
font-weight: 600;
font-weight: 600;
.van-icon-records-o {
:deep(.van-checkbox__icon) {
font-size: 17px;
font-size: 16px;
color: @primary-color;
}
.td-edit {
width: 14px;
}
}
}
}
}
}
...
...
src/Dynamic/assets/edit.png
0 → 100644
View file @
cbd6cce2
1.5 KB
src/pages/dynamicTest/testDynamic.vue
View file @
cbd6cce2
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: zong.wang01@hand-china.com
* @Author: zong.wang01@hand-china.com
* @Date: 2024-08-16 09:39:36
* @Date: 2024-08-16 09:39:36
* @LastEditors: zong.wang01@hand-china.com
* @LastEditors: zong.wang01@hand-china.com
* @LastEditTime: 2024-0
8-26 09:55:22
* @LastEditTime: 2024-0
9-19 15:27:44
* @Version: 1.0.0
* @Version: 1.0.0
* @Description:
* @Description:
* @Copyright: Copyright (c) 2021, Hand-RongJing
* @Copyright: Copyright (c) 2021, Hand-RongJing
...
@@ -50,7 +50,7 @@ export default {
...
@@ -50,7 +50,7 @@ export default {
}
}
},
},
created
()
{
created
()
{
window
.
localStorage
.
access_token
=
'
3e4ed606-6b81-40c2-8ba3-54f73832504e
'
window
.
localStorage
.
access_token
=
'
71fc3203-0d1b-4f62-adea-d08dd473c0cc
'
},
},
methods
:
{
methods
:
{
configLoadHandle
(
config
)
{
// 查询配置信息之后的回调
configLoadHandle
(
config
)
{
// 查询配置信息之后的回调
...
...
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