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 @@
<!-- <img alt="Vue logo" src="./assets/logo.png" /> -->
<!-- <HelloWorld msg="Welcome to Your Vue.js App" />
<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>
<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>
<hr />
<h3>el-dialog调整</h3>
<!-- <GLDialog :visible.sync="visible" title="aaaaaaaaa">
......@@ -22,7 +19,6 @@
</GLDialog> -->
<hr />
<h3>el-table调整</h3>
<GLTable ref="liveRoomRef" :tableParams="tableParams" :tableData="tableData">
<span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
......@@ -34,10 +30,8 @@
<el-button v-if="scope.scope.liveStatus != '101'" type="text" @click="handleDelete(scope.scope)">删除</el-button>
</span>
</GLTable>
<hr />
<h3>el-tooltip调整</h3>
<!-- <gl-tooltip class="item" effect="dark" content="hello tooltip" placement="top-start">
<el-button>上左</el-button> -->
<!-- <template slot='content'>
......@@ -50,12 +44,10 @@
<p>Here's some contact info</p>
</template>
</gl-tooltip> -->
<!-- <el-tooltip class="item" content="hello tooltip" placement="top-start">
<el-button>上左</el-button>
</el-tooltip> -->
<el-popover popper-class="bubble-box" placement="top" width="600" trigger="click">
<Popover popper-class="bubble-box" placement="top" width="600" trigger="click">
<div class="bubble-content">
<el-table :data="gridData">
<el-table-column width="150" property="date" label="日期"></el-table-column>
......@@ -63,10 +55,9 @@
<el-table-column width="300" property="address" label="地址"></el-table-column>
</el-table>
</div>
<el-button slot="reference">click 激活</el-button>
</el-popover>
</Popover>
<GLFooter></GLFooter>
<!-- <el-popover
placement="bottom"
title="标题"
......@@ -76,7 +67,6 @@
v-model="visible">
<el-button slot="reference" @click="visible = !visible">手动激活</el-button>
</el-popover> -->
<!-- <el-popover
placement="top"
width="160"
......@@ -90,7 +80,6 @@
</el-popover> -->
</div>
</template>
<script>
export default {
name: 'App',
......@@ -309,7 +298,6 @@ export default {
}
}
</script>
<style lang="scss">
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
......@@ -322,4 +310,4 @@ export default {
padding-bottom: 50px;
height: 2000px;
}
</style>
</style>
\ No newline at end of file
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
<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 @@
</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-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">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
......@@ -61,7 +61,7 @@
<slot name="additionalContent"></slot>
</template>
</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>
</template>
......@@ -149,6 +149,10 @@ export default {
})
}
},
pageSizes: {
type: Array,
default: () => [10, 20, 30, 40]
},
// 分页,默认有
hasPage: {
type: Boolean,
......@@ -213,6 +217,16 @@ export default {
}
}
}
},
// el分页组件属性透传
paginationattrs: {
type: Object,
default: () => ({})
},
// el分页组件事件透传
paginationlisteners: {
type: Object,
default: () => ({})
}
},
......@@ -544,6 +558,4 @@ export default {
.el-table.hightline .el-table__fixed th.is-leaf:first-child {
border: none;
}
</style>
<template>
<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">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
......
......@@ -43,12 +43,12 @@ import GLExternal from './External'
import GLButton from './Button'
import GLDialog from './Dialog'
import GLTable from './Table'
import GLFooter from './Footer'
// 一次性注册所有的过滤器 本地测试
import filters from '@/filters'
// 存储组件列表
const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable]
const components = [TestComp, GLExternal, GLButton, GLDialog, GLTable,GLFooter]
// 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
const install = function(Vue) {
......@@ -73,5 +73,6 @@ export default {
GLExternal,
GLButton,
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!