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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
65 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
=>
{
child
.
get
(
'height'
).
then
(
height
=>
{
child
.
frame
.
setAttribute
(
'scrolling'
,
'no'
)
child
.
frame
.
style
.
height
=
`
${
height
+
14
}
px`
})
this
.
subscribe
&&
this
.
subscribe
(
child
)
})
})
.
catch
(
err
=>
{
.
then
((
child
)
=>
{
console
.
log
(
err
)
child
.
get
(
"height"
).
then
((
height
)
=>
{
throw
new
Error
(
'连接失败: '
+
this
.
url
)
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
>
</
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
...
@@ -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; */
...
...
src/theme/theme.scss
View file @
9d9f52f
$defaultColor
:
#5850
ff
;
$defaultColor
:
#5850
FF
;
$lightColor
:
#7973ff
;
$lightColor
:
#7973ff
;
$dackColor
:
#4f48e6
;
$dackColor
:
#4f48e6
;
...
@@ -7,7 +7,7 @@ $dackColor: #4f48e6;
...
@@ -7,7 +7,7 @@ $dackColor: #4f48e6;
.el-button
{
.el-button
{
padding
:
12px
20px
;
padding
:
12px
20px
;
font-size
:
14px
;
font-size
:
14px
;
border-radius
:
4px
;
border-radius
:
4px
}
}
.el-button
:hover
,
.el-button
:hover
,
...
@@ -24,7 +24,7 @@ $dackColor: #4f48e6;
...
@@ -24,7 +24,7 @@ $dackColor: #4f48e6;
}
}
.el-button.is-round
{
.el-button.is-round
{
padding
:
12px
20px
;
padding
:
12px
20px
}
}
.el-button--primary
{
.el-button--primary
{
...
@@ -49,7 +49,7 @@ $dackColor: #4f48e6;
...
@@ -49,7 +49,7 @@ $dackColor: #4f48e6;
.el-button.is-plain
:focus
,
.el-button.is-plain
:focus
,
.el-button.is-plain
:hover
{
.el-button.is-plain
:hover
{
background
:
#fff
;
background
:
#FFF
;
border-color
:
$lightColor
;
border-color
:
$lightColor
;
color
:
$lightColor
;
color
:
$lightColor
;
}
}
...
@@ -92,6 +92,7 @@ $dackColor: #4f48e6;
...
@@ -92,6 +92,7 @@ $dackColor: #4f48e6;
line-height
:
28px
;
line-height
:
28px
;
}
}
/* 输入框 下拉框 选择器 开关 单选 多选*/
/* 输入框 下拉框 选择器 开关 单选 多选*/
.el-input__inner
:focus
{
.el-input__inner
:focus
{
...
@@ -174,7 +175,7 @@ $dackColor: #4f48e6;
...
@@ -174,7 +175,7 @@ $dackColor: #4f48e6;
background
:
#fff
;
background
:
#fff
;
}
}
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
.el-radio-button__orig-radio
:checked
+
.el-radio-button__inner
{
background-color
:
$defaultColor
;
background-color
:
$defaultColor
;
border-color
:
$defaultColor
;
border-color
:
$defaultColor
;
-webkit-box-shadow
:
-1px
0
0
0
$defaultColor
;
-webkit-box-shadow
:
-1px
0
0
0
$defaultColor
;
...
@@ -191,7 +192,7 @@ $dackColor: #4f48e6;
...
@@ -191,7 +192,7 @@ $dackColor: #4f48e6;
border-color
:
$defaultColor
;
border-color
:
$defaultColor
;
}
}
.el-radio__input.is-checked
+
.el-radio__label
{
.el-radio__input.is-checked
+
.el-radio__label
{
color
:
$defaultColor
;
color
:
$defaultColor
;
}
}
...
@@ -208,7 +209,7 @@ $dackColor: #4f48e6;
...
@@ -208,7 +209,7 @@ $dackColor: #4f48e6;
border-color
:
$defaultColor
;
border-color
:
$defaultColor
;
}
}
.el-checkbox__input.is-checked
+
.el-checkbox__label
{
.el-checkbox__input.is-checked
+
.el-checkbox__label
{
color
:
$defaultColor
;
color
:
$defaultColor
;
}
}
...
@@ -232,12 +233,13 @@ $dackColor: #4f48e6;
...
@@ -232,12 +233,13 @@ $dackColor: #4f48e6;
color
:
$defaultColor
;
color
:
$defaultColor
;
}
}
/* 标签*/
/* 标签*/
.el-tag
{
.el-tag
{
color
:
$lightColor
;
color
:
$lightColor
;
background
:
#e6e9ff
;
background
:
#E6E9FF
;
border
:
1px
solid
#5850ff
;
border
:
1px
solid
#5850FF
;
}
}
.el-tag
.el-tag__close
{
.el-tag
.el-tag__close
{
...
@@ -248,6 +250,7 @@ $dackColor: #4f48e6;
...
@@ -248,6 +250,7 @@ $dackColor: #4f48e6;
background-color
:
$lightColor
;
background-color
:
$lightColor
;
}
}
/* 面包屑*/
/* 面包屑*/
.el-breadcrumb__inner
a
,
.el-breadcrumb__inner
a
,
...
@@ -263,7 +266,7 @@ $dackColor: #4f48e6;
...
@@ -263,7 +266,7 @@ $dackColor: #4f48e6;
.el-breadcrumb__inner
{
.el-breadcrumb__inner
{
font-weight
:
700
;
font-weight
:
700
;
color
:
#3a3a3a
;
color
:
#3A3A3A
;
}
}
.el-breadcrumb__item
:last-child
.el-breadcrumb__inner
,
.el-breadcrumb__item
:last-child
.el-breadcrumb__inner
,
...
@@ -271,14 +274,15 @@ $dackColor: #4f48e6;
...
@@ -271,14 +274,15 @@ $dackColor: #4f48e6;
.el-breadcrumb__item
:last-child
.el-breadcrumb__inner
a
:hover
,
.el-breadcrumb__item
:last-child
.el-breadcrumb__inner
a
:hover
,
.el-breadcrumb__item
:last-child
.el-breadcrumb__inner
:hover
{
.el-breadcrumb__item
:last-child
.el-breadcrumb__inner
:hover
{
font-weight
:
700
;
font-weight
:
700
;
color
:
#3a3a3a
;
color
:
#3A3A3A
;
}
}
/* 树形 */
/* 树形 */
.el-tree--highlight-current
.el-tree-node.is-current
>
.el-tree-node__content
{
.el-tree--highlight-current
.el-tree-node.is-current
>
.el-tree-node__content
{
color
:
$defaultColor
;
color
:
$defaultColor
;
background-color
:
#f2f5fa
;
background-color
:
#F2F5FA
;
height
:
34px
;
height
:
34px
;
}
}
...
@@ -286,6 +290,7 @@ $dackColor: #4f48e6;
...
@@ -286,6 +290,7 @@ $dackColor: #4f48e6;
height
:
34px
;
height
:
34px
;
}
}
/* 选项卡 */
/* 选项卡 */
.el-tabs__item.is-active
{
.el-tabs__item.is-active
{
...
@@ -296,11 +301,11 @@ $dackColor: #4f48e6;
...
@@ -296,11 +301,11 @@ $dackColor: #4f48e6;
color
:
$defaultColor
;
color
:
$defaultColor
;
}
}
.el-tabs--border-card
>
.el-tabs__header
.el-tabs__item.is-active
{
.el-tabs--border-card
>
.el-tabs__header
.el-tabs__item.is-active
{
color
:
$defaultColor
;
color
:
$defaultColor
;
}
}
.el-tabs--border-card
>
.el-tabs__header
.el-tabs__item
:not
(
.is-disabled
)
:hover
{
.el-tabs--border-card
>
.el-tabs__header
.el-tabs__item
:not
(
.is-disabled
)
:hover
{
color
:
$defaultColor
;
color
:
$defaultColor
;
}
}
...
@@ -308,6 +313,7 @@ $dackColor: #4f48e6;
...
@@ -308,6 +313,7 @@ $dackColor: #4f48e6;
background-color
:
$defaultColor
;
background-color
:
$defaultColor
;
}
}
/* 表格 */
/* 表格 */
.el-table--medium
.el-table__cell
{
.el-table--medium
.el-table__cell
{
...
@@ -319,7 +325,7 @@ $dackColor: #4f48e6;
...
@@ -319,7 +325,7 @@ $dackColor: #4f48e6;
}
}
.el-table
.el-table__header
tr
{
.el-table
.el-table__header
tr
{
background
:
#f4f6fc
;
background
:
#F4F6FC
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#333333
;
color
:
#333333
;
...
@@ -327,7 +333,7 @@ $dackColor: #4f48e6;
...
@@ -327,7 +333,7 @@ $dackColor: #4f48e6;
}
}
.el-table
th
.el-table__cell
{
.el-table
th
.el-table__cell
{
background
:
#f4f6fc
;
background
:
#F4F6FC
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
600
;
font-weight
:
600
;
color
:
#333333
;
color
:
#333333
;
...
@@ -342,24 +348,25 @@ $dackColor: #4f48e6;
...
@@ -342,24 +348,25 @@ $dackColor: #4f48e6;
}
}
.el-table--striped
.el-table__body
tr
.el-table__row--striped.current-row
td
.el-table__cell
{
.el-table--striped
.el-table__body
tr
.el-table__row--striped.current-row
td
.el-table__cell
{
background-color
:
#f4f3ff
;
background-color
:
#F4F3FF
;
}
}
.el-table__body
tr
.current-row
>
td
.el-table__cell
{
.el-table__body
tr
.current-row
>
td
.el-table__cell
{
background-color
:
#f4f3ff
;
background-color
:
#F4F3FF
;
}
}
.el-table--striped
.el-table__body
tr
.el-table__row--striped
td
.el-table__cell
{
.el-table--striped
.el-table__body
tr
.el-table__row--striped
td
.el-table__cell
{
background
:
#fff
;
background
:
#fff
;
}
}
.el-table__body
tr
.hover-row.current-row
>
td
.el-table__cell
,
.el-table__body
tr
.hover-row.current-row
>
td
.el-table__cell
,
.el-table__body
tr
.hover-row.el-table__row--striped.current-row
>
td
.el-table__cell
,
.el-table__body
tr
.hover-row.el-table__row--striped.current-row
>
td
.el-table__cell
,
.el-table__body
tr
.hover-row.el-table__row--striped
>
td
.el-table__cell
,
.el-table__body
tr
.hover-row.el-table__row--striped
>
td
.el-table__cell
,
.el-table__body
tr
.hover-row
>
td
.el-table__cell
{
.el-table__body
tr
.hover-row
>
td
.el-table__cell
{
background-color
:
#f4f3ff
;
background-color
:
#F4F3FF
;
}
}
/* 分页 */
/* 分页 */
.el-pager
li
.active
{
.el-pager
li
.active
{
...
@@ -381,8 +388,13 @@ $dackColor: #4f48e6;
...
@@ -381,8 +388,13 @@ $dackColor: #4f48e6;
color
:
$defaultColor
;
color
:
$defaultColor
;
}
}
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
:hover
{
color
:
$defaultColor
;
}
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
.active
{
background-color
:
$defaultColor
;
background-color
:
$defaultColor
;
color
:
#ffffff
;
}
}
.el-pagination__sizes
.el-input
.el-input__inner
:hover
{
.el-pagination__sizes
.el-input
.el-input__inner
:hover
{
...
@@ -397,10 +409,6 @@ $dackColor: #4f48e6;
...
@@ -397,10 +409,6 @@ $dackColor: #4f48e6;
margin-left
:
10px
;
margin-left
:
10px
;
}
}
.el-pagination.is-background
.el-pager
li
:not
(
.disabled
)
:hover
{
color
:
$defaultColor
;
}
.el-drawer__header
{
.el-drawer__header
{
font-size
:
22px
;
font-size
:
22px
;
font-weight
:
600
;
font-weight
:
600
;
...
...
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