xt-element-ui 1.2.7 → 1.2.8

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.
@@ -130192,21 +130192,21 @@ var xt_time_component = normalizeComponent(
130192
130192
 
130193
130193
  /* harmony default export */ var components_xt_time = (xt_time);
130194
130194
 
130195
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price/index.vue?vue&type=template&id=024462cc
130196
- var xt_step_pricevue_type_template_id_024462cc_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price",class:{ 'is-disabled': _vm.disabled }},[(_vm.title || _vm.$slots.header)?_c('div',{staticClass:"xt-step-price__header"},[(_vm.title)?_c('xt-text',{attrs:{"bold":"","size":"medium"}},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._t("header"),(!_vm.disabled && !_vm.isLimitReached)?_c('el-button',{attrs:{"type":"primary","size":"small","icon":"el-icon-plus","plain":""},on:{"click":_vm.onAdd}},[_vm._v("新增阶梯")]):_vm._e(),(_vm.isLimitReached)?_c('xt-text',{attrs:{"size":"small","type-color":"info"}},[_vm._v("已达上限("+_vm._s(_vm.localItems.length)+"/"+_vm._s(_vm.limit)+")")]):_vm._e()],2):_vm._e(),_c('div',{staticClass:"xt-step-price__list"},_vm._l((_vm.localItems),function(item,idx){return _c('XtStepPriceItem',{key:idx,attrs:{"value":item,"index":idx,"is-first":idx === 0,"is-last":idx === _vm.localItems.length - 1,"items-length":_vm.localItems.length,"removable":idx !== 0,"min-locked":idx !== 0 ? true : false,"unit":_vm.unit,"precision":_vm.precision,"left-bracket":_vm.leftBracket,"right-bracket":_vm.rightBracket,"field-keys":_vm.fieldKeys,"disabled":_vm.disabled},on:{"input":(val) => _vm.onItemInput(val, idx),"max-change":_vm.onMaxChange,"min-change":_vm.onMinChange,"delete":_vm.onDelete}})}),1),(_vm.localItems.length === 0)?_c('div',{staticClass:"xt-step-price__empty"},[_c('span',[_vm._v("暂无数据,点击右上角「新增阶梯」开始配置")])]):_vm._e(),(_vm.tip || _vm.$slots.tip)?_c('div',{staticClass:"xt-step-price__tip"},[_vm._t("tip",function(){return [_c('xt-text',{attrs:{"size":"small","type-color":"warning"}},[_vm._v(_vm._s(_vm.tip))])]})],2):_vm._e()])
130195
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price/index.vue?vue&type=template&id=263a6004
130196
+ var xt_step_pricevue_type_template_id_263a6004_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price",class:{ 'is-disabled': _vm.disabled }},[(_vm.title || _vm.$slots.header)?_c('div',{staticClass:"xt-step-price__header"},[(_vm.title)?_c('xt-text',{attrs:{"bold":"","size":"medium"}},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._t("header"),(!_vm.disabled && !_vm.isLimitReached)?_c('el-button',{attrs:{"type":"primary","size":"small","icon":"el-icon-plus","plain":""},on:{"click":_vm.onAdd}},[_vm._v("新增阶梯")]):_vm._e(),(_vm.isLimitReached)?_c('xt-text',{attrs:{"size":"small","type-color":"info"}},[_vm._v("已达上限("+_vm._s(_vm.localItems.length)+"/"+_vm._s(_vm.limit)+")")]):_vm._e()],2):_vm._e(),_c('div',{staticClass:"xt-step-price__list"},_vm._l((_vm.localItems),function(item,idx){return _c('XtStepPriceItem',{key:idx,attrs:{"value":item,"index":idx,"is-first":idx === 0,"is-last":idx === _vm.localItems.length - 1,"items-length":_vm.localItems.length,"removable":idx !== 0,"min-locked":idx !== 0 ? true : false,"unit":_vm.unit,"precision":_vm.precision,"left-bracket":_vm.leftBracket,"right-bracket":_vm.rightBracket,"field-keys":_vm.fieldKeys,"disabled":_vm.disabled},on:{"input":(val) => _vm.onItemInput(val, idx),"max-change":_vm.onMaxChange,"min-change":_vm.onMinChange,"delete":_vm.onDelete}})}),1),(_vm.localItems.length === 0)?_c('div',{staticClass:"xt-step-price__empty"},[_c('span',[_vm._v("暂无数据,点击右上角「新增阶梯」开始配置")])]):_vm._e(),(_vm.tip || _vm.$slots.tip)?_c('div',{staticClass:"xt-step-price__tip"},[_vm._t("tip",function(){return [_c('xt-text',{attrs:{"size":"small","type-color":"warning"}},[_vm._v(_vm._s(_vm.tip))])]})],2):_vm._e()])
130197
130197
  }
