labmaker-plugin 0.0.5 → 0.0.6

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.
@@ -1,27 +1,69 @@
1
- import { openBlock as _, createElementBlock as c, createElementVNode as r, toDisplayString as s } from "vue";
2
- const l = (e, n) => {
3
- const t = e.__vccOpts || e;
4
- for (const [o, a] of n)
5
- t[o] = a;
6
- return t;
7
- };
8
- const d = {
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 [n, s] of t)
5
+ o[n] = s;
6
+ return o;
7
+ }, u = {
8
+ props: ["custom-img"],
9
+ data() {
10
+ return {
11
+ imgSRC: this.customImg
12
+ };
13
+ },
14
+ computed: {},
15
+ methods: {
16
+ fileUpload(e) {
17
+ const o = e.target.files[0];
18
+ this.fileProcess(o);
19
+ },
20
+ fileProcess(e) {
21
+ this.imgSRC = URL.createObjectURL(e);
22
+ }
23
+ },
24
+ mounted() {
25
+ }
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, n, s, 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
+ type: "file",
35
+ id: "file-upload",
36
+ name: "fileUpload",
37
+ accept: "image/*"
38
+ }, null, 32),
39
+ l("div", h, [
40
+ l("img", {
41
+ src: s.imgSRC,
42
+ alt: "",
43
+ scrset: ""
44
+ }, null, 8, U)
45
+ ])
46
+ ])
47
+ ], 64);
48
+ }
49
+ const y = /* @__PURE__ */ i(u, [["render", v]]);
50
+ const b = {
9
51
  props: ["title"],
10
52
  data() {
11
53
  return {};
12
54
  },
13
55
  computed: {}
14
56
  };
15
- function p(e, n, t, o, a, u) {
16
- return _(), c("header", null, [
17
- r("h1", null, s(t.title), 1)
57
+ function x(e, t, o, n, s, c) {
58
+ return a(), r("header", null, [
59
+ l("h1", null, p(o.title), 1)
18
60
  ]);
19
61
  }
20
- const i = /* @__PURE__ */ l(d, [["render", p], ["__scopeId", "data-v-b60cd7ff"]]), m = {
21
- install: (e, n) => {
22
- e.component("LabHeader", i);
62
+ const $ = /* @__PURE__ */ i(b, [["render", x], ["__scopeId", "data-v-b60cd7ff"]]), S = {
63
+ install: (e, t) => {
64
+ e.component("special-uploader", y), e.component("lab-header", $);
23
65
  }
24
66
  };
25
67
  export {
26
- m as default
68
+ S as default
27
69
  };
@@ -1 +1 @@
1
- (function(e,n){typeof exports=="object"&&typeof module<"u"?module.exports=n(require("vue")):typeof define=="function"&&define.amd?define(["vue"],n):(e=typeof globalThis<"u"?globalThis:e||self,e.LabmakerPlugin=n(e.Vue))})(this,function(e){"use strict";const n="",a=(t,c)=>{const o=t.__vccOpts||t;for(const[s,r]of c)o[s]=r;return o},u="",d={props:["title"],data(){return{}},computed:{}};function i(t,c,o,s,r,p){return e.openBlock(),e.createElementBlock("header",null,[e.createElementVNode("h1",null,e.toDisplayString(o.title),1)])}const _=a(d,[["render",i],["__scopeId","data-v-b60cd7ff"]]);return{install:(t,c)=>{t.component("LabHeader",_)}}});
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[c,s]of n)o[c]=s;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,c,s,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:s.imgSRC,alt:"",scrset:""},null,8,f)])])],64)}const g=r(a,[["render",u]]),b="",h={props:["title"],data(){return{}},computed:{}};function y(t,n,o,c,s,i){return e.openBlock(),e.createElementBlock("header",null,[e.createElementVNode("h1",null,e.toDisplayString(o.title),1)])}const U=r(h,[["render",y],["__scopeId","data-v-b60cd7ff"]]);return{install:(t,n)=>{t.component("special-uploader",g),t.component("lab-header",U)}}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "labmaker-plugin",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"