lh-ui-next 0.0.39 → 0.0.40

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
@@ -4,8 +4,8 @@
4
4
  alpha version is use to self-test; beta version is use to public survey.for example:
5
5
  1.0.0-alpha.1
6
6
  1.0.0-test.2
7
- ## Official version : "0.0.39",
8
- ## test version : "0.0.39",
7
+ ## Official version : "0.0.40",
8
+ ## test version : "0.0.40",
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
@@ -715,7 +715,10 @@ const q = /* @__PURE__ */ x(wt, [["render", It]]), Pt = {
715
715
  },
716
716
  methods: {
717
717
  dayin() {
718
- console.log(this.$refs.myScrollbarWrap.scrollTop), console.log(this.vertical.rate), console.log(this.vertical.scrollbarHeight), console.log(this.vertical.translateY), console.log(this.$refs.myScrollbarWrap.scrollTop / this.vertical.rate / this.vertical.scrollbarHeight * 100);
718
+ console.log(this.$refs.myScrollbarWrap.scrollTop);
719
+ },
720
+ reset() {
721
+ this.$refs.myScrollbarWrap.scrollTop = 0, this.vertical.translateY = 0;
719
722
  },
720
723
  debounce(e, t) {
721
724
  this.fun !== null && clearTimeout(this.fun), this.fun = setTimeout(e, t);
@@ -776,7 +779,14 @@ const q = /* @__PURE__ */ x(wt, [["render", It]]), Pt = {
776
779
  },
777
780
  mounted() {
778
781
  let e = this.$refs.myScrollbar.style.maxHeight;
779
- e && (e.indexOf("px") !== -1 ? this.$refs.myScrollbarWrap.style.maxHeight = e : e.indexOf("%") !== -1 && (this.$refs.myScrollbarWrap.style.maxHeight = this.$refs.myScrollbar.parentNode.offsetHeight));
782
+ if (e) {
783
+ if (e.indexOf("px") !== -1)
784
+ this.$refs.myScrollbarWrap.style.maxHeight = e;
785
+ else if (e.indexOf("%") !== -1) {
786
+ let t = e.substr(0, e.length - 1) / 100;
787
+ this.$refs.myScrollbarWrap.style.maxHeight = this.$refs.myScrollbar.parentNode.offsetHeight * t + "px";
788
+ }
789
+ }
780
790
  }
781
791
  }, Lt = { class: "lh-scrollbar__view" };
782
792
  function Vt(e, t, i, s, l, n) {
@@ -1015,7 +1025,7 @@ const Z = /* @__PURE__ */ x(Pt, [["render", Vt]]), Nt = {
1015
1025
  this.showList = i;
1016
1026
  },
1017
1027
  selectClick(e) {
1018
- this.disabled || this.$refs.lhSelect == null || (e == "all" && (this.manualStatus = !this.manualStatus), this.$emit("selectClick"));
1028
+ this.disabled || this.$refs.lhSelect == null || (e == "all" && (this.manualStatus = !this.manualStatus), this.$emit("selectClick"), this.$refs.myScrollbar.reset());
1019
1029
  },
1020
1030
  commitCC(e) {
1021
1031
  let t = this.modelValue, i = !0;
@@ -1180,6 +1190,7 @@ function Yt(e, t, i, s, l, n) {
1180
1190
  }, null, 8, ["modelValue"])
1181
1191
  ])) : m("", !0),
1182
1192
  S(c, {
1193
+ ref: "myScrollbar",
1183
1194
  style: k({ maxHeight: i.maxHeight + "px" })
1184
1195
  }, {
1185
1196
  default: _(() => [