Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
npm
/
glsx-components
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9d9f52f5
authored
Oct 27, 2021
by
ym
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
select
1 parent
d30cbf63
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
38 deletions
src/packages/External/src/index.vue
src/packages/Table/src/index.vue
src/theme/theme.scss
src/packages/External/src/index.vue
View file @
9d9f52f
...
...
@@ -3,53 +3,53 @@
</
template
>
<
script
>
import
{
Postmate
}
from
'glsx-common'
import
{
Postmate
}
from
"glsx-common"
;
export
default
{
name
:
'GLExternal'
,
name
:
"GLExternal"
,
props
:
{
url
:
{
type
:
String
,
required
:
true
required
:
true
,
},
subscribe
:
{
type
:
Function
,
default
:
null
}
default
:
null
,
}
,
},
data
()
{
return
{
container
:
null
}
container
:
null
,
}
;
},
mounted
()
{
this
.
container
=
this
.
$refs
[
'adapter-frame'
]
this
.
create
()
this
.
container
=
this
.
$refs
[
"adapter-frame"
];
this
.
create
()
;
},
methods
:
{
create
()
{
if
(
!
this
.
url
)
throw
new
Error
(
'url为空'
)
this
.
container
.
innerHTML
=
''
if
(
!
this
.
url
)
throw
new
Error
(
"url为空"
);
this
.
container
.
innerHTML
=
""
;
var
postmate
=
new
Postmate
({
container
:
this
.
container
,
url
:
this
.
url
,
name
:
'adapter-frame'
,
classListArray
:
[
'gl-external-adapter-frame'
]
name
:
"adapter-frame"
,
classListArray
:
[
"gl-external-adapter-frame"
],
})
.
then
(
child
=>
{
child
.
get
(
'height'
).
then
(
height
=>
{
child
.
frame
.
setAttribute
(
'scrolling'
,
'no'
)
child
.
frame
.
style
.
height
=
`
${
height
+
14
}
px`
})
this
.
subscribe
&&
this
.
subscribe
(
child
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
throw
new
Error
(
'连接失败: '
+
this
.
url
)
.
then
((
child
)
=>
{
child
.
get
(
"height"
).
then
((
height
)
=>
{
child
.
frame
.
setAttribute
(
"scrolling"
,
"no"
);
child
.
frame
.
style
.
height
=
`
${
height
}
px`
;
});
this
.
subscribe
&&
this
.
subscribe
(
child
);
})
}
}
}
.
catch
((
err
)
=>
{
console
.
log
(
err
);
throw
new
Error
(
"连接失败: "
+
this
.
url
);
});
},
},
};
</
script
>
<
style
>
.gl-external-adapter-frame
{
...
...
src/packages/Table/src/index.vue
View file @
9d9f52f
<
template
>
<div
class=
"glsx-table"
>
<el-table
id=
"initTable"
:ref=
"tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data=
"getListApi ? data : tableData"
:row-key=
"tableParams.mutiSelectUniqueKey || ''"
v-loading=
"loading"
:height=
"tableHeightValues"
:border=
"border"
:tableId=
"tableId"
:highlight-current-row=
"true"
:stripe=
"true"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelect"
:size=
"size"
:header-cell-style=
"headerStyle"
>
<el-table
style=
"width: 100%"
id=
"initTable"
:ref=
"tableParams.mutiSelectName + 'MutiTable' || 'MutiTable'"
:data=
"getListApi ? data : tableData"
:row-key=
"tableParams.mutiSelectUniqueKey || ''"
v-loading=
"loading"
:height=
"tableHeightValues"
:border=
"border"
:tableId=
"tableId"
:highlight-current-row=
"true"
:stripe=
"true"
@
sort-change=
"sortChange"
@
selection-change=
"handleSelect"
:size=
"size"
:header-cell-style=
"headerStyle"
>
<el-table-column
v-if=
"tableParams.mutiSelectUniqueKey && tableParams.mutiSelectName"
type=
"selection"
width=
"55"
:selectable=
"checkSelectable"
:reserve-selection=
"true"
></el-table-column>
<el-table-column
v-if=
"hasNum"
align=
"center"
width=
"60px"
label=
"序号"
type=
"index"
:index=
"index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"
></el-table-column>
<el-table-column
v-for=
"(item, index) in tableColumns"
:key=
"index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
:min-width=
"item.minWidth"
:align=
"item.align || 'center'"
:sortable=
"item.sortable"
>
...
...
@@ -239,7 +239,8 @@ export default {
// 多选
handleSelect
(
val
)
{
this
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
=
val
this
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
=
val
;
this
.
$emit
(
'selectionTable'
,
val
)
},
// 清空多选
...
...
@@ -252,12 +253,8 @@ export default {
//navHeight 传值底部高度
var
baseNavEle
=
document
.
querySelector
(
'.scrm-base-nav'
)
var
baseSubNavEle
=
document
.
querySelector
(
'.scrm-base-sub-nav'
)
var
baseNavEleHeight
=
0
var
baseSubNavEleHeight
=
0
if
(
baseNavEle
&&
baseNavEle
)
{
baseNavEleHeight
=
baseNavEle
.
clientHeight
//60
baseSubNavEleHeight
=
baseSubNavEle
.
clientHeight
//14
}
var
baseNavEleHeight
=
baseNavEle
?
baseNavEle
.
clientHeight
:
0
;
var
baseSubNavEleHeight
=
baseSubNavEle
?
baseSubNavEle
.
clientHeight
:
0
let
paginationHeight
if
(
document
.
querySelector
(
'.el-pagination'
))
{
paginationHeight
=
document
.
querySelector
(
'.el-pagination'
).
clientHeight
+
20
...
...
@@ -334,7 +331,7 @@ export default {
this
.
getListApi
&&
this
.
refreshTable
()
}
}
</
script
>
</
script
>
<
style
>
.a-click
{
...
...
@@ -347,8 +344,6 @@ export default {
margin
:
10px
0
;
}
.glsx-table
.line-ellipsis
{
display
:
-webkit-box
;
width
:
100%
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
/* -webkit-line-clamp: 2; */
...
...
@@ -420,4 +415,4 @@ export default {
/* .hasTableContent .el-table__body-wrapper{
height: 100%;
} */
</
style
>
</
style
>
\ No newline at end of file
src/theme/theme.scss
View file @
9d9f52f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment