Browse Source

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

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

+ 16 - 0
data-room-ui/packages/BigScreenDesign/PageDesignTop.vue

@@ -13,10 +13,12 @@
       <span style="margin-right:8px;font-size:12px">缩放</span>
       <el-input-number
         class="bs-el-input-number"
+        ref="zoomInput"
         style="margin-right:10px"
         :value="zoom"
         :min="1"
         label="描述文字"
+        :controls="true"
         @change="changeZoom"
       />
       <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: {
     ...mapActions({
       initLayout: 'bigScreen/initLayout'
@@ -230,6 +238,14 @@ export default {
       undoTimeLine: 'bigScreen/undoTimeLine',
       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) {
       this.$emit('changeZoom', val)
     },

+ 1 - 1
data-room-ui/packages/BigScreenMag/SideMenu.vue

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

+ 1 - 1
data-room-ui/packages/ComponentList/CatalogEditForm.vue

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

+ 1 - 1
data-room-ui/packages/SourceMag/SideMenu.vue

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