130198
- var xt_step_pricevue_type_template_id_024462cc_staticRenderFns = []
130198
+ var xt_step_pricevue_type_template_id_263a6004_staticRenderFns = []
130199
130199
 
130200
130200
 
130201
- // CONCATENATED MODULE: ./src/components/xt-step-price/index.vue?vue&type=template&id=024462cc
130201
+ // CONCATENATED MODULE: ./src/components/xt-step-price/index.vue?vue&type=template&id=263a6004
130202
130202
 
130203
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/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=2417b1fa
130204
- var xt_step_price_itemvue_type_template_id_2417b1fa_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))]),_c('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled || _vm.minLocked,"size":"small"},on:{"blur":_vm.onMinBlur},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('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled,"size":"small"},on:{"blur":_vm.onMaxBlur},model:{value:(_vm.maxInput),callback:function ($$v) {_vm.maxInput=_vm._n($$v)},expression:"maxInput"}}):_c('span',{staticClass:"xt-step-price-item__infinity"},[_vm._v("+∞")]),_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalRightBracket))])],1),_c('span',{staticClass:"xt-step-price-item__arrow"},[_vm._v("→")]),_c('div',{staticClass:"xt-step-price-item__price"},[_c('el-input',{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{"disabled":_vm.disabled,"size":"small","placeholder":"价格"},on:{"blur":_vm.onPriceBlur},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('el-button',{staticClass:"xt-step-price-item__delete",attrs:{"type":"text","icon":"el-icon-delete"},on:{"click":_vm.onDelete}}):_vm._e()],1)
130203
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/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=8fdfa548
130204
+ var xt_step_price_itemvue_type_template_id_8fdfa548_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))]),_c('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled || _vm.minLocked,"size":"small"},on:{"blur":_vm.onMinBlur},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('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled,"size":"small"},on:{"blur":_vm.onMaxBlur},model:{value:(_vm.maxInput),callback:function ($$v) {_vm.maxInput=_vm._n($$v)},expression:"maxInput"}}):_c('span',{staticClass:"xt-step-price-item__infinity"},[_vm._v("+∞")]),_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalRightBracket))])],1),_c('span',{staticClass:"xt-step-price-item__arrow"},[_vm._v("→")]),_c('div',{staticClass:"xt-step-price-item__price"},[_c('el-input',{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{"disabled":_vm.disabled,"size":"small","placeholder":"价格"},on:{"blur":_vm.onPriceBlur},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('el-button',{staticClass:"xt-step-price-item__delete",attrs:{"type":"text","icon":"el-icon-delete"},on:{"click":_vm.onDelete}}):_vm._e()],1)
130205
130205
  }
130206
- var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130206
+ var xt_step_price_itemvue_type_template_id_8fdfa548_staticRenderFns = []
130207
130207
 
130208
130208
 
130209
- // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=2417b1fa
130209
+ // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=8fdfa548
130210
130210
 
130211
130211
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/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
130212
130212
 
@@ -130253,10 +130253,7 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130253
130253
  },
130254
130254
 
