Commit 5e8146a0 by limin

Merge branch 'master' of http://192.168.3.233:8090/npm/glsx-components into master

2 parents 4abd3be7 55f1e56f
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -3,15 +3,12 @@ ...@@ -3,15 +3,12 @@
<!-- <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 /> <hr />
<h3>el-button调整</h3> <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 /> <hr />
<h3>el-dialog调整</h3> <h3>el-dialog调整</h3>
<!-- <GLDialog :visible.sync="visible" title="aaaaaaaaa"> <!-- <GLDialog :visible.sync="visible" title="aaaaaaaaa">
...@@ -22,7 +19,6 @@ ...@@ -22,7 +19,6 @@
</GLDialog> --> </GLDialog> -->
<hr /> <hr />
<h3>el-table调整</h3> <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" />
...@@ -34,10 +30,8 @@ ...@@ -34,10 +30,8 @@
<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>
<hr /> <hr />
<h3>el-tooltip调整</h3> <h3>el-tooltip调整</h3>
<!-- <gl-tooltip class="item" effect="dark" content="hello tooltip" placement="top-start"> <!-- <gl-tooltip class="item" effect="dark" content="hello tooltip" placement="top-start">
<el-button>上左</el-button> --> <el-button>上左</el-button> -->
<!-- <template slot='content'> <!-- <template slot='content'>
...@@ -50,12 +44,10 @@ ...@@ -50,12 +44,10 @@
<p>Here's some contact info</p> <p>Here's some contact info</p>
</template> </template>
</gl-tooltip> --> </gl-tooltip> -->
<!-- <el-tooltip class="item" content="hello tooltip" placement="top-start"> <!-- <el-tooltip class="item" content="hello tooltip" placement="top-start">
<el-button>上左</el-button> <el-button>上左</el-button>
</el-tooltip> --> </el-tooltip> -->
<Popover popper-class="bubble-box" placement="top" width="600" trigger="click">
<el-popover popper-class="bubble-box" placement="top" width="600" trigger="click">
<div class="bubble-content"> <div class="bubble-content">
<el-table :data="gridData"> <el-table :data="gridData">
<el-table-column width="150" property="date" label="日期"></el-table-column> <el-table-column width="150" property="date" label="日期"></el-table-column>
...@@ -63,10 +55,9 @@ ...@@ -63,10 +55,9 @@
<el-table-column width="300" property="address" label="地址"></el-table-column> <el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table> </el-table>
</div> </div>
<el-button slot="reference">click 激活</el-button> <el-button slot="reference">click 激活</el-button>
</el-popover> </Popover>
<GLFooter></GLFooter>
<!-- <el-popover <!-- <el-popover
placement="bottom" placement="bottom"
title="标题" title="标题"
...@@ -76,7 +67,6 @@ ...@@ -76,7 +67,6 @@
v-model="visible"> v-model="visible">
<el-button slot="reference" @click="visible = !visible">手动激活</el-button> <el-button slot="reference" @click="visible = !visible">手动激活</el-button>
</el-popover> --> </el-popover> -->
<!-- <el-popover <!-- <el-popover
placement="top" placement="top"
width="160" width="160"
...@@ -90,7 +80,6 @@ ...@@ -90,7 +80,6 @@
</el-popover> --> </el-popover> -->
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: 'App', name: 'App',
...@@ -309,7 +298,6 @@ export default { ...@@ -309,7 +298,6 @@ export default {
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
#app { #app {
font-family: Avenir, Helvetica, Arial, sans-serif; font-family: Avenir, Helvetica, Arial, sans-serif;
......
import GLFooter from './src/index.vue'
// 为组件提供 install 安装方法,供按需引入
GLFooter.install = function(Vue) {
Vue.component(GLFooter.name, GLFooter)
}
// 默认导出组件
export default GLFooter
\ No newline at end of file \ No newline at end of file
<template>
<div
class="scrm-footer-panel"
:style="{
left: footerLeft + 'px',
width: footerWidth + 'px'
}"
>
<slot></slot>
</div>
</template>
<script>
export default {
name: 'GLFooter',
props: {
className: {
type: String,
default: '.base-container-right'
}
},
data() {
return {
footerLeft: 0,
footerWidth: 0
}
},
methods: {
resize() {
this.footerLeft = document.querySelector(this.className)?document.querySelector(this.className).offsetLeft : 0
this.footerWidth = document.documentElement.clientWidth - this.footerLeft
}
},
destroyed() {
window.removeEventListener('resize', this.resize)
},
mounted() {
this.resize()
window.addEventListener('resize', this.resize)
}
}
</script>
<style lang="scss">
.scrm-footer-panel {
display: flex;
align-items: center;
justify-content: center;
position: fixed;
bottom: 0px;
height: 64px;
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
}
</style>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
</el-table-column> </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="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" :fixed="item.fixed" :align="item.align || 'center'" :sortable="item.sortable" :render-header="item.renderHeader"> <el-table-column v-for="(item, index) in tableColumns" :key="index" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'center'" :sortable="item.sortable" :render-header="item.renderHeader">
<template slot-scope="scope"> <template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
<slot name="additionalContent"></slot> <slot name="additionalContent"></slot>
</template> </template>
</el-table> </el-table>
<el-pagination v-if="hasPage" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="[10, 20, 30, 40]" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination> <el-pagination v-if="hasPage" v-bind="paginationattrs" v-on="paginationlisteners" background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page[this.pageConf.pageNum]" :page-sizes="pageSizes" :page-size="page[this.pageConf.pageSize]" :total="getListApi ? total : tableTotal" :layout="layout"></el-pagination>
</div> </div>
</template> </template>
...@@ -149,6 +149,10 @@ export default { ...@@ -149,6 +149,10 @@ export default {
}) })
} }
}, },
pageSizes: {
type: Array,
default: () => [10, 20, 30, 40]
},
// 分页,默认有 // 分页,默认有
hasPage: { hasPage: {
type: Boolean, type: Boolean,
...@@ -213,6 +217,16 @@ export default { ...@@ -213,6 +217,16 @@ export default {
} }
} }
} }
},
// el分页组件属性透传
paginationattrs: {
type: Object,
default: () => ({})
},
// el分页组件事件透传
paginationlisteners: {
type: Object,
default: () => ({})
} }
}, },
...@@ -544,6 +558,4 @@ export default { ...@@ -544,6 +558,4 @@ export default {
.el-table.hightline .el-table__fixed th.is-leaf:first-child { .el-table.hightline .el-table__fixed th.is-leaf:first-child {
border: none; border: none;
} }
</style> </style>
<template> <template>
<div class="sub-el-table-column"> <div class="sub-el-table-column">
<el-table-column v-for="(item, index) in reverseData" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'center'" :sortable="item.sortable" :render-header="item.renderHeader"> <el-table-column v-for="(item, index) in reverseData" :key="index" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'center'" :sortable="item.sortable" :render-header="item.renderHeader">
<template slot-scope="scope"> <template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
......
...@@ -43,12 +43,12 @@ import GLExternal from './External' ...@@ -43,12 +43,12 @@ 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'
import GLFooter from './Footer'
// 一次性注册所有的过滤器 本地测试 // 一次性注册所有的过滤器 本地测试
import filters from '@/filters' import filters from '@/filters'
// 存储组件列表 // 存储组件列表
const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable] const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable,GLFooter]
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册 // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
const install = function(Vue) { const install = function(Vue) {
...@@ -73,5 +73,6 @@ export default { ...@@ -73,5 +73,6 @@ export default {
GLExternal, GLExternal,
GLButton, GLButton,
GLDialog, GLDialog,
GLTable GLTable,
GLFooter
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!