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 @@
...
@@ -3,53 +3,53 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
Postmate
}
from
'glsx-common'
import
{
Postmate
}
from
"glsx-common"
;
export
default
{
export
default
{
name
:
'GLExternal'
,
name
:
"GLExternal"
,
props
:
{
props
:
{
url
:
{
url
:
{
type
:
String
,
type
:
String
,
required
:
true
required
:
true
,
},
},
subscribe
:
{
subscribe
:
{
type
:
Function
,
type
:
Function
,
default
:
null
default
:
null
,
}
}
,
},
},
data
()
{
data
()
{
return
{
return
{
container
:
null
container
:
null
,
}
}
;
},
},
mounted
()
{
mounted
()
{
this
.
container
=
this
.
$refs
[
'adapter-frame'
]
this
.
container
=
this
.
$refs
[
"adapter-frame"
];
this
.
create
()
this
.
create
()
;
},
},
methods
:
{
methods
:
{
create
()
{
create
()
{
if
(
!
this
.
url
)
throw
new
Error
(
'url为空'
)
if
(
!
this
.
url
)
throw
new
Error
(
"url为空"
);
this
.
container
.
innerHTML
=
''
this
.
container
.
innerHTML
=
""
;
var
postmate
=
new
Postmate
({
var
postmate
=
new
Postmate
({
container
:
this
.
container
,
container
:
this
.
container
,
url
:
this
.
url
,
url
:
this
.
url
,
name
:
'adapter-frame'
,
name
:
"adapter-frame"
,
classListArray
:
[
'gl-external-adapter-frame'
]
classListArray
:
[
"gl-external-adapter-frame"
],
})
})
.
then
(
child
=>
{
.
then
((
child
)
=>
{
child
.
get
(
'height'
).
then
(
height
=>
{
child
.
get
(
"height"
).
then
((
height
)
=>
{
child
.
frame
.
setAttribute
(
'scrolling'
,
'no'
)
child
.
frame
.
setAttribute
(
"scrolling"
,
"no"
);
child
.
frame
.
style
.
height
=
`
${
height
+
14
}
px`
child
.
frame
.
style
.
height
=
`
${
height
}
px`
;
})
});
this
.
subscribe
&&
this
.
subscribe
(
child
)
this
.
subscribe
&&
this
.
subscribe
(
child
);
})
.
catch
(
err
=>
{
console
.
log
(
err
)
throw
new
Error
(
'连接失败: '
+
this
.
url
)
})
})
}
.
catch
((
err
)
=>
{
}
console
.
log
(
err
);
}
throw
new
Error
(
"连接失败: "
+
this
.
url
);
});
},
},
};
</
script
>
</
script
>
<
style
>
<
style
>
.gl-external-adapter-frame
{
.gl-external-adapter-frame
{
...
...
src/packages/Table/src/index.vue
View file @
9d9f52f
<
template
>
<
template
>
<div
class=
"glsx-table"
>
<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=
"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-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"
>
<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 {
...
@@ -239,7 +239,8 @@ export default {
// 多选
// 多选
handleSelect
(
val
)
{
handleSelect
(
val
)
{
this
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
=
val
this
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
=
val
;
this
.
$emit
(
'selectionTable'
,
val
)
},
},
// 清空多选
// 清空多选
...
@@ -252,12 +253,8 @@ export default {
...
@@ -252,12 +253,8 @@ export default {
//navHeight 传值底部高度
//navHeight 传值底部高度
var
baseNavEle
=
document
.
querySelector
(
'.scrm-base-nav'
)
var
baseNavEle
=
document
.
querySelector
(
'.scrm-base-nav'
)
var
baseSubNavEle
=
document
.
querySelector
(
'.scrm-base-sub-nav'
)
var
baseSubNavEle
=
document
.
querySelector
(
'.scrm-base-sub-nav'
)
var
baseNavEleHeight
=
0
var
baseNavEleHeight
=
baseNavEle
?
baseNavEle
.
clientHeight
:
0
;
var
baseSubNavEleHeight
=
0
var
baseSubNavEleHeight
=
baseSubNavEle
?
baseSubNavEle
.
clientHeight
:
0
if
(
baseNavEle
&&
baseNavEle
)
{
baseNavEleHeight
=
baseNavEle
.
clientHeight
//60
baseSubNavEleHeight
=
baseSubNavEle
.
clientHeight
//14
}
let
paginationHeight
let
paginationHeight
if
(
document
.
querySelector
(
'.el-pagination'
))
{
if
(
document
.
querySelector
(
'.el-pagination'
))
{
paginationHeight
=
document
.
querySelector
(
'.el-pagination'
).
clientHeight
+
20
paginationHeight
=
document
.
querySelector
(
'.el-pagination'
).
clientHeight
+
20
...
@@ -334,7 +331,7 @@ export default {
...
@@ -334,7 +331,7 @@ export default {
this
.
getListApi
&&
this
.
refreshTable
()
this
.
getListApi
&&
this
.
refreshTable
()
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
.a-click
{
.a-click
{
...
@@ -347,8 +344,6 @@ export default {
...
@@ -347,8 +344,6 @@ export default {
margin
:
10px
0
;
margin
:
10px
0
;
}
}
.glsx-table
.line-ellipsis
{
.glsx-table
.line-ellipsis
{
display
:
-webkit-box
;
width
:
100%
;
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
/* -webkit-line-clamp: 2; */
/* -webkit-line-clamp: 2; */
...
@@ -420,4 +415,4 @@ export default {
...
@@ -420,4 +415,4 @@ export default {
/* .hasTableContent .el-table__body-wrapper{
/* .hasTableContent .el-table__body-wrapper{
height: 100%;
height: 100%;
} */
} */
</
style
>
</
style
>
\ No newline at end of file
\ 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