130255
130255
  data() {
130256
- const v = this.value
130257
- const minVal = this.safeNumber(v && v[this.keyMin], 0)
130258
- const maxVal = this.isLast ? null : this.safeNumber(v && v[this.keyMax], minVal + 1)
130259
- const priceVal = this.safeNumber(v && v[this.keyPrice], 0)
130256
+ const { minVal, maxVal, priceVal } = this.getPriceItem(this.value)
130260
130257
  return {
130261
130258
  minInput: minVal,
130262
130259
  maxInput: maxVal,
@@ -130267,11 +130264,12 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130267
130264
  watch: {
130268
130265
  value: {
130269
130266
  deep: true,
130267
+ immediate: true,
130270
130268
  handler(val) {
130271
- const minVal = this.safeNumber(val && val[this.keyMin], 0)
130269
+ const { minVal, maxVal, priceVal } = this.getPriceItem(val)
130272
130270
  this.minInput = minVal
130273
- this.maxInput = this.isLast ? null : this.safeNumber(val && val[this.keyMax], minVal + 1)
130274
- this.priceInput = this.safeNumber(val && val[this.keyPrice], 0)
130271
+ this.maxInput = maxVal
130272
+ this.priceInput = priceVal
130275
130273
  }
130276
130274
  },
130277
130275
  isLast(val) {
@@ -130286,6 +130284,17 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130286
130284
  },
130287
130285
 
130288
130286
  methods: {
130287
+ getPriceItem(value) {
130288
+ const v = value
130289
+ const minVal = this.safeNumber(v && v[this.keyMin], 0)
130290
+ const maxVal = this.isLast ? null : this.safeNumber(v && v[this.keyMax], minVal + 1)
130291
+ const priceVal = this.safeNumber(v && v[this.keyPrice], 0)
130292
+ return {
130293
+ minVal,
130294
+ maxVal,
130295
+ priceVal
130296
+ }
130297
+ },
130289
130298
  // 统一兜底:非数字输入一律转为 fallback(默认 0)
130290
130299
  safeNumber(v, fallback = 0) {
130291
130300
  if (v === null || v === undefined || v === '' || v === Infinity || v === -Infinity) return fallback
@@ -130347,8 +130356,8 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130347
130356
 
130348
130357
  var xt_step_price_item_component = normalizeComponent(
130349
130358
  components_xt_step_price_itemvue_type_script_lang_js,
130350
- xt_step_price_itemvue_type_template_id_2417b1fa_render,
130351
- xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns,
130359
+ xt_step_price_itemvue_type_template_id_8fdfa548_render,
130360
+ xt_step_price_itemvue_type_template_id_8fdfa548_staticRenderFns,
130352
130361
  false,
130353
130362
  null,
130354
130363
  null,
@@ -130413,6 +130422,7 @@ var xt_step_price_item_component = normalizeComponent(
130413
130422
  watch: {
130414
130423
  value: {
130415
130424
  deep: true,
130425
+ immediate: true,
130416
130426
  handler(val) {
130417
130427
  this.localItems = this.normalize(val)
130418
130428
  }
@@ -130504,7 +130514,6 @@ var xt_step_price_item_component = normalizeComponent(
130504
130514
  },
130505
130515
 
130506
130516
  onAdd() {
130507
- debugger
130508
130517
  const list = this.localItems
130509
130518
  const lim = Number(this.limit)
130510
130519
  if (lim > 0 && list.length >= lim) return
@@ -130588,8 +130597,8 @@ var xt_step_price_item_component = normalizeComponent(
130588
130597
 
130589
130598
  var xt_step_price_component = normalizeComponent(
130590
130599
  components_xt_step_pricevue_type_script_lang_js,
130591
- xt_step_pricevue_type_template_id_024462cc_render,
130592
- xt_step_pricevue_type_template_id_024462cc_staticRenderFns,
130600
+ xt_step_pricevue_type_template_id_263a6004_render,
130601
+ xt_step_pricevue_type_template_id_263a6004_staticRenderFns,
130593
130602
  false,
130594
130603
  null,
130595
130604
  null,
package/lib/index.umd.js CHANGED
@@ -130201,21 +130201,21 @@ var xt_time_component = normalizeComponent(
130201
130201
 
130202
130202
  /* harmony default export */ var components_xt_time = (xt_time);
130203
130203
 
130204
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price/index.vue?vue&type=template&id=024462cc
130205
- var xt_step_pricevue_type_template_id_024462cc_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price",class:{ 'is-disabled': _vm.disabled }},[(_vm.title || _vm.$slots.header)?_c('div',{staticClass:"xt-step-price__header"},[(_vm.title)?_c('xt-text',{attrs:{"bold":"","size":"medium"}},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._t("header"),(!_vm.disabled && !_vm.isLimitReached)?_c('el-button',{attrs:{"type":"primary","size":"small","icon":"el-icon-plus","plain":""},on:{"click":_vm.onAdd}},[_vm._v("新增阶梯")]):_vm._e(),(_vm.isLimitReached)?_c('xt-text',{attrs:{"size":"small","type-color":"info"}},[_vm._v("已达上限("+_vm._s(_vm.localItems.length)+"/"+_vm._s(_vm.limit)+")")]):_vm._e()],2):_vm._e(),_c('div',{staticClass:"xt-step-price__list"},_vm._l((_vm.localItems),function(item,idx){return _c('XtStepPriceItem',{key:idx,attrs:{"value":item,"index":idx,"is-first":idx === 0,"is-last":idx === _vm.localItems.length - 1,"items-length":_vm.localItems.length,"removable":idx !== 0,"min-locked":idx !== 0 ? true : false,"unit":_vm.unit,"precision":_vm.precision,"left-bracket":_vm.leftBracket,"right-bracket":_vm.rightBracket,"field-keys":_vm.fieldKeys,"disabled":_vm.disabled},on:{"input":(val) => _vm.onItemInput(val, idx),"max-change":_vm.onMaxChange,"min-change":_vm.onMinChange,"delete":_vm.onDelete}})}),1),(_vm.localItems.length === 0)?_c('div',{staticClass:"xt-step-price__empty"},[_c('span',[_vm._v("暂无数据,点击右上角「新增阶梯」开始配置")])]):_vm._e(),(_vm.tip || _vm.$slots.tip)?_c('div',{staticClass:"xt-step-price__tip"},[_vm._t("tip",function(){return [_c('xt-text',{attrs:{"size":"small","type-color":"warning"}},[_vm._v(_vm._s(_vm.tip))])]})],2):_vm._e()])
130204
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/xt-step-price/index.vue?vue&type=template&id=263a6004
130205
+ var xt_step_pricevue_type_template_id_263a6004_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"xt-step-price",class:{ 'is-disabled': _vm.disabled }},[(_vm.title || _vm.$slots.header)?_c('div',{staticClass:"xt-step-price__header"},[(_vm.title)?_c('xt-text',{attrs:{"bold":"","size":"medium"}},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._t("header"),(!_vm.disabled && !_vm.isLimitReached)?_c('el-button',{attrs:{"type":"primary","size":"small","icon":"el-icon-plus","plain":""},on:{"click":_vm.onAdd}},[_vm._v("新增阶梯")]):_vm._e(),(_vm.isLimitReached)?_c('xt-text',{attrs:{"size":"small","type-color":"info"}},[_vm._v("已达上限("+_vm._s(_vm.localItems.length)+"/"+_vm._s(_vm.limit)+")")]):_vm._e()],2):_vm._e(),_c('div',{staticClass:"xt-step-price__list"},_vm._l((_vm.localItems),function(item,idx){return _c('XtStepPriceItem',{key:idx,attrs:{"value":item,"index":idx,"is-first":idx === 0,"is-last":idx === _vm.localItems.length - 1,"items-length":_vm.localItems.length,"removable":idx !== 0,"min-locked":idx !== 0 ? true : false,"unit":_vm.unit,"precision":_vm.precision,"left-bracket":_vm.leftBracket,"right-bracket":_vm.rightBracket,"field-keys":_vm.fieldKeys,"disabled":_vm.disabled},on:{"input":(val) => _vm.onItemInput(val, idx),"max-change":_vm.onMaxChange,"min-change":_vm.onMinChange,"delete":_vm.onDelete}})}),1),(_vm.localItems.length === 0)?_c('div',{staticClass:"xt-step-price__empty"},[_c('span',[_vm._v("暂无数据,点击右上角「新增阶梯」开始配置")])]):_vm._e(),(_vm.tip || _vm.$slots.tip)?_c('div',{staticClass:"xt-step-price__tip"},[_vm._t("tip",function(){return [_c('xt-text',{attrs:{"size":"small","type-color":"warning"}},[_vm._v(_vm._s(_vm.tip))])]})],2):_vm._e()])
130206
130206
  }
130207
- var xt_step_pricevue_type_template_id_024462cc_staticRenderFns = []
130207
+ var xt_step_pricevue_type_template_id_263a6004_staticRenderFns = []
130208
130208
 
130209
130209
 
130210
- // CONCATENATED MODULE: ./src/components/xt-step-price/index.vue?vue&type=template&id=024462cc
130210
+ // CONCATENATED MODULE: ./src/components/xt-step-price/index.vue?vue&type=template&id=263a6004
130211
130211
 
130212
- // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/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=2417b1fa
130213
- var xt_step_price_itemvue_type_template_id_2417b1fa_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))]),_c('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled || _vm.minLocked,"size":"small"},on:{"blur":_vm.onMinBlur},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('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled,"size":"small"},on:{"blur":_vm.onMaxBlur},model:{value:(_vm.maxInput),callback:function ($$v) {_vm.maxInput=_vm._n($$v)},expression:"maxInput"}}):_c('span',{staticClass:"xt-step-price-item__infinity"},[_vm._v("+∞")]),_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalRightBracket))])],1),_c('span',{staticClass:"xt-step-price-item__arrow"},[_vm._v("→")]),_c('div',{staticClass:"xt-step-price-item__price"},[_c('el-input',{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{"disabled":_vm.disabled,"size":"small","placeholder":"价格"},on:{"blur":_vm.onPriceBlur},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('el-button',{staticClass:"xt-step-price-item__delete",attrs:{"type":"text","icon":"el-icon-delete"},on:{"click":_vm.onDelete}}):_vm._e()],1)
130212
+ // CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"60253456-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/@vue/cli-service/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=8fdfa548
130213
+ var xt_step_price_itemvue_type_template_id_8fdfa548_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))]),_c('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled || _vm.minLocked,"size":"small"},on:{"blur":_vm.onMinBlur},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('el-input',{staticClass:"xt-step-price-item__input",attrs:{"disabled":_vm.disabled,"size":"small"},on:{"blur":_vm.onMaxBlur},model:{value:(_vm.maxInput),callback:function ($$v) {_vm.maxInput=_vm._n($$v)},expression:"maxInput"}}):_c('span',{staticClass:"xt-step-price-item__infinity"},[_vm._v("+∞")]),_c('span',{staticClass:"xt-step-price-item__bracket"},[_vm._v(_vm._s(_vm.finalRightBracket))])],1),_c('span',{staticClass:"xt-step-price-item__arrow"},[_vm._v("→")]),_c('div',{staticClass:"xt-step-price-item__price"},[_c('el-input',{staticClass:"xt-step-price-item__input xt-step-price-item__input--price",attrs:{"disabled":_vm.disabled,"size":"small","placeholder":"价格"},on:{"blur":_vm.onPriceBlur},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('el-button',{staticClass:"xt-step-price-item__delete",attrs:{"type":"text","icon":"el-icon-delete"},on:{"click":_vm.onDelete}}):_vm._e()],1)
130214
130214
  }
