@mixd-id/web-scaffold 0.1.2301231364 → 0.1.2301231366

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.2301231364",
4
+ "version": "0.1.2301231366",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -1,6 +1,8 @@
1
1
  <template>
2
2
  <button :class="computedClass" :disabled="isDisabled">
3
- <slot></slot>
3
+ <div>
4
+ <slot></slot>
5
+ </div>
4
6
  <div v-if="isLoading" :class="$style.loadingPane">
5
7
  <svg :class="$style.spinner" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
6
8
  <circle :class="$style.svgBg" cx="12" cy="12" r="10" stroke-width="4"></circle>
@@ -31,7 +33,10 @@ export default{
31
33
  default: '' // 0|1|2|3, default: 2
32
34
  },
33
35
 
34
- state: [ String, Number ], // -1:disabled, 1:normal, 2:loading, default: normal
36
+ state: {
37
+ type: [ String, Number ],
38
+ default: 1
39
+ }, // -1:disabled, 1:normal, 2:loading, default: normal
35
40
 
36
41
  },
37
42
 
@@ -50,11 +55,7 @@ export default{
50
55
  },
51
56
 
52
57
  isDisabled(){
53
- return parseInt(this.computedState) === -1
54
- },
55
-
56
- isNormal(){
57
- return parseInt(this.computedState) !== 2
58
+ return parseInt(this.computedState) !== 1
58
59
  },
59
60
 
60
61
  isLoading(){
@@ -227,6 +228,12 @@ export default{
227
228
  .loading:active{
228
229
  @apply top-0 left-0;
229
230
  }
231
+ .loading>*{
232
+ opacity: 0;
233
+ }
234
+ .loading .loadingPane{
235
+ opacity: 1;
236
+ }
230
237
 
231
238
  .spacing-,
232
239
  .spacing-2{