xt-element-ui 2.1.72 → 2.2.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/lib/index.common.js +267 -61
- package/lib/index.css +1 -1
- package/lib/index.umd.js +267 -61
- package/lib/index.umd.min.js +1 -1
- package/lib/xt-badge/demo.html +10 -0
- package/lib/xt-badge/index.js +1 -0
- package/lib/xt-badge/xt-badge.common.js +335 -0
- package/lib/xt-badge/xt-badge.css +1 -0
- package/lib/xt-badge/xt-badge.umd.js +345 -0
- package/lib/xt-badge/xt-badge.umd.min.js +1 -0
- package/lib/xt-button/demo.html +10 -0
- package/lib/xt-button/index.js +1 -0
- package/lib/xt-button/xt-button.common.js +331 -0
- package/lib/xt-button/xt-button.css +1 -0
- package/lib/xt-button/xt-button.umd.js +341 -0
- package/lib/xt-button/xt-button.umd.min.js +1 -0
- package/lib/xt-card/demo.html +10 -0
- package/lib/xt-card/index.js +1 -0
- package/lib/xt-card/xt-card.common.js +325 -0
- package/lib/xt-card/xt-card.css +1 -0
- package/lib/xt-card/xt-card.umd.js +335 -0
- package/lib/xt-card/xt-card.umd.min.js +1 -0
- package/lib/xt-card-item/demo.html +10 -0
- package/lib/xt-card-item/index.js +1 -0
- package/lib/xt-card-item/xt-card-item.common.js +291 -0
- package/lib/xt-card-item/xt-card-item.css +1 -0
- package/lib/xt-card-item/xt-card-item.umd.js +301 -0
- package/lib/xt-card-item/xt-card-item.umd.min.js +1 -0
- package/lib/xt-chart/demo.html +10 -0
- package/lib/xt-chart/index.js +1 -0
- package/lib/xt-chart/xt-chart.common.js +109203 -0
- package/lib/xt-chart/xt-chart.css +1 -0
- package/lib/xt-chart/xt-chart.umd.js +109213 -0
- package/lib/xt-chart/xt-chart.umd.min.js +1 -0
- package/lib/xt-config-provider/demo.html +10 -0
- package/lib/xt-config-provider/index.js +1 -0
- package/lib/xt-config-provider/xt-config-provider.common.js +108388 -0
- package/lib/xt-config-provider/xt-config-provider.css +1 -0
- package/lib/xt-config-provider/xt-config-provider.umd.js +108398 -0
- package/lib/xt-config-provider/xt-config-provider.umd.min.js +1 -0
- package/lib/xt-date-picker/demo.html +10 -0
- package/lib/xt-date-picker/index.js +1 -0
- package/lib/xt-date-picker/xt-date-picker.common.js +768 -0
- package/lib/xt-date-picker/xt-date-picker.css +1 -0
- package/lib/xt-date-picker/xt-date-picker.umd.js +778 -0
- package/lib/xt-date-picker/xt-date-picker.umd.min.js +1 -0
- package/lib/xt-flex-box/demo.html +10 -0
- package/lib/xt-flex-box/index.js +1 -0
- package/lib/xt-flex-box/xt-flex-box.common.js +303 -0
- package/lib/xt-flex-box/xt-flex-box.css +1 -0
- package/lib/xt-flex-box/xt-flex-box.umd.js +313 -0
- package/lib/xt-flex-box/xt-flex-box.umd.min.js +1 -0
- package/lib/xt-form-schema/demo.html +10 -0
- package/lib/xt-form-schema/index.js +1 -0
- package/lib/xt-form-schema/xt-form-schema.common.js +510 -0
- package/lib/xt-form-schema/xt-form-schema.css +1 -0
- package/lib/xt-form-schema/xt-form-schema.umd.js +520 -0
- package/lib/xt-form-schema/xt-form-schema.umd.min.js +1 -0
- package/lib/xt-grid-box/demo.html +10 -0
- package/lib/xt-grid-box/index.js +1 -0
- package/lib/xt-grid-box/xt-grid-box.common.js +404 -0
- package/lib/xt-grid-box/xt-grid-box.css +1 -0
- package/lib/xt-grid-box/xt-grid-box.umd.js +414 -0
- package/lib/xt-grid-box/xt-grid-box.umd.min.js +1 -0
- package/lib/xt-grid-item/demo.html +10 -0
- package/lib/xt-grid-item/index.js +1 -0
- package/lib/xt-grid-item/xt-grid-item.common.js +381 -0
- package/lib/xt-grid-item/xt-grid-item.css +1 -0
- package/lib/xt-grid-item/xt-grid-item.umd.js +391 -0
- package/lib/xt-grid-item/xt-grid-item.umd.min.js +1 -0
- package/lib/xt-icon/demo.html +10 -0
- package/lib/xt-icon/index.js +1 -0
- package/lib/xt-icon/xt-icon.common.js +430 -0
- package/lib/xt-icon/xt-icon.css +1 -0
- package/lib/xt-icon/xt-icon.umd.js +440 -0
- package/lib/xt-icon/xt-icon.umd.min.js +1 -0
- package/lib/xt-input/demo.html +10 -0
- package/lib/xt-input/index.js +1 -0
- package/lib/xt-input/xt-input.common.js +584 -0
- package/lib/xt-input/xt-input.css +1 -0
- package/lib/xt-input/xt-input.umd.js +594 -0
- package/lib/xt-input/xt-input.umd.min.js +1 -0
- package/lib/xt-list/demo.html +10 -0
- package/lib/xt-list/index.js +1 -0
- package/lib/xt-list/xt-list.common.js +714 -0
- package/lib/xt-list/xt-list.css +1 -0
- package/lib/xt-list/xt-list.umd.js +724 -0
- package/lib/xt-list/xt-list.umd.min.js +1 -0
- package/lib/xt-map/demo.html +10 -0
- package/lib/xt-map/index.js +1 -0
- package/lib/xt-map/xt-map.common.js +1951 -0
- package/lib/xt-map/xt-map.css +1 -0
- package/lib/xt-map/xt-map.umd.js +1961 -0
- package/lib/xt-map/xt-map.umd.min.js +1 -0
- package/lib/xt-map-provider/demo.html +10 -0
- package/lib/xt-map-provider/index.js +1 -0
- package/lib/xt-map-provider/xt-map-provider.common.js +644 -0
- package/lib/xt-map-provider/xt-map-provider.css +1 -0
- package/lib/xt-map-provider/xt-map-provider.umd.js +654 -0
- package/lib/xt-map-provider/xt-map-provider.umd.min.js +1 -0
- package/lib/xt-page/demo.html +10 -0
- package/lib/xt-page/index.js +1 -0
- package/lib/xt-page/xt-page.common.js +353 -0
- package/lib/xt-page/xt-page.css +1 -0
- package/lib/xt-page/xt-page.umd.js +363 -0
- package/lib/xt-page/xt-page.umd.min.js +1 -0
- package/lib/xt-progress/demo.html +10 -0
- package/lib/xt-progress/index.js +1 -0
- package/lib/xt-progress/xt-progress.common.js +327 -0
- package/lib/xt-progress/xt-progress.css +1 -0
- package/lib/xt-progress/xt-progress.umd.js +337 -0
- package/lib/xt-progress/xt-progress.umd.min.js +1 -0
- package/lib/xt-scroll-arrow/demo.html +10 -0
- package/lib/xt-scroll-arrow/index.js +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.common.js +495 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.css +1 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.js +505 -0
- package/lib/xt-scroll-arrow/xt-scroll-arrow.umd.min.js +1 -0
- package/lib/xt-select-tree/demo.html +10 -0
- package/lib/xt-select-tree/index.js +1 -0
- package/lib/xt-select-tree/xt-select-tree.common.js +1791 -0
- package/lib/xt-select-tree/xt-select-tree.css +1 -0
- package/lib/xt-select-tree/xt-select-tree.umd.js +1801 -0
- package/lib/xt-select-tree/xt-select-tree.umd.min.js +1 -0
- package/lib/xt-step-price/demo.html +10 -0
- package/lib/xt-step-price/index.js +1 -0
- package/lib/xt-step-price/xt-step-price.common.js +800 -0
- package/lib/xt-step-price/xt-step-price.css +1 -0
- package/lib/xt-step-price/xt-step-price.umd.js +810 -0
- package/lib/xt-step-price/xt-step-price.umd.min.js +1 -0
- package/lib/xt-step-price-item/demo.html +10 -0
- package/lib/xt-step-price-item/index.js +1 -0
- package/lib/xt-step-price-item/xt-step-price-item.common.js +417 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.js +427 -0
- package/lib/xt-step-price-item/xt-step-price-item.umd.min.js +1 -0
- package/lib/xt-tab-pane/demo.html +10 -0
- package/lib/xt-tab-pane/index.js +1 -0
- package/lib/xt-tab-pane/xt-tab-pane.common.js +309 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.js +319 -0
- package/lib/xt-tab-pane/xt-tab-pane.umd.min.js +1 -0
- package/lib/xt-table/demo.html +10 -0
- package/lib/xt-table/index.js +1 -0
- package/lib/xt-table/xt-table.common.js +1027 -0
- package/lib/xt-table/xt-table.css +1 -0
- package/lib/xt-table/xt-table.umd.js +1037 -0
- package/lib/xt-table/xt-table.umd.min.js +1 -0
- package/lib/xt-tabs/demo.html +10 -0
- package/lib/xt-tabs/index.js +1 -0
- package/lib/xt-tabs/xt-tabs.common.js +463 -0
- package/lib/xt-tabs/xt-tabs.css +1 -0
- package/lib/xt-tabs/xt-tabs.umd.js +473 -0
- package/lib/xt-tabs/xt-tabs.umd.min.js +1 -0
- package/lib/xt-text/demo.html +10 -0
- package/lib/xt-text/index.js +1 -0
- package/lib/xt-text/xt-text.common.js +536 -0
- package/lib/xt-text/xt-text.css +1 -0
- package/lib/xt-text/xt-text.umd.js +546 -0
- package/lib/xt-text/xt-text.umd.min.js +1 -0
- package/lib/xt-time/demo.html +10 -0
- package/lib/xt-time/index.js +1 -0
- package/lib/xt-time/xt-time.common.js +555 -0
- package/lib/xt-time/xt-time.css +1 -0
- package/lib/xt-time/xt-time.umd.js +565 -0
- package/lib/xt-time/xt-time.umd.min.js +1 -0
- package/lib/xt-transfer-tree/demo.html +10 -0
- package/lib/xt-transfer-tree/index.js +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.common.js +594 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.css +1 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.js +604 -0
- package/lib/xt-transfer-tree/xt-transfer-tree.umd.min.js +1 -0
- package/lib/xt-upload/demo.html +10 -0
- package/lib/xt-upload/index.js +1 -0
- package/lib/xt-upload/xt-upload.common.js +1292 -0
- package/lib/xt-upload/xt-upload.css +1 -0
- package/lib/xt-upload/xt-upload.umd.js +1302 -0
- package/lib/xt-upload/xt-upload.umd.min.js +1 -0
- package/package.json +4 -2
- package/src/components/xt-badge/index.js +8 -7
- package/src/components/xt-button/index.js +1 -0
- package/src/components/xt-card/index.js +1 -0
- package/src/components/xt-card-item/index.js +1 -0
- package/src/components/xt-config-provider/index.js +1 -0
- package/src/components/xt-flex-box/index.js +1 -0
- package/src/components/xt-grid-box/index.js +1 -0
- package/src/components/xt-icon/index.js +1 -0
- package/src/components/xt-input/index.js +1 -0
- package/src/components/xt-map/index.js +1 -0
- package/src/components/xt-progress/index.js +8 -7
- package/src/components/xt-scroll-arrow/index.js +8 -7
- package/src/components/xt-step-price/index.js +1 -0
- package/src/components/xt-tabs/index.js +9 -8
- package/src/components/xt-text/index.js +1 -0
- package/src/components/xt-time/index.js +1 -0
- package/src/index.js +32 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["xt-step-price"]=t():e["xt-step-price"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function i(s){if(t[s])return t[s].exports;var n=t[s]={i:s,l:!1,exports:{}};return e[s].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,s){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},i.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(s,n,function(t){return e[t]}.bind(null,n));return s},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="fb15")}({fb15:function(e,t,i){"use strict";if(i.r(t),i.d(t,"XtStepPrice",(function(){return x})),i.d(t,"XtStepPriceItem",(function(){return m})),"undefined"!==typeof window){var s=window.document.currentScript,n=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);n&&(i.p=n[1])}i("fd93");var r=function(){var e=this,t=e._self._c;return t("div",{staticClass:"xt-step-price",class:{"is-disabled":e.disabled}},[e.title||e.$slots.header?t("div",{staticClass:"xt-step-price__header"},[e.title?t("xt-text",{attrs:{bold:"",size:"medium"}},[e._v(e._s(e.title))]):e._e(),e._t("header"),e.disabled||e.isLimitReached?e._e():t("xt-button",{attrs:{type:"primary",size:"small",icon:"el-icon-plus",plain:""},on:{click:e.onAdd}},[e._v("新增"+e._s(e.stepName))]),e.isLimitReached?t("xt-text",{attrs:{size:"small","type-color":"info"}},[e._v("已达上限("+e._s(e.localItems.length)+"/"+e._s(e.limit)+")")]):e._e()],2):e._e(),t("div",{staticClass:"xt-step-price__list"},e._l(e.localItems,(function(i,s){return t("XtStepPriceItem",{key:s,attrs:{value:i,index:s,"is-first":0===s,"is-last":s===e.localItems.length-1,"items-length":e.localItems.length,removable:0!==s,"min-locked":0!==s,unit:e.unit,precision:e.precision,"step-name":e.stepName,step:e.step,"left-bracket":e.leftBracket,"right-bracket":e.rightBracket,"field-keys":e.fieldKeys,disabled:e.disabled,"allow-negative":e.allowNegative},on:{input:t=>e.onItemInput(t,s),"max-change":e.onMaxChange,"min-change":e.onMinChange,delete:e.onDelete,blur:e.onFieldBlur}})})),1),0===e.localItems.length?t("div",{staticClass:"xt-step-price__empty"},[t("span",[e._v("暂无数据,点击右上角「新增"+e._s(e.stepName)+"」开始配置")])]):e._e(),e.tip||e.$slots.tip?t("div",{staticClass:"xt-step-price__tip"},[e._t("tip",(function(){return[t("xt-text",{attrs:{size:"small","type-color":"warning"}},[e._v(e._s(e.tip))])]}))],2):e._e()])},a=[],l=function(){var e=this,t=e._self._c;return t("div",{staticClass:"xt-step-price-item"},[t("div",{staticClass:"xt-step-price-item__range"},[t("span",{staticClass:"xt-step-price-item__bracket"},[e._v(e._s(e.finalLeftBracket))]),e.itemsLength>1?t("span",{staticClass:"xt-step-price-item__name"},[e._v("第"+e._s(e.index+1)+e._s(e.stepName))]):e._e(),t("span",{staticClass:"xt-step-price-item__bracket"},[e._v(e._s(e.finalRightBracket))]),t("xt-input",{staticClass:"xt-step-price-item__input",attrs:{disabled:e.disabled||e.minLocked,size:"small",placeholder:"下限"},on:{blur:t=>{e.onMinBlur(),e.onBlur(t)}},model:{value:e.minInput,callback:function(t){e.minInput=e._n(t)},expression:"minInput"}}),t("span",{staticClass:"xt-step-price-item__comma"},[e._v("-")]),e.isLast?t("span",{staticClass:"xt-step-price-item__infinity"},[e._v("+∞")]):t("xt-input",{staticClass:"xt-step-price-item__input",attrs:{type:"number",disabled:e.disabled,size:"small",placeholder:"上限"},on:{blur:t=>{e.onMaxBlur(),e.onBlur(t)}},model:{value:e.maxInput,callback:function(t){e.maxInput=e._n(t)},expression:"maxInput"}})],1),t("div",{staticClass:"xt-step-price-item__price"},[t("xt-input",{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{type:"number",disabled:e.disabled,size:"small",placeholder:"价格"},on:{blur:t=>{e.onPriceBlur(),e.onBlur(t)}},model:{value:e.priceInput,callback:function(t){e.priceInput=e._n(t)},expression:"priceInput"}}),t("span",{staticClass:"xt-step-price-item__unit"},[e._v(e._s(e.unit))])],1),!e.disabled&&e.removable&&e.itemsLength>1?t("xt-button",{staticClass:"xt-step-price-item__delete",attrs:{type:"text",icon:"el-icon-delete"},on:{click:e.onDelete}}):e._e()],1)},u=[],o={name:"XtStepPriceItem",props:{value:{type:Object,required:!0,default:()=>({min:0,max:null,price:0})},stepName:{type:String,default:"阶梯"},index:{type:Number,default:0},isFirst:{type:Boolean,default:!1},isLast:{type:Boolean,default:!1},itemsLength:{type:Number,default:1},removable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},allowNegative:{type:Boolean,default:!1},minLocked:{type:Boolean,default:!1},unit:{type:String,default:"元"},precision:{type:Number,default:2},step:{type:Number,default:1},leftBracket:{type:String,default:"["},rightBracket:{type:String,default:null},fieldKeys:{type:Object,default:()=>({min:"min",max:"max",price:"price"})}},computed:{keyMin(){return this.fieldKeys&&this.fieldKeys.min||"min"},keyMax(){return this.fieldKeys&&this.fieldKeys.max||"max"},keyPrice(){return this.fieldKeys&&this.fieldKeys.price||"price"},finalRightBracket(){return null!==this.rightBracket&&void 0!==this.rightBracket&&""!==this.rightBracket?this.rightBracket:this.isLast?"]":")"},finalLeftBracket(){return null===this.leftBracket||void 0===this.leftBracket?"[":this.leftBracket}},data(){const{minVal:e,maxVal:t,priceVal:i}=this.getPriceItem(this.value);return{minInput:e,maxInput:t,priceInput:i}},watch:{value:{deep:!0,immediate:!0,handler(e){const{minVal:t,maxVal:i,priceVal:s}=this.getPriceItem(e);this.minInput=t,this.maxInput=i,this.priceInput=s}},isLast(e){if(e)this.maxInput=null;else{const e=this.safeNumber(this.minInput,0),t=this.value;this.maxInput=this.safeNumber(t&&t[this.keyMax],e+1)}}},methods:{getPriceItem(e){const t=e,i=this.safeNumber(t&&t[this.keyMin],0),s=this.isLast?null:this.safeNumber(t&&t[this.keyMax],i+1),n=this.safeNumber(t&&t[this.keyPrice],0);return{minVal:i,maxVal:s,priceVal:n}},safeNumber(e,t=0){if(null===e||void 0===e||""===e||e===1/0||e===-1/0)return t;const i=Number(e);return isNaN(i)?t:i},emitChange(e){const t={[this.keyMin]:this.minInput,[this.keyMax]:this.isLast?null:this.maxInput,[this.keyPrice]:this.priceInput,...e};this.$emit("input",t),this.$emit("change",t,this.index)},onMinBlur(){let e=this.safeNumber(this.minInput,0);0!==e&&(e=Number(e.toFixed(this.precision))),this.minInput=e,this.$emit("min-change",e,this.index),this.emitChange({[this.keyMin]:e})},onMaxBlur(){if(this.isLast)return;const e=this.safeNumber(this.minInput,0),t=this.safeNumber(this.step,1);let i=this.safeNumber(this.maxInput,e+t);i<=e&&(i=e+t),i=Number(i.toFixed(this.precision)),this.maxInput=i,this.$emit("max-change",i,this.index),this.emitChange({[this.keyMax]:i})},onPriceBlur(){const e=this.priceInput;if(null===e||void 0===e||""===e||isNaN(e))return this.priceInput="",void this.emitChange({[this.keyPrice]:""});let t=this.safeNumber(e,0);t<0&&!this.allowNegative&&(t=0),t=Number(t.toFixed(this.precision)),this.priceInput=t,this.emitChange({[this.keyPrice]:t})},onBlur(e){this.$emit("blur",e)},onDelete(){this.$emit("delete",this.index)}}},c=o;function h(e,t,i,s,n,r,a,l){var u,o="function"===typeof e?e.options:e;if(t&&(o.render=t,o.staticRenderFns=i,o._compiled=!0),s&&(o.functional=!0),r&&(o._scopeId="data-v-"+r),a?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},o._ssrRegister=u):n&&(u=l?function(){n.call(this,(o.functional?this.parent:this).$root.$options.shadowRoot)}:n),u)if(o.functional){o._injectStyles=u;var c=o.render;o.render=function(e,t){return u.call(t),c(e,t)}}else{var h=o.beforeCreate;o.beforeCreate=h?[].concat(h,u):[u]}return{exports:e,options:o}}var p=h(c,l,u,!1,null,null,null),m=p.exports,d={name:"XtStepPrice",components:{XtStepPriceItem:m},inject:{elFormItem:{default:""}},computed:{keyMin(){return this.fieldKeys&&this.fieldKeys.min||"min"},keyMax(){return this.fieldKeys&&this.fieldKeys.max||"max"},keyPrice(){return this.fieldKeys&&this.fieldKeys.price||"price"},isLimitReached(){const e=Number(this.limit);return e>0&&this.localItems.length>=e}},props:{value:{type:Array,default:()=>[]},title:{type:String,default:""},unit:{type:String,default:"元"},stepName:{type:String,default:"阶梯"},precision:{type:Number,default:2},leftBracket:{type:String,default:"["},rightBracket:{type:String,default:null},fieldKeys:{type:Object,default:()=>({min:"min",max:"max",price:"price"})},limit:{type:Number,default:0},step:{type:Number,default:10},disabled:{type:Boolean,default:!1},allowNegative:{type:Boolean,default:!1},tip:{type:String,default:"区间左闭右闭 [min, max],最后一级为 [min, +∞),保证连续且不重叠。"},defaultFirst:{type:Boolean,default:!0}},data(){return{localItems:this.normalize(this.value)}},watch:{value:{deep:!0,immediate:!0,handler(e){this.localItems=this.normalize(e)}}},methods:{safeNumber(e,t=0){if(null===e||void 0===e||""===e||e===1/0||e===-1/0)return t;const i=Number(e);return isNaN(i)?t:i},cloneItems(e){return Array.isArray(e)?e.map(e=>{const t=e&&e[this.keyPrice];return{[this.keyMin]:this.safeNumber(e&&e[this.keyMin],0),[this.keyMax]:e&&null==e[this.keyMax]||e&&""===e[this.keyMax]?null:this.safeNumber(e[this.keyMax],null),[this.keyPrice]:null===t||void 0===t||""===t?"":this.safeNumber(t,0)}}):[]},normalize(e){const t=this.cloneItems(e);return 0===t.length&&this.defaultFirst&&t.push({[this.keyMin]:0,[this.keyMax]:null,[this.keyPrice]:0}),this.ensureContinuity(t),t},ensureContinuity(e){if(!Array.isArray(e)||0===e.length)return;e[0][this.keyMin]=0;const t=this.safeNumber(this.step,1);for(let i=0;i<e.length;i++){const s=e[i],n=e[i+1],r=this.safeNumber(s[this.keyMin],0);if(n){let e=this.safeNumber(s[this.keyMax],r+t);e<=r&&(e=r+t),e=Number(e.toFixed(this.precision)),s[this.keyMax]=e,n[this.keyMin]=e}else s[this.keyMax]=null;const a=s[this.keyPrice];s[this.keyPrice]=null===a||void 0===a||""===a?"":this.safeNumber(a,0)}},emit(){this.ensureContinuity(this.localItems);const e=this.cloneItems(this.localItems);this.$emit("input",e),this.$emit("change",e),this.dispatchFormEvent("el.form.change",e)},dispatchFormEvent(e,t){this.elFormItem&&this.elFormItem.$emit(e,t)},onFieldBlur(){this.dispatchFormEvent("el.form.blur",this.localItems)},validate(e){const t=this.localItems;if(!Array.isArray(t)||0===t.length)return e&&e(!1,[{field:"stepPrice",message:"请配置"+this.stepName,type:"error"}]),!1;const i=[];for(let s=0;s<t.length;s++){const e=t[s],n=e[this.keyPrice],r=e[this.keyMin],a=e[this.keyMax],l=this.safeNumber(n,0),u=this.safeNumber(r,0);if(null===n||void 0===n||""===n?i.push({field:`stepPrice[${s}].price`,message:`第${s+1}${this.stepName}价格不能为空`,type:"error"}):l<0&&!this.allowNegative&&i.push({field:`stepPrice[${s}].price`,message:`第${s+1}${this.stepName}价格不能为负数`,type:"error"}),null===r||void 0===r||""===r?i.push({field:`stepPrice[${s}].min`,message:`第${s+1}${this.stepName}下限不能为空`,type:"error"}):u<0&&!this.allowNegative&&i.push({field:`stepPrice[${s}].min`,message:`第${s+1}${this.stepName}下限不能为负数`,type:"error"}),this.isLast(s)||(null===a||void 0===a||""===a?i.push({field:`stepPrice[${s}].max`,message:`第${s+1}${this.stepName}上限不能为空`,type:"error"}):this.safeNumber(a,0)<=u&&i.push({field:`stepPrice[${s}].max`,message:`第${s+1}${this.stepName}上限必须大于下限`,type:"error"})),s>0){const e=t[s-1],n=e[this.keyMax];null!==n&&this.safeNumber(n,0)!==u&&i.push({field:`stepPrice[${s}].min`,message:`第${s+1}${this.stepName}下限必须等于上一${this.stepName}上限`,type:"error"})}}return i.length>0?(e&&e(!1,i),!1):(e&&e(!0),!0)},isLast(e){return e===this.localItems.length-1},onItemInput(e,t){const i=this.localItems[t];if(i&&e&&void 0!==e[this.keyPrice]){const t=e[this.keyPrice];if(null===t||void 0===t||""===t)i[this.keyPrice]="";else{let e=this.safeNumber(t,0);e=Number(e.toFixed(this.precision)),i[this.keyPrice]=e}this.emit()}},onMaxChange(e,t){const i=this.localItems[t];if(!i)return;const s=this.safeNumber(this.step,1);let n=this.safeNumber(e,this.safeNumber(i[this.keyMin],0)+s);n=Number(n.toFixed(this.precision)),i[this.keyMax]=n;const r=this.localItems[t+1];r&&(r[this.keyMin]=n),this.emit()},onMinChange(e,t){const i=this.localItems[t];if(i){if(0===t)i[this.keyMin]=0;else{let s=this.safeNumber(e,this.safeNumber(i[this.keyMin],0));0!==s&&(s=Number(s.toFixed(this.precision))),i[this.keyMin]=s;const n=this.localItems[t-1];n&&(n[this.keyMax]=s)}this.emit()}},onAdd(){const e=this.localItems,t=Number(this.limit);if(t>0&&e.length>=t)return;const i=this.safeNumber(this.step,1);if(0===e.length)return e.push({[this.keyMin]:0,[this.keyMax]:null,[this.keyPrice]:10}),void this.emit();const s=e[e.length-1],n=this.safeNumber(s[this.keyMin],0),r=n+i;let a=0;const l=[...e.slice(0,-1),{[this.keyMin]:n,[this.keyMax]:r,[this.keyPrice]:a},{[this.keyMin]:r,[this.keyMax]:null,[this.keyPrice]:a}];this.localItems=l,this.emit()},onDelete(e){const t=this.localItems;if(t.length<=1)return;if(0===e)return;const i=t[e],s=t[e-1],n=t[e+1];s&&n?s[this.keyMax]=null==i[this.keyMax]?null:Number(i[this.keyMax]):s&&!n?s[this.keyMax]=null:!s&&n&&(n[this.keyMin]=0),t.splice(e,1),this.emit()}}},f=d,y=h(f,r,a,!1,null,null,null),x=y.exports;x.install=function(e){e.component(x.name,x),e.component(m.name,m)};var b=x;t["default"]=b},fd93:function(e,t,i){}})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./xt-step-price-item.common.js');
|
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
module.exports =
|
|
2
|
+
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
+
/******/ // The module cache
|
|
4
|
+
/******/ var installedModules = {};
|
|
5
|
+
/******/
|
|
6
|
+
/******/ // The require function
|
|
7
|
+
/******/ function __webpack_require__(moduleId) {
|
|
8
|
+
/******/
|
|
9
|
+
/******/ // Check if module is in cache
|
|
10
|
+
/******/ if(installedModules[moduleId]) {
|
|
11
|
+
/******/ return installedModules[moduleId].exports;
|
|
12
|
+
/******/ }
|
|
13
|
+
/******/ // Create a new module (and put it into the cache)
|
|
14
|
+
/******/ var module = installedModules[moduleId] = {
|
|
15
|
+
/******/ i: moduleId,
|
|
16
|
+
/******/ l: false,
|
|
17
|
+
/******/ exports: {}
|
|
18
|
+
/******/ };
|
|
19
|
+
/******/
|
|
20
|
+
/******/ // Execute the module function
|
|
21
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
+
/******/
|
|
23
|
+
/******/ // Flag the module as loaded
|
|
24
|
+
/******/ module.l = true;
|
|
25
|
+
/******/
|
|
26
|
+
/******/ // Return the exports of the module
|
|
27
|
+
/******/ return module.exports;
|
|
28
|
+
/******/ }
|
|
29
|
+
/******/
|
|
30
|
+
/******/
|
|
31
|
+
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
+
/******/ __webpack_require__.m = modules;
|
|
33
|
+
/******/
|
|
34
|
+
/******/ // expose the module cache
|
|
35
|
+
/******/ __webpack_require__.c = installedModules;
|
|
36
|
+
/******/
|
|
37
|
+
/******/ // define getter function for harmony exports
|
|
38
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
+
/******/ }
|
|
42
|
+
/******/ };
|
|
43
|
+
/******/
|
|
44
|
+
/******/ // define __esModule on exports
|
|
45
|
+
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
+
/******/ }
|
|
49
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
/******/ };
|
|
51
|
+
/******/
|
|
52
|
+
/******/ // create a fake namespace object
|
|
53
|
+
/******/ // mode & 1: value is a module id, require it
|
|
54
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
+
/******/ // mode & 4: return value when already ns object
|
|
56
|
+
/******/ // mode & 8|1: behave like require
|
|
57
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
+
/******/ if(mode & 8) return value;
|
|
60
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
+
/******/ var ns = Object.create(null);
|
|
62
|
+
/******/ __webpack_require__.r(ns);
|
|
63
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
+
/******/ return ns;
|
|
66
|
+
/******/ };
|
|
67
|
+
/******/
|
|
68
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
+
/******/ __webpack_require__.n = function(module) {
|
|
70
|
+
/******/ var getter = module && module.__esModule ?
|
|
71
|
+
/******/ function getDefault() { return module['default']; } :
|
|
72
|
+
/******/ function getModuleExports() { return module; };
|
|
73
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
+
/******/ return getter;
|
|
75
|
+
/******/ };
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
+
/******/
|
|
80
|
+
/******/ // __webpack_public_path__
|
|
81
|
+
/******/ __webpack_require__.p = "";
|
|
82
|
+
/******/
|
|
83
|
+
/******/
|
|
84
|
+
/******/ // Load entry module and return exports
|
|
85
|
+
/******/ return __webpack_require__(__webpack_require__.s = "fb15");
|
|
86
|
+
/******/ })
|
|
87
|
+
/************************************************************************/
|
|
88
|
+
/******/ ({
|
|
89
|
+
|
|
90
|
+
/***/ "fb15":
|
|
91
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
92
|
+
|
|
93
|
+
"use strict";
|
|
94
|
+
// ESM COMPAT FLAG
|
|
95
|
+
__webpack_require__.r(__webpack_exports__);
|
|
96
|
+
|
|
97
|
+
// EXPORTS
|
|
98
|
+
__webpack_require__.d(__webpack_exports__, "XtStepPriceItem", function() { return /* reexport */ xt_step_price_item; });
|
|
99
|
+
|
|
100
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/setPublicPath.js
|
|
101
|
+
// This file is imported into lib/wc client bundles.
|
|
102
|
+
|
|
103
|
+
if (typeof window !== 'undefined') {
|
|
104
|
+
var currentScript = window.document.currentScript
|
|
105
|
+
if (false) { var getCurrentScript; }
|
|
106
|
+
|
|
107
|
+
var src = currentScript && currentScript.src.match(/(.+\/)[^/]+\.js(\?.*)?$/)
|
|
108
|
+
if (src) {
|
|
109
|
+
__webpack_require__.p = src[1] // eslint-disable-line
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Indicate to webpack that this file can be concatenated
|
|
114
|
+
/* harmony default export */ var setPublicPath = (null);
|
|
115
|
+
|
|
116
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"b8cd9b04-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price-item/index.vue?vue&type=template&id=4d5bb3b1
|
|
117
|
+
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price-item"},[_c('div',{staticClass:"xt-step-price-item__range"},[_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalLeftBracket))]),(_vm.itemsLength > 1)?_c('span',{staticClass:"xt-step-price-item__name"},[_vm._v("第"+_vm._s(_vm.index + 1)+_vm._s(_vm.stepName))]):_vm._e(),_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalRightBracket))]),_c('xt-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled || _vm.minLocked,"size":"small","placeholder":"下限"},on:{"blur":(e) => { _vm.onMinBlur(); _vm.onBlur(e) }},model:{value:(_vm.minInput),callback:function ($$v) {_vm.minInput=_vm._n($$v)},expression:"minInput"}}),_c('span',{staticClass:"xt-step-price-item__comma"},[_vm._v("-")]),(!_vm.isLast)?_c('xt-input',{staticClass:"xt-step-price-item__input",attrs:{"type":"number","disabled":_vm.disabled,"size":"small","placeholder":"上限"},on:{"blur":(e) => { _vm.onMaxBlur(); _vm.onBlur(e) }},model:{value:(_vm.maxInput),callback:function ($$v) {_vm.maxInput=_vm._n($$v)},expression:"maxInput"}}):_c('span',{staticClass:"xt-step-price-item__infinity"},[_vm._v("+∞")])],1),_c('div',{staticClass:"xt-step-price-item__price"},[_c('xt-input',{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{"type":"number","disabled":_vm.disabled,"size":"small","placeholder":"价格"},on:{"blur":(e) => { _vm.onPriceBlur(); _vm.onBlur(e) }},model:{value:(_vm.priceInput),callback:function ($$v) {_vm.priceInput=_vm._n($$v)},expression:"priceInput"}}),_c('span',{staticClass:"xt-step-price-item__unit"},[_vm._v(_vm._s(_vm.unit))])],1),(!_vm.disabled && _vm.removable && _vm.itemsLength > 1)?_c('xt-button',{staticClass:"xt-step-price-item__delete",attrs:{"type":"text","icon":"el-icon-delete"},on:{"click":_vm.onDelete}}):_vm._e()],1)
|
|
118
|
+
}
|
|
119
|
+
var staticRenderFns = []
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=4d5bb3b1
|
|
123
|
+
|
|
124
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price-item/index.vue?vue&type=script&lang=js
|
|
125
|
+
|
|
126
|
+
/* harmony default export */ var xt_step_price_itemvue_type_script_lang_js = ({
|
|
127
|
+
name: 'XtStepPriceItem',
|
|
128
|
+
|
|
129
|
+
props: {
|
|
130
|
+
value: {
|
|
131
|
+
type: Object,
|
|
132
|
+
required: true,
|
|
133
|
+
default: () => ({ min: 0, max: null, price: 0 })
|
|
134
|
+
},
|
|
135
|
+
stepName: { type: String, default: '阶梯' },
|
|
136
|
+
index: { type: Number, default: 0 },
|
|
137
|
+
isFirst: { type: Boolean, default: false },
|
|
138
|
+
isLast: { type: Boolean, default: false },
|
|
139
|
+
itemsLength: { type: Number, default: 1 },
|
|
140
|
+
removable: { type: Boolean, default: true },
|
|
141
|
+
disabled: { type: Boolean, default: false },
|
|
142
|
+
allowNegative: { type: Boolean, default: false },
|
|
143
|
+
minLocked: { type: Boolean, default: false },
|
|
144
|
+
unit: { type: String, default: '元' },
|
|
145
|
+
precision: { type: Number, default: 2 },
|
|
146
|
+
// 阶梯增量:控制新增/校正时的区间跨度,默认 1
|
|
147
|
+
step: { type: Number, default: 1 },
|
|
148
|
+
// 左括号:默认 '[',传空则不显示
|
|
149
|
+
leftBracket: { type: String, default: '[' },
|
|
150
|
+
// 右括号:默认 null,走内置规则(只有1条为 ']',多条为 ')');传值则强制使用
|
|
151
|
+
rightBracket: { type: String, default: null },
|
|
152
|
+
// 字段名映射:{ min, max, price },允许传入的 value 使用自定义字段名
|
|
153
|
+
fieldKeys: {
|
|
154
|
+
type: Object,
|
|
155
|
+
default: () => ({ min: 'min', max: 'max', price: 'price' })
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
|
|
159
|
+
computed: {
|
|
160
|
+
keyMin() { return (this.fieldKeys && this.fieldKeys.min) || 'min' },
|
|
161
|
+
keyMax() { return (this.fieldKeys && this.fieldKeys.max) || 'max' },
|
|
162
|
+
keyPrice() { return (this.fieldKeys && this.fieldKeys.price) || 'price' },
|
|
163
|
+
finalRightBracket() {
|
|
164
|
+
if (this.rightBracket !== null && this.rightBracket !== undefined && this.rightBracket !== '') return this.rightBracket
|
|
165
|
+
return this.isLast ? ']' : ')'
|
|
166
|
+
},
|
|
167
|
+
finalLeftBracket() {
|
|
168
|
+
return (this.leftBracket === null || this.leftBracket === undefined) ? '[' : this.leftBracket
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
data() {
|
|
173
|
+
const { minVal, maxVal, priceVal } = this.getPriceItem(this.value)
|
|
174
|
+
return {
|
|
175
|
+
minInput: minVal,
|
|
176
|
+
maxInput: maxVal,
|
|
177
|
+
priceInput: priceVal
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
watch: {
|
|
182
|
+
value: {
|
|
183
|
+
deep: true,
|
|
184
|
+
immediate: true,
|
|
185
|
+
handler(val) {
|
|
186
|
+
const { minVal, maxVal, priceVal } = this.getPriceItem(val)
|
|
187
|
+
this.minInput = minVal
|
|
188
|
+
this.maxInput = maxVal
|
|
189
|
+
this.priceInput = priceVal
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
isLast(val) {
|
|
193
|
+
if (val) {
|
|
194
|
+
this.maxInput = null
|
|
195
|
+
} else {
|
|
196
|
+
const minVal = this.safeNumber(this.minInput, 0)
|
|
197
|
+
const v = this.value
|
|
198
|
+
this.maxInput = this.safeNumber(v && v[this.keyMax], minVal + 1)
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
methods: {
|
|
204
|
+
getPriceItem(value) {
|
|
205
|
+
const v = value
|
|
206
|
+
const minVal = this.safeNumber(v && v[this.keyMin], 0)
|
|
207
|
+
const maxVal = this.isLast ? null : this.safeNumber(v && v[this.keyMax], minVal + 1)
|
|
208
|
+
const priceVal = this.safeNumber(v && v[this.keyPrice], 0)
|
|
209
|
+
return {
|
|
210
|
+
minVal,
|
|
211
|
+
maxVal,
|
|
212
|
+
priceVal
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
// 统一兜底:非数字输入一律转为 fallback(默认 0)
|
|
216
|
+
safeNumber(v, fallback = 0) {
|
|
217
|
+
if (v === null || v === undefined || v === '' || v === Infinity || v === -Infinity) return fallback
|
|
218
|
+
const n = Number(v)
|
|
219
|
+
return isNaN(n) ? fallback : n
|
|
220
|
+
},
|
|
221
|
+
|
|
222
|
+
emitChange(partial) {
|
|
223
|
+
const next = {
|
|
224
|
+
[this.keyMin]: this.minInput,
|
|
225
|
+
[this.keyMax]: this.isLast ? null : this.maxInput,
|
|
226
|
+
[this.keyPrice]: this.priceInput,
|
|
227
|
+
...partial
|
|
228
|
+
}
|
|
229
|
+
this.$emit('input', next)
|
|
230
|
+
this.$emit('change', next, this.index)
|
|
231
|
+
},
|
|
232
|
+
|
|
233
|
+
onMinBlur() {
|
|
234
|
+
let v = this.safeNumber(this.minInput, 0)
|
|
235
|
+
if (v !== 0) {
|
|
236
|
+
v = Number(v.toFixed(this.precision))
|
|
237
|
+
}
|
|
238
|
+
this.minInput = v
|
|
239
|
+
this.$emit('min-change', v, this.index)
|
|
240
|
+
this.emitChange({ [this.keyMin]: v })
|
|
241
|
+
},
|
|
242
|
+
|
|
243
|
+
onMaxBlur() {
|
|
244
|
+
if (this.isLast) return
|
|
245
|
+
const minVal = this.safeNumber(this.minInput, 0)
|
|
246
|
+
const stepVal = this.safeNumber(this.step, 1)
|
|
247
|
+
let v = this.safeNumber(this.maxInput, minVal + stepVal)
|
|
248
|
+
if (v <= minVal) v = minVal + stepVal
|
|
249
|
+
v = Number(v.toFixed(this.precision))
|
|
250
|
+
this.maxInput = v
|
|
251
|
+
this.$emit('max-change', v, this.index)
|
|
252
|
+
this.emitChange({ [this.keyMax]: v })
|
|
253
|
+
},
|
|
254
|
+
|
|
255
|
+
onPriceBlur() {
|
|
256
|
+
const rawVal = this.priceInput
|
|
257
|
+
if (rawVal === null || rawVal === undefined || rawVal === '' || isNaN(rawVal)) {
|
|
258
|
+
this.priceInput = ''
|
|
259
|
+
this.emitChange({ [this.keyPrice]: '' })
|
|
260
|
+
return
|
|
261
|
+
}
|
|
262
|
+
let v = this.safeNumber(rawVal, 0)
|
|
263
|
+
if (v < 0 && !this.allowNegative) v = 0
|
|
264
|
+
v = Number(v.toFixed(this.precision))
|
|
265
|
+
this.priceInput = v
|
|
266
|
+
this.emitChange({ [this.keyPrice]: v })
|
|
267
|
+
},
|
|
268
|
+
|
|
269
|
+
onBlur(e) {
|
|
270
|
+
this.$emit('blur', e)
|
|
271
|
+
},
|
|
272
|
+
|
|
273
|
+
onDelete() {
|
|
274
|
+
this.$emit('delete', this.index)
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=script&lang=js
|
|
280
|
+
/* harmony default export */ var components_xt_step_price_itemvue_type_script_lang_js = (xt_step_price_itemvue_type_script_lang_js);
|
|
281
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
282
|
+
/* globals __VUE_SSR_CONTEXT__ */
|
|
283
|
+
|
|
284
|
+
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
285
|
+
// This module is a runtime utility for cleaner component module output and will
|
|
286
|
+
// be included in the final webpack user bundle.
|
|
287
|
+
|
|
288
|
+
function normalizeComponent(
|
|
289
|
+
scriptExports,
|
|
290
|
+
render,
|
|
291
|
+
staticRenderFns,
|
|
292
|
+
functionalTemplate,
|
|
293
|
+
injectStyles,
|
|
294
|
+
scopeId,
|
|
295
|
+
moduleIdentifier /* server only */,
|
|
296
|
+
shadowMode /* vue-cli only */
|
|
297
|
+
) {
|
|
298
|
+
// Vue.extend constructor export interop
|
|
299
|
+
var options =
|
|
300
|
+
typeof scriptExports === 'function' ? scriptExports.options : scriptExports
|
|
301
|
+
|
|
302
|
+
// render functions
|
|
303
|
+
if (render) {
|
|
304
|
+
options.render = render
|
|
305
|
+
options.staticRenderFns = staticRenderFns
|
|
306
|
+
options._compiled = true
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// functional template
|
|
310
|
+
if (functionalTemplate) {
|
|
311
|
+
options.functional = true
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// scopedId
|
|
315
|
+
if (scopeId) {
|
|
316
|
+
options._scopeId = 'data-v-' + scopeId
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
var hook
|
|
320
|
+
if (moduleIdentifier) {
|
|
321
|
+
// server build
|
|
322
|
+
hook = function (context) {
|
|
323
|
+
// 2.3 injection
|
|
324
|
+
context =
|
|
325
|
+
context || // cached call
|
|
326
|
+
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
327
|
+
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
328
|
+
// 2.2 with runInNewContext: true
|
|
329
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
330
|
+
context = __VUE_SSR_CONTEXT__
|
|
331
|
+
}
|
|
332
|
+
// inject component styles
|
|
333
|
+
if (injectStyles) {
|
|
334
|
+
injectStyles.call(this, context)
|
|
335
|
+
}
|
|
336
|
+
// register component module identifier for async chunk inferrence
|
|
337
|
+
if (context && context._registeredComponents) {
|
|
338
|
+
context._registeredComponents.add(moduleIdentifier)
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
// used by ssr in case component is cached and beforeCreate
|
|
342
|
+
// never gets called
|
|
343
|
+
options._ssrRegister = hook
|
|
344
|
+
} else if (injectStyles) {
|
|
345
|
+
hook = shadowMode
|
|
346
|
+
? function () {
|
|
347
|
+
injectStyles.call(
|
|
348
|
+
this,
|
|
349
|
+
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
350
|
+
)
|
|
351
|
+
}
|
|
352
|
+
: injectStyles
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
if (hook) {
|
|
356
|
+
if (options.functional) {
|
|
357
|
+
// for template-only hot-reload because in that case the render fn doesn't
|
|
358
|
+
// go through the normalizer
|
|
359
|
+
options._injectStyles = hook
|
|
360
|
+
// register for functional component in vue file
|
|
361
|
+
var originalRender = options.render
|
|
362
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
363
|
+
hook.call(context)
|
|
364
|
+
return originalRender(h, context)
|
|
365
|
+
}
|
|
366
|
+
} else {
|
|
367
|
+
// inject component registration as beforeCreate hook
|
|
368
|
+
var existing = options.beforeCreate
|
|
369
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook]
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return {
|
|
374
|
+
exports: scriptExports,
|
|
375
|
+
options: options
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
/* normalize component */
|
|
386
|
+
|
|
387
|
+
var component = normalizeComponent(
|
|
388
|
+
components_xt_step_price_itemvue_type_script_lang_js,
|
|
389
|
+
render,
|
|
390
|
+
staticRenderFns,
|
|
391
|
+
false,
|
|
392
|
+
null,
|
|
393
|
+
null,
|
|
394
|
+
null
|
|
395
|
+
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
/* harmony default export */ var xt_step_price_item = (component.exports);
|
|
399
|
+
// CONCATENATED MODULE: ./src/components/xt-step-price-item/index.js
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
xt_step_price_item.install = function (Vue) {
|
|
403
|
+
Vue.component(xt_step_price_item.name, xt_step_price_item)
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* harmony default export */ var components_xt_step_price_item = (xt_step_price_item);
|
|
407
|
+
|
|
408
|
+
// CONCATENATED MODULE: ./node_modules/@vue/cli-service/lib/commands/build/entry-lib.js
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
/* harmony default export */ var entry_lib = __webpack_exports__["default"] = (components_xt_step_price_item);
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
/***/ })
|
|
416
|
+
|
|
417
|
+
/******/ });
|