From b9736729cd40a87d6d183f598ea4831c28ba56c2 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Sun, 29 Aug 2021 15:54:41 +0300 Subject: [PATCH] Initiated Image component --- src/assets/menu/menu.json | 5 + src/components/image/Image.d.ts | 9 + src/components/image/Image.vue | 224 ++++++++++++++++++++ src/components/image/package.json | 9 + src/main.js | 2 + src/router/index.js | 5 + src/views/image/ImageDemo.vue | 37 ++++ src/views/image/ImageDoc.vue | 325 ++++++++++++++++++++++++++++++ 8 files changed, 616 insertions(+) create mode 100644 src/components/image/Image.d.ts create mode 100644 src/components/image/Image.vue create mode 100644 src/components/image/package.json create mode 100644 src/views/image/ImageDemo.vue create mode 100644 src/views/image/ImageDoc.vue diff --git a/src/assets/menu/menu.json b/src/assets/menu/menu.json index fc44a210a..6f43dea9e 100644 --- a/src/assets/menu/menu.json +++ b/src/assets/menu/menu.json @@ -799,6 +799,11 @@ "to": "/galleria/advanced" } ] + }, + { + "name": "Image", + "to": "/image", + "badge": "New" } ] }, diff --git a/src/components/image/Image.d.ts b/src/components/image/Image.d.ts new file mode 100644 index 000000000..539276c9d --- /dev/null +++ b/src/components/image/Image.d.ts @@ -0,0 +1,9 @@ +interface ImageProps { + preview?: boolean; +} + +declare class Image { + $props: ImageProps; +} + +export default Image; diff --git a/src/components/image/Image.vue b/src/components/image/Image.vue new file mode 100644 index 000000000..026ed70f2 --- /dev/null +++ b/src/components/image/Image.vue @@ -0,0 +1,224 @@ + + + + + \ No newline at end of file diff --git a/src/components/image/package.json b/src/components/image/package.json new file mode 100644 index 000000000..81643ec36 --- /dev/null +++ b/src/components/image/package.json @@ -0,0 +1,9 @@ +{ + "main": "./image.cjs.js", + "module": "./image.esm.js", + "unpkg": "./image.min.js", + "types": "./Image.d.ts", + "browser": { + "./sfc": "./Image.vue" + } + } \ No newline at end of file diff --git a/src/main.js b/src/main.js index dbeb0f838..078ce55b9 100644 --- a/src/main.js +++ b/src/main.js @@ -40,6 +40,7 @@ import Editor from './components/editor/Editor'; import Fieldset from './components/fieldset/Fieldset'; import FileUpload from './components/fileupload/FileUpload'; import FullCalendar from './components/fullcalendar/FullCalendar'; +import Image from './components/image/Image'; import InlineMessage from './components/inlinemessage/InlineMessage'; import Inplace from './components/inplace/Inplace'; import InputMask from './components/inputmask/InputMask'; @@ -164,6 +165,7 @@ app.component('Editor', Editor); app.component('Fieldset', Fieldset); app.component('FileUpload', FileUpload); app.component('FullCalendar', FullCalendar); +app.component('Image', Image); app.component('InlineMessage', InlineMessage); app.component('Inplace', Inplace); app.component('InputMask', InputMask); diff --git a/src/router/index.js b/src/router/index.js index b3954ec34..c025562f4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -382,6 +382,11 @@ const routes = [ name: 'fullcalendar', component: () => import('../views/fullcalendar/FullCalendarDemo.vue') }, + { + path: '/image', + name: 'image', + component: () => import('../views/image/ImageDemo.vue') + }, { path: '/inplace', name: 'inplace', diff --git a/src/views/image/ImageDemo.vue b/src/views/image/ImageDemo.vue new file mode 100644 index 000000000..b52dd1dd7 --- /dev/null +++ b/src/views/image/ImageDemo.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/src/views/image/ImageDoc.vue b/src/views/image/ImageDoc.vue new file mode 100644 index 000000000..0211b9aba --- /dev/null +++ b/src/views/image/ImageDoc.vue @@ -0,0 +1,325 @@ + + + \ No newline at end of file