z-vue-design 0.0.3 → 0.0.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "z-vue-design",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"main": "./z-vue-design/z-vue-design.umd.js",
|
|
5
5
|
"module": "./z-vue-design/z-vue-design.es.js",
|
|
6
6
|
"exports": {
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"require": "./z-vue-design/z-vue-design.umd.js"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
|
-
"files": [
|
|
12
|
+
"files": [
|
|
13
|
+
"z-vue-design"
|
|
14
|
+
],
|
|
13
15
|
"scripts": {
|
|
14
16
|
"dev": "vite",
|
|
15
17
|
"start": "vite",
|
|
@@ -20,6 +22,7 @@
|
|
|
20
22
|
"@ant-design/icons-vue": "^7.0.1",
|
|
21
23
|
"ant-design-vue": "^4.2.6",
|
|
22
24
|
"axios": "^1.8.0",
|
|
25
|
+
"babel-plugin-import": "^1.13.8",
|
|
23
26
|
"node-sass": "^9.0.0",
|
|
24
27
|
"pinia": "^3.0.1",
|
|
25
28
|
"sass": "^1.86.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.z-button[data-v-
|
|
1
|
+
:root[z-theme=bright][data-v-4ed7f0d0]{--main-bg: rgb(17, 18, 23)}:root[z-theme=dark][data-v-4ed7f0d0]{--main-bg: skyblue}.z-button[data-v-4ed7f0d0]{display:inline-block;padding:.5rem 1rem;font-size:1rem;border:none;background-color:var(--main-bg);border-radius:.25rem;cursor:pointer;transition:all .3s ease}.z-button[data-v-4ed7f0d0]:disabled{background-color:#6c757d;cursor:not-allowed}
|
|
@@ -1,48 +1,55 @@
|
|
|
1
|
-
import { resolveComponent as
|
|
2
|
-
import { Button as
|
|
3
|
-
const
|
|
4
|
-
const n =
|
|
5
|
-
for (const [o,
|
|
6
|
-
n[o] =
|
|
1
|
+
import { resolveComponent as r, createBlock as u, openBlock as p, unref as d, withCtx as i, renderSlot as l } from "vue";
|
|
2
|
+
import { Button as f } from "ant-design-vue";
|
|
3
|
+
const m = (t, e) => {
|
|
4
|
+
const n = t.__vccOpts || t;
|
|
5
|
+
for (const [o, s] of e)
|
|
6
|
+
n[o] = s;
|
|
7
7
|
return n;
|
|
8
8
|
}, _ = {
|
|
9
9
|
name: "ZButton",
|
|
10
10
|
components: {
|
|
11
|
-
AButton:
|
|
11
|
+
AButton: f
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, b = /* @__PURE__ */ Object.assign(_, {
|
|
14
14
|
props: {
|
|
15
15
|
type: {
|
|
16
16
|
type: String,
|
|
17
|
-
default: "
|
|
17
|
+
default: "primary"
|
|
18
18
|
},
|
|
19
19
|
disabled: {
|
|
20
20
|
type: Boolean,
|
|
21
21
|
default: !1
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
setup(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
setup(t) {
|
|
25
|
+
const e = t, { type: n, disabled: o } = e;
|
|
26
|
+
return (s, h) => {
|
|
27
|
+
const c = r("a-button");
|
|
28
|
+
return p(), u(c, {
|
|
28
29
|
class: "z-button",
|
|
29
|
-
type:
|
|
30
|
+
type: d(n),
|
|
31
|
+
disabled: d(o)
|
|
30
32
|
}, {
|
|
31
|
-
default:
|
|
32
|
-
|
|
33
|
+
default: i(() => [
|
|
34
|
+
l(s.$slots, "default", {}, void 0, !0)
|
|
33
35
|
]),
|
|
34
36
|
_: 3
|
|
35
|
-
});
|
|
37
|
+
}, 8, ["type", "disabled"]);
|
|
36
38
|
};
|
|
37
39
|
}
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
+
}), y = /* @__PURE__ */ m(b, [["__scopeId", "data-v-4ed7f0d0"]]), w = [y], a = function(t) {
|
|
41
|
+
a.installed || w.map((e) => t.component(e.name, e));
|
|
40
42
|
};
|
|
41
|
-
typeof window < "u" && window.Vue &&
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
typeof window < "u" && window.Vue && a(window.Vue);
|
|
44
|
+
function B(t = "dark") {
|
|
45
|
+
document.documentElement.setAttribute("Z-theme", t);
|
|
46
|
+
}
|
|
47
|
+
const x = {
|
|
48
|
+
install: a,
|
|
49
|
+
setTheme: B
|
|
44
50
|
};
|
|
45
51
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
52
|
+
y as ZButton,
|
|
53
|
+
x as default,
|
|
54
|
+
B as setTheme
|
|
48
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e
|
|
1
|
+
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("ant-design-vue")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.ZVueDesign={},t.Vue,t.antDesignVue))})(this,function(t,e,f){"use strict";const r=(n,o)=>{const s=n.__vccOpts||n;for(const[d,i]of o)s[d]=i;return s},l={name:"ZButton",components:{AButton:f.Button}},c=r(Object.assign(l,{props:{type:{type:String,default:"primary"},disabled:{type:Boolean,default:!1}},setup(n){const o=n,{type:s,disabled:d}=o;return(i,b)=>{const m=e.resolveComponent("a-button");return e.openBlock(),e.createBlock(m,{class:"z-button",type:e.unref(s),disabled:e.unref(d)},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"default",{},void 0,!0)]),_:3},8,["type","disabled"])}}}),[["__scopeId","data-v-4ed7f0d0"]]),p=[c],u=function(n){u.installed||p.map(o=>n.component(o.name,o))};typeof window<"u"&&window.Vue&&u(window.Vue);function a(n="dark"){document.documentElement.setAttribute("Z-theme",n)}const _={install:u,setTheme:a};t.ZButton=c,t.default=_,t.setTheme=a,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|