labmaker-plugin 0.0.1

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/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # lab_maker_plugin
2
+
3
+ This template should help get you started developing with Vue 3 in Vite.
4
+
5
+ ## Recommended IDE Setup
6
+
7
+ [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
8
+
9
+ ## Customize configuration
10
+
11
+ See [Vite Configuration Reference](https://vitejs.dev/config/).
12
+
13
+ ## Project Setup
14
+
15
+ ```sh
16
+ npm install
17
+ ```
18
+
19
+ ### Compile and Hot-Reload for Development
20
+
21
+ ```sh
22
+ npm run dev
23
+ ```
24
+
25
+ ### Compile and Minify for Production
26
+
27
+ ```sh
28
+ npm run build
29
+ ```
30
+
31
+ ### Lint with [ESLint](https://eslint.org/)
32
+
33
+ ```sh
34
+ npm run lint
35
+ ```
Binary file
@@ -0,0 +1,56 @@
1
+ import { openBlock as a, createElementBlock as r, Fragment as p, createElementVNode as o } from "vue";
2
+ const d = (e, t) => {
3
+ const l = e.__vccOpts || e;
4
+ for (const [n, s] of t)
5
+ l[n] = s;
6
+ return l;
7
+ }, _ = {
8
+ props: ["custom-img"],
9
+ data() {
10
+ return {
11
+ imgSRC: this.customImg
12
+ };
13
+ },
14
+ computed: {},
15
+ methods: {
16
+ fileUpload(e) {
17
+ const l = e.target.files[0];
18
+ this.fileProcess(l);
19
+ },
20
+ fileProcess(e) {
21
+ this.imgSRC = URL.createObjectURL(e);
22
+ }
23
+ },
24
+ mounted() {
25
+ }
26
+ }, m = /* @__PURE__ */ o("h1", null, "File Uploader", -1), u = { class: "image-uploader" }, f = /* @__PURE__ */ o("h1", null, "File Uploader", -1), g = { class: "your-file" }, h = ["src"];
27
+ function U(e, t, l, n, s, i) {
28
+ return a(), r(p, null, [
29
+ m,
30
+ o("div", u, [
31
+ f,
32
+ o("input", {
33
+ onChange: t[0] || (t[0] = (...c) => i.fileUpload && i.fileUpload(...c)),
34
+ type: "file",
35
+ id: "file-upload",
36
+ name: "fileUpload",
37
+ accept: "image/*"
38
+ }, null, 32),
39
+ o("div", g, [
40
+ o("img", {
41
+ src: s.imgSRC,
42
+ alt: "",
43
+ scrset: ""
44
+ }, null, 8, h)
45
+ ])
46
+ ])
47
+ ], 64);
48
+ }
49
+ const v = /* @__PURE__ */ d(_, [["render", U]]), R = {
50
+ install: (e, t) => {
51
+ e.component("SpecialUploader", v);
52
+ }
53
+ };
54
+ export {
55
+ R as default
56
+ };
@@ -0,0 +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,o)=>{const n=t.__vccOpts||t;for(const[s,i]of o)n[s]=i;return n},a={props:["custom-img"],data(){return{imgSRC:this.customImg}},computed:{},methods:{fileUpload(t){const n=t.target.files[0];this.fileProcess(n)},fileProcess(t){this.imgSRC=URL.createObjectURL(t)}},mounted(){}},d=e.createElementVNode("h1",null,"File Uploader",-1),p={class:"image-uploader"},m=e.createElementVNode("h1",null,"File Uploader",-1),u={class:"your-file"},f=["src"];function _(t,o,n,s,i,c){return e.openBlock(),e.createElementBlock(e.Fragment,null,[d,e.createElementVNode("div",p,[m,e.createElementVNode("input",{onChange:o[0]||(o[0]=(...h)=>c.fileUpload&&c.fileUpload(...h)),type:"file",id:"file-upload",name:"fileUpload",accept:"image/*"},null,32),e.createElementVNode("div",u,[e.createElementVNode("img",{src:i.imgSRC,alt:"",scrset:""},null,8,f)])])],64)}const g=r(a,[["render",_]]);return{install:(t,o)=>{t.component("SpecialUploader",g)}}});
package/dist/style.css ADDED
@@ -0,0 +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%}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "labmaker-plugin",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "files": [
6
+ "dist"
7
+ ],
8
+ "main": "./dist/labmaker-plugin.umd.cjs",
9
+ "module": "./dist/labmaker-plugin.js",
10
+ "exports": {
11
+ ".": {
12
+ "import": "./dist/labmaker-plugin.js",
13
+ "require": "./dist/labmaker-plugin.umd.cjs"
14
+ },
15
+ "./styles": "./dist/style.css"
16
+ },
17
+ "scripts": {
18
+ "dev": "vite",
19
+ "build": "vite build",
20
+ "preview": "vite preview",
21
+ "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path .gitignore"
22
+ },
23
+ "dependencies": {
24
+ "vue": "^3.3.2"
25
+ },
26
+ "devDependencies": {
27
+ "@vitejs/plugin-vue": "^4.2.3",
28
+ "eslint": "^8.39.0",
29
+ "eslint-plugin-vue": "^9.11.0",
30
+ "vite": "^4.3.5"
31
+ }
32
+ }