130215
- var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130215
+ var xt_step_price_itemvue_type_template_id_8fdfa548_staticRenderFns = []
130216
130216
 
130217
130217
 
130218
- // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=2417b1fa
130218
+ // CONCATENATED MODULE: ./src/components/xt-step-price-item/index.vue?vue&type=template&id=8fdfa548
130219
130219
 
130220
130220
  // CONCATENATED MODULE: ./node_modules/@vue/cli-service/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
130221
130221
 
@@ -130262,10 +130262,7 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130262
130262
  },
130263
130263
 
130264
130264
  data() {
130265
- const v = this.value
130266
- const minVal = this.safeNumber(v && v[this.keyMin], 0)
130267
- const maxVal = this.isLast ? null : this.safeNumber(v && v[this.keyMax], minVal + 1)
130268
- const priceVal = this.safeNumber(v && v[this.keyPrice], 0)
130265
+ const { minVal, maxVal, priceVal } = this.getPriceItem(this.value)
130269
130266
  return {
130270
130267
  minInput: minVal,
130271
130268
  maxInput: maxVal,
@@ -130276,11 +130273,12 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130276
130273
  watch: {
130277
130274
  value: {
130278
130275
  deep: true,
130276
+ immediate: true,
130279
130277
  handler(val) {
130280
- const minVal = this.safeNumber(val && val[this.keyMin], 0)
130278
+ const { minVal, maxVal, priceVal } = this.getPriceItem(val)
130281
130279
  this.minInput = minVal
130282
- this.maxInput = this.isLast ? null : this.safeNumber(val && val[this.keyMax], minVal + 1)
130283
- this.priceInput = this.safeNumber(val && val[this.keyPrice], 0)
130280
+ this.maxInput = maxVal
130281
+ this.priceInput = priceVal
130284
130282
  }
130285
130283
  },
130286
130284
  isLast(val) {
@@ -130295,6 +130293,17 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130295
130293
  },
130296
130294
 
130297
130295
  methods: {
130296
+ getPriceItem(value) {
130297
+ const v = value
130298
+ const minVal = this.safeNumber(v && v[this.keyMin], 0)
130299
+ const maxVal = this.isLast ? null : this.safeNumber(v && v[this.keyMax], minVal + 1)
130300
+ const priceVal = this.safeNumber(v && v[this.keyPrice], 0)
130301
+ return {
130302
+ minVal,
130303
+ maxVal,
130304
+ priceVal
130305
+ }
130306
+ },
130298
130307
  // 统一兜底:非数字输入一律转为 fallback(默认 0)
130299
130308
  safeNumber(v, fallback = 0) {
130300
130309
  if (v === null || v === undefined || v === '' || v === Infinity || v === -Infinity) return fallback
@@ -130356,8 +130365,8 @@ var xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns = []
130356
130365
 
130357
130366
  var xt_step_price_item_component = normalizeComponent(
130358
130367
  components_xt_step_price_itemvue_type_script_lang_js,
130359
- xt_step_price_itemvue_type_template_id_2417b1fa_render,
130360
- xt_step_price_itemvue_type_template_id_2417b1fa_staticRenderFns,
130368
+ xt_step_price_itemvue_type_template_id_8fdfa548_render,
130369
+ xt_step_price_itemvue_type_template_id_8fdfa548_staticRenderFns,
130361
130370
  false,
130362
130371
  null,
130363
130372
  null,
@@ -130422,6 +130431,7 @@ var xt_step_price_item_component = normalizeComponent(
130422
130431
  watch: {
130423
130432
  value: {
130424
130433
  deep: true,
130434
+ immediate: true,
130425
130435
  handler(val) {
130426
130436
  this.localItems = this.normalize(val)
130427
130437
  }
@@ -130513,7 +130523,6 @@ var xt_step_price_item_component = normalizeComponent(
130513
130523
  },
130514
130524
 
130515
130525
  onAdd() {
130516
- debugger
130517
130526
  const list = this.localItems
130518
130527
  const lim = Number(this.limit)
130519
130528
  if (lim > 0 && list.length >= lim) return
@@ -130597,8 +130606,8 @@ var xt_step_price_item_component = normalizeComponent(
130597
130606
 
130598
130607
  var xt_step_price_component = normalizeComponent(
130599
130608
  components_xt_step_pricevue_type_script_lang_js,
130600
- xt_step_pricevue_type_template_id_024462cc_render,
130601
- xt_step_pricevue_type_template_id_024462cc_staticRenderFns,
130609
+ xt_step_pricevue_type_template_id_263a6004_render,
130610
+ xt_step_pricevue_type_template_id_263a6004_staticRenderFns,
130602
130611
  false,
130603
130612
  null,
130604
130613
  null,