Commit d5f87b35 by luyt

feat:1.广联在线iconfont新增2.表单公共类新增3.修复table组件实例方法报错问题

1 parent dfd6837a
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -43,6 +43,39 @@
</GLDialog> -->
<hr />
<h3>el-table调整</h3>
<i class="gl-icon-question"></i>
<div style="margin-left: 300px;">
<el-popover popper-class="gl-col" width="260" trigger="click">
<div>
<div class="gl-title">
表头字段配置
<el-tooltip
content="点击字段前的图标可拖动位置"
popper-class="gl-tip"
placement="bottom"
effect="light"
>
<i class="gl-icon-question"></i>
</el-tooltip>
</div>
<div class="gl-content">
<el-checkbox-group v-model="checkList">
<vuedraggable v-model="optionsList" draggable=".item" group="tableClomns" animation="1000" @onStart="startHook" @onEnd="endHook">
<transition-group>
<el-checkbox :class="{'item':!disabledList.includes(item.id)}" v-for="(item,index) in optionsList" :label="item.id" :key="'tableOpt'+index" :disabled="disabledList.includes(item.id)">{{item.name}}</el-checkbox>
</transition-group>
</vuedraggable>
</el-checkbox-group>
</div>
<div class="gl-btns">
<el-button plain size="small" class="btn-three">重置</el-button>
<el-button type="primary" size="small">确定</el-button>
</div>
</div>
<el-button plain size="small" class="btn-three" icon="gl-icon-cog-fill" round slot="reference"></el-button>
</el-popover>
</div>
<GLTable ref="liveRoomRef" :tableParams="tableParams" :tableData="tableData" max-height="250">
<span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
......@@ -209,16 +242,20 @@
</GLDialog>
<GLDialog :mode="mode" title="提示" :hasFooter="hasFooter" :type="'error'" :content="'hello HelloWorld'" @onOk="handleOk" @onCancel="handleCancel" :visible.sync="dialogShow2"></GLDialog>
<GLDialog title="提示123" :mode="mode" :hasFooter="hasFooter" :type="'info'" :content="'hello HelloWorld'" @onOk="handleOk" @onCancel="handleCancel" :visible.sync="dialogShow1"></GLDialog>
<!-- <GLDialog title="提示123" :mode="mode" :hasFooter="hasFooter" :type="'info'" @onOk="handleOk" @onCancel="handleCancel" :visible.sync="dialogShow1">
<div>hello</div>
</GLDialog> -->
<hr />
<!-- 测试iconfont字体 -->
<h3>广联iconfont字体调整</h3>
<i class="gl-icon-a-bianzu5 colorred"></i>
<i class="gl-icon-pause"></i>
<i class="gl-icon-icon-full-screen"></i>
<i class="gl-icon-a-bianzu5 colorred"></i>
<i class="gl-icon-pause"></i>
<i class="gl-icon-icon-full-screen"></i>
<hr />
</div>
</template>
<script>
import vuedraggable from 'vuedraggable'
export default {
name: 'App',
data() {
......@@ -795,7 +832,33 @@ export default {
hasFooter: true,
//tab
activeName: 'tab0',
tabPaneList: []
tabPaneList: [],
//测试table配置项
checkList: ['1','4'],
optionsList: [
{
id:'1',
name: '复选框A',
},
{
id:'2',
name: '复选框b'
},
{
id:'5',
name: '复选框c'
},
{
id:'3',
name: '禁用'
},
{
id:'4',
name: '选中且禁用',
},
],
disabledList:['3','4']
}
},
mounted() {
......@@ -1112,6 +1175,22 @@ export default {
},
handleTabRemove(val) {
// console.log(val, '删除')
},
//测试table配置项
startHook(){
console.log('onStart: ', onStart);
},
endHook(){
console.log('onEnd: ', onEnd);
},
},
components: {
vuedraggable
},
watch:{
checkList (val, oldVal) {
console.log('new: %s, old: %s', val, oldVal)
}
}
}
......@@ -1129,7 +1208,38 @@ export default {
height: 2000px;
font-size: 14px;
}
.colorred{
.colorred {
color: red;
}
// 配置表单项
.gl-col {
.gl-title {
}
.gl-content {
margin-top: 10px;
padding-top: 10px;
padding-bottom: 10px;
border-top: 1px solid #e8e8ea;
border-bottom: 1px solid #e8e8ea;
}
.gl-btns {
padding-top: 16px;
padding-bottom: 6px;
text-align: right;
}
}
.gl-tip.el-tooltip__popper.is-light {
color: #666666;
border: 0;
box-shadow: 0 4px 12px 0 rgba(0,0,0,0.08);
.popper__arrow{
border-bottom-color: rgba(0,0,0,0.05) !important;
// box-shadow: 0 -4px 12px 0 rgba(0,0,0,0.1);
&:after{
// display: none;
// border: 0;
}
}
}
</style>
......@@ -355,7 +355,7 @@ export default {
clearMutiSelect() {
// 清空多选
this.mutiSelectArr[this.tableParams.mutiSelectName] = []
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].clearSelection()
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.clearSelection()
},
// @vuese
// 设置表格高度
......@@ -407,7 +407,7 @@ export default {
this.total = this.findVal(res, this.pageConf.totalCount)
this.loading = false
this.$nextTick(() => {
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].doLayout()
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.doLayout()
})
// 表格请求到数据
// console.log('表格请求到数据this.data',this.data)
......@@ -448,7 +448,7 @@ export default {
setTimeout(() => {
// console.log('123456doLayout')
this.$refs[this.tableParams.mutiSelectName + 'MutiTable'].doLayout()
this.$refs[this.tableParams.mutiSelectName + 'MutiTable']?.doLayout()
}, 100)
}
},
......
......@@ -3,7 +3,7 @@
*/
// 导入颜色选择器组件
// import '@/plugins/element.js'
import { Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem, DropdownMenu, Dialog, MessageBox, Tabs, TabPane } from '@/plugins/element.js'
import { Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem, DropdownMenu, Dialog, MessageBox, Tabs, TabPane ,Checkbox,CheckboxGroup} from '@/plugins/element.js'
import '@/theme/theme.scss'
// 一次性注册所有的过滤器 本地测试
......@@ -31,7 +31,7 @@ import GLEditor from './Editor'
import GLBcTest from '@/bcPackages/GLBcTest'
//el原始组件
const ElComponent = [Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem, DropdownMenu, Dialog, MessageBox, Tabs, TabPane]
const ElComponent = [Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem, DropdownMenu, Dialog, MessageBox, Tabs, TabPane,Checkbox,CheckboxGroup]
// 业务组件导入列表
const BcComponent = [GLBcTest]
......
......@@ -3,7 +3,7 @@
*
*/
import Vue from 'vue'
import { Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem,DropdownMenu, Dialog,MessageBox, Tabs, TabPane} from 'element-ui'
import { Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem,DropdownMenu, Dialog,MessageBox, Tabs, TabPane,Checkbox,CheckboxGroup} from 'element-ui'
// import 'element-ui/lib/theme-chalk/index.css' //todo 按需引入插件样式
import 'element-ui/lib/theme-chalk/table.css'
import 'element-ui/lib/theme-chalk/table-column.css'
......@@ -28,6 +28,9 @@ import 'element-ui/lib/theme-chalk/message.css'
import 'element-ui/lib/theme-chalk/message-box.css'
import 'element-ui/lib/theme-chalk/tabs.css'
import 'element-ui/lib/theme-chalk/tab-pane.css'
import 'element-ui/lib/theme-chalk/checkbox.css'
import 'element-ui/lib/theme-chalk/checkbox-group.css'
// 解决 ElTable 自动宽度高度导致的「ResizeObserver loop limit exceeded」问题
const fixElTableErr = table => {
......@@ -59,8 +62,11 @@ Vue.use(DropdownMenu)
Vue.use(Dialog)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
// Vue.use(MessageBox)
Vue.prototype.$confirm = MessageBox.confirm
//打包后的组件dist 测试组件可能需要的
export { Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem,DropdownMenu,Dialog,MessageBox, Tabs, TabPane }
export { Table, TableColumn, Popover, Button, ButtonGroup, Loading, Input, Form, FormItem, Pagination, Tooltip, Icon, Select, Option, DatePicker, Dropdown, DropdownItem,DropdownMenu,Dialog,MessageBox, Tabs, TabPane,Checkbox,CheckboxGroup }
......@@ -8,8 +8,8 @@
margin: 0 !important;
}
// 字体样式
*[class^="gl-icon-"]{
// // 字体样式(主应用已加载)
*[class*="gl-icon-"]{
font-family: "gl-iconfont" !important;
font-size: 16px;
font-style: normal;
......
......@@ -666,3 +666,84 @@ $lightColorDisabled: $color-primary-light04;
padding-top: 112.5px;
}
}
// 表单样式公共类
.gl-form-page {
.ml12 {
margin-left: 12px;
}
.mr12 {
margin-right: 12px;
}
.mr24 {
margin-right: 24px;
}
.mb10 {
margin-bottom: 10px;
}
.mb12 {
margin-bottom: 12px;
}
.mb20 {
margin-bottom: 20px;
}
.w136 {
width: 136px !important;
}
.w154 {
width: 154px !important;
}
.w284 {
width: 284px !important;
}
.w432 {
width: 432px !important;
}
.w580 {
width: 580px !important;
}
.w728 {
width: 728px !important;
}
.el-form {
padding-left: 20px;
.el-form-item {
&:last-child {
margin-bottom: 0;
}
margin-bottom: 20px;
}
.el-form-item__label {
padding: 0;
width: 154px;
}
.el-button--medium {
padding: 10px 20px;
font-size: 14px;
border-radius: 4px;
}
.el-input {
width: 432px;
}
.el-textarea {
width: 580px !important;
}
.el-select {
width: 432px;
margin-right: 12px;
.el-input {
width: 432px;
}
.el-input--small .el-input__inner {
height: 32px;
line-height: 32px;
}
}
.el-date-editor {
width: 432px;
}
.welcome-box {
width: 580px;
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!