@can2421/ui 0.0.9 → 0.0.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/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as l, createElementBlock as a, openBlock as r, normalizeClass as d, renderSlot as p } from "vue";
1
+ import { defineComponent as a, createElementBlock as r, openBlock as l, normalizeClass as d, renderSlot as p } from "vue";
2
2
  const u = {
3
3
  type: {
4
4
  type: String,
@@ -8,52 +8,57 @@ const u = {
8
8
  type: Boolean,
9
9
  default: !1
10
10
  }
11
- }, f = ["disabled"], m = /* @__PURE__ */ l({
11
+ }, f = ["disabled"], m = /* @__PURE__ */ a({
12
12
  __name: "Button",
13
13
  props: u,
14
14
  emits: ["click"],
15
15
  setup(t, { emit: e }) {
16
- const o = t, s = e;
17
- function c(n) {
18
- o.disabled || s("click", n);
16
+ const n = t, o = e;
17
+ function c(s) {
18
+ n.disabled || o("click", s);
19
19
  }
20
- return (n, C) => (r(), a("button", {
20
+ return (s, C) => (l(), r("button", {
21
21
  class: d(["hyc-button", [
22
- `hyc-button--${n.type}`,
23
- { "hyc-button--disabled": n.disabled }
22
+ `hyc-button--${s.type}`,
23
+ { "hyc-button--disabled": s.disabled }
24
24
  ]]),
25
- disabled: n.disabled,
25
+ disabled: s.disabled,
26
26
  onClick: c
27
27
  }, [
28
- p(n.$slots, "default")
28
+ p(s.$slots, "default", {}, void 0, !0)
29
29
  ], 10, f));
30
30
  }
31
- }), b = "Hyc";
32
- function y(t) {
31
+ }), b = (t, e) => {
32
+ const n = t.__vccOpts || t;
33
+ for (const [o, c] of e)
34
+ n[o] = c;
35
+ return n;
36
+ }, y = /* @__PURE__ */ b(m, [["__scopeId", "data-v-6c0ad3e0"]]), _ = "Hyc";
37
+ function h(t) {
33
38
  const e = {};
34
- return Object.entries(t).forEach(([o, s]) => {
35
- const c = `${b}${o}`;
36
- e[c] = s;
39
+ return Object.entries(t).forEach(([n, o]) => {
40
+ const c = `${_}${n}`;
41
+ e[c] = o;
37
42
  }), e;
38
43
  }
39
- function h(t, e) {
40
- Object.entries(e).forEach(([o, s]) => {
41
- t.component(o, s);
44
+ function k(t, e) {
45
+ Object.entries(e).forEach(([n, o]) => {
46
+ t.component(n, o);
42
47
  });
43
48
  }
44
49
  const B = {
45
- Button: m
50
+ Button: y
46
51
  // 添加新组件示例:
47
52
  // Input,
48
53
  // Dialog,
49
- }, i = y(B), E = i.HycButton, _ = {
54
+ }, i = h(B), O = i.HycButton, v = {
50
55
  install(t) {
51
- h(t, i);
56
+ k(t, i);
52
57
  }
53
58
  };
54
59
  export {
55
- m as Button,
56
- E as HycButton,
60
+ y as Button,
61
+ O as HycButton,
57
62
  u as buttonProps,
58
- _ as default
63
+ v as default
59
64
  };
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.HycUILib={},e.Vue))})(this,(function(e,t){"use strict";const l={type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},r=["disabled"],u=t.defineComponent({__name:"Button",props:l,emits:["click"],setup(n,{emit:o}){const s=n,c=o;function d(i){s.disabled||c("click",i)}return(i,B)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["hyc-button",[`hyc-button--${i.type}`,{"hyc-button--disabled":i.disabled}]]),disabled:i.disabled,onClick:d},[t.renderSlot(i.$slots,"default")],10,r))}}),a="Hyc";function p(n){const o={};return Object.entries(n).forEach(([s,c])=>{const d=`${a}${s}`;o[d]=c}),o}function b(n,o){Object.entries(o).forEach(([s,c])=>{n.component(s,c)})}const f=p({Button:u}),m=f.HycButton,y={install(n){b(n,f)}};e.Button=u,e.HycButton=m,e.buttonProps=l,e.default=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(e,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,n(e.HycUILib={},e.Vue))})(this,(function(e,n){"use strict";const u={type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},a=["disabled"],l=((t,o)=>{const s=t.__vccOpts||t;for(const[c,d]of o)s[c]=d;return s})(n.defineComponent({__name:"Button",props:u,emits:["click"],setup(t,{emit:o}){const s=t,c=o;function d(i){s.disabled||c("click",i)}return(i,k)=>(n.openBlock(),n.createElementBlock("button",{class:n.normalizeClass(["hyc-button",[`hyc-button--${i.type}`,{"hyc-button--disabled":i.disabled}]]),disabled:i.disabled,onClick:d},[n.renderSlot(i.$slots,"default",{},void 0,!0)],10,a))}}),[["__scopeId","data-v-6c0ad3e0"]]),f="Hyc";function p(t){const o={};return Object.entries(t).forEach(([s,c])=>{const d=`${f}${s}`;o[d]=c}),o}function m(t,o){Object.entries(o).forEach(([s,c])=>{t.component(s,c)})}const r=p({Button:l}),b=r.HycButton,y={install(t){m(t,r)}};e.Button=l,e.HycButton=b,e.buttonProps=u,e.default=y,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/dist/ui.css CHANGED
@@ -1 +1 @@
1
- .hyc-button{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-size:14px;transition:all .3s}.hyc-button--primary{background-color:#1890ff;color:#fff}.hyc-button--secondary{background-color:#f5f5f5;color:#333}.hyc-button--text{background-color:transparent;color:#1890ff}.hyc-button--disabled{opacity:.6;cursor:not-allowed}
1
+ .hyc-button[data-v-6c0ad3e0]{padding:8px 16px;border-radius:4px;border:none;cursor:pointer;font-size:14px;transition:all .3s}.hyc-button--primary[data-v-6c0ad3e0]{background-color:#1890ff;color:#fff}.hyc-button--secondary[data-v-6c0ad3e0]{background-color:#f5f5f5;color:#333}.hyc-button--text[data-v-6c0ad3e0]{background-color:transparent;color:#1890ff}.hyc-button--disabled[data-v-6c0ad3e0]{opacity:.6;cursor:not-allowed}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@can2421/ui",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",