drill.define(async t=>{await t("./unit-input.css"),$.register({tag:"unit-input",data:{value:"",step:1},props:["value","step"],temp:'\n        <div class="input_con">\n            <input type="number" xv-tar="numInput" xv-module="numInputValue">\n        </div>\n        <div class="unip_con" xv-tar="unitCon"></div>\n        <div xv-content></div>\n        ',watch:{numInputValue(t,n){let e=String(n).match(/(\d+)\.(\d+)/);if(e&&3===e.length&&e[2].length>3)return n=parseFloat(n).toFixed(3),void(this.numInputValue=n);this.value=n+this.$unitCon.text},step(t,n){this.$numInput.attr("step",n)},value(t,n){let e=/([\d\.\-]+)(\D*)/.exec(n);if(e){let t=e[1],n=e[2];this.$unitCon.html=n,this.numInputValue=t}}},inited(){let t,n;this.$unitCon.on("mouseenter",e=>{t=setTimeout(()=>{(n=this.que(`[unit-name="${this.$unitCon.text.trim()}"]`))&&(n.display="block")},500)}),this.$unitCon.on("mouseleave",e=>{clearTimeout(t),n&&(n.display="none",n=null)})}})});