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 0af48f56
authored
Sep 27, 2021
by
ym
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
css
1 parent
5eae1373
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
185 additions
and
15 deletions
src/App.vue
src/main.js
src/packages/index.js
src/plugins/element.js
src/theme/common.css
src/theme/index.css
src/App.vue
View file @
0af48f5
...
@@ -5,6 +5,8 @@
...
@@ -5,6 +5,8 @@
<GLExternal
url=
"//localhost:8080/html/employee/index.html"
:subscribe=
"subscribe"
></GLExternal>
<GLExternal
url=
"//localhost:8080/html/employee/index.html"
:subscribe=
"subscribe"
></GLExternal>
<GLButton
@
click=
"click"
id=
"1-1-1-1"
mode=
"button"
>
232321321
</GLButton>
<GLButton
@
click=
"click"
id=
"1-1-1-1"
mode=
"button"
>
232321321
</GLButton>
<el-button
type=
"primary"
>
aaa
</el-button>
<el-button
type=
"primary"
>
aaa
</el-button>
<el-button
type=
"primary"
size=
"small"
>
aaa
</el-button>
<el-button
type=
"primary"
size=
"mini"
>
aaa
</el-button>
<GLDialog
:visible
.
sync=
"visible"
title=
"aaaaaaaaa"
>
<GLDialog
:visible
.
sync=
"visible"
title=
"aaaaaaaaa"
>
<div
slot=
"footer"
>
<div
slot=
"footer"
>
<el-button
size=
"small"
@
click=
"visible = false"
>
取消
</el-button>
<el-button
size=
"small"
@
click=
"visible = false"
>
取消
</el-button>
...
@@ -39,7 +41,7 @@ export default {
...
@@ -39,7 +41,7 @@ export default {
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
>
#app
{
#app
{
...
@@ -50,4 +52,4 @@ export default {
...
@@ -50,4 +52,4 @@ export default {
color
:
#2c3e50
;
color
:
#2c3e50
;
margin-top
:
60px
;
margin-top
:
60px
;
}
}
</
style
>
</
style
>
\ No newline at end of file
\ No newline at end of file
src/main.js
View file @
0af48f5
import
Vue
from
'vue'
import
Vue
from
'vue'
import
App
from
'./App.vue'
import
App
from
'./App.vue'
import
{
GLExternal
,
GLButton
,
GLDialog
,
GLTable
}
from
'./packages/index'
import
{
GLExternal
,
GLButton
,
GLDialog
,
GLTable
}
from
'./packages/index'
import
'../dist/glsx-components.css'
//
import '../dist/glsx-components.css'
Vue
.
use
(
GLExternal
)
Vue
.
use
(
GLExternal
)
Vue
.
use
(
GLDialog
)
Vue
.
use
(
GLDialog
)
Vue
.
use
(
GLTable
)
Vue
.
use
(
GLTable
)
...
...
src/packages/index.js
View file @
0af48f5
...
@@ -4,22 +4,23 @@ import GLButton from './Button'
...
@@ -4,22 +4,23 @@ import GLButton from './Button'
import
GLDialog
from
'./Dialog'
import
GLDialog
from
'./Dialog'
import
GLTable
from
'./Table'
import
GLTable
from
'./Table'
import
'@/theme/index.css'
import
'@/theme/index.css'
import
'@/theme/common.css'
import
'@/plugins/element.js'
import
'@/plugins/element.js'
// 存储组件列表
// 存储组件列表
const
components
=
[
GLExternal
,
GLButton
,
GLDialog
,
GLTable
]
const
components
=
[
GLExternal
,
GLButton
,
GLDialog
,
GLTable
]
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
const
install
=
function
(
Vue
)
{
const
install
=
function
(
Vue
)
{
// 判断是否安装
// 判断是否安装
if
(
install
.
installed
)
return
if
(
install
.
installed
)
return
// 遍历注册全局组件
// 遍历注册全局组件
components
.
map
(
component
=>
Vue
.
component
(
component
.
name
,
component
))
components
.
map
(
component
=>
Vue
.
component
(
component
.
name
,
component
))
}
}
// 判断是否是直接引入文件
// 判断是否是直接引入文件
if
(
typeof
window
!==
'undefined'
&&
window
.
Vue
)
{
if
(
typeof
window
!==
'undefined'
&&
window
.
Vue
)
{
install
(
window
.
Vue
)
install
(
window
.
Vue
)
}
}
export
{
GLExternal
,
GLButton
,
GLDialog
,
GLTable
}
export
{
GLExternal
,
GLButton
,
GLDialog
,
GLTable
}
export
default
{
export
default
{
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
install
install
}
}
\ No newline at end of file
\ No newline at end of file
src/plugins/element.js
View file @
0af48f5
import
Vue
from
'vue'
import
Vue
from
'vue'
// import 'element-ui/lib/theme-chalk/index.css'
// import 'element-ui/lib/theme-chalk/index.css'
import
{
Button
,
ButtonGroup
,
Loading
}
from
'element-ui'
import
{
Button
,
ButtonGroup
,
Loading
,
Table
,
Input
,
Form
,
FormItem
}
from
'element-ui'
Vue
.
use
(
Loading
)
Vue
.
use
(
Loading
)
Vue
.
use
(
Button
)
Vue
.
use
(
Button
)
Vue
.
use
(
ButtonGroup
)
Vue
.
use
(
ButtonGroup
)
Vue
.
use
(
Table
)
Vue
.
use
(
Input
)
Vue
.
use
(
Form
)
Vue
.
use
(
FormItem
)
\ No newline at end of file
\ No newline at end of file
src/theme/common.css
0 → 100644
View file @
0af48f5
/* element */
.el-button
{
padding
:
10px
20px
;
font-size
:
14px
;
border-radius
:
4px
}
.el-button.is-round
{
padding
:
12px
20px
}
.el-button--small
{
padding
:
9px
20px
;
font-size
:
14px
;
border-radius
:
4px
;
}
.el-button--small.is-round
{
padding
:
9px
20px
;
}
.el-button--mini
{
padding
:
9px
16px
;
font-size
:
14px
;
border-radius
:
4px
;
}
.el-button--mini.is-round
{
padding
:
9px
16px
;
}
.el-dialog__title
{
font-size
:
20px
;
font-weight
:
500
;
color
:
#333333
;
line-height
:
28px
;
}
.el-form-item__label
{
font-size
:
14px
;
font-weight
:
400
;
color
:
#666666
;
}
/* common.css */
/* img {
width: 100%;
height: 100%;
vertical-align: top;
} */
.text-hide
{
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.text-hide-2
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
display
:
-webkit-box
;
-webkit-box-orient
:
vertical
;
-webkit-line-clamp
:
2
;
}
.scrm-textRight
{
text-align
:
right
;
}
.scrm-textCenter
{
text-align
:
center
;
}
.scrm-f12
{
font-size
:
12px
;
}
.scrm-f13
{
font-size
:
13px
;
}
.scrm-f14
{
font-size
:
14px
;
}
.scrm-f15
{
font-size
:
15px
;
}
.scrm-f16
{
font-size
:
16px
;
}
.scrm-f18
{
font-size
:
18px
;
}
.scrm-f20
{
font-size
:
20px
;
}
.scrm-f22
{
font-size
:
22px
;
}
.scrm-f24
{
font-size
:
24px
;
}
.scrm-m10
{
margin
:
10px
;
}
.scrm-m20
{
margin
:
20px
;
}
.scrm-ml10
{
margin-left
:
10px
;
}
.scrm-ml20
{
margin-left
:
20px
;
}
.scrm-mr10
{
margin-right
:
10px
;
}
.scrm-mr20
{
margin-right
:
20px
;
}
.scrm-p10
{
padding
:
10px
;
}
.scrm-p20
{
padding
:
20px
;
}
.scrm-box-background
{
background
:
#FFFFFF
;
box-shadow
:
0
10px
20px
0
rgba
(
88
,
80
,
255
,
0.10
);
}
.scrm-h1-title
{
font-size
:
20px
;
font-weight
:
600
;
color
:
#424242
;
line-height
:
20px
;
}
.scrm-h2-title
{
font-size
:
16px
;
font-weight
:
600
;
color
:
#333333
;
line-height
:
28px
;
}
\ No newline at end of file
\ No newline at end of file
src/theme/index.css
View file @
0af48f5
This diff could not be displayed because it is too large.
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