@10yun/cv-pc-ui 0.3.59 → 0.3.61

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/cv-ui.js CHANGED
@@ -62,7 +62,7 @@ const at = S({ name: "cvBtnBase", emits: ["click"], props: { ...Fe.props, autoLo
62
62
  }
63
63
  } } }, [["render", function(e, t, o, l, a, i) {
64
64
  const n = C("cv-mask-svg"), c = C("el-button");
65
- return e.$slots.default || i.hasDefaultContent ? (d(), V(c, O({ key: 0, class: "cv-btn" }, i.filteredProps, { loading: a.loadingStatus, onClick: i.handleClick }), le({ default: v(() => [L(e.$slots, "default")]), _: 2 }, [o.svg ? { name: "icon", fn: v(() => [y(n, { name: o.svg, size: "14", color: "#fff" }, null, 8, ["name"])]), key: "0" } : void 0]), 1040, ["loading", "onClick"])) : (d(), V(c, O({ key: 1, class: "cv-btn" }, i.filteredProps, { loading: a.loadingStatus, onClick: i.handleClick }), le({ _: 2 }, [o.svg ? { name: "icon", fn: v(() => [y(n, { name: o.svg, size: "14", color: "#fff" }, null, 8, ["name"])]), key: "0" } : void 0]), 1040, ["loading", "onClick"]));
65
+ return e.$slots.default || i.hasDefaultContent ? (d(), V(c, O({ key: 0, class: "cv-btn" }, i.filteredProps, { loading: a.loadingStatus, onClick: i.handleClick }), le({ default: v(() => [L(e.$slots, "default")]), _: 2 }, [o.svg ? { name: "icon", fn: v(() => [y(n, { name: o.svg, size: "14", color: "currentColor" }, null, 8, ["name"])]), key: "0" } : void 0]), 1040, ["loading", "onClick"])) : (d(), V(c, O({ key: 1, class: "cv-btn" }, i.filteredProps, { loading: a.loadingStatus, onClick: i.handleClick }), le({ _: 2 }, [o.svg ? { name: "icon", fn: v(() => [y(n, { name: o.svg, size: "14", color: "currentColor" }, null, 8, ["name"])]), key: "0" } : void 0]), 1040, ["loading", "onClick"]));
66
66
  }]]), it = S({ name: "cvBtnText", emits: ["click"], props: { ...Fe.props, autoLoading: { type: Boolean, default: !1 } }, data: () => ({ loadingStatus: !1 }), methods: { handleClick() {
67
67
  this.autoLoading && (this.loadingStatus = !0), this.$emit("click", () => {
68
68
  this.loadingStatus = !1;
@@ -2912,10 +2912,12 @@ const Th = { name: "cvIcons", props: { ...yn.prop, type: { type: [String], defau
2912
2912
  }]]), Xl = { emits: ["click"], props: { name: { type: String, required: !0, validator: (e) => e.trim().length > 0 }, size: { type: [Number, String], default: 24 }, color: { type: String, default: "#333333" }, hoverColor: { type: String, default: "" }, hoverEffect: { type: Boolean, default: !1 } }, data: () => ({ iconType: "svg" }), computed: { maskIconUrl() {
2913
2913
  const e = "https://10ui.cn/icons";
2914
2914
  let t = this.name || "", o = "";
2915
- if (t = t.replace(/([A-Z])/g, (l) => `-${l.toLowerCase()}`), t = t.replace(/^-|-$/g, ""), t = t.toLowerCase().trim(), /-filled$/.test(t)) {
2916
- const l = t.slice(0, t.lastIndexOf("-filled"));
2917
- l ? o = `${l.split("-").filter((a) => a.trim().length > 0).join("/")}-filled` : o = t;
2918
- } else t.includes("-") ? o = t.split("-").filter((l) => l.trim().length > 0).join("/") : o = t;
2915
+ t = t.replace(/([A-Z])/g, (a) => `-${a.toLowerCase()}`), t = t.replace(/^-|-$/g, ""), t = t.toLowerCase().trim();
2916
+ const l = /-(filled|bold)$/;
2917
+ if (l.test(t)) {
2918
+ const a = t.match(l)[1], i = t.slice(0, t.lastIndexOf(`-${a}`));
2919
+ i ? o = `${i.split("-").filter((n) => n.trim().length > 0).join("/")}-${a}` : o = t;
2920
+ } else t.includes("-") ? o = t.split("-").filter((a) => a.trim().length > 0).join("/") : o = t;
2919
2921
  return (this.iconType?.toLowerCase() || "png") === "svg" ? `${e}/${o}.svg` : `${e}/png/${o}.png`;
2920
2922
  }, iconSize() {
2921
2923
  return typeof this.size == "string" && (this.size.includes("px") || this.size.includes("rpx")) ? this.size : `${parseFloat(this.size)}px`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10yun/cv-pc-ui",
3
- "version": "0.3.59",
3
+ "version": "0.3.61",
4
4
  "description": "cvjs-pc-ui组件",
5
5
  "author": "10yun",
6
6
  "private": false,