Browse Source

[edit] style

wenliming 3 năm trước cách đây
mục cha
commit
b7d05b8ee8

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

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