jobdone-shared-files 1.0.20 → 1.0.22

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
@@ -97,8 +97,10 @@ import OOXX from '../../node_modules/jobdone-shared-files/OOXX.vue';
97
97
  <template v-slot:icon-start>
98
98
  // 前方箭頭後的 slot 插槽
99
99
  </template>
100
- <template v-slot:icon>
100
+ <template v-slot:icon="slotProps">
101
101
  // 後方的 slot 插槽,預設為 radio icon
102
+ // 透過 slotProps 取得每一個 item 的資料
103
+ {{slotProps.item}}
102
104
  </template>
103
105
  </tree>
104
106
  </template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jobdone-shared-files",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "Shared JS and SCSS for Jobdone Enterprise.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -100,10 +100,6 @@ ul, ol{
100
100
 
101
101
  // text / link ------------------------------------------
102
102
 
103
- *{
104
- word-break: break-all;
105
- }
106
-
107
103
  a{
108
104
  text-decoration: none;
109
105
  // 如果需要底線使用 <u></u> tag
package/tree.vue CHANGED
@@ -4,8 +4,8 @@
4
4
  <template v-slot:icon-start>
5
5
  <slot name="icon-start"></slot>
6
6
  </template>
7
- <template v-slot:icon>
8
- <slot name="icon"></slot>
7
+ <template v-slot:icon="slotProps">
8
+ <slot name="icon" :item="slotProps.item"></slot>
9
9
  </template>
10
10
  </tree-item>
11
11
  </form>
package/treeItem.vue CHANGED
@@ -8,7 +8,7 @@
8
8
  <div class="btn-title d-flex text-start rounded-0 flex-grow-1"
9
9
  :for="item.id" @click="clickItem(item)">
10
10
  <div class="btn btn-text border-start">{{item.title}}</div>
11
- <slot name="icon">
11
+ <slot name="icon" :item="item">
12
12
  <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
13
13
  <span class="material-icons icon-18"></span>
14
14
  </div>
@@ -27,8 +27,8 @@
27
27
  <template v-slot:icon-start>
28
28
  <slot name="icon-start"></slot>
29
29
  </template>
30
- <template v-slot:icon>
31
- <slot name="icon">
30
+ <template v-slot:icon="slotProps">
31
+ <slot name="icon" :item="slotProps.item">
32
32
  <div class="btn d-flex align-items-center border-start rounded-0 text-primary h-100 ms-auto">
33
33
  <span class="material-icons icon-18"></span>
34
34
  </div>