sccba-ui 0.0.1 → 0.0.2
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/sccba-ui.cjs.js +1 -1
- package/dist/sccba-ui.css +1 -1
- package/dist/sccba-ui.es.js +36 -36
- package/dist/sccba-ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/sccba-ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var B=Object.create;var y=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var S=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var _=(e,o,l,s)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of v(o))!h.call(e,a)&&a!==l&&y(e,a,{get:()=>o[a],enumerable:!(s=b(o,a))||s.enumerable});return e};var f=(e,o,l)=>(l=e!=null?B(S(e)):{},_(o||!e||!e.__esModule?y(l,"default",{value:e,enumerable:!0}):l,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue-demi"),n=require("vue"),d=(e,o)=>{const l=e.__vccOpts||e;for(const[s,a]of o)l[s]=a;return l},I={name:"MyButton",inheritAttrs:!1},w=Object.assign(I,{props:{type:{type:String,default:"default"},size:{type:String,default:""},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},label:{type:String,default:""},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},block:{type:Boolean,default:!1},nativeType:{type:String,default:"button"},placeholder:{type:String,default:""}},setup(e){const o=e,l=t.useAttrs(),s=t.shallowRef(null),a=t.ref(null),c=t.computed(()=>({...o,...l}));return t.onMounted(async()=>{if(t.isVue2){const u=await import("element-ui");s.value=u.Button}else{const u=await import("element-plus");s.value=u.ElButton}}),(u,i)=>n.unref(s)?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(t.h)(n.unref(s),{...n.unref(c),ref:n.unref(a)},u.$slots)),{key:0})):n.createCommentVNode("",!0)}}),C=d(w,[["__scopeId","data-v-20d033dc"]]),M=t.defineComponent({name:"MyButton",inheritAttrs:!1,props:{type:{type:String,default:"default"},size:{type:String,default:"medium"},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},label:{type:String,default:""},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},block:{type:Boolean,default:!1},nativeType:{type:String,default:"button"},placeholder:{type:String,default:""}},setup(e,{attrs:o}){const l=t.shallowRef(null),s=t.computed(()=>({...e,...o})),a=t.getCurrentInstance(),c=u=>{console.log(u,"elllll"),u&&(a.exposed=u)};return t.onMounted(async()=>{if(t.isVue2){const u=await import("element-ui");l.value=u.Button}else{const u=await import("element-plus");l.value=u.ElButton}console.log(l.value,"buttonComponent.value"),console.log(a,"vmmmmm")}),{buttonComponent:l,allProps:s,h:t.h,changeRef:c}}});function $(e,o,l,s,a,c){return n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.h(e.buttonComponent,{...e.allProps,ref:e.changeRef},e.$slots)))}const k=d(M,[["render",$],["__scopeId","data-v-1cb31901"]]),P={name:"MyInput"},N=Object.assign(P,{props:{type:{type:String,default:"text"},size:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxlength:{type:[String,Number],default:null},showWordLimit:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},name:{type:String,default:""},form:{type:String,default:""},required:{type:Boolean,default:!1},width:{type:[String,Number],default:""}},emits:["input","change","focus","blur","clear"],setup(e,{expose:o,emit:l}){const s=e,a=t.useAttrs(),c=t.shallowRef(null),u=t.computed(()=>({...s,...a}));t.onMounted(async()=>{if(t.isVue2){const p=await import("element-ui");c.value=p.Input}else{const p=await import("element-plus");c.value=p.ElInput}});const i=t.getCurrentInstance(),r=t.ref(null),g=p=>{r.value=p,t.isVue2&&i&&(i.exposed=p)};return o({getInputInstance:()=>r.value,focus:()=>r.value&&r.value.focus(),blur:()=>r.value&&r.value.blur(),select:()=>r.value&&r.value.select(),clear:()=>r.value&&r.value.clear(),inputRef:r}),(p,U)=>n.unref(c)?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(t.h)(n.unref(c),{...n.unref(u),ref:g},p.$slots)),{key:0})):n.createCommentVNode("",!0)}}),R=d(N,[["__scopeId","data-v-119c0e3d"]]);function m(e){e.component("SccbaButton",SccbaButton),e.component("MyButton1",MyButton1),e.component("SccbaInput",SccbaInput)}const V={install:m};exports.MyButton1=k;exports.MyUI=V;exports.SccbaButton=C;exports.SccbaInput=R;exports.install=m;
|
package/dist/sccba-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}[data-v-20d033dc] .el-button{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-20d033dc] .el-button:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-1px)}[data-v-20d033dc] .el-button:active{transform:translateY(0);box-shadow:0 2px 8px #00000026}[data-v-20d033dc] .el-button{margin-right:10px}[data-v-20d033dc] .el-button:last-child{margin-right:0}[data-v-1cb31901] .el-button{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-1cb31901] .el-button:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-1px)}[data-v-1cb31901] .el-button:active{transform:translateY(0);box-shadow:0 2px 8px #00000026}[data-v-1cb31901] .el-button{margin-right:10px}[data-v-1cb31901] .el-button:last-child{margin-right:0}[data-v-
|
|
1
|
+
:root{font-family:system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;display:flex;place-items:center;min-width:320px;min-height:100vh}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}.card{padding:2em}#app{max-width:1280px;margin:0 auto;padding:2rem;text-align:center}@media(prefers-color-scheme:light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}[data-v-20d033dc] .el-button{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-20d033dc] .el-button:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-1px)}[data-v-20d033dc] .el-button:active{transform:translateY(0);box-shadow:0 2px 8px #00000026}[data-v-20d033dc] .el-button{margin-right:10px}[data-v-20d033dc] .el-button:last-child{margin-right:0}[data-v-1cb31901] .el-button{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-1cb31901] .el-button:hover{box-shadow:0 4px 12px #00000026;transform:translateY(-1px)}[data-v-1cb31901] .el-button:active{transform:translateY(0);box-shadow:0 2px 8px #00000026}[data-v-1cb31901] .el-button{margin-right:10px}[data-v-1cb31901] .el-button:last-child{margin-right:0}[data-v-119c0e3d] .el-input__inner{transition:all .3s cubic-bezier(.645,.045,.355,1)}[data-v-119c0e3d] .el-input__inner:focus{box-shadow:0 0 0 2px #3b82f633!important}
|
package/dist/sccba-ui.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { useAttrs as
|
|
2
|
-
import { createBlock as g, createCommentVNode as I, unref as
|
|
3
|
-
const S = (e,
|
|
1
|
+
import { useAttrs as v, shallowRef as i, ref as _, computed as d, onMounted as y, isVue2 as p, h as m, defineComponent as $, getCurrentInstance as h } from "vue-demi";
|
|
2
|
+
import { createBlock as g, createCommentVNode as I, unref as s, openBlock as b, resolveDynamicComponent as B } from "vue";
|
|
3
|
+
const S = (e, r) => {
|
|
4
4
|
const n = e.__vccOpts || e;
|
|
5
|
-
for (const [
|
|
6
|
-
n[
|
|
5
|
+
for (const [l, a] of r)
|
|
6
|
+
n[l] = a;
|
|
7
7
|
return n;
|
|
8
8
|
}, C = {
|
|
9
9
|
name: "MyButton",
|
|
@@ -82,16 +82,16 @@ const S = (e, s) => {
|
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
setup(e) {
|
|
85
|
-
const
|
|
85
|
+
const r = e, n = v(), l = i(null), a = _(null), u = d(() => ({ ...r, ...n }));
|
|
86
86
|
return y(async () => {
|
|
87
|
-
if (
|
|
87
|
+
if (p) {
|
|
88
88
|
const t = await import("element-ui");
|
|
89
|
-
|
|
89
|
+
l.value = t.Button;
|
|
90
90
|
} else {
|
|
91
91
|
const t = await import("element-plus");
|
|
92
|
-
|
|
92
|
+
l.value = t.ElButton;
|
|
93
93
|
}
|
|
94
|
-
}), (t, f) =>
|
|
94
|
+
}), (t, f) => s(l) ? (b(), g(B(s(m)(s(l), { ...s(u), ref: s(a) }, t.$slots)), { key: 0 })) : I("", !0);
|
|
95
95
|
}
|
|
96
96
|
}), E = /* @__PURE__ */ S(M, [["__scopeId", "data-v-20d033dc"]]), P = $({
|
|
97
97
|
name: "MyButton",
|
|
@@ -170,28 +170,28 @@ const S = (e, s) => {
|
|
|
170
170
|
default: ""
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
|
-
setup(e, { attrs:
|
|
174
|
-
const n = i(null),
|
|
175
|
-
console.log(t, "elllll"), t && (
|
|
173
|
+
setup(e, { attrs: r }) {
|
|
174
|
+
const n = i(null), l = d(() => ({ ...e, ...r })), a = h(), u = (t) => {
|
|
175
|
+
console.log(t, "elllll"), t && (a.exposed = t);
|
|
176
176
|
};
|
|
177
177
|
return y(async () => {
|
|
178
|
-
if (
|
|
178
|
+
if (p) {
|
|
179
179
|
const t = await import("element-ui");
|
|
180
180
|
n.value = t.Button;
|
|
181
181
|
} else {
|
|
182
182
|
const t = await import("element-plus");
|
|
183
183
|
n.value = t.ElButton;
|
|
184
184
|
}
|
|
185
|
-
console.log(n.value, "buttonComponent.value"), console.log(
|
|
185
|
+
console.log(n.value, "buttonComponent.value"), console.log(a, "vmmmmm");
|
|
186
186
|
}), {
|
|
187
187
|
buttonComponent: n,
|
|
188
|
-
allProps:
|
|
188
|
+
allProps: l,
|
|
189
189
|
h: m,
|
|
190
|
-
changeRef:
|
|
190
|
+
changeRef: u
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
});
|
|
194
|
-
function k(e,
|
|
194
|
+
function k(e, r, n, l, a, u) {
|
|
195
195
|
return b(), g(B(e.h(e.buttonComponent, { ...e.allProps, ref: e.changeRef }, e.$slots)));
|
|
196
196
|
}
|
|
197
197
|
const O = /* @__PURE__ */ S(P, [["render", k], ["__scopeId", "data-v-1cb31901"]]), N = {
|
|
@@ -270,35 +270,35 @@ const O = /* @__PURE__ */ S(P, [["render", k], ["__scopeId", "data-v-1cb31901"]]
|
|
|
270
270
|
}
|
|
271
271
|
},
|
|
272
272
|
emits: ["input", "change", "focus", "blur", "clear"],
|
|
273
|
-
setup(e, { expose:
|
|
274
|
-
const
|
|
273
|
+
setup(e, { expose: r, emit: n }) {
|
|
274
|
+
const l = e, a = v(), u = i(null), t = d(() => ({ ...l, ...a }));
|
|
275
275
|
y(async () => {
|
|
276
|
-
if (
|
|
277
|
-
const
|
|
278
|
-
|
|
276
|
+
if (p) {
|
|
277
|
+
const c = await import("element-ui");
|
|
278
|
+
u.value = c.Input;
|
|
279
279
|
} else {
|
|
280
|
-
const
|
|
281
|
-
|
|
280
|
+
const c = await import("element-plus");
|
|
281
|
+
u.value = c.ElInput;
|
|
282
282
|
}
|
|
283
283
|
});
|
|
284
|
-
const f =
|
|
285
|
-
|
|
284
|
+
const f = h(), o = _(null), w = (c) => {
|
|
285
|
+
o.value = c, p && f && (f.exposed = c);
|
|
286
286
|
};
|
|
287
|
-
return
|
|
287
|
+
return r({
|
|
288
288
|
// 暴露底层输入框实例
|
|
289
|
-
getInputInstance: () =>
|
|
289
|
+
getInputInstance: () => o.value,
|
|
290
290
|
// 常用的输入框方法
|
|
291
|
-
focus: () =>
|
|
292
|
-
blur: () =>
|
|
291
|
+
focus: () => o.value && o.value.focus(),
|
|
292
|
+
blur: () => o.value && o.value.blur(),
|
|
293
293
|
// 选择文本
|
|
294
|
-
select: () =>
|
|
294
|
+
select: () => o.value && o.value.select(),
|
|
295
295
|
// 清空输入框
|
|
296
|
-
clear: () =>
|
|
296
|
+
clear: () => o.value && o.value.clear(),
|
|
297
297
|
// 直接暴露实例(在某些情况下可能更方便)
|
|
298
|
-
inputRef:
|
|
299
|
-
}), (
|
|
298
|
+
inputRef: o
|
|
299
|
+
}), (c, x) => s(u) ? (b(), g(B(s(m)(s(u), { ...s(t), ref: w }, c.$slots)), { key: 0 })) : I("", !0);
|
|
300
300
|
}
|
|
301
|
-
}), j = /* @__PURE__ */ S(R, [["__scopeId", "data-v-
|
|
301
|
+
}), j = /* @__PURE__ */ S(R, [["__scopeId", "data-v-119c0e3d"]]);
|
|
302
302
|
function U(e) {
|
|
303
303
|
e.component("SccbaButton", SccbaButton), e.component("MyButton1", MyButton1), e.component("SccbaInput", SccbaInput);
|
|
304
304
|
}
|
package/dist/sccba-ui.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(l,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue-demi"),require("vue")):typeof define=="function"&&define.amd?define(["exports","vue-demi","vue"],t):(l=typeof globalThis<"u"?globalThis:l||self,t(l.SccbaUI={},l.VueDemi,l.Vue))})(this,(function(l,t,e){"use strict";const d=(n,
|
|
1
|
+
(function(l,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue-demi"),require("vue")):typeof define=="function"&&define.amd?define(["exports","vue-demi","vue"],t):(l=typeof globalThis<"u"?globalThis:l||self,t(l.SccbaUI={},l.VueDemi,l.Vue))})(this,(function(l,t,e){"use strict";const d=(n,f)=>{const a=n.__vccOpts||n;for(const[s,r]of f)a[s]=r;return a},m=d(Object.assign({name:"MyButton",inheritAttrs:!1},{props:{type:{type:String,default:"default"},size:{type:String,default:""},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},label:{type:String,default:""},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},block:{type:Boolean,default:!1},nativeType:{type:String,default:"button"},placeholder:{type:String,default:""}},setup(n){const f=n,a=t.useAttrs(),s=t.shallowRef(null),r=t.ref(null),c=t.computed(()=>({...f,...a}));return t.onMounted(async()=>{if(t.isVue2){const o=await import("element-ui");s.value=o.Button}else{const o=await import("element-plus");s.value=o.ElButton}}),(o,i)=>e.unref(s)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t.h)(e.unref(s),{...e.unref(c),ref:e.unref(r)},o.$slots)),{key:0})):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-20d033dc"]]),g=t.defineComponent({name:"MyButton",inheritAttrs:!1,props:{type:{type:String,default:"default"},size:{type:String,default:"medium"},plain:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{type:String,default:""},label:{type:String,default:""},width:{type:[String,Number],default:""},height:{type:[String,Number],default:""},block:{type:Boolean,default:!1},nativeType:{type:String,default:"button"},placeholder:{type:String,default:""}},setup(n,{attrs:f}){const a=t.shallowRef(null),s=t.computed(()=>({...n,...f})),r=t.getCurrentInstance(),c=o=>{console.log(o,"elllll"),o&&(r.exposed=o)};return t.onMounted(async()=>{if(t.isVue2){const o=await import("element-ui");a.value=o.Button}else{const o=await import("element-plus");a.value=o.ElButton}console.log(a.value,"buttonComponent.value"),console.log(r,"vmmmmm")}),{buttonComponent:a,allProps:s,h:t.h,changeRef:c}}});function _(n,f,a,s,r,c){return e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.h(n.buttonComponent,{...n.allProps,ref:n.changeRef},n.$slots)))}const B=d(g,[["render",_],["__scopeId","data-v-1cb31901"]]),b=d(Object.assign({name:"MyInput"},{props:{type:{type:String,default:"text"},size:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showPassword:{type:Boolean,default:!1},maxlength:{type:[String,Number],default:null},showWordLimit:{type:Boolean,default:!1},autocomplete:{type:String,default:"off"},name:{type:String,default:""},form:{type:String,default:""},required:{type:Boolean,default:!1},width:{type:[String,Number],default:""}},emits:["input","change","focus","blur","clear"],setup(n,{expose:f,emit:a}){const s=n,r=t.useAttrs(),c=t.shallowRef(null),o=t.computed(()=>({...s,...r}));t.onMounted(async()=>{if(t.isVue2){const p=await import("element-ui");c.value=p.Input}else{const p=await import("element-plus");c.value=p.ElInput}});const i=t.getCurrentInstance(),u=t.ref(null),h=p=>{u.value=p,t.isVue2&&i&&(i.exposed=p)};return f({getInputInstance:()=>u.value,focus:()=>u.value&&u.value.focus(),blur:()=>u.value&&u.value.blur(),select:()=>u.value&&u.value.select(),clear:()=>u.value&&u.value.clear(),inputRef:u}),(p,M)=>e.unref(c)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t.h)(e.unref(c),{...e.unref(o),ref:h},p.$slots)),{key:0})):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-119c0e3d"]]);function y(n){n.component("SccbaButton",SccbaButton),n.component("MyButton1",MyButton1),n.component("SccbaInput",SccbaInput)}const S={install:y};l.MyButton1=B,l.MyUI=S,l.SccbaButton=m,l.SccbaInput=b,l.install=y,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})}));
|