Commit 8c6d11d9 by 匡雅琴

Merge branch 'dev_v1.0.0' of http://192.168.3.233:8090/npm/glsx-components into dev_v1.0.0

2 parents c15ef361 1b2d77fa
This diff could not be displayed because it is too large.
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
sidebar: [{ sidebar: [{
title: '组件文档', title: '组件文档',
links: [ links: [
{
title: 'Blog',
link: '/components/Blog'
},
{ {
title: 'TestComp', title: 'TestComp',
link: '/components/TestComp' link: '/components/TestComp'
......
...@@ -179,11 +179,11 @@ export default { ...@@ -179,11 +179,11 @@ export default {
}, },
{ {
label: '直播状态', label: '直播状态',
prop: 'liveStatus', // prop: 'liveStatus',
width: '80', width: '80',
formatter: cellValue => { // formatter: cellValue => {
return 111 // return 111
}, // },
children: [ children: [
{ {
label: '直播状态1', label: '直播状态1',
...@@ -280,47 +280,82 @@ export default { ...@@ -280,47 +280,82 @@ export default {
liveStatus3: '132', liveStatus3: '132',
liveStatus4: '789', liveStatus4: '789',
name1: '123', name1: '123',
name2: '123' name2: '123',
aiveStatus3: '123',
yiveStatus4: '123',
civeStatus3: '123',
diveStatus4: '123',
kiveStatus4: '123'
}, },
{ {
name: '王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王小虎王小虎王王小虎王小虎王小虎王', name: '王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王小虎王小虎王王小虎王小虎王小虎王',
liveStatus3: '132', liveStatus3: '132',
liveStatus4: '789', liveStatus4: '789',
name1: '123', name1: '123',
name2: '123' name2: '123',
aiveStatus3: '123',
yiveStatus4: '123',
civeStatus3: '123',
diveStatus4: '123',
kiveStatus4: '123'
}, },
{ {
name: '_____________', name: '_____________',
name1: '123', name1: '123',
name2: '123' name2: '123',
aiveStatus3: '123',
yiveStatus4: '123',
civeStatus3: '123',
diveStatus4: '123',
kiveStatus4: '123'
}, },
{ {
name: '王小虎王小虎王小虎王', name: '王小虎王小虎王小虎王',
liveStatus3: '132', liveStatus3: '132',
liveStatus4: '789', liveStatus4: '789',
name1: '123', name1: '123',
name2: '123' name2: '123',
aiveStatus3: '123',
yiveStatus4: '123',
civeStatus3: '123',
diveStatus4: '123',
kiveStatus4: '123'
}, },
{ {
name: '王小虎王小虎王小虎王王小虎王小虎王小虎王', name: '王小虎王小虎王小虎王王小虎王小虎王小虎王',
liveStatus3: '132', liveStatus3: '132',
liveStatus4: '789', liveStatus4: '789',
name1: '123', name1: '123',
name2: '123' name2: '123',
aiveStatus3: '123',
yiveStatus4: '123',
civeStatus3: '123',
diveStatus4: '123',
kiveStatus4: '123'
}, },
{ {
name: '王小虎', name: '王小虎',
liveStatus3: '132', liveStatus3: '132',
liveStatus4: '789', liveStatus4: '789',
name1: '123', name1: '123',
name2: '123' name2: '123',
aiveStatus3: '123',
yiveStatus4: '123',
civeStatus3: '123',
diveStatus4: '123',
kiveStatus4: '123'
}, },
{ {
name: '王小虎王小虎王小虎王', name: '王小虎王小虎王小虎王',
liveStatus3: '132', liveStatus3: '132',
liveStatus4: '789', liveStatus4: '789',
name1: '123', name1: '123',
name2: '123' name2: '123',
aiveStatus3: '123',
yiveStatus4: '123',
civeStatus3: '123',
diveStatus4: '123',
kiveStatus4: '123'
} }
], ],
gridData: [ gridData: [
...@@ -649,6 +684,220 @@ export default { ...@@ -649,6 +684,220 @@ export default {
} }
}, },
mounted() { mounted() {
//测试改变 tableColumns
setTimeout(() => {
// this.$refs.liveRoomRef.componentKey = Date.now()
// console.log('测试改变 tableColumns')
this.tableParams.tableColumns = [
{
label: '最近开播',
prop: 'time',
width: '180',
formatter: cellValue => {
return cellValue.startTime + '-' + cellValue.endTime
},
columnattrs: {},
columnlisteners: {}
},
{
label: '直播间名称',
prop: 'name',
line: 1,
width: 90
// children:[
// {
// label: '直播间名称1',
// prop: 'name1',
// line: 1,
// },
// {
// label: '直播间名称2',
// prop: 'name2',
// line: 1,
// },
// ]
},
{
label: '房间号',
prop: 'roomId'
},
{
label: '主播',
prop: 'anchorName',
line: 1
},
{
label: '直播间图片',
prop: 'shareImgUrl',
line: 1,
width: 150,
addHtml: 'shareImgUrl'
},
{
label: '直播状态',
prop: 'liveStatus',
// width: '80',
formatter: cellValue => {
return 111
},
children: [
{
label: '直播状态1',
prop: 'liveStatus1',
line: 1,
// addHtml: 'shareImgUrl',
children: [
{
label: '直播状态1-1',
prop: 'aiveStatus3',
line: 1,
width: '200'
// addHtml: 'shareImgUrl'
},
{
label: '直播状态1-2',
prop: 'yiveStatus4',
line: 1,
width: '200'
// addHtml: 'shareImgUrl'
},
{
label: '直播状态1-3',
prop: 'civeStatus3',
line: 1,
width: '200'
// addHtml: 'shareImgUrl'
},
{
label: '直播状态1-4',
prop: 'diveStatus4',
line: 1,
width: '200'
// addHtml: 'shareImgUrl'
},
{
label: '直播状态1-5',
prop: 'kiveStatus4',
line: 1,
width: '200'
// addHtml: 'shareImgUrl'
}
]
},
{
label: '直播状态2',
prop: 'liveStatus2',
// line: 1,
// addHtml: 'shareImgUrl',
children: [
{
label: '直播状态2-1',
prop: 'liveStatus3',
line: 1,
width: '200'
// addHtml: 'shareImgUrl'
},
{
label: '直播状态2-2',
prop: 'kiveStatus3',
line: 1,
width: '200'
// addHtml: 'shareImgUrl'
}
]
}
]
}
]
this.$refs.liveRoomRef.componentKey = Date.now()
// //测试表格数据异步
// this.tableData = [
// {
// name: '王小虎王小虎王小虎王',
// liveStatus3: '132',
// liveStatus4: '789',
// name1: '123',
// name2: '123',
// aiveStatus3:'123',
// yiveStatus4:'123',
// civeStatus3:'123',
// diveStatus4:'123',
// kiveStatus4:'123',
// },
// {
// name: '王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王王小虎王小虎王小虎王小虎王小虎王王小虎王小虎王小虎王',
// liveStatus3: '132',
// liveStatus4: '789',
// name1: '123',
// name2: '123',
// aiveStatus3:'123',
// yiveStatus4:'123',
// civeStatus3:'123',
// diveStatus4:'123',
// kiveStatus4:'123',
// },
// {
// name: '_____________',
// name1: '123',
// name2: '123',
// aiveStatus3:'123',
// yiveStatus4:'123',
// civeStatus3:'123',
// diveStatus4:'123',
// kiveStatus4:'123',
// },
// {
// name: '王小虎王小虎王小虎王',
// liveStatus3: '132',
// liveStatus4: '789',
// name1: '123',
// name2: '123',
// aiveStatus3:'123',
// yiveStatus4:'123',
// civeStatus3:'123',
// diveStatus4:'123',
// kiveStatus4:'123',
// },
// {
// name: '王小虎王小虎王小虎王王小虎王小虎王小虎王',
// liveStatus3: '132',
// liveStatus4: '789',
// name1: '123',
// name2: '123',
// aiveStatus3:'123',
// yiveStatus4:'123',
// civeStatus3:'123',
// diveStatus4:'123',
// kiveStatus4:'123',
// },
// {
// name: '王小虎',
// liveStatus3: '132',
// liveStatus4: '789',
// name1: '123',
// name2: '123',
// aiveStatus3:'123',
// yiveStatus4:'123',
// civeStatus3:'123',
// diveStatus4:'123',
// kiveStatus4:'123',
// },
// {
// name: '王小虎王小虎王小虎王',
// liveStatus3: '132',
// liveStatus4: '789',
// name1: '123',
// name2: '123',
// aiveStatus3:'123',
// yiveStatus4:'123',
// civeStatus3:'123',
// diveStatus4:'123',
// kiveStatus4:'123',
// }
// ]
}, 3000)
// 测试省市组件
this.$refs.provinceForm2.provinceList() this.$refs.provinceForm2.provinceList()
}, },
methods: { methods: {
......
import Blog from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
Blog.install = function(Vue) {
Vue.component(Blog.name, Blog)
}
// 默认导出组件
export default Blog
<!-- <content> -->
# 用来作为 markdown 代码的示例部分
```html
更新日志
v1.4.2
1.调整GlTableButton、GlCombiForm穿透属性顺序
2.修改table无数据的单元格状态 --
```
<!-- </content> -->
<template>
<div class="blog"></div>
</template>
<script>
export default {
name: 'Blog',
props: {
// 1.XX新增
// hello
end: {
type: String,
default: ''
}
},
data() {
return {}
}
}
</script>
<style lang="scss">
.blog {
}
</style>
...@@ -268,6 +268,10 @@ export default { ...@@ -268,6 +268,10 @@ export default {
watch: { watch: {
customHeadShowList(val) { customHeadShowList(val) {
this.isCustomHead && this.findShowHeadCol() this.isCustomHead && this.findShowHeadCol()
},
'tableParams.tableColumns'(newVal,oldVal) {
// console.log('newVal',newVal)
this.tableColumns = newVal
} }
// data: { // data: {
// immediate: true, // immediate: true,
...@@ -349,7 +353,7 @@ export default { ...@@ -349,7 +353,7 @@ export default {
}, },
// @vuese // @vuese
// 设置表格高度 // 设置表格高度
// @arg navHeight 默认为0 这个数值 // @arg 1.navHeight,这个减值,2.addHeight是增值, 默认都为0
setTableHeightFun(navHeight = 0,addHeight = 0) { setTableHeightFun(navHeight = 0,addHeight = 0) {
// 设置表格高度 // 设置表格高度
//navHeight 传值底部高度 //navHeight 传值底部高度
...@@ -427,15 +431,24 @@ export default { ...@@ -427,15 +431,24 @@ export default {
// 页码 // 页码
this.page[this.pageConf.pageNum] = value this.page[this.pageConf.pageNum] = value
this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page) this.getListApi ? this.refreshTable(false, false) : this.$emit('refreshTable', this.page)
}
}, },
//原table mounted要做的要做的事情
mounted() { tableInit(){
this.isCustomHead ? this.findShowHeadCol() : (this.tableColumns = this.tableParams.tableColumns) this.isCustomHead ? this.findShowHeadCol() : (this.tableColumns = this.tableParams.tableColumns)
this.page = {} this.page = {}
this.page[this.pageConf.pageSize] = this.pageSizes[0] this.page[this.pageConf.pageSize] = this.pageSizes[0]
this.page[this.pageConf.pageNum] = 1 this.page[this.pageConf.pageNum] = 1
this.getListApi && this.refreshTable() this.getListApi && this.refreshTable()
setTimeout(() => {
// console.log('123456doLayout')
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].doLayout()
}, 100)
}
},
mounted() {
this.tableInit()
// 注册事件 -- 防抖 // 注册事件 -- 防抖
window.onresize = () => { window.onresize = () => {
if (!this.bAntiShike) { if (!this.bAntiShike) {
...@@ -447,11 +460,6 @@ export default { ...@@ -447,11 +460,6 @@ export default {
}, 300) }, 300)
} }
} }
//
setTimeout(() => {
// console.log('123456doLayout')
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].doLayout()
}, 100)
}, },
beforeDestroy() { beforeDestroy() {
// 事件注销 // 事件注销
......
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
}, },
components: { components: {
GlSubTableColumn GlSubTableColumn
} },
// created(){ // created(){
// // console.log('data',this.data) // // console.log('data',this.data)
// } // }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!