ybd-ui 1.0.0
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/style.css +1 -0
- package/dist/yb-ui.es.js +57 -0
- package/package.json +36 -0
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.my-btn[data-v-f424331c]{padding:8px 16px;border:1px solid #dcdfe6;border-radius:4px;background:#fff;cursor:pointer;transition:all .3s}.my-btn[data-v-f424331c]:hover{opacity:.8}.my-btn--primary[data-v-f424331c]{background:#409eff;color:#fff;border-color:#409eff}.my-btn--danger[data-v-f424331c]{background:#f56c6c;color:#fff;border-color:#f56c6c}.my-btn--disabled[data-v-f424331c]{opacity:.6;cursor:not-allowed}
|
package/dist/yb-ui.es.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { createElementBlock as r, openBlock as u, normalizeClass as c, renderSlot as f } from "vue";
|
|
2
|
+
const p = (e, n) => {
|
|
3
|
+
const d = e.__vccOpts || e;
|
|
4
|
+
for (const [a, l] of n)
|
|
5
|
+
d[a] = l;
|
|
6
|
+
return d;
|
|
7
|
+
}, m = {
|
|
8
|
+
name: "YbButton"
|
|
9
|
+
};
|
|
10
|
+
defineProps({
|
|
11
|
+
type: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "default",
|
|
14
|
+
// default, primary, danger
|
|
15
|
+
validator: (e) => ["default", "primary", "danger"].includes(e)
|
|
16
|
+
},
|
|
17
|
+
disabled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !1
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
defineEmits(["click"]);
|
|
23
|
+
const b = ["disabled"];
|
|
24
|
+
function y(e, n, d, a, l, k) {
|
|
25
|
+
return u(), r("button", {
|
|
26
|
+
class: c([
|
|
27
|
+
"my-btn",
|
|
28
|
+
`my-btn--${e.type}`,
|
|
29
|
+
{ "my-btn--disabled": e.disabled }
|
|
30
|
+
]),
|
|
31
|
+
disabled: e.disabled,
|
|
32
|
+
onClick: n[0] || (n[0] = (...i) => e.handleClick && e.handleClick(...i))
|
|
33
|
+
}, [
|
|
34
|
+
f(e.$slots, "default", {}, void 0, !0)
|
|
35
|
+
], 10, b);
|
|
36
|
+
}
|
|
37
|
+
const t = /* @__PURE__ */ p(m, [["render", y], ["__scopeId", "data-v-f424331c"]]);
|
|
38
|
+
t.install = function(e) {
|
|
39
|
+
e.component(t.name, t);
|
|
40
|
+
};
|
|
41
|
+
const s = [
|
|
42
|
+
t
|
|
43
|
+
], o = function(e) {
|
|
44
|
+
o.installed || (o.installed = !0, s.map((n) => {
|
|
45
|
+
e.component(n.name, n);
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
typeof window < "u" && window.Vue && o(window.Vue);
|
|
49
|
+
const _ = {
|
|
50
|
+
// 导出的对象必须具备一个 install 方法
|
|
51
|
+
install: o,
|
|
52
|
+
// 组件列表
|
|
53
|
+
...s
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
_ as default
|
|
57
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ybd-ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A Vue 3 component library built with Vite",
|
|
6
|
+
"main": "./dist/yb-ui.umd.js",
|
|
7
|
+
"module": "./dist/ybd-ui.es.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/ybd-ui.es.js",
|
|
11
|
+
"require": "./dist/ybd-ui.umd.js"
|
|
12
|
+
},
|
|
13
|
+
"./style.css": "./dist/style.css"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist/*"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"dev": "vite",
|
|
20
|
+
"build": "vite build",
|
|
21
|
+
"preview": "vite preview"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"vue3",
|
|
25
|
+
"component-library",
|
|
26
|
+
"ui"
|
|
27
|
+
],
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"vue": "^3.3.0"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
33
|
+
"@vitejs/plugin-vue-jsx": "^5.1.2",
|
|
34
|
+
"vite": "^5.0.0"
|
|
35
|
+
}
|
|
36
|
+
}
|