lh-ui-next 0.2.1-beta.1 → 0.2.1-beta.10

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/README.md CHANGED
@@ -5,7 +5,7 @@ alpha version is use to self-test; beta version is use to public survey.for exam
5
5
  1.0.0-alpha.1
6
6
  1.0.0-test.2
7
7
  ## Official version : "0.2.0",
8
- ## test version : "0.2.1-beta.1,
8
+ ## test version : "0.2.1-beta.10,
9
9
  ## npmmirror
10
10
  When cnpm sync execution is unsuccessful,you can go the website(http://www.npmmirror.com/package/lh-ui-next) and press sync button to
11
11
  manual trigger the sync event
package/lib/css/dev.css CHANGED
@@ -1 +1 @@
1
- *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;outline:0}body,html{margin:0;max-height:100%;height:100%}body{overflow-y:hidden;width:100%;font-family:"Microsoft YaHei";font-size:12px}td,th{font-size:12px}img{width:auto;height:auto}a,a:focus,a:hover{text-decoration:none;outline:0}ul{margin:0;padding:0}li{list-style:none}button:focus{outline:0}select:focus{outline:0}::-ms-clear,::-ms-reveal{display:none}p{margin-block-start:0;margin-block-end:0}input{font-family:"Microsoft YaHei";-webkit-appearance:none;outline:0}input:focus{outline:0}textarea{font-family:"Microsoft YaHei";resize:none;padding:0}textarea:focus{outline:0;resize:none}pre{font-family:"Microsoft YaHei"}body,html{margin:0;max-height:100%;height:100%}body{overflow-y:hidden;width:100%;font-family:"Microsoft YaHei";font-size:12px}.pointer{cursor:pointer}#app{width:100%;height:100%;overflow-y:auto;background-color:#F5F5F6}.date-picker-dialog{padding:16px}.date-picker-dialog .date-bordor{background:#FFF;border:1px solid rgba(0,0,0,.15);opacity:1;border-radius:2px;padding:8px;position:relative}.date-picker-dialog .date-bordor .date-picker-left{width:80px;position:absolute;left:8px;top:1px}.date-picker-dialog .date-bordor .date-picker-right{width:100px;position:absolute;left:116px;top:1px}.date-picker-dialog .date-bordor .icon_component_date{color:rgba(0,0,0,.25);vertical-align:middle;font-size:14px}.date-picker-dialog .date-bordor .lh-input .lh-input-cornInput{border:none}.date-picker-dialog .date-bordor .lh-input__prefix{display:none}.date-picker-dialog .date-bordor .lh-input-cornInput{padding-left:8px}.date-picker-dialog .date-bordor .lh-input.is-prefix.mini .lh-input-cornInput{padding-left:8px}.date-picker-dialog .date-bordor .icon_component_arrow_right{color:rgba(0,0,0,.25);font-size:14px;vertical-align:middle}
1
+ *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-tap-highlight-color:transparent;tap-highlight-color:transparent;outline:0}body,html{margin:0;max-height:100%;height:100%}body{overflow-y:hidden;width:100%;font-family:"Microsoft YaHei";font-size:12px}td,th{font-size:12px}img{width:auto;height:auto}a,a:focus,a:hover{text-decoration:none;outline:0}ul{margin:0;padding:0}li{list-style:none}button:focus{outline:0}select:focus{outline:0}::-ms-clear,::-ms-reveal{display:none}p{margin-block-start:0;margin-block-end:0}input{font-family:"Microsoft YaHei";-webkit-appearance:none;outline:0}input:focus{outline:0}textarea{font-family:"Microsoft YaHei";resize:none;padding:0}textarea:focus{outline:0;resize:none}pre{font-family:"Microsoft YaHei"}input[type=number]{-moz-appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}body,html{margin:0;max-height:100%;height:100%}body{overflow-y:hidden;width:100%;font-family:"Microsoft YaHei";font-size:12px}.pointer{cursor:pointer}#app{width:100%;height:100%;overflow-y:auto;background-color:#f5f5f6}.date-picker-dialog{padding:16px}.date-picker-dialog .date-bordor{background:#fff;border:1px solid rgba(0,0,0,.15);opacity:1;border-radius:2px;padding:8px;position:relative}.date-picker-dialog .date-bordor .date-picker-left{width:80px;position:absolute;left:8px;top:1px}.date-picker-dialog .date-bordor .date-picker-right{width:100px;position:absolute;left:116px;top:1px}.date-picker-dialog .date-bordor .icon_component_date{color:rgba(0,0,0,.25);vertical-align:middle;font-size:14px}.date-picker-dialog .date-bordor .lh-input .lh-input-cornInput{border:none}.date-picker-dialog .date-bordor .lh-input__prefix{display:none}.date-picker-dialog .date-bordor .lh-input-cornInput{padding-left:8px}.date-picker-dialog .date-bordor .lh-input.is-prefix.mini .lh-input-cornInput{padding-left:8px}.date-picker-dialog .date-bordor .icon_component_arrow_right{color:rgba(0,0,0,.25);font-size:14px;vertical-align:middle}
@@ -199,12 +199,7 @@ const kt = {
199
199
  }, _t = ["type", "name", "placeholder", "required", "min", "max", "step", "pattern", "title", "minlength", "maxlength", "disabled", "readonly", "autofocus"], vt = ["title"], xt = ["title"];
