fix: 分组删除提示优化,新增大屏比例滚轮缩放

分组删除提示优化,新增大屏比例滚轮缩放
main
hong.yang 2 years ago
parent e793a37e97
commit f31c729569

@ -13,10 +13,12 @@
<span style="margin-right:8px;font-size:12px">缩放</span> <span style="margin-right:8px;font-size:12px">缩放</span>
<el-input-number <el-input-number
class="bs-el-input-number" class="bs-el-input-number"
ref="zoomInput"
style="margin-right:10px" style="margin-right:10px"
:value="zoom" :value="zoom"
:min="1" :min="1"
label="描述文字" label="描述文字"
:controls="true"
@change="changeZoom" @change="changeZoom"
/> />
<CusBtn <CusBtn
@ -219,6 +221,12 @@ export default {
) )
} }
}, },
mounted() {
this.$refs.zoomInput.$el.addEventListener('mousewheel', this.handleMouseWheel);
},
beforeDestroy() {
this.$refs.zoomInput.$el.removeEventListener('mousewheel', this.handleMouseWheel);
},
methods: { methods: {
...mapActions({ ...mapActions({
initLayout: 'bigScreen/initLayout' initLayout: 'bigScreen/initLayout'
@ -230,6 +238,14 @@ export default {
undoTimeLine: 'bigScreen/undoTimeLine', undoTimeLine: 'bigScreen/undoTimeLine',
saveTimeLine: 'bigScreen/saveTimeLine' saveTimeLine: 'bigScreen/saveTimeLine'
}), }),
handleMouseWheel() {
const delta = Math.sign(event.deltaY);
// 10
if (this.zoom <= 10 && delta > 0) return;
event.preventDefault();
let zoom1 = this.zoom - delta
this.$emit('changeZoom', zoom1)
},
changeZoom (val) { changeZoom (val) {
this.$emit('changeZoom', val) this.$emit('changeZoom', val)
}, },

@ -235,7 +235,7 @@ export default {
}, },
// //
catalogDel (catalog) { catalogDel (catalog) {
this.$confirm('确定删除该目录', '提示', { this.$confirm('分组删除后,分组下的大屏会被归纳至全部中,确定删除该分组', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

@ -246,7 +246,7 @@ export default {
}, },
// //
catalogDel (catalog) { catalogDel (catalog) {
this.$confirm('确定删除该分组?', '提示', { this.$confirm('分组删除后,分组下的组件会被归纳至全部中,确定删除该分组?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

@ -265,7 +265,7 @@ export default {
}, },
// //
catalogDel (catalog) { catalogDel (catalog) {
this.$confirm('确定删除该分组?', '提示', { this.$confirm('分组删除后,分组下的资源会被归纳至全部中,确定删除该分组?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',

Loading…
Cancel
Save