| | |
| | | <draggable :set-data="setData" :list="list1" class="dragArea" animation="300" @end="draggableEnded"> |
| | | <div v-for="item in list1" :key="item.id" class="list-complete-item"> |
| | | <div style="display: flex"> |
| | | <div style="width: 20px;height: 20px;margin-right: 4px;cursor:move"><i class="el-icon-rank" /></div> |
| | | <div style="width: 20px;height: 20px;margin-right: 4px;cursor:move;"><i |
| | | style="font-weight: bolder" |
| | | class="el-icon-rank" |
| | | /></div> |
| | | <el-checkbox :label="item.label" class="list-complete-item-handle" /> |
| | | </div> |
| | | <div> |
| | |
| | | data() { |
| | | return { |
| | | checkedList: this.list1.map(i => i.show ? i.label : '').filter(i => i !== ''), // 列展示值 |
| | | checkedListDefault: [...this.list1], // 重置默认值List |
| | | checkedListDefaultLabel: this.list1.map(i => i.show ? i.label : '').filter(i => i !== ''), // 重置默认值label |
| | | // checkedListDefaultFixed: this.list1.map(i => i.show ? i.label : '').filter(i => i !== ''), // 重置默认值fixed |
| | | checkedListDefaultFixed: this.list1.map(i => i.fixed), // 重置默认值fixed |
| | | checkedAll: true |
| | | } |
| | | }, |
| | |
| | | // 重置 |
| | | resetColumn() { |
| | | this.checkedList = this.checkedListDefaultLabel |
| | | this.list1.sort((a, b) => a.id - b.id)// 排序 |
| | | this.list1.forEach((i, j) => { |
| | | i.show = !!this.checkedListDefaultLabel.includes(i.label) |
| | | }) |
| | | this.checkedListDefaultFixed.forEach((i, j) => { |
| | | this.list1[j].fixed = i |
| | | }) |
| | | this.$emit('tableColumnUpdate', this.checkedListDefaultLabel) |
| | | }, |
| | |
| | | }, |
| | | // 固定到左侧 |
| | | fixedToLeft(val) { |
| | | console.log('fixedToLeft', val) |
| | | if (this.list1.find(i => i.label === val).show) { |
| | | this.list1.find(i => i.label === val).fixed = this.list1.find(i => i.label === val).fixed !== 'left' ? 'left' : false |
| | | } |
| | | this.$emit('tableColumnUpdate', this.checkedList) |
| | | }, |
| | | // 固定到右侧 |
| | | fixedToRight(val) { |
| | | console.log('fixedToRight', val) |
| | | if (this.list1.find(i => i.label === val).show) { |
| | | this.list1.find(i => i.label === val).fixed = this.list1.find(i => i.label === val).fixed !== 'right' ? 'right' : false |
| | | } |
| | | this.$emit('tableColumnUpdate', this.checkedList) |
| | | }, |
| | | // 拖动结束事件 |
| | | draggableEnded({ to, from, item, clone, oldIndex, newIndex }) { |
| | | console.log(to, from, item, clone, oldIndex, newIndex) |
| | | |
| | | // console.log(this.list1, 123456789) |
| | | // console.log(to, from, item, clone, oldIndex, newIndex) |
| | | this.$emit('tableColumnUpdate', this.list1, true)// 传给爷爷 isCopyTrue:复值给爷爷 |
| | | }, |
| | | // 多选框值改变事件 |
| | | checkedListChange(val) { |
| | | console.log(val, 1) |
| | | this.checkedAll = val.length !== 0 |
| | | this.list1.forEach((i, j) => { |
| | | i.show = !!val.includes(i.label) |
| | |
| | | .dragArea { |
| | | margin-top: 15px; |
| | | min-height: 50px; |
| | | padding-bottom: 30px; |
| | | //padding-bottom: 30px; |
| | | } |
| | | } |
| | | } |
| | |
| | | if (typeof val !== 'string') return |
| | | const themeCluster = this.getThemeCluster(val.replace('#', '')) |
| | | const originalCluster = this.getThemeCluster(oldVal.replace('#', '')) |
| | | console.log(themeCluster, originalCluster) |
| | | |
| | | const $message = this.$message({ |
| | | message: ' 正在切换主题', |
| | |
| | | return path |
| | | }, |
| | | variables() { |
| | | console.log(variables, 2333) |
| | | // console.log(variables, 2333) |
| | | // 先输出这个variables值 然后修改其属性值 |
| | | variables.menuActiveText = this.$store.state.settings.theme |
| | | // background: rgb(48, 65, 86); |
| | |
| | | style="width: 120px;" |
| | | placeholder="请选择" |
| | | size="mini" |
| | | @change="animationTypeChange" |
| | | > |
| | | <el-option |
| | | v-for="item in animationTypeArr" |
| | |
| | | key: 'theme', |
| | | value: val |
| | | }) |
| | | }, |
| | | animationTypeChange(val) { |
| | | console.log(val, 1) |
| | | } |
| | | } |
| | | } |
| | |
| | | return this.$store.state.settings.sidebarLogo |
| | | }, |
| | | variables() { |
| | | console.log(variables, 2333) |
| | | // console.log(variables, 2333) |
| | | // 先输出这个variables值 然后修改其属性值 |
| | | variables.menuActiveText = this.$store.state.settings.theme |
| | | console.log(!this.$store.state.settings.menuIsHorizontal && !this.$store.state.settings.leftBackgroundColorValue, 1) |
| | | // console.log(!this.$store.state.settings.menuIsHorizontal && !this.$store.state.settings.leftBackgroundColorValue, 1) |
| | | if ((!this.$store.state.settings.menuIsHorizontal && !this.$store.state.settings.leftBackgroundColorValue)) { |
| | | variables.menuHover = '#eee' |
| | | } |