200
200
  function St(e, t, i, s, l, n) {
201
201
  return r(), d("span", {
202
- class: f(["lh-input", [
203
- i.disabled ? "lh-input-disabled" : "",
204
- i.size,
205
- i.prefixIcon ? "is-prefix" : "",
206
- i.suffixIcon ? "is-suffix" : ""
207
- ]])
202
+ class: f(["lh-input", [i.disabled ? "lh-input-disabled" : "", i.size, i.prefixIcon ? "is-prefix" : "", i.suffixIcon ? "is-suffix" : ""]])
208
203
  }, [
209
204
  v(h("input", {
210
205
  class: "lh-input-cornInput",
@@ -1017,6 +1012,11 @@ const Ue = /* @__PURE__ */ x(Mt, [["render", Ft]]), Et = {
1017
1012
  type: Boolean,
1018
1013
  required: !1,
1019
1014
  default: !0
1015
+ },
1016
+ //item点击之前的事件
1017
+ itemClickPreEvent: {
1018
+ type: [Function, String],
1019
+ default: ""
1020
1020
  }
1021
1021
  },
1022
1022
  data() {
@@ -1114,7 +1114,7 @@ const Ue = /* @__PURE__ */ x(Mt, [["render", Ft]]), Et = {
1114
1114
  },
1115
1115
  //点击li的时候
1116
1116
  itemClick(e) {
1117
- if (e.disabled)
1117
+ if (e.disabled || typeof this.itemClickPreEvent == "function" && !this.itemClickPreEvent(e))
1118
1118
  return !1;
1119
1119
  this.selectType == 1 && (this.manualStatus = !1), this.changeClick(e.value), this.$emit("itemClick", e);
1120
1120
  },
@@ -6419,11 +6419,21 @@ const ra = {
6419
6419
  },
6420
6420
  //改变年份
6421
6421
  yearClick(e) {
6422
- this.type === "year" ? (this.showDate.year = e, this.selectDate = e.toString(), this.$emit("yearClick", this.selectDate)) : (this.showDate.year = e, this.dateType = "month"), this.headerValueChange();
6422
+ if (this.type === "year") {
6423
+ if (this.yearDisable(e))
6424
+ return;
6425
+ this.showDate.year = e, this.selectDate = e.toString(), this.$emit("yearClick", this.selectDate);
6426
+ } else
6427
+ this.showDate.year = e, this.dateType = "month";
6428
+ this.headerValueChange();
6423
6429
  },
6424
6430
  //改变月份
6425
6431
  monthClick(e) {
6426
6432
  this.type === "month" ? (this.selectDate = this.showDate.year.toString() + "-" + (e > 9 ? e : "0" + e.toString()), this.$emit("monthClick", this.selectDate)) : (this.showDate.month = e, this.dateType = "date"), this.headerValueChange();
6433
+ },
6434
+ //根据pickerOptions中的disabledYear函数来确定年份可点击状态
6435
+ yearDisable(e) {
6436
+ return typeof this.pickerOptions.disabledYear == "function" ? this.pickerOptions.disabledYear(e) : !1;
6427
6437
  }
6428
6438
  },
6429
6439
  computed: {
@@ -6541,7 +6551,7 @@ function Ma(e, t, i, s, l, n) {
6541
6551
  h("tbody", null, [
6542
6552
  (r(!0), d(g, null, y(n.decadesList, (a) => (r(), d("tr", null, [
6543
6553
  (r(!0), d(g, null, y(a, (o) => (r(), d("td", {
6544
- class: f({ selected: o === e.showDate.year }),
6554
+ class: f({ selected: o === e.showDate.year, disabled: n.yearDisable(o) }),
6545
6555
  onClick: E((c) => n.yearClick(o), ["stop"])
6546
6556
  }, [
6547
6557
  h("a", za, b(o), 1)
@@ -8916,7 +8926,7 @@ Se.install = function(e) {
8916
8926
  const _r = {
8917
8927
  name: "lhSlider",
8918
8928
  componentName: "lhSlider",
8919
- emits: ["update:modelValue"],
8929
+ emits: ["update:modelValue", "dragEndCallback"],
8920
8930
  props: {
8921
8931
  modelValue: {
8922
8932
  type: [Number, Array],
@@ -8972,7 +8982,19 @@ const _r = {
8972
8982
  watch: {
8973
8983
  modelValue: {
8974
8984
  deep: !0,
8975
- handler() {
8985
+ handler: function(e) {
8986
+ if (e === "" || e === null) {
8987
+ this.$emit("update:modelValue", this.min);
8988
+ return;
8989
+ }
8990
+ if (e > this.max) {
8991
+ this.$emit("update:modelValue", this.max);
8992
+ return;
8993
+ }
8994
+ if (e < this.min) {
8995
+ this.$emit("update:modelValue", this.min);
8996
+ return;
8997
+ }
8976
8998
  this.buttonPosition(), this.formatTooltipEvent();
8977
8999
  }
8978
9000
  }
@@ -9005,24 +9027,32 @@ const _r = {
9005
9027
  },
9006
9028
  //拖动结束
9007
9029
  dragEnd: function(e) {
9008
- document.onmousemove = null;
9009
- for (let t = 0; t < this.$refs.sliderButtonWrapper1.classList.length; t++)
9010
- this.$refs.sliderButtonWrapper1.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper1.classList.remove("grabbing");
9011
- for (let t = 0; t < this.$refs.sliderButtonWrapper2.classList.length; t++)
9012
- this.$refs.sliderButtonWrapper2.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper2.classList.remove("grabbing");
9030
+ if (document.onmousemove = null, this.$refs.sliderButtonWrapper1)
9031
+ for (let t = 0; t < this.$refs.sliderButtonWrapper1.classList.length; t++)
9032
+ this.$refs.sliderButtonWrapper1.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper1.classList.remove("grabbing");
9033
+ if (this.$refs.sliderButtonWrapper2)
9034
+ for (let t = 0; t < this.$refs.sliderButtonWrapper2.classList.length; t++)
9035
+ this.$refs.sliderButtonWrapper2.classList[t] == "grabbing" && this.$refs.sliderButtonWrapper2.classList.remove("grabbing");
9036
+ this.dragEndCallback();
9013
9037
  },
9014
9038
  //点击轨道移动滑块
9015
9039
  clickRunway() {
9016
9040
  if (!this.disabled) {
9017
- let e = e || window.event, t = this.$refs.sliderRunway, i = this.vertical ? this.height.substring(0, this.height.length - 2) * 1 - e.clientY + t.getBoundingClientRect().top : e.clientX - t.getBoundingClientRect().left;
9041
+ let e = window.event, t = this.$refs.sliderRunway, i = this.vertical ? this.height.substring(0, this.height.length - 2) * 1 - e.clientY + t.getBoundingClientRect().top : e.clientX - t.getBoundingClientRect().left;
9018
9042
  if (typeof this.modelValue == "number")
9019
9043
  this.moveSlider(i, 1);
9020
9044
  else {
9021
9045
  let s = this.vertical ? this.drag1.style.bottom.substring(0, this.drag1.style.bottom.length - 2) * 1 : this.drag1.style.left.substring(0, this.drag1.style.left.length - 2) * 1, l = this.vertical ? this.drag2.style.bottom.substring(0, this.drag2.style.bottom.length - 2) * 1 : this.drag2.style.left.substring(0, this.drag2.style.left.length - 2) * 1, n = Math.abs(s - i), a = Math.abs(l - i);
9022
- n <= a ? this.moveSlider(i, 1) : this.moveSlider(i, 2);
9046
+ n <= a ? (this.moveSlider(i, 1), this.dragEndCallback()) : (this.moveSlider(i, 2), this.dragEndCallback());
9023
9047
  }
9024
9048
  }
9025
9049
  },
9050
+ //拖拽以及点击结束之后的回调事件
9051
+ dragEndCallback() {
9052
+ setTimeout(() => {
9053
+ this.$emit("dragEndCallback", this.modelValue);
9054
+ }, 0);
9055
+ },
9026
9056
  //移动滑块
9027
9057
  moveSlider(e, t) {
9028
9058
  let i = "";