@zhijiancloud/bpm 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bpmField.umd.js +3 -3
- package/dist/bpmFormField.umd.js +3 -3
- package/dist/bpmMulFile.umd.js +1 -1
- package/dist/bpmNumber.umd.js +1 -1
- package/dist/bpmOcr.umd.js +1 -1
- package/dist/bpmQuote.umd.js +1 -1
- package/dist/bpmRemoteMulFile.umd.js +2 -0
- package/dist/bpmRemoteMulFile.umd.js.LICENSE.txt +9 -0
- package/dist/bpmRichText.umd.js +1 -1
- package/dist/bpmSubFormField.umd.js +3 -3
- package/dist/css/bpmRichText.css +1 -1
- package/dist/css/index.css +1 -1
- package/dist/index.umd.js +3 -3
- package/package.json +1 -1
package/dist/bpmNumber.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see bpmNumber.umd.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,function(e){return function(){var t={9590:function(e,t,n){"use strict";var r=n(1601),i=n.n(r),o=n(6314);n.n(o)()(i()).push([e.id,".bpm-number-editor[data-v-685818a2] {\n position: relative;\n display: inline-block;\n}\n",""])},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var u=0;u<this.length;u++){var l=this[u][0];null!=l&&(a[l]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},1601:function(e){"use strict";e.exports=function(e){return e[1]}},9227:function(e,t,n){var r,i;r=function(){var e,t,n,r,i,o={},a={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function s(e,t){this._input=e,this._value=t}return(e=function(n){var r,i,a,u;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(i in o)if((u="function"==typeof o[i].regexps.unformat?o[i].regexps.unformat():o[i].regexps.unformat)&&n.match(u)){a=o[i].unformat;break}r=(a=a||e._.stringToNumber)(n)}else r=Number(n)||null;return new s(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof s},e._=t={numberToFormat:function(t,n,r){var i,o,u,l,s,c,f,p,d=a[e.options.currentLocale],h=!1,m=!1,v="",b=1e12,g=1e9,_=1e6,y="",x=!1;if(t=t||0,o=Math.abs(t),e._.includes(n,"(")?(h=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(s=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],e._.includes(n," a")&&(v=" "),n=n.replace(new RegExp(v+"a[kmbt]?"),""),o>=b&&!i||"t"===i?(v+=d.abbreviations.trillion,t/=b):o<b&&o>=g&&!i||"b"===i?(v+=d.abbreviations.billion,t/=g):o<g&&o>=_&&!i||"m"===i?(v+=d.abbreviations.million,t/=_):(o<_&&o>=1e3&&!i||"k"===i)&&(v+=d.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(m=!0,n=n.replace("[.]",".")),u=t.toString().split(".")[0],l=n.split(".")[1],c=n.indexOf(","),p=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,l?(e._.includes(l,"[")?(l=(l=l.replace("]","")).split("["),y=e._.toFixed(t,l[0].length+l[1].length,r,l[1].length)):y=e._.toFixed(t,l.length,r),u=y.split(".")[0],y=e._.includes(y,".")?d.delimiters.decimal+y.split(".")[1]:"",m&&0===Number(y.slice(1))&&(y="")):u=e._.toFixed(t,0,r),v&&!i&&Number(u)>=1e3&&v!==d.abbreviations.trillion)switch(u=String(Number(u)/1e3),v){case d.abbreviations.thousand:v=d.abbreviations.million;break;case d.abbreviations.million:v=d.abbreviations.billion;break;case d.abbreviations.billion:v=d.abbreviations.trillion}if(e._.includes(u,"-")&&(u=u.slice(1),x=!0),u.length<p)for(var w=p-u.length;w>0;w--)u="0"+u;return c>-1&&(u=u.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===n.indexOf(".")&&(u=""),f=u+y+(v||""),h?f=(h&&x?"(":"")+f+(h&&x?")":""):s>=0?f=0===s?(x?"-":"+")+f:f+(x?"-":"+"):x&&(f="-"+f),f},stringToNumber:function(e){var t,n,r,i=a[l.currentLocale],o=e,u={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==i.delimiters.decimal&&(e=e.replace(/\./g,"").replace(i.delimiters.decimal,".")),u)if(r=new RegExp("[^a-zA-Z]"+i.abbreviations[t]+"(?:\\)|(\\"+i.currency.symbol+")?(?:\\))?)?$"),o.match(r)){n*=Math.pow(10,u[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),i=r.length>>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o<i&&!(o in r);)o++;if(o>=i)throw new TypeError("Reduce of empty array with no initial value");n=r[o++]}for(;o<i;o++)o in r&&(n=t(n,r[o],o,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(e,n){var r=t.multiplier(n);return e>r?e:r},1)},toFixed:function(e,t,n,r){var i,o,a,u,l=e.toString().split("."),s=t-(r||0);return i=2===l.length?Math.min(Math.max(l[1].length,s),t):s,a=Math.pow(10,i),u=(n(e+"e+"+i)/a).toFixed(i),r>t-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),u=u.replace(o,"")),u}},e.options=l,e.formats=o,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in u)l[e]=u[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,i,o,a,u,l,s,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{s=e.localeData(n)}catch(t){s=e.localeData(e.locale())}return o=s.currency.symbol,u=s.abbreviations,r=s.delimiters.decimal,i="."===s.delimiters.thousands?"\\.":s.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==o)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==u.thousand&&c[0]!==u.million&&c[0]!==u.billion&&c[0]!==u.trillion)||(l=new RegExp(i+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=s.prototype={clone:function(){return e(this)},format:function(t,n){var r,i,a,u=this._value,s=t||l.defaultFormat;if(n=n||Math.round,0===u&&null!==l.zeroFormat)i=l.zeroFormat;else if(null===u&&null!==l.nullFormat)i=l.nullFormat;else{for(r in o)if(s.match(o[r].regexps.format)){a=o[r].format;break}i=(a=a||e._.numberToFormat)(u,s,n)}return i},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],function(e,t,r,i){return e+Math.round(n*t)},0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],function(e,t,r,i){return e-Math.round(n*t)},Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)*Math.round(n*o)/Math.round(o*o)},1),this},divide:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)/Math.round(n*o)}),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var i,o=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"BPS"),i=i.join("")):i=i+o+"BPS",i},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},i="("+(i=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(e){return n.suffixes.indexOf(e)<0})).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(i)},format:function(t,i,o){var a,u,l,s=e._.includes(i,"ib")?r:n,c=e._.includes(i," b")||e._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),a=0;a<=s.suffixes.length;a++)if(u=Math.pow(s.base,a),l=Math.pow(s.base,a+1),null===t||0===t||t>=u&&t<l){c+=s.suffixes[a],u>0&&(t/=u);break}return e._.numberToFormat(t,i,o)+c},unformat:function(t){var i,o,a=e._.stringToNumber(t);if(a){for(i=n.suffixes.length-1;i>=0;i--){if(e._.includes(t,n.suffixes[i])){o=Math.pow(n.base,i);break}if(e._.includes(t,r.suffixes[i])){o=Math.pow(r.base,i);break}}a*=o||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var i,o,a=e.locales[e.options.currentLocale],u={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=e._.numberToFormat(t,n,r),t>=0?(u.before=u.before.replace(/[\-\(]/,""),u.after=u.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(u.before,"-")&&!e._.includes(u.before,"(")&&(u.before="-"+u.before),o=0;o<u.before.length;o++)switch(u.before[o]){case"$":i=e._.insert(i,a.currency.symbol,o);break;case" ":i=e._.insert(i," ",o+a.currency.symbol.length-1)}for(o=u.after.length-1;o>=0;o--)switch(u.after[o]){case"$":i=o===u.after.length-1?i+a.currency.symbol:e._.insert(i,a.currency.symbol,-(u.after.length-(1+o)));break;case" ":i=o===u.after.length-1?i+" ":e._.insert(i," ",-(u.after.length-(1+o)+a.currency.symbol.length-1))}return i}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var i=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),i=Number(n[1]);return i=e._.includes(t,"e-")?i*=-1:i,e._.reduce([r,Math.pow(10,i)],function(t,n,r,i){var o=e._.correctionFactor(t,n);return t*o*(n*o)/(o*o)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var i=e.locales[e.options.currentLocale],o=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),o+=i.ordinal(t),e._.numberToFormat(t,n,r)+o}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var i,o=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"%"),i=i.join("")):i=i+o+"%",i},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),i=Math.floor((e-60*r*60)/60),o=Math.round(e-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e},void 0===(i=r.call(t,n,t,e))||(e.exports=i)},4486:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,u){var l,s="function"==typeof e?e.options:e;if(t&&(s.render=t,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},s._ssrRegister=l):i&&(l=u?function(){i.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(s.functional){s._injectStyles=l;var c=s.render;s.render=function(e,t){return l.call(t),c(e,t)}}else{var f=s.beforeCreate;s.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:s}}n.d(t,{A:function(){return r}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";r.r(i),r.d(i,{default:function(){return w}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._b({tag:"component",staticClass:"bpm-number",attrs:{value:e.curVal,fieldConf:e.fieldConf,row:e.row,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange}},"component",e.$attrs,!1))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bpm-number-editor"},[n("el-input-number",{ref:"component",staticClass:"bpm-number-editor__input",style:e.inputNumberStyle,attrs:{precision:e.precision},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}})],1)};t._withStripped=!0;var n=r(6773),o=r.n(n),a=r(5554),u=r.n(a),l=r(7642);u().use(l.InputNumber);var s={data(){return{curVal:null,inputWidth:null,inputFont:""}},props:["value","fieldConf","row"],watch:{curVal(){this.$nextTick(this.updateAutoWidth)},value(e){this.value||0===this.value||"0"===this.value?this.curVal=Number(this.value):this.curVal=void 0,this.$nextTick(this.updateAutoWidth)}},computed:{precision(){return o().get(this.fieldConf,"view.precision",0)},inputNumberStyle(){return this.inputWidth?{width:`${this.inputWidth}px`}:{}}},methods:{handleChange(e){console.log("number change: ",e),this.$emit("change",this.curVal),this.$emit("input",this.curVal)},updateAutoWidth(e){const t=this.$refs.component,n=t&&t.$el?t.$el:null;if(!n)return;const r=n.querySelector("input");if(!r)return;const i=window.getComputedStyle(r),o=i.font||`${i.fontSize} ${i.fontFamily}`;this.inputFont=o;const a=(parseFloat(i.paddingLeft)||0)+(parseFloat(i.paddingRight)||0),u=n.querySelector(".el-input-number__increase"),l=n.querySelector(".el-input-number__decrease"),s=Math.max(u?u.offsetWidth:0,l?l.offsetWidth:0),c="string"==typeof e?e:null===r.value||void 0===r.value?"":String(r.value),f=c.length?c:"0";this._autoWidthCanvas||(this._autoWidthCanvas=document.createElement("canvas"));const p=this._autoWidthCanvas.getContext("2d");if(!p)return;p.font=o;const d=p.measureText(f).width,h=Math.ceil(d+a+s+10);this.inputWidth=Math.max(40,h)},attachNativeInputListener(){const e=this.$refs.component,t=e&&e.$el?e.$el:null;if(!t)return;const n=t.querySelector("input");n&&(this._nativeInputHandler||(this._nativeInputHandler=e=>{const t=e&&e.target?e.target.value:"";this.updateAutoWidth(String(t||""))},n.addEventListener("input",this._nativeInputHandler)))},detachNativeInputListener(){const e=this.$refs.component,t=e&&e.$el?e.$el:null;if(!t)return;const n=t.querySelector("input");n&&this._nativeInputHandler&&(n.removeEventListener("input",this._nativeInputHandler),this._nativeInputHandler=null)}},mounted(){this.value||0===this.value||"0"===this.value?this.curVal=Number(this.value):this.curVal=void 0,this.$nextTick(()=>{this.attachNativeInputListener(),this.updateAutoWidth()})},beforeDestroy(){this.detachNativeInputListener()}},c=s,f=(r(9590),r(4486)),p=(0,f.A)(c,t,[],!1,null,"685818a2",null);p.options.__file="components/lib/bpmNumber/src/part/editor.vue";var d=p.exports,h=function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{staticClass:"bpm-text-view",class:e.uiType+"-text-view "+e.fieldConf.type+"-view",attrs:{title:e._value}},[e._v(e._s(e._value||0===e._value?e._value:"--"))])};h._withStripped=!0;var m=r(9227),v={props:["value","fieldConf","row","uiType"],computed:{_value(){let e=o().get(this.row,this.fieldConf.id)||this.value;"string"==typeof e&&(e=e.trim());let t=o().get(this.fieldConf,"view.precision",0);this.fieldConf.view&&this.fieldConf.view.precision&&(e=o().round(e,this.fieldConf.view.precision)),o().get(this.fieldConf,"view.show_percent",!1)&&(e||0==e)&&(e=(100*e).toFixed(t-2>0?t-2:0)+"%");let n=o().get(this.fieldConf,"view.format",!1);if(n){let t=0;if(-1!=n.indexOf("{")){var r=n.match(/\{([^\}]+)\}/)[1];let i=n;t=m(e).format(r),e=i.replace(/\{[^\}]+\}/,t)}else e=m(e).format(n);return e}return e}}},b=(0,f.A)(v,h,[],!1,null,null,null);b.options.__file="components/lib/bpmNumber/src/part/reader.vue";var g=b.exports,_={name:"BpmNumber",components:{editorComponent:d,readerComponent:g},props:{value:{type:[String,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?g:d}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},y=(0,f.A)(_,e,[],!1,null,null,null);y.options.__file="components/lib/bpmNumber/src/main.vue";var x=y.exports;x.install=function(e){e.component(x.name,x)};var w=x}(),i}()});
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash")):"function"==typeof define&&define.amd?define(["lodash"],t):"object"==typeof exports?exports.bpm2=t(require("lodash")):e.bpm2=t(e.lodash)}(self,function(e){return function(){var t={9590:function(e,t,n){"use strict";var r=n(1601),i=n.n(r),o=n(6314);n.n(o)()(i()).push([e.id,".bpm-number-editor[data-v-685818a2] {\n position: relative;\n display: inline-block;\n}\n",""])},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var u=0;u<this.length;u++){var l=this[u][0];null!=l&&(a[l]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},1601:function(e){"use strict";e.exports=function(e){return e[1]}},9227:function(e,t,n){var r,i;r=function(){var e,t,n,r,i,o={},a={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},l={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function s(e,t){this._input=e,this._value=t}return(e=function(n){var r,i,a,u;if(e.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||t.isNaN(n))r=null;else if("string"==typeof n)if(l.zeroFormat&&n===l.zeroFormat)r=0;else if(l.nullFormat&&n===l.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(i in o)if((u="function"==typeof o[i].regexps.unformat?o[i].regexps.unformat():o[i].regexps.unformat)&&n.match(u)){a=o[i].unformat;break}r=(a=a||e._.stringToNumber)(n)}else r=Number(n)||null;return new s(n,r)}).version="2.0.6",e.isNumeral=function(e){return e instanceof s},e._=t={numberToFormat:function(t,n,r){var i,o,u,l,s,c,f,p,d=a[e.options.currentLocale],h=!1,m=!1,v="",b=1e12,g=1e9,_=1e6,y="",x=!1;if(t=t||0,o=Math.abs(t),e._.includes(n,"(")?(h=!0,n=n.replace(/[\(|\)]/g,"")):(e._.includes(n,"+")||e._.includes(n,"-"))&&(s=e._.includes(n,"+")?n.indexOf("+"):t<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),e._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],e._.includes(n," a")&&(v=" "),n=n.replace(new RegExp(v+"a[kmbt]?"),""),o>=b&&!i||"t"===i?(v+=d.abbreviations.trillion,t/=b):o<b&&o>=g&&!i||"b"===i?(v+=d.abbreviations.billion,t/=g):o<g&&o>=_&&!i||"m"===i?(v+=d.abbreviations.million,t/=_):(o<_&&o>=1e3&&!i||"k"===i)&&(v+=d.abbreviations.thousand,t/=1e3)),e._.includes(n,"[.]")&&(m=!0,n=n.replace("[.]",".")),u=t.toString().split(".")[0],l=n.split(".")[1],c=n.indexOf(","),p=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,l?(e._.includes(l,"[")?(l=(l=l.replace("]","")).split("["),y=e._.toFixed(t,l[0].length+l[1].length,r,l[1].length)):y=e._.toFixed(t,l.length,r),u=y.split(".")[0],y=e._.includes(y,".")?d.delimiters.decimal+y.split(".")[1]:"",m&&0===Number(y.slice(1))&&(y="")):u=e._.toFixed(t,0,r),v&&!i&&Number(u)>=1e3&&v!==d.abbreviations.trillion)switch(u=String(Number(u)/1e3),v){case d.abbreviations.thousand:v=d.abbreviations.million;break;case d.abbreviations.million:v=d.abbreviations.billion;break;case d.abbreviations.billion:v=d.abbreviations.trillion}if(e._.includes(u,"-")&&(u=u.slice(1),x=!0),u.length<p)for(var w=p-u.length;w>0;w--)u="0"+u;return c>-1&&(u=u.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+d.delimiters.thousands)),0===n.indexOf(".")&&(u=""),f=u+y+(v||""),h?f=(h&&x?"(":"")+f+(h&&x?")":""):s>=0?f=0===s?(x?"-":"+")+f:f+(x?"-":"+"):x&&(f="-"+f),f},stringToNumber:function(e){var t,n,r,i=a[l.currentLocale],o=e,u={thousand:3,million:6,billion:9,trillion:12};if(l.zeroFormat&&e===l.zeroFormat)n=0;else if(l.nullFormat&&e===l.nullFormat||!e.replace(/[^0-9]+/g,"").length)n=null;else{for(t in n=1,"."!==i.delimiters.decimal&&(e=e.replace(/\./g,"").replace(i.delimiters.decimal,".")),u)if(r=new RegExp("[^a-zA-Z]"+i.abbreviations[t]+"(?:\\)|(\\"+i.currency.symbol+")?(?:\\))?)?$"),o.match(r)){n*=Math.pow(10,u[t]);break}n*=(e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1,e=e.replace(/[^0-9\.]+/g,""),n*=Number(e)}return n},isNaN:function(e){return"number"==typeof e&&isNaN(e)},includes:function(e,t){return-1!==e.indexOf(t)},insert:function(e,t,n){return e.slice(0,n)+t+e.slice(n)},reduce:function(e,t){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,r=Object(e),i=r.length>>>0,o=0;if(3===arguments.length)n=arguments[2];else{for(;o<i&&!(o in r);)o++;if(o>=i)throw new TypeError("Reduce of empty array with no initial value");n=r[o++]}for(;o<i;o++)o in r&&(n=t(n,r[o],o,r));return n},multiplier:function(e){var t=e.toString().split(".");return t.length<2?1:Math.pow(10,t[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(e,n){var r=t.multiplier(n);return e>r?e:r},1)},toFixed:function(e,t,n,r){var i,o,a,u,l=e.toString().split("."),s=t-(r||0);return i=2===l.length?Math.min(Math.max(l[1].length,s),t):s,a=Math.pow(10,i),u=(n(e+"e+"+i)/a).toFixed(i),r>t-i&&(o=new RegExp("\\.?0{1,"+(r-(t-i))+"}$"),u=u.replace(o,"")),u}},e.options=l,e.formats=o,e.locales=a,e.locale=function(e){return e&&(l.currentLocale=e.toLowerCase()),l.currentLocale},e.localeData=function(e){if(!e)return a[l.currentLocale];if(e=e.toLowerCase(),!a[e])throw new Error("Unknown locale : "+e);return a[e]},e.reset=function(){for(var e in u)l[e]=u[e]},e.zeroFormat=function(e){l.zeroFormat="string"==typeof e?e:null},e.nullFormat=function(e){l.nullFormat="string"==typeof e?e:null},e.defaultFormat=function(e){l.defaultFormat="string"==typeof e?e:"0.0"},e.register=function(e,t,n){if(t=t.toLowerCase(),this[e+"s"][t])throw new TypeError(t+" "+e+" already registered.");return this[e+"s"][t]=n,n},e.validate=function(t,n){var r,i,o,a,u,l,s,c;if("string"!=typeof t&&(t+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",t)),(t=t.trim()).match(/^\d+$/))return!0;if(""===t)return!1;try{s=e.localeData(n)}catch(t){s=e.localeData(e.locale())}return o=s.currency.symbol,u=s.abbreviations,r=s.delimiters.decimal,i="."===s.delimiters.thousands?"\\.":s.delimiters.thousands,!(null!==(c=t.match(/^[^\d]+/))&&(t=t.substr(1),c[0]!==o)||null!==(c=t.match(/[^\d]+$/))&&(t=t.slice(0,-1),c[0]!==u.thousand&&c[0]!==u.million&&c[0]!==u.billion&&c[0]!==u.trillion)||(l=new RegExp(i+"{2}"),t.match(/[^\d.,]/g)||(a=t.split(r)).length>2||(a.length<2?!a[0].match(/^\d+.*\d$/)||a[0].match(l):1===a[0].length?!a[0].match(/^\d+$/)||a[0].match(l)||!a[1].match(/^\d+$/):!a[0].match(/^\d+.*\d$/)||a[0].match(l)||!a[1].match(/^\d+$/))))},e.fn=s.prototype={clone:function(){return e(this)},format:function(t,n){var r,i,a,u=this._value,s=t||l.defaultFormat;if(n=n||Math.round,0===u&&null!==l.zeroFormat)i=l.zeroFormat;else if(null===u&&null!==l.nullFormat)i=l.nullFormat;else{for(r in o)if(s.match(o[r].regexps.format)){a=o[r].format;break}i=(a=a||e._.numberToFormat)(u,s,n)}return i},value:function(){return this._value},input:function(){return this._input},set:function(e){return this._value=Number(e),this},add:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([this._value,e],function(e,t,r,i){return e+Math.round(n*t)},0)/n,this},subtract:function(e){var n=t.correctionFactor.call(null,this._value,e);return this._value=t.reduce([e],function(e,t,r,i){return e-Math.round(n*t)},Math.round(this._value*n))/n,this},multiply:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)*Math.round(n*o)/Math.round(o*o)},1),this},divide:function(e){return this._value=t.reduce([this._value,e],function(e,n,r,i){var o=t.correctionFactor(e,n);return Math.round(e*o)/Math.round(n*o)}),this},difference:function(t){return Math.abs(e(this._value).subtract(t).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(t,n,r){var i,o=e._.includes(n," BPS")?" ":"";return t*=1e4,n=n.replace(/\s?BPS/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"BPS"),i=i.join("")):i=i+o+"BPS",i},unformat:function(t){return+(1e-4*e._.stringToNumber(t)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},i="("+(i=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(e){return n.suffixes.indexOf(e)<0})).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(i)},format:function(t,i,o){var a,u,l,s=e._.includes(i,"ib")?r:n,c=e._.includes(i," b")||e._.includes(i," ib")?" ":"";for(i=i.replace(/\s?i?b/,""),a=0;a<=s.suffixes.length;a++)if(u=Math.pow(s.base,a),l=Math.pow(s.base,a+1),null===t||0===t||t>=u&&t<l){c+=s.suffixes[a],u>0&&(t/=u);break}return e._.numberToFormat(t,i,o)+c},unformat:function(t){var i,o,a=e._.stringToNumber(t);if(a){for(i=n.suffixes.length-1;i>=0;i--){if(e._.includes(t,n.suffixes[i])){o=Math.pow(n.base,i);break}if(e._.includes(t,r.suffixes[i])){o=Math.pow(r.base,i);break}}a*=o||1}return a}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(t,n,r){var i,o,a=e.locales[e.options.currentLocale],u={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),i=e._.numberToFormat(t,n,r),t>=0?(u.before=u.before.replace(/[\-\(]/,""),u.after=u.after.replace(/[\-\)]/,"")):t<0&&!e._.includes(u.before,"-")&&!e._.includes(u.before,"(")&&(u.before="-"+u.before),o=0;o<u.before.length;o++)switch(u.before[o]){case"$":i=e._.insert(i,a.currency.symbol,o);break;case" ":i=e._.insert(i," ",o+a.currency.symbol.length-1)}for(o=u.after.length-1;o>=0;o--)switch(u.after[o]){case"$":i=o===u.after.length-1?i+a.currency.symbol:e._.insert(i,a.currency.symbol,-(u.after.length-(1+o)));break;case" ":i=o===u.after.length-1?i+" ":e._.insert(i," ",-(u.after.length-(1+o)+a.currency.symbol.length-1))}return i}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(t,n,r){var i=("number"!=typeof t||e._.isNaN(t)?"0e+0":t.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(i[0]),n,r)+"e"+i[1]},unformat:function(t){var n=e._.includes(t,"e+")?t.split("e+"):t.split("e-"),r=Number(n[0]),i=Number(n[1]);return i=e._.includes(t,"e-")?i*=-1:i,e._.reduce([r,Math.pow(10,i)],function(t,n,r,i){var o=e._.correctionFactor(t,n);return t*o*(n*o)/(o*o)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(t,n,r){var i=e.locales[e.options.currentLocale],o=e._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),o+=i.ordinal(t),e._.numberToFormat(t,n,r)+o}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(t,n,r){var i,o=e._.includes(n," %")?" ":"";return e.options.scalePercentBy100&&(t*=100),n=n.replace(/\s?\%/,""),i=e._.numberToFormat(t,n,r),e._.includes(i,")")?((i=i.split("")).splice(-1,0,o+"%"),i=i.join("")):i=i+o+"%",i},unformat:function(t){var n=e._.stringToNumber(t);return e.options.scalePercentBy100?.01*n:n}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(e,t,n){var r=Math.floor(e/60/60),i=Math.floor((e-60*r*60)/60),o=Math.round(e-60*r*60-60*i);return r+":"+(i<10?"0"+i:i)+":"+(o<10?"0"+o:o)},unformat:function(e){var t=e.split(":"),n=0;return 3===t.length?(n+=60*Number(t[0])*60,n+=60*Number(t[1]),n+=Number(t[2])):2===t.length&&(n+=60*Number(t[0]),n+=Number(t[1])),Number(n)}}),e},void 0===(i=r.call(t,n,t,e))||(e.exports=i)},4486:function(e,t,n){"use strict";function r(e,t,n,r,i,o,a,u){var l,s="function"==typeof e?e.options:e;if(t&&(s.render=t,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),a?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},s._ssrRegister=l):i&&(l=u?function(){i.call(this,(s.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(s.functional){s._injectStyles=l;var c=s.render;s.render=function(e,t){return l.call(t),c(e,t)}}else{var f=s.beforeCreate;s.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:s}}n.d(t,{A:function(){return r}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return function(){"use strict";r.r(i),r.d(i,{default:function(){return w}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._b({tag:"component",staticClass:"bpm-number",attrs:{value:e.curVal,fieldConf:e.fieldConf,row:e.row,mode:e.mode,uiType:e.uiType},on:{change:e.handleChange}},"component",e.$attrs,!1))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"bpm-number-editor"},[n("el-input-number",{ref:"component",staticClass:"bpm-number-editor__input",style:e.inputNumberStyle,attrs:{precision:e.precision,controls:e.controls,"controls-position":e.controlsPosition},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}})],1)};t._withStripped=!0;var n=r(6773),o=r.n(n),a=r(5554),u=r.n(a),l=r(7642);u().use(l.InputNumber);var s={data(){return{curVal:null,inputWidth:null,inputFont:""}},props:["value","fieldConf","row"],watch:{curVal(){this.$nextTick(this.updateAutoWidth)},value(e){this.value||0===this.value||"0"===this.value?this.curVal=Number(this.value):this.curVal=void 0,this.$nextTick(this.updateAutoWidth)}},computed:{precision(){return o().get(this.fieldConf,"view.precision",0)},inputNumberStyle(){return this.inputWidth?{width:`${this.inputWidth}px`}:{}},controls(){return!("none"===o().get(this.fieldConf,"view.controls"))},controlsPosition(){return o().get(this.fieldConf,"view.controls","both")}},methods:{handleChange(e){console.log("number change: ",e),this.$emit("change",this.curVal),this.$emit("input",this.curVal)},updateAutoWidth(e){const t=this.$refs.component,n=t&&t.$el?t.$el:null;if(!n)return;const r=n.querySelector("input");if(!r)return;const i=window.getComputedStyle(r),o=i.font||`${i.fontSize} ${i.fontFamily}`;this.inputFont=o;const a=(parseFloat(i.paddingLeft)||0)+(parseFloat(i.paddingRight)||0),u="string"==typeof e?e:null===r.value||void 0===r.value?"":String(r.value),l=u.length?u:"0";this._autoWidthCanvas||(this._autoWidthCanvas=document.createElement("canvas"));const s=this._autoWidthCanvas.getContext("2d");if(!s)return;s.font=o;const c=s.measureText(l).width,f=Math.ceil(c+a+10);this.inputWidth=Math.max(40,f)},attachNativeInputListener(){const e=this.$refs.component,t=e&&e.$el?e.$el:null;if(!t)return;const n=t.querySelector("input");n&&(this._nativeInputHandler||(this._nativeInputHandler=e=>{const t=e&&e.target?e.target.value:"";this.updateAutoWidth(String(t||""))},n.addEventListener("input",this._nativeInputHandler)))},detachNativeInputListener(){const e=this.$refs.component,t=e&&e.$el?e.$el:null;if(!t)return;const n=t.querySelector("input");n&&this._nativeInputHandler&&(n.removeEventListener("input",this._nativeInputHandler),this._nativeInputHandler=null)}},mounted(){this.value||0===this.value||"0"===this.value?this.curVal=Number(this.value):this.curVal=void 0,this.$nextTick(()=>{this.attachNativeInputListener(),this.updateAutoWidth()})},beforeDestroy(){this.detachNativeInputListener()}},c=s,f=(r(9590),r(4486)),p=(0,f.A)(c,t,[],!1,null,"685818a2",null);p.options.__file="components/lib/bpmNumber/src/part/editor.vue";var d=p.exports,h=function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{staticClass:"bpm-text-view",class:e.uiType+"-text-view "+e.fieldConf.type+"-view",attrs:{title:e._value}},[e._v(e._s(e._value||0===e._value?e._value:"--"))])};h._withStripped=!0;var m=r(9227),v={props:["value","fieldConf","row","uiType"],computed:{_value(){let e=o().get(this.row,this.fieldConf.id)||this.value;"string"==typeof e&&(e=e.trim());let t=o().get(this.fieldConf,"view.precision",0);this.fieldConf.view&&this.fieldConf.view.precision&&(e=o().round(e,this.fieldConf.view.precision)),o().get(this.fieldConf,"view.show_percent",!1)&&(e||0==e)&&(e=(100*e).toFixed(t-2>0?t-2:0)+"%");let n=o().get(this.fieldConf,"view.format",!1);if(n){let t=0;if(-1!=n.indexOf("{")){var r=n.match(/\{([^\}]+)\}/)[1];let i=n;t=m(e).format(r),e=i.replace(/\{[^\}]+\}/,t)}else e=m(e).format(n);return e}return e}}},b=(0,f.A)(v,h,[],!1,null,null,null);b.options.__file="components/lib/bpmNumber/src/part/reader.vue";var g=b.exports,_={name:"BpmNumber",components:{editorComponent:d,readerComponent:g},props:{value:{type:[String,Number]},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?g:d}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},y=(0,f.A)(_,e,[],!1,null,null,null);y.options.__file="components/lib/bpmNumber/src/main.vue";var x=y.exports;x.install=function(e){e.component(x.name,x)};var w=x}(),i}()});
|