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 299740cf
authored
Dec 28, 2021
by
luyt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add:文件调整,多级表头的样式调整
1 parent
01e3ae85
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
103 deletions
.gitignore
src/App.vue
src/packages/Tooltip/index.js → src/packages/GlTooltip/index.js
src/packages/Tooltip/src/index.vue → src/packages/GlTooltip/src/index.vue
src/packages/Table/src/index.vue
src/packages/index.js
.gitignore
View file @
299740c
...
@@ -15,6 +15,7 @@ website/
...
@@ -15,6 +15,7 @@ website/
*.air
*.air
*.ipa
*.ipa
*.apk
*.apk
postcss.config.js
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties`
# should NOT be excluded as they contain compiler settings and other important
# should NOT be excluded as they contain compiler settings and other important
...
...
src/App.vue
View file @
299740c
...
@@ -3,16 +3,26 @@
...
@@ -3,16 +3,26 @@
<!--
<img
alt=
"Vue logo"
src=
"./assets/logo.png"
/>
-->
<!--
<img
alt=
"Vue logo"
src=
"./assets/logo.png"
/>
-->
<!--
<HelloWorld
msg=
"Welcome to Your Vue.js App"
/>
<!--
<HelloWorld
msg=
"Welcome to Your Vue.js App"
/>
<GLExternal
url=
"//localhost:8080/html/employee/index.html"
:subscribe=
"subscribe"
></GLExternal>
-->
<GLExternal
url=
"//localhost:8080/html/employee/index.html"
:subscribe=
"subscribe"
></GLExternal>
-->
<hr
/>
<h3>
el-button调整
</h3>
<GLButton
@
click=
"click"
fn=
"1-1-1-11"
mode=
"el-button"
display=
"disabled"
>
232321321
</GLButton>
<GLButton
@
click=
"click"
fn=
"1-1-1-11"
mode=
"el-button"
display=
"disabled"
>
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=
"small"
>
aaa
</el-button>
<el-button
type=
"primary"
size=
"mini"
>
aaa
</el-button>
<el-button
type=
"primary"
size=
"mini"
>
aaa
</el-button>
<hr
/>
<h3>
el-dialog调整
</h3>
<!--
<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>
<el-button
type=
"primary"
size=
"small"
>
aaa
</el-button>
<el-button
type=
"primary"
size=
"small"
>
aaa
</el-button>
</div>
</div>
</GLDialog>
-->
</GLDialog>
-->
<hr
/>
<h3>
el-table调整
</h3>
<GLTable
ref=
"liveRoomRef"
:tableParams=
"tableParams"
:tableData=
"tableData"
>
<GLTable
ref=
"liveRoomRef"
:tableParams=
"tableParams"
:tableData=
"tableData"
>
<span
slot=
"shareImgUrl"
slot-scope=
"scope"
>
<span
slot=
"shareImgUrl"
slot-scope=
"scope"
>
<img
class=
"img-60"
:src=
"scope.scope.shareImgUrl"
/>
<img
class=
"img-60"
:src=
"scope.scope.shareImgUrl"
/>
...
@@ -24,37 +34,22 @@
...
@@ -24,37 +34,22 @@
<el-button
v-if=
"scope.scope.liveStatus != '101'"
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
<el-button
v-if=
"scope.scope.liveStatus != '101'"
type=
"text"
@
click=
"handleDelete(scope.scope)"
>
删除
</el-button>
</span>
</span>
</GLTable>
</GLTable>
<!--
<el-table
:data=
"tableData"
style=
"width: 100%"
>
<el-table-column
prop=
"date"
label=
"序号"
align=
"center"
></el-table-column>
<hr
/>
<el-table-column
label=
"订单信息"
align=
"center"
>
<h3>
el-tooltip调整
</h3>
<el-table-column
prop=
"name"
label=
"支付订单编号"
align=
"center"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"交易参考号"
></el-table-column>
<gl-tooltip
class=
"item"
effect=
"dark"
content=
"hello tooltip"
placement=
"top-start"
>
<el-table-column
prop=
"name"
align=
"center"
label=
"商品名称"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"商品编号"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"商品成本"
></el-table-column>
</el-table-column>
<el-table-column
label=
"支付信息"
align=
"center"
>
<el-table-column
prop=
"name"
align=
"center"
label=
"客户手机号"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"转化员"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"转销售顾问"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"支付时间"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"支付方式"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"支付金额"
></el-table-column>
</el-table-column>
<el-table-column
label=
"导流方利润"
align=
"center"
>
<el-table-column
prop=
"name"
align=
"center"
label=
"总分账金额"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"分润对象"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"分润规则"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"分润金额"
></el-table-column>
<el-table-column
prop=
"name"
align=
"center"
label=
"分账类型"
></el-table-column>
</el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
align=
"center"
width=
"120"
>
添加
</el-table-column>
</el-table>
-->
<!-- 弹窗调整 -->
<h2>
文字内容弹窗调整
</h2>
<el-tooltip
class=
"item"
effect=
"dark"
content=
"Top Left 提示文字提示文字提示文字提示文字提字提示文字提示文字提示文字示文字提示文字提示文字提示文字提示文字"
placement=
"top-start"
>
<el-button>
上左
</el-button>
<el-button>
上左
</el-button>
</el-tooltip>
<!--
<template
slot=
'content'
>
<p>
Here's some contact info
</p>
</
template
>
-->
<!-- <template v-slot:content>
<p>Here's some contact info</p>
</template> -->
<
template
#
content
>
<p>
Here's some contact info
</p>
</
template
>
</gl-tooltip>
</div>
</div>
</template>
</template>
...
@@ -79,7 +74,7 @@ export default {
...
@@ -79,7 +74,7 @@ export default {
{
{
label
:
'直播间名称'
,
label
:
'直播间名称'
,
prop
:
'name'
,
prop
:
'name'
,
line
:
1
,
line
:
1
// children:[
// children:[
// {
// {
// label: '直播间名称1',
// label: '直播间名称1',
...
@@ -115,25 +110,25 @@ export default {
...
@@ -115,25 +110,25 @@ export default {
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
111
return
111
},
},
children
:[
children
:
[
{
{
label
:
'直播状态1'
,
label
:
'直播状态1'
,
prop
:
'liveStatus1'
,
prop
:
'liveStatus1'
,
line
:
1
,
line
:
1
,
addHtml
:
'shareImgUrl'
,
addHtml
:
'shareImgUrl'
,
children
:[
children
:
[
{
{
label
:
'直播状态3'
,
label
:
'直播状态3'
,
prop
:
'liveStatus3'
,
prop
:
'liveStatus3'
,
line
:
1
,
line
:
1
,
addHtml
:
'shareImgUrl'
,
addHtml
:
'shareImgUrl'
},
},
{
{
label
:
'直播状态4'
,
label
:
'直播状态4'
,
prop
:
'liveStatus4'
,
prop
:
'liveStatus4'
,
line
:
1
,
line
:
1
,
addHtml
:
'shareImgUrl'
addHtml
:
'shareImgUrl'
},
}
]
]
},
},
{
{
...
@@ -141,15 +136,15 @@ export default {
...
@@ -141,15 +136,15 @@ export default {
prop
:
'liveStatus2'
,
prop
:
'liveStatus2'
,
line
:
1
,
line
:
1
,
addHtml
:
'shareImgUrl'
,
addHtml
:
'shareImgUrl'
,
//
children:[
children
:[
//
{
{
//
label: '直播状态3',
label
:
'直播状态3'
,
//
prop: 'liveStatus3',
prop
:
'liveStatus3'
,
//
line: 1,
line
:
1
,
//
addHtml: 'shareImgUrl'
addHtml
:
'shareImgUrl'
//
}
}
//
]
]
}
,
}
]
]
}
}
]
]
...
@@ -157,50 +152,50 @@ export default {
...
@@ -157,50 +152,50 @@ export default {
tableData
:
[
tableData
:
[
{
{
name
:
'王小虎王小虎王小虎王'
,
name
:
'王小虎王小虎王小虎王'
,
liveStatus3
:
'132'
,
liveStatus3
:
'132'
,
liveStatus4
:
'789'
,
liveStatus4
:
'789'
,
name1
:
'123'
,
name1
:
'123'
,
name2
:
'123'
,
name2
:
'123'
},
},
{
{
name
:
'王小虎王小虎王小虎王王小虎王小虎王小虎王'
,
name
:
'王小虎王小虎王小虎王王小虎王小虎王小虎王'
,
liveStatus3
:
'132'
,
liveStatus3
:
'132'
,
liveStatus4
:
'789'
,
liveStatus4
:
'789'
,
name1
:
'123'
,
name1
:
'123'
,
name2
:
'123'
,
name2
:
'123'
},
},
{
{
name
:
'王小虎'
,
name
:
'王小虎'
,
name1
:
'123'
,
name1
:
'123'
,
name2
:
'123'
,
name2
:
'123'
},
},
{
{
name
:
'王小虎王小虎王小虎王'
,
name
:
'王小虎王小虎王小虎王'
,
liveStatus3
:
'132'
,
liveStatus3
:
'132'
,
liveStatus4
:
'789'
,
liveStatus4
:
'789'
,
name1
:
'123'
,
name1
:
'123'
,
name2
:
'123'
,
name2
:
'123'
},
},
{
{
name
:
'王小虎王小虎王小虎王王小虎王小虎王小虎王'
,
name
:
'王小虎王小虎王小虎王王小虎王小虎王小虎王'
,
liveStatus3
:
'132'
,
liveStatus3
:
'132'
,
liveStatus4
:
'789'
,
liveStatus4
:
'789'
,
name1
:
'123'
,
name1
:
'123'
,
name2
:
'123'
,
name2
:
'123'
},
},
{
{
name
:
'王小虎'
,
name
:
'王小虎'
,
liveStatus3
:
'132'
,
liveStatus3
:
'132'
,
liveStatus4
:
'789'
,
liveStatus4
:
'789'
,
name1
:
'123'
,
name1
:
'123'
,
name2
:
'123'
,
name2
:
'123'
},
},
{
{
name
:
'王小虎王小虎王小虎王'
,
name
:
'王小虎王小虎王小虎王'
,
liveStatus3
:
'132'
,
liveStatus3
:
'132'
,
liveStatus4
:
'789'
,
liveStatus4
:
'789'
,
name1
:
'123'
,
name1
:
'123'
,
name2
:
'123'
,
name2
:
'123'
}
}
]
]
}
}
...
@@ -227,12 +222,8 @@ export default {
...
@@ -227,12 +222,8 @@ export default {
-moz-osx-font-smoothing
:
grayscale
;
-moz-osx-font-smoothing
:
grayscale
;
text-align
:
center
;
text-align
:
center
;
color
:
#2c3e50
;
color
:
#2c3e50
;
margin-top
:
60px
;
//
margin-top
:
60px
;
padding-top
:
60px
;
padding-bottom
:
50px
;
}
}
//
table
滚动调样式
//
table
滚动调样式
</
style
>
</
style
>
src/packages/Tooltip/index.js
→
src/packages/
Gl
Tooltip/index.js
View file @
299740c
File moved
src/packages/Tooltip/src/index.vue
→
src/packages/
Gl
Tooltip/src/index.vue
View file @
299740c
...
@@ -2,6 +2,15 @@
...
@@ -2,6 +2,15 @@
<div
class=
"gl-tooltip"
>
<div
class=
"gl-tooltip"
>
<el-tooltip
v-bind=
"$attrs"
v-on=
"$listeners"
>
<el-tooltip
v-bind=
"$attrs"
v-on=
"$listeners"
>
<slot></slot>
<slot></slot>
<!--
<div
slot=
"content"
v-if=
"$slots.content"
>
<slot
name=
"content"
></slot>
</div>
-->
<!--
<template
v-slot:content
v-if=
"$slots.content"
>
<slot
name=
"content"
></slot>
</
template
>
-->
<
template
#
content
v-if=
"$slots.content"
>
<slot
name=
"content"
></slot>
</
template
>
</el-tooltip>
</el-tooltip>
</div>
</div>
</template>
</template>
...
...
src/packages/Table/src/index.vue
View file @
299740c
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
</span>
</span>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<!-- 大于10或 20个字节长度 -->
<!-- 大于10或 20个字节长度
宽度160px
-->
<el-popover
v-if=
"tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= 10 * item.line"
placement=
"top"
popper-class=
"base-popper"
trigger=
"hover"
:content=
"tableData[scope.$index][item.prop]"
>
<el-popover
v-if=
"tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= 10 * item.line"
placement=
"top"
popper-class=
"base-popper"
trigger=
"hover"
:content=
"tableData[scope.$index][item.prop]"
>
<span
slot=
"reference"
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }">
<span
slot=
"reference"
class=
"line-ellipsis"
:style=
"
{ '-webkit-line-clamp': item.line ? item.line : '' }">
...
@@ -66,7 +66,6 @@
...
@@ -66,7 +66,6 @@
</template>
</template>
<
script
>
<
script
>
let
hignLigihtLine
=
''
import
SubElTableColumn
from
'./sub-el-table-column.vue'
import
SubElTableColumn
from
'./sub-el-table-column.vue'
import
GlSubTableColumn
from
'../../GlSubTableColumn'
import
GlSubTableColumn
from
'../../GlSubTableColumn'
import
GlSubTable
from
'../../GlSubTable'
import
GlSubTable
from
'../../GlSubTable'
...
@@ -510,8 +509,14 @@ export default {
...
@@ -510,8 +509,14 @@ export default {
box-shadow
:
none
!important
;
box-shadow
:
none
!important
;
}
}
/* 样式新增光亮tr */
/* 样式新增光亮tr */
/* 多级表头的样式调整 */
.el-table.hightline
.el-table__fixed
.el-table__row
td
:first-child
{
border-right
:
none
;
}
.el-table.hightline
.el-table__fixed
th
.is-leaf
:first-child
{
border
:
none
;
}
//
气泡
(
基础用法
)
//
气泡
(
基础用法
)
.base-popper
{
.base-popper
{
...
...
src/packages/index.js
View file @
299740c
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
/***
/***
* new line
* new line
*/
*/
...
@@ -34,31 +35,31 @@
...
@@ -34,31 +35,31 @@
import
'@/plugins/element.js'
import
'@/plugins/element.js'
import
'@/theme/theme.scss'
import
'@/theme/theme.scss'
// test 组件
import
TestComp
from
'./TestComp'
import
GLExternal
from
'./External'
import
GLExternal
from
'./External'
import
GLButton
from
'./Button'
import
GLButton
from
'./Button'
import
GLDialog
from
'./Dialog'
import
GLDialog
from
'./Dialog'
import
GLTable
from
'./Table'
import
GLTable
from
'./Table'
// test 组件
import
GlTooltip
from
'./GlTooltip'
import
TestComp
from
'./TestComp'
// // 一次性注册所有的过滤器 本地测试
// import filters from '@/filters'
// 一次性注册所有的过滤器 本地测试
import
filters
from
'@/filters'
// 存储组件列表
// 存储组件列表
const
components
=
[
GLExternal
,
GLButton
,
GLDialog
,
GLTable
,
TestCom
p
]
const
components
=
[
TestComp
,
GLExternal
,
GLButton
,
GLDialog
,
GLTable
,
GlToolti
p
]
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
const
install
=
function
(
Vue
)
{
const
install
=
function
(
Vue
)
{
//
//
注册全局过滤器(一次性注册)
// 注册全局过滤器(一次性注册)
//
Object.keys(filters).forEach(key => {
Object
.
keys
(
filters
).
forEach
(
key
=>
{
//
Vue.filter(key, filters[key])
Vue
.
filter
(
key
,
filters
[
key
])
//
})
})
// 判断是否安装
// 判断是否安装
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
)
{
...
@@ -68,9 +69,10 @@ if (typeof window !== 'undefined' && window.Vue) {
...
@@ -68,9 +69,10 @@ if (typeof window !== 'undefined' && window.Vue) {
export
default
{
export
default
{
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
// 导出的对象必须具有 install,才能被 Vue.use() 方法安装
install
,
install
,
TestComp
,
GLExternal
,
GLExternal
,
GLButton
,
GLButton
,
GLDialog
,
GLDialog
,
GLTable
,
GLTable
,
TestComp
}
\ No newline at end of file
\ No newline at end of file
GlTooltip
}
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