Explorar o código

拖拽位置记录

laiguoran %!s(int64=3) %!d(string=hai) anos
pai
achega
4d2d3928fd
Modificáronse 1 ficheiros con 10 adicións e 3 borrados
  1. 10 3
      app/public/js/change_information.js

+ 10 - 3
app/public/js/change_information.js

@@ -300,12 +300,19 @@ $(document).ready(() => {
         select: '#right-spr',
         select: '#right-spr',
         callback: function () {
         callback: function () {
             changeSpread.refresh();
             changeSpread.refresh();
-            // leafXmjSpread.refresh();
             xmjSpread.refresh();
             xmjSpread.refresh();
-            // const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
-            // setLocalCache('material_list_' + materialID, width);
+            const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
+            setLocalCache('change_information_width', width);
         }
         }
     });
     });
+
+    // 根据浏览器记录展开收起
+    if (getLocalCache('change_information_width')) {
+        $('#left-view').css('width', (100 - parseFloat(getLocalCache('change_information_width'))) + '%');
+        $('#right-view').css('width', getLocalCache('change_information_width') + '%');
+        changeSpread.refresh();
+        xmjSpread.refresh();
+    }
 });
 });
 function findDecimal(unit) {
 function findDecimal(unit) {
     let value = precision.other.value;
     let value = precision.other.value;