@ramathibodi/nuxt-commons 0.0.8 → 0.0.10

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 CHANGED
@@ -67,6 +67,21 @@ npm run test:watch
67
67
  npm run release
68
68
  ```
69
69
 
70
+ ## NPM Login
71
+ ```bash
72
+ npm login
73
+ ```
74
+ - จะส่ง link url มาให้เข้าไปที่ url login npm
75
+
76
+ ## NPM PUBLISH
77
+ ```bash
78
+ 1. ตรวจสอบ source code, ตรวจสอบ Branch ว่าเป็น master แล้ว จากนั้นตรวจสอบ version ของ npm ว่ามีการเปลี่ยนและไม่ชนกับ version บน npm
79
+ 2. npm run dev:build
80
+ 3. npm publish --access public
81
+ 4. set token ใน link ที่ npm ให้มา
82
+ 5. เสร็จสิ้น
83
+ ```
84
+
70
85
  <!-- Badges -->
71
86
  [npm-version-src]: https://img.shields.io/npm/v/my-module/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
72
87
  [npm-version-href]: https://npmjs.com/package/my-module
package/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.0.8"
7
+ "version": "0.0.10"
8
8
  }
@@ -0,0 +1,49 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue';
3
+ import { VCard } from 'vuetify/components/VCard'
4
+ const isResizing = ref(false);
5
+ const pane1Width = ref('50%');
6
+ const containerRef = ref<HTMLElement>()
7
+ interface Props extends /* @vue-ignore */ InstanceType<typeof VCard['$props']>{
8
+ height? : number | string
9
+ }
10
+ const props = defineProps<Props>()
11
+
12
+ const startResize = () => {
13
+ isResizing.value = true;
14
+ };
15
+
16
+ const stopResize = () => {
17
+ isResizing.value = false;
18
+ };
19
+
20
+ const resize = (event: MouseEvent) => {
21
+ if (isResizing.value && containerRef.value) {
22
+ const containerRect = containerRef.value.getBoundingClientRect();
23
+ const newWidth = event.clientX - containerRect.left;
24
+ pane1Width.value = `${(newWidth / containerRect.width) * 100}%`;
25
+ }
26
+ };
27
+ </script>
28
+
29
+ <template>
30
+ <v-card :="$attrs">
31
+ <v-sheet border :height="height">
32
+ <div class="d-flex" ref="containerRef" @mouseup="stopResize" @mousemove="resize" >
33
+ <v-sheet :width = "pane1Width">
34
+ <slot name="left"></slot>
35
+ </v-sheet>
36
+ <v-divider :thickness="3" vertical class="cursor-move" @mousedown="startResize" ></v-divider>
37
+ <v-sheet :width = "`calc(100% - ${pane1Width})`" >
38
+ <slot name="right"></slot>
39
+ </v-sheet>
40
+ </div>
41
+ </v-sheet>
42
+
43
+ </v-card>
44
+
45
+ </template>
46
+
47
+ <style scoped>
48
+
49
+ </style>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramathibodi/nuxt-commons",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Ramathibodi Nuxt modules for common components",
5
5
  "repository": {
6
6
  "type": "git",