labmaker-plugin 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/labmaker-plugin.js +37 -24
- package/dist/labmaker-plugin.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/labmaker-plugin.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { openBlock as a, createElementBlock as r, Fragment as
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
for (const [
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
},
|
|
1
|
+
import { openBlock as a, createElementBlock as r, Fragment as _, createElementVNode as l, toDisplayString as p } from "vue";
|
|
2
|
+
const i = (e, t) => {
|
|
3
|
+
const o = e.__vccOpts || e;
|
|
4
|
+
for (const [s, n] of t)
|
|
5
|
+
o[s] = n;
|
|
6
|
+
return o;
|
|
7
|
+
}, u = {
|
|
8
8
|
props: ["custom-img"],
|
|
9
9
|
data() {
|
|
10
10
|
return {
|
|
@@ -14,8 +14,8 @@ const d = (e, t) => {
|
|
|
14
14
|
computed: {},
|
|
15
15
|
methods: {
|
|
16
16
|
fileUpload(e) {
|
|
17
|
-
const
|
|
18
|
-
this.fileProcess(
|
|
17
|
+
const o = e.target.files[0];
|
|
18
|
+
this.fileProcess(o);
|
|
19
19
|
},
|
|
20
20
|
fileProcess(e) {
|
|
21
21
|
this.imgSRC = URL.createObjectURL(e);
|
|
@@ -23,34 +23,47 @@ const d = (e, t) => {
|
|
|
23
23
|
},
|
|
24
24
|
mounted() {
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
function
|
|
28
|
-
return a(), r(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onChange: t[0] || (t[0] = (...
|
|
26
|
+
}, f = /* @__PURE__ */ l("h1", null, "File Uploader", -1), m = { class: "image-uploader" }, g = /* @__PURE__ */ l("h1", null, "File Uploader", -1), h = { class: "your-file" }, U = ["src"];
|
|
27
|
+
function v(e, t, o, s, n, c) {
|
|
28
|
+
return a(), r(_, null, [
|
|
29
|
+
f,
|
|
30
|
+
l("div", m, [
|
|
31
|
+
g,
|
|
32
|
+
l("input", {
|
|
33
|
+
onChange: t[0] || (t[0] = (...d) => c.fileUpload && c.fileUpload(...d)),
|
|
34
34
|
type: "file",
|
|
35
35
|
id: "file-upload",
|
|
36
36
|
name: "fileUpload",
|
|
37
37
|
accept: "image/*"
|
|
38
38
|
}, null, 32),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
src:
|
|
39
|
+
l("div", h, [
|
|
40
|
+
l("img", {
|
|
41
|
+
src: n.imgSRC,
|
|
42
42
|
alt: "",
|
|
43
43
|
scrset: ""
|
|
44
|
-
}, null, 8,
|
|
44
|
+
}, null, 8, U)
|
|
45
45
|
])
|
|
46
46
|
])
|
|
47
47
|
], 64);
|
|
48
48
|
}
|
|
49
|
-
const
|
|
49
|
+
const y = /* @__PURE__ */ i(u, [["render", v]]);
|
|
50
|
+
const x = {
|
|
51
|
+
props: ["title"],
|
|
52
|
+
data() {
|
|
53
|
+
return {};
|
|
54
|
+
},
|
|
55
|
+
computed: {}
|
|
56
|
+
};
|
|
57
|
+
function S(e, t, o, s, n, c) {
|
|
58
|
+
return a(), r("header", null, [
|
|
59
|
+
l("h1", null, p(o.title), 1)
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
const $ = /* @__PURE__ */ i(x, [["render", S], ["__scopeId", "data-v-b60cd7ff"]]), b = {
|
|
50
63
|
install: (e, t) => {
|
|
51
|
-
e.component("SpecialUploader",
|
|
64
|
+
e.component("SpecialUploader", y), e.component("Header", $);
|
|
52
65
|
}
|
|
53
66
|
};
|
|
54
67
|
export {
|
|
55
|
-
|
|
68
|
+
b as default
|
|
56
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.LabmakerPlugin=l(e.Vue))})(this,function(e){"use strict";const l="",r=(t,
|
|
1
|
+
(function(e,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue")):typeof define=="function"&&define.amd?define(["vue"],l):(e=typeof globalThis<"u"?globalThis:e||self,e.LabmakerPlugin=l(e.Vue))})(this,function(e){"use strict";const l="",r=(t,n)=>{const o=t.__vccOpts||t;for(const[s,c]of n)o[s]=c;return o},a={props:["custom-img"],data(){return{imgSRC:this.customImg}},computed:{},methods:{fileUpload(t){const o=t.target.files[0];this.fileProcess(o)},fileProcess(t){this.imgSRC=URL.createObjectURL(t)}},mounted(){}},d=e.createElementVNode("h1",null,"File Uploader",-1),p={class:"image-uploader"},_=e.createElementVNode("h1",null,"File Uploader",-1),m={class:"your-file"},f=["src"];function u(t,n,o,s,c,i){return e.openBlock(),e.createElementBlock(e.Fragment,null,[d,e.createElementVNode("div",p,[_,e.createElementVNode("input",{onChange:n[0]||(n[0]=(...E)=>i.fileUpload&&i.fileUpload(...E)),type:"file",id:"file-upload",name:"fileUpload",accept:"image/*"},null,32),e.createElementVNode("div",m,[e.createElementVNode("img",{src:c.imgSRC,alt:"",scrset:""},null,8,f)])])],64)}const g=r(a,[["render",u]]),k="",h={props:["title"],data(){return{}},computed:{}};function U(t,n,o,s,c,i){return e.openBlock(),e.createElementBlock("header",null,[e.createElementVNode("h1",null,e.toDisplayString(o.title),1)])}const y=r(h,[["render",U],["__scopeId","data-v-b60cd7ff"]]);return{install:(t,n)=>{t.component("SpecialUploader",g),t.component("Header",y)}}});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.image-uploader{display:flex;flex-direction:column;align-items:center;border:1px solid gray;width:53%;background-color:#cecece;margin:0 auto;height:300px;box-shadow:#0000001a 0 4px 12px}.your-file{display:flex;justify-content:center;align-items:center;margin-top:20px}img{width:80%}
|
|
1
|
+
.image-uploader{display:flex;flex-direction:column;align-items:center;border:1px solid gray;width:53%;background-color:#cecece;margin:0 auto;height:300px;box-shadow:#0000001a 0 4px 12px}.your-file{display:flex;justify-content:center;align-items:center;margin-top:20px}img{width:80%}header[data-v-b60cd7ff]{display:flex;justify-content:center;align-items:center;height:40px;margin-top:10px;margin-bottom:10px}
|