@mixd-id/web-scaffold 0.1.2301231322 → 0.1.2301231323

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.2301231322",
4
+ "version": "0.1.2301231323",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -1,5 +1,7 @@
1
1
  <template>
2
- <div :class="computedOuterClass" @click="onClick">
2
+ <div :class="computedOuterClass">
3
+ <slot v-if="editable && $slots['edit-area']" name="edit-area"></slot>
4
+ <div v-else-if="editable" :class="$style.editArea" @click="edit"></div>
3
5
  <img :class="computedClass" :src="actualSrc" ref="img" :style="imageStyle"/>
4
6
  <input v-if="Boolean(editable)" class="hidden" type="file" accept="image/*" ref="file" @change="onChange"/>
5
7
  <slot></slot>
@@ -54,7 +56,8 @@ export default{
54
56
 
55
57
  computedOuterClass(){
56
58
  return [
57
- this.$style.img
59
+ this.$style.img,
60
+ this.outerClass
58
61
  ]
59
62
  .join(' ')
60
63
  },
@@ -102,7 +105,7 @@ export default{
102
105
  }
103
106
  },
104
107
 
105
- onClick(){
108
+ edit(){
106
109
  if(this.$refs.file){
107
110
  this.$refs.file.click()
108
111
  }
@@ -193,6 +196,10 @@ export default{
193
196
  @apply relative;
194
197
  }
195
198
 
199
+ .editArea{
200
+ @apply absolute top-0 left-0 right-0 bottom-0;
201
+ }
202
+
196
203
  .isLoading{
197
204
  @apply absolute top-0 left-0 right-0 bottom-0;
198
205
  @apply flex items-center justify-center;
@@ -53,6 +53,7 @@ export default{
53
53
 
54
54
  .previewModal{
55
55
  @apply !w-screen !h-screen !bg-base-300;
56
+ z-index: 21;
56
57
  max-width: unset !important;
57
58
  max-height: unset !important;
58
59
  }
@@ -381,7 +381,7 @@ export default{
381
381
 
382
382
  onHooks(module, event, items){
383
383
 
384
- console.log('onHooks', module, event, items)
384
+ //console.log('onHooks', module, event, items)
385
385
 
386
386
  if(!Array.isArray(items)) return
387
387
  items = items.filter((_) => _).map((_) => {