Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-sky-ui
Project
Project
Details
Activity
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
何虹
hs-sky-ui
Commits
0003cec5
Commit
0003cec5
authored
Jan 19, 2021
by
何虹
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复表格bug
parent
b0df0a0e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
77 deletions
+77
-77
index.vue
src/packages/hs-dialog-table/src/index.vue
+1
-1
ItemComponentChild.vue
src/packages/hs-table/src/ItemComponentChild.vue
+70
-69
child.vue
src/packages/hs-table/src/child.vue
+6
-7
No files found.
src/packages/hs-dialog-table/src/index.vue
View file @
0003cec5
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
:config=
'hsTableConfig'
:config=
'hsTableConfig'
:data=
'hsTableData'
:data=
'hsTableData'
:elInfo=
'hsTableEl'
:elInfo=
'hsTableEl'
fromWhere=
'hdrDtl
'
:editable=
'true
'
@
handleClick=
'handleClick'
@
handleClick=
'handleClick'
@
toolClick=
'tableItemClick'
@
toolClick=
'tableItemClick'
v-bind=
"$attrs"
v-bind=
"$attrs"
...
...
src/packages/hs-table/src/ItemComponentChild.vue
View file @
0003cec5
...
@@ -13,18 +13,18 @@
...
@@ -13,18 +13,18 @@
@
keyup
.
enter
.
native=
"enterInput"
@
keyup
.
enter
.
native=
"enterInput"
style=
"width:100%"
style=
"width:100%"
clearable
clearable
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
size=
'mini'
size=
'mini'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
></el-input>
></el-input>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsInput'"
>
<
template
v-else-if=
"item.showType==='hsInput'"
>
<hs-input
<hs-input
:prop=
'item.prop'
:prop=
'item.prop'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
></hs-input>
></hs-input>
</
template
>
</
template
>
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
style=
"width:100%"
style=
"width:100%"
type=
'textarea'
type=
'textarea'
clearable
clearable
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
></el-input>
></el-input>
</
template
>
</
template
>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<
template
v-else-if=
"item.showType==='elDatePicker'"
>
<
template
v-else-if=
"item.showType==='elDatePicker'"
>
<el-date-picker
<el-date-picker
clearable
clearable
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
style=
"width:100%"
style=
"width:100%"
size=
'mini'
size=
'mini'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
<
template
v-else-if=
"item.showType==='elDatePickerDatetime'"
>
<
template
v-else-if=
"item.showType==='elDatePickerDatetime'"
>
<el-date-picker
<el-date-picker
clearable
clearable
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
style=
"width:100%"
style=
"width:100%"
size=
'mini'
size=
'mini'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
...
@@ -68,10 +68,10 @@
...
@@ -68,10 +68,10 @@
<
template
v-else-if=
"item.showType==='hsSwitch'"
>
<
template
v-else-if=
"item.showType==='hsSwitch'"
>
<hs-switch
<hs-switch
:prop=
'item.prop'
:prop=
'item.prop'
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
>
>
</hs-switch>
</hs-switch>
</
template
>
</
template
>
...
@@ -79,69 +79,70 @@
...
@@ -79,69 +79,70 @@
<el-checkbox
<el-checkbox
style=
"width:100%"
style=
"width:100%"
size=
'mini'
size=
'mini'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
>
>
</el-checkbox>
</el-checkbox>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsComputed'"
>
<
template
v-else-if=
"item.showType==='hsComputed'"
>
<hs-computed
<hs-computed
:prop=
'item.prop'
:prop=
'item.prop'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
v-on=
"$listeners"
v-on=
"$listeners"
v-bind=
"$attrs"
v-bind=
"$attrs"
>
>
</hs-computed>
</hs-computed>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsSelectPlus'"
>
<
template
v-else-if=
"item.showType==='hsSelectPlus'"
>
<hs-select-plus
<hs-select-plus
parentType=
'table'
parentType=
'table'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:prop=
'item.prop'
:prop=
'item.prop'
:allSourceData=
'item.allSourceData'
:config=
'item.config'
:elInfo=
'item.elInfo'
:data=
'item.data'
:formData=
'formParms'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||isFromHdrDtl'
:formData=
'formParms'
v-on=
"$listeners"
:disabled=
'getDisabled||isEditable'
v-bind=
"$attrs"
v-on=
"$listeners"
v-bind=
"$attrs"
>
>
</hs-select-plus>
</hs-select-plus>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsInputNumber'"
>
<
template
v-else-if=
"item.showType==='hsInputNumber'"
>
<hs-input-number
<hs-input-number
:prop=
'item.prop'
:prop=
'item.prop'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
v-bind=
"$attrs"
v-bind=
"$attrs"
v-on=
"$listeners"
v-on=
"$listeners"
></hs-input-number>
></hs-input-number>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsPopoverTextarea'"
>
<
template
v-else-if=
"item.showType==='hsPopoverTextarea'"
>
<hs-popover-textarea
<hs-popover-textarea
:prop=
'item.prop'
:prop=
'item.prop'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
v-bind=
"$attrs"
v-bind=
"$attrs"
v-on=
"$listeners"
v-on=
"$listeners"
></hs-popover-textarea>
></hs-popover-textarea>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsLookup'"
>
<
template
v-else-if=
"item.showType==='hsLookup'"
>
<hs-lookup
<hs-lookup
:prop=
'item.prop'
:prop=
'item.prop'
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
v-on=
"$listeners"
v-on=
"$listeners"
v-bind=
"$attrs"
v-bind=
"$attrs"
...
@@ -150,49 +151,49 @@
...
@@ -150,49 +151,49 @@
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsTagsSelect'"
>
<
template
v-else-if=
"item.showType==='hsTagsSelect'"
>
<hs-tags-select
<hs-tags-select
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:prop=
'item.prop'
:prop=
'item.prop'
:allSourceData=
'item.allSourceData
'
:config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:formData=
'formParms'
:formData=
'formParms'
:disabled=
'getDisabled||isFromHdrDtl
'
:disabled=
'getDisabled||isEditable
'
v-on=
"$listeners"
v-on=
"$listeners"
v-bind=
"$attrs"
v-bind=
"$attrs"
>
>
</hs-tags-select>
</hs-tags-select>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsTagsTable'"
>
<
template
v-else-if=
"item.showType==='hsTagsTable'"
>
<hs-tags-table
<hs-tags-table
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:prop=
'item.prop'
:prop=
'item.prop'
:allSourceData=
'item.allSourceData
'
:config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:formData=
'formParms'
:formData=
'formParms'
:disabled=
'getDisabled'
:disabled=
'getDisabled'
v-on=
"$listeners"
v-on=
"$listeners"
v-bind=
"$attrs"
v-bind=
"$attrs"
>
>
</hs-tags-table>
</hs-tags-table>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsTagsFrom'"
>
<
template
v-else-if=
"item.showType==='hsTagsFrom'"
>
<hs-tags-from
<hs-tags-from
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:prop=
'item.prop'
:prop=
'item.prop'
:allSourceData=
'item.allSourceData
'
:config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:formData=
'formParms'
:formData=
'formParms'
:disabled=
'getDisabled||isFromHdrDtl
'
:disabled=
'getDisabled||isEditable
'
v-on=
"$listeners"
v-on=
"$listeners"
v-bind=
"$attrs"
v-bind=
"$attrs"
>
>
</hs-tags-from>
</hs-tags-from>
</
template
>
</
template
>
<
template
v-else-if=
"item.showType==='hsSelectList'"
>
<
template
v-else-if=
"item.showType==='hsSelectList'"
>
<hs-select-list
<hs-select-list
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
:prop=
'item.prop'
:prop=
'item.prop'
v-on=
"$listeners"
v-on=
"$listeners"
...
@@ -203,9 +204,9 @@
...
@@ -203,9 +204,9 @@
<
template
v-else-if=
"item.showType==='hsDragList'"
>
<
template
v-else-if=
"item.showType==='hsDragList'"
>
<hs-drag-list
<hs-drag-list
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
:prop=
'item.prop'
:prop=
'item.prop'
v-on=
"$listeners"
v-on=
"$listeners"
...
@@ -216,9 +217,9 @@
...
@@ -216,9 +217,9 @@
<
template
v-else-if=
"item.showType==='hsInputSelect'"
>
<
template
v-else-if=
"item.showType==='hsInputSelect'"
>
<hs-input-select
<hs-input-select
v-model=
"formParms[item.prop]"
v-model=
"formParms[item.prop]"
:
allSourceData=
'item.allSourceData
'
:
config=
'item.config
'
:elInfo=
'item.elInfo'
:elInfo=
'item.elInfo'
:disabled=
'getDisabled||is
FromHdrDtl
'
:disabled=
'getDisabled||is
Editable
'
:formData=
'formParms'
:formData=
'formParms'
:prop=
'item.prop'
:prop=
'item.prop'
v-on=
"$listeners"
v-on=
"$listeners"
...
@@ -244,13 +245,13 @@ export default {
...
@@ -244,13 +245,13 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
// 为什么加这个 因为有变态需求是列表上要修改, 原本是列表上一律不允许修改
// 为什么加这个 因为有变态需求是列表上要修改, 原本是列表上一律不允许修改
Editable
is
FromHdrDtl
()
{
is
Editable
()
{
// 是否可编辑
const
fromWhere
=
this
.
$attrs
.
fromWher
e
const
editable
=
this
.
$attrs
.
editabl
e
if
(
fromWhere
===
'importPage'
)
{
if
(
editable
)
{
return
false
return
false
}
else
{
}
else
{
return
fromWhere
!==
'hdrDtl'
return
true
}
}
},
},
getDisabled
()
{
getDisabled
()
{
...
...
src/packages/hs-table/src/child.vue
View file @
0003cec5
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
title=
'展开'
title=
'展开'
>
>
<template
v-slot:content=
"
{ row }">
<template
v-slot:content=
"
{ row }">
<rowTable
:rowTable=
'row._childTable'
></rowTable>
<rowTable
:rowTable=
'row._childTable'
></rowTable>
</
template
>
</
template
>
</ux-table-column>
</ux-table-column>
<ux-table-column
<ux-table-column
...
@@ -109,9 +109,9 @@
...
@@ -109,9 +109,9 @@
></i>
></i>
<childItem
<childItem
v-else
v-else
:fromWhere=
'fromWhere'
v-bind=
"$attrs"
v-bind=
"$attrs"
v-on=
"$listeners"
v-on=
"$listeners"
:editable=
'editable'
:item=
'column'
:item=
'column'
:prop=
"column.prop"
:prop=
"column.prop"
:formParms=
'scope.row'
:formParms=
'scope.row'
...
@@ -136,9 +136,9 @@
...
@@ -136,9 +136,9 @@
<childItem
<childItem
:item=
'item'
:item=
'item'
:formParms=
'scope.row'
:formParms=
'scope.row'
:editable=
'editable'
v-bind=
"$attrs"
v-bind=
"$attrs"
v-on=
"$listeners"
v-on=
"$listeners"
:fromWhere=
'fromWhere'
>
>
</childItem>
</childItem>
</
template
>
</
template
>
...
@@ -185,7 +185,7 @@ export default {
...
@@ -185,7 +185,7 @@ export default {
getSourceData
:
{
getSourceData
:
{
type
:
Function
type
:
Function
},
},
fromWher
e
:
{
editabl
e
:
{
default
:
'list'
default
:
'list'
},
},
// 数据
// 数据
...
@@ -444,7 +444,7 @@ export default {
...
@@ -444,7 +444,7 @@ export default {
?
disabledLogicOperation
?
disabledLogicOperation
:
false
:
false
const
type
=
typeof
disabled
const
type
=
typeof
disabled
const
innerStatus
=
this
.
disabled
&&
this
.
fromWhere
===
'hdrDtl'
const
innerStatus
=
this
.
disabled
&&
this
.
editable
const
data
=
{
row
,
item
}
const
data
=
{
row
,
item
}
if
(
disabledLevel
===
1
)
{
if
(
disabledLevel
===
1
)
{
if
(
type
===
'boolean'
||
type
===
'undefined'
)
{
if
(
type
===
'boolean'
||
type
===
'undefined'
)
{
...
@@ -462,8 +462,7 @@ export default {
...
@@ -462,8 +462,7 @@ export default {
},
},
getBindEntity
()
{
getBindEntity
()
{
const
bindEntity
=
this
.
tableConfig
.
bindEntity
const
bindEntity
=
this
.
tableConfig
.
bindEntity
if
(
bindEntity
)
return
bindEntity
return
bindEntity
||
'dtl'
if
(
this
.
fromWhere
===
'hdrDtl'
)
return
'dtl'
},
},
clickToolLabel
(
item
)
{
clickToolLabel
(
item
)
{
const
{
click
}
=
item
const
{
click
}
=
item
...
...
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