فهرست منبع

make boolean attributes html5 spec compatible #2169

rhyzx 10 سال پیش
والد
کامیت
1d4ea8e785
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/directives/public/bind.js

+ 2 - 2
src/directives/public/bind.js

@@ -132,9 +132,9 @@ export default {
         }
         setClass(el, value)
       } else if (xlinkRE.test(attr)) {
-        el.setAttributeNS(xlinkNS, attr, value)
+        el.setAttributeNS(xlinkNS, attr, value === true ? '' : value)
       } else {
-        el.setAttribute(attr, value)
+        el.setAttribute(attr, value === true ? '' : value)
       }
     } else {
       el.removeAttribute(attr)