Selaa lähdekoodia

Merge branch 'test' of https://git.yishihui.com/DeNet/de-net into test

zhangwei 3 vuotta sitten
vanhempi
commit
ce57f4ab3d
1 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 5 2
      src/view/components/give-dialog.vue

+ 5 - 2
src/view/components/give-dialog.vue

@@ -509,9 +509,12 @@ const selectCurrency = (params) => {
 
 const calcDomZoom = () => {
     nextTick(() => {
+        let maxWidth = 68;
         var textWidth = document.querySelector('.text').offsetWidth;
-        var scale = 68 / textWidth;
-        document.querySelector('.text').style.zoom = scale;
+        if(textWidth > 68) {
+            var scale = maxWidth / textWidth;
+            document.querySelector('.text').style.zoom = scale;
+        }
     }) 
 }