jobdone-shared-files 0.0.1-beta.8 → 0.0.1-beta.80

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.
Files changed (127) hide show
  1. package/.vs/VSWorkspaceState.json +6 -0
  2. package/.vs/jobdone_sharejs/FileContentIndex/a973f22d-a16a-4ca9-ab6a-75ab92ec6af7.vsidx +0 -0
  3. package/.vs/jobdone_sharejs/FileContentIndex/bacf95a3-2185-41c2-b12a-e93bb40f2204.vsidx +0 -0
  4. package/.vs/jobdone_sharejs/config/applicationhost.config +1021 -0
  5. package/.vs/jobdone_sharejs/v17/.wsuo +0 -0
  6. package/.vs/slnx.sqlite +0 -0
  7. package/ProjectManagement/projectNavbar.vue +225 -79
  8. package/README.md +79 -6
  9. package/common/directives/collapse.js +12 -12
  10. package/common/directives/popovers.js +11 -0
  11. package/common/directives/tooltip.js +11 -0
  12. package/common/format.js +26 -12
  13. package/index.js +14 -14
  14. package/lightboxWithOverview.vue +132 -0
  15. package/package.json +19 -18
  16. package/paginate.vue +138 -138
  17. package/style/css/vue-loading-overlay/index.css +40 -40
  18. package/style/scss/Common/Animation.scss +6 -0
  19. package/style/scss/Common/SelectableTable.scss +31 -0
  20. package/style/scss/Common/filepond.scss +28 -0
  21. package/style/scss/Common/thumbnail-group.scss +14 -0
  22. package/style/scss/Layout/LayoutBase.scss +1015 -942
  23. package/style/scss/Layout/LayoutMobile.scss +203 -0
  24. package/style/scss/Layout/LayoutProject.scss +122 -126
  25. package/style/scss/Layout/LayoutSinglePage.scss +13 -13
  26. package/style/scss/Layout/LayoutTwoColumn.scss +56 -56
  27. package/style/scss/Settings/_Mixins.scss +229 -229
  28. package/style/scss/Settings/_MobileVariables.scss +12 -0
  29. package/style/scss/Settings/_basic-import.scss +5 -4
  30. package/style/scss/Settings/_bs-variables-dark.scss +70 -70
  31. package/style/scss/Settings/_bs-variables.scss +1743 -1703
  32. package/style/scss/Settings/_color-mode.scss +122 -122
  33. package/style/scss/Settings/_custom-variables.scss +14 -10
  34. package/tagEditor.vue +263 -263
  35. package/tree.vue +69 -62
  36. package/treeItem.vue +366 -366
  37. package/vueLoadingOverlay.vue +70 -76
  38. package/style/scss/Bootstrap/_accordion.scss +0 -158
  39. package/style/scss/Bootstrap/_alert.scss +0 -68
  40. package/style/scss/Bootstrap/_badge.scss +0 -38
  41. package/style/scss/Bootstrap/_breadcrumb.scss +0 -40
  42. package/style/scss/Bootstrap/_button-group.scss +0 -142
  43. package/style/scss/Bootstrap/_buttons.scss +0 -207
  44. package/style/scss/Bootstrap/_card.scss +0 -238
  45. package/style/scss/Bootstrap/_carousel.scss +0 -238
  46. package/style/scss/Bootstrap/_close.scss +0 -61
  47. package/style/scss/Bootstrap/_containers.scss +0 -41
  48. package/style/scss/Bootstrap/_dropdown.scss +0 -250
  49. package/style/scss/Bootstrap/_forms.scss +0 -9
  50. package/style/scss/Bootstrap/_functions.scss +0 -302
  51. package/style/scss/Bootstrap/_grid.scss +0 -33
  52. package/style/scss/Bootstrap/_helpers.scss +0 -10
  53. package/style/scss/Bootstrap/_images.scss +0 -42
  54. package/style/scss/Bootstrap/_list-group.scss +0 -204
  55. package/style/scss/Bootstrap/_maps.scss +0 -121
  56. package/style/scss/Bootstrap/_mixins.scss +0 -42
  57. package/style/scss/Bootstrap/_modal.scss +0 -237
  58. package/style/scss/Bootstrap/_nav.scss +0 -172
  59. package/style/scss/Bootstrap/_navbar.scss +0 -286
  60. package/style/scss/Bootstrap/_offcanvas.scss +0 -146
  61. package/style/scss/Bootstrap/_pagination.scss +0 -109
  62. package/style/scss/Bootstrap/_placeholders.scss +0 -51
  63. package/style/scss/Bootstrap/_popover.scss +0 -196
  64. package/style/scss/Bootstrap/_progress.scss +0 -68
  65. package/style/scss/Bootstrap/_reboot.scss +0 -610
  66. package/style/scss/Bootstrap/_root.scss +0 -195
  67. package/style/scss/Bootstrap/_spinners.scss +0 -85
  68. package/style/scss/Bootstrap/_tables.scss +0 -164
  69. package/style/scss/Bootstrap/_toasts.scss +0 -73
  70. package/style/scss/Bootstrap/_tooltip.scss +0 -120
  71. package/style/scss/Bootstrap/_transitions.scss +0 -27
  72. package/style/scss/Bootstrap/_type.scss +0 -106
  73. package/style/scss/Bootstrap/_utilities.scss +0 -748
  74. package/style/scss/Bootstrap/_variables-dark.scss +0 -70
  75. package/style/scss/Bootstrap/_variables.scss +0 -1703
  76. package/style/scss/Bootstrap/bootstrap-grid.scss +0 -66
  77. package/style/scss/Bootstrap/bootstrap-reboot.scss +0 -10
  78. package/style/scss/Bootstrap/bootstrap-utilities.scss +0 -19
  79. package/style/scss/Bootstrap/bootstrap.scss +0 -52
  80. package/style/scss/Bootstrap/forms/_floating-labels.scss +0 -90
  81. package/style/scss/Bootstrap/forms/_form-check.scss +0 -188
  82. package/style/scss/Bootstrap/forms/_form-control.scss +0 -201
  83. package/style/scss/Bootstrap/forms/_form-range.scss +0 -91
  84. package/style/scss/Bootstrap/forms/_form-select.scss +0 -81
  85. package/style/scss/Bootstrap/forms/_form-text.scss +0 -11
  86. package/style/scss/Bootstrap/forms/_input-group.scss +0 -132
  87. package/style/scss/Bootstrap/forms/_labels.scss +0 -36
  88. package/style/scss/Bootstrap/forms/_validation.scss +0 -12
  89. package/style/scss/Bootstrap/helpers/_clearfix.scss +0 -3
  90. package/style/scss/Bootstrap/helpers/_color-bg.scss +0 -10
  91. package/style/scss/Bootstrap/helpers/_colored-links.scss +0 -12
  92. package/style/scss/Bootstrap/helpers/_position.scss +0 -36
  93. package/style/scss/Bootstrap/helpers/_ratio.scss +0 -26
  94. package/style/scss/Bootstrap/helpers/_stacks.scss +0 -15
  95. package/style/scss/Bootstrap/helpers/_stretched-link.scss +0 -15
  96. package/style/scss/Bootstrap/helpers/_text-truncation.scss +0 -7
  97. package/style/scss/Bootstrap/helpers/_visually-hidden.scss +0 -8
  98. package/style/scss/Bootstrap/helpers/_vr.scss +0 -8
  99. package/style/scss/Bootstrap/mixins/_alert.scss +0 -18
  100. package/style/scss/Bootstrap/mixins/_backdrop.scss +0 -14
  101. package/style/scss/Bootstrap/mixins/_banner.scss +0 -7
  102. package/style/scss/Bootstrap/mixins/_border-radius.scss +0 -78
  103. package/style/scss/Bootstrap/mixins/_box-shadow.scss +0 -18
  104. package/style/scss/Bootstrap/mixins/_breakpoints.scss +0 -127
  105. package/style/scss/Bootstrap/mixins/_buttons.scss +0 -70
  106. package/style/scss/Bootstrap/mixins/_caret.scss +0 -69
  107. package/style/scss/Bootstrap/mixins/_clearfix.scss +0 -9
  108. package/style/scss/Bootstrap/mixins/_color-mode.scss +0 -21
  109. package/style/scss/Bootstrap/mixins/_color-scheme.scss +0 -7
  110. package/style/scss/Bootstrap/mixins/_container.scss +0 -11
  111. package/style/scss/Bootstrap/mixins/_deprecate.scss +0 -10
  112. package/style/scss/Bootstrap/mixins/_forms.scss +0 -153
  113. package/style/scss/Bootstrap/mixins/_gradients.scss +0 -47
  114. package/style/scss/Bootstrap/mixins/_grid.scss +0 -151
  115. package/style/scss/Bootstrap/mixins/_image.scss +0 -16
  116. package/style/scss/Bootstrap/mixins/_list-group.scss +0 -27
  117. package/style/scss/Bootstrap/mixins/_lists.scss +0 -7
  118. package/style/scss/Bootstrap/mixins/_pagination.scss +0 -10
  119. package/style/scss/Bootstrap/mixins/_reset-text.scss +0 -17
  120. package/style/scss/Bootstrap/mixins/_resize.scss +0 -6
  121. package/style/scss/Bootstrap/mixins/_table-variants.scss +0 -24
  122. package/style/scss/Bootstrap/mixins/_text-truncate.scss +0 -8
  123. package/style/scss/Bootstrap/mixins/_transition.scss +0 -26
  124. package/style/scss/Bootstrap/mixins/_utilities.scss +0 -97
  125. package/style/scss/Bootstrap/mixins/_visually-hidden.scss +0 -29
  126. package/style/scss/Bootstrap/utilities/_api.scss +0 -47
  127. package/style/scss/Bootstrap/vendor/_rfs.scss +0 -354
package/tagEditor.vue CHANGED
@@ -1,264 +1,264 @@
1
- <template>
2
- <div class="tag-editor" v-if="tagAry">
3
- <div class="main-cont">
4
- <div class="form-control form-control-sm" :class="disabled ? 'is-disabled' : ''">
5
- <template v-if="tagAry.length">
6
- <div class="badge rounded-pill" :class="disabled ? 'badge-outline-gray ' : 'badge-outline-purple'"
7
- v-for="(tag, index) in tagAry" :key="index" :title="tag">
8
- <div class="tag-text">{{ tag }}</div>
9
- <div class="remove-btn-box" v-if="!disabled">
10
- <button type="button" class="remove-btn" @click="removeTag(index)"><span
11
- class="material-icons">close</span>
12
- </button>
13
- </div>
14
- </div>
15
- </template>
16
- <input v-if="!disabled" class="new-tag-input" list="datalistOptions" type="text" :placeholder="placeholder"
17
- v-model.trim="newTag" @keydown.enter="addTag" @keyup="keyupFunction">
18
- <datalist id="datalistOptions" v-if="autoCompleteShow">
19
- <option :value="opt" v-for="(opt, idx) in autoCompleteOption" :key="idx">{{ opt }}</option>
20
- </datalist>
21
- </div>
22
- </div>
23
- <div class="helper-text-box" v-if="!disabled">
24
- <small class="helper-text">在輸入框中輸入文字後,按下鍵盤的"Enter"鍵,即可增加標籤。(標籤僅接受中文、英文、數字、下底線)</small>
25
- </div>
26
- </div>
27
- </template>
28
- <script>
29
- // enum Data & Functions
30
- // import { } from '../common/enum.js'
31
-
32
- // vue & bootstrap
33
- import { ref, reactive, onMounted, computed } from 'vue'
34
- // import { } from 'bootstrap';
35
-
36
- // plugins
37
- // import { v4 as uuidv4 } from 'uuid';
38
- // import { useVuelidate } from '@vuelidate/core'
39
- // import { required } from '@vuelidate/validators'
40
- // import { SwalSuccess, SwalConfirmDelete } from '../common/sweetalert.js';
41
-
42
- // vue components
43
- // import Loading from "./vueLoadingOverlay.vue";
44
-
45
- export default {
46
- props: {
47
- defaultTagList: {
48
- type: Array,
49
- default: () => []
50
- },
51
- placeholder: {
52
- type: String,
53
- default: '請在此處輸入標籤文字'
54
- },
55
- autoComplete: {
56
- type: Boolean,
57
- default: true
58
- },
59
- autoCompleteOption: {
60
- type: Array,
61
- default: () => []
62
- },
63
- disabled: {
64
- type: Boolean,
65
- default: false
66
- }
67
- },
68
- setup(props, { emit }) {
69
- // 基本資料
70
- const tagAry = reactive([])
71
- const newTag = ref('')
72
-
73
- const autoCompleteShow = computed(() => {
74
- let show = props.autoComplete
75
- if (!newTag.value || props.autoCompleteOption.length < 1) {
76
- show = false
77
- }
78
- return show
79
- })
80
- // 輸入時 AutoComplete
81
- var autoCompleteTimer
82
- function updateAutoCompleteOption() {
83
- clearTimeout(autoCompleteTimer);
84
- if (newTag.value) {
85
- autoCompleteTimer = setTimeout(() => {
86
- emit('update-auto-complete-option', newTag.value);
87
- }, 500);
88
- }
89
- }
90
-
91
- // 刷新預設選中內容
92
- function getDefaultTag(updateData = []) {
93
- tagAry.splice(0, tagAry.length, ...updateData)
94
- }
95
- function keyupFunction() {
96
- if (props.autoCompleteOption) {
97
- updateAutoCompleteOption()
98
- }
99
- newTag.value = newTag.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g, '_')
100
- }
101
-
102
- // 重複標籤禁止新增
103
- var isDuplicate = computed(() => {
104
- return newTag.value ? !!tagAry.find(tag => tag == newTag.value) : false
105
- })
106
-
107
- // 增加Tag
108
- function addTag() {
109
- if (newTag.value && !isDuplicate.value) {
110
- tagAry.push(newTag.value)
111
- }
112
- newTag.value = ''
113
- }
114
- // 移除Tag
115
- function removeTag(index) {
116
- tagAry.splice(index, 1)
117
- }
118
- function reset() {
119
- tagAry.splice(0, tagAry.length)
120
- newTag.value = ''
121
- }
122
-
123
- onMounted(() => {
124
- getDefaultTag(props.defaultTagList)
125
- })
126
- return {
127
- tagAry,
128
- newTag,
129
- addTag,
130
- removeTag,
131
- updateAutoCompleteOption,
132
- autoCompleteTimer,
133
- autoCompleteShow,
134
- reset,
135
- keyupFunction,
136
- isDuplicate,
137
- getDefaultTag
138
- }
139
- }
140
- }
141
- </script>
142
-
143
- <style lang="scss" scoped>
144
- .tag-editor {
145
- background: var(--bs-gray-100);
146
- border-radius: var(--bs-border-radius);
147
- padding: .5rem;
148
-
149
- .helper-text-box {
150
- text-align: start;
151
-
152
- .helper-text {
153
- font-size: 0.75rem;
154
- color: var(--bs-gray-500);
155
- }
156
- }
157
-
158
- .main-cont {
159
- position: relative;
160
-
161
- .auto-complete-box {
162
- all: unset;
163
- display: none;
164
- visibility: hidden;
165
- position: absolute;
166
- width: 90%;
167
- overflow: hidden;
168
-
169
- &.show {
170
- visibility: visible;
171
- display: block;
172
- position: absolute;
173
- top: calc(100% + 0.25rem);
174
- background: #fff;
175
- border: 1px solid var(--bs-gray-300);
176
- border-radius: var(--bs-border-radius);
177
- box-shadow: var(--bs-box-shadow);
178
- }
179
-
180
- .opt-item {
181
- padding: 0.5rem;
182
- cursor: pointer;
183
- overflow: hidden;
184
- text-overflow: ellipsis;
185
-
186
- &:not(:last-child) {
187
- border-bottom: 1px solid var(--bs-gray-300);
188
- }
189
- }
190
- }
191
- }
192
-
193
- .form-control {
194
- display: flex;
195
- align-items: center;
196
- flex-wrap: wrap;
197
- padding: .5rem .5rem .25rem .5rem;
198
-
199
- &.is-disabled:hover {
200
- cursor: not-allowed;
201
- }
202
- }
203
-
204
- .new-tag-input {
205
- all: unset;
206
- flex-grow: 1;
207
- margin-bottom: .25rem;
208
- background: var(--bs-gray-100);
209
- padding: .25rem .75rem;
210
- border-radius: 99px;
211
- border: 1px solid rgba(#000, 0);
212
- }
213
-
214
- .badge.rounded-pill {
215
- margin: 0 .25rem .25rem 0;
216
- display: inline-flex;
217
- align-items: stretch;
218
- overflow: hidden;
219
-
220
- .tag-text {
221
- margin: auto;
222
- overflow: hidden;
223
- text-overflow: ellipsis;
224
- }
225
-
226
- .remove-btn-box {
227
- display: flex;
228
- align-items: stretch;
229
-
230
- &::before {
231
- display: block;
232
- content: ' ';
233
- height: 100%;
234
- border-left: 1px solid var(--bs-gray-300);
235
- margin: 0 0.25rem;
236
- }
237
- }
238
-
239
- .remove-btn {
240
- all: unset;
241
- display: flex;
242
- align-items: center;
243
- justify-content: center;
244
-
245
- .material-icons {
246
- font-size: 16px;
247
- line-height: 16px;
248
- color: var(--bs-purple);
249
- opacity: .5;
250
- transition: .3s;
251
- }
252
-
253
- &:hover {
254
- cursor: pointer;
255
-
256
- .material-icons {
257
- opacity: 1;
258
- }
259
- }
260
- }
261
- }
262
-
263
- }
1
+ <template>
2
+ <div class="tag-editor" v-if="tagAry">
3
+ <div class="main-cont">
4
+ <div class="form-control form-control-sm" :class="disabled ? 'is-disabled' : ''">
5
+ <template v-if="tagAry.length">
6
+ <div class="badge rounded-pill" :class="disabled ? 'badge-outline-gray ' : 'badge-outline-purple'"
7
+ v-for="(tag, index) in tagAry" :key="index" :title="tag">
8
+ <div class="tag-text">{{ tag }}</div>
9
+ <div class="remove-btn-box" v-if="!disabled">
10
+ <button type="button" class="remove-btn" @click="removeTag(index)"><span
11
+ class="material-icons">close</span>
12
+ </button>
13
+ </div>
14
+ </div>
15
+ </template>
16
+ <input v-if="!disabled" class="new-tag-input" list="datalistOptions" type="text" :placeholder="placeholder"
17
+ v-model.trim="newTag" @keydown.enter="addTag" @keyup="keyupFunction">
18
+ <datalist id="datalistOptions" v-if="autoCompleteShow">
19
+ <option :value="opt" v-for="(opt, idx) in autoCompleteOption" :key="idx">{{ opt }}</option>
20
+ </datalist>
21
+ </div>
22
+ </div>
23
+ <div class="helper-text-box" v-if="!disabled">
24
+ <small class="helper-text">在輸入框中輸入文字後,按下鍵盤的"Enter"鍵,即可增加標籤。(標籤僅接受中文、英文、數字、下底線)</small>
25
+ </div>
26
+ </div>
27
+ </template>
28
+ <script>
29
+ // enum Data & Functions
30
+ // import { } from '../common/enum.js'
31
+
32
+ // vue & bootstrap
33
+ import { ref, reactive, onMounted, computed } from 'vue'
34
+ // import { } from 'bootstrap';
35
+
36
+ // plugins
37
+ // import { v4 as uuidv4 } from 'uuid';
38
+ // import { useVuelidate } from '@vuelidate/core'
39
+ // import { required } from '@vuelidate/validators'
40
+ // import { SwalSuccess, SwalConfirmDelete } from '../common/sweetalert.js';
41
+
42
+ // vue components
43
+ // import Loading from "./vueLoadingOverlay.vue";
44
+
45
+ export default {
46
+ props: {
47
+ defaultTagList: {
48
+ type: Array,
49
+ default: () => []
50
+ },
51
+ placeholder: {
52
+ type: String,
53
+ default: '請在此處輸入標籤文字'
54
+ },
55
+ autoComplete: {
56
+ type: Boolean,
57
+ default: true
58
+ },
59
+ autoCompleteOption: {
60
+ type: Array,
61
+ default: () => []
62
+ },
63
+ disabled: {
64
+ type: Boolean,
65
+ default: false
66
+ }
67
+ },
68
+ setup(props, { emit }) {
69
+ // 基本資料
70
+ const tagAry = reactive([])
71
+ const newTag = ref('')
72
+
73
+ const autoCompleteShow = computed(() => {
74
+ let show = props.autoComplete
75
+ if (!newTag.value || props.autoCompleteOption.length < 1) {
76
+ show = false
77
+ }
78
+ return show
79
+ })
80
+ // 輸入時 AutoComplete
81
+ var autoCompleteTimer
82
+ function updateAutoCompleteOption() {
83
+ clearTimeout(autoCompleteTimer);
84
+ if (newTag.value) {
85
+ autoCompleteTimer = setTimeout(() => {
86
+ emit('update-auto-complete-option', newTag.value);
87
+ }, 500);
88
+ }
89
+ }
90
+
91
+ // 刷新預設選中內容
92
+ function getDefaultTag(updateData = []) {
93
+ tagAry.splice(0, tagAry.length, ...updateData)
94
+ }
95
+ function keyupFunction() {
96
+ if (props.autoCompleteOption) {
97
+ updateAutoCompleteOption()
98
+ }
99
+ newTag.value = newTag.value.replace(/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g, '_')
100
+ }
101
+
102
+ // 重複標籤禁止新增
103
+ var isDuplicate = computed(() => {
104
+ return newTag.value ? !!tagAry.find(tag => tag == newTag.value) : false
105
+ })
106
+
107
+ // 增加Tag
108
+ function addTag() {
109
+ if (newTag.value && !isDuplicate.value) {
110
+ tagAry.push(newTag.value)
111
+ }
112
+ newTag.value = ''
113
+ }
114
+ // 移除Tag
115
+ function removeTag(index) {
116
+ tagAry.splice(index, 1)
117
+ }
118
+ function reset() {
119
+ tagAry.splice(0, tagAry.length)
120
+ newTag.value = ''
121
+ }
122
+
123
+ onMounted(() => {
124
+ getDefaultTag(props.defaultTagList)
125
+ })
126
+ return {
127
+ tagAry,
128
+ newTag,
129
+ addTag,
130
+ removeTag,
131
+ updateAutoCompleteOption,
132
+ autoCompleteTimer,
133
+ autoCompleteShow,
134
+ reset,
135
+ keyupFunction,
136
+ isDuplicate,
137
+ getDefaultTag
138
+ }
139
+ }
140
+ }
141
+ </script>
142
+
143
+ <style lang="scss" scoped>
144
+ .tag-editor {
145
+ background: var(--bs-gray-100);
146
+ border-radius: var(--bs-border-radius);
147
+ padding: .5rem;
148
+
149
+ .helper-text-box {
150
+ text-align: start;
151
+
152
+ .helper-text {
153
+ font-size: 0.75rem;
154
+ color: var(--bs-gray-500);
155
+ }
156
+ }
157
+
158
+ .main-cont {
159
+ position: relative;
160
+
161
+ .auto-complete-box {
162
+ all: unset;
163
+ display: none;
164
+ visibility: hidden;
165
+ position: absolute;
166
+ width: 90%;
167
+ overflow: hidden;
168
+
169
+ &.show {
170
+ visibility: visible;
171
+ display: block;
172
+ position: absolute;
173
+ top: calc(100% + 0.25rem);
174
+ background: #fff;
175
+ border: 1px solid var(--bs-gray-300);
176
+ border-radius: var(--bs-border-radius);
177
+ box-shadow: var(--bs-box-shadow);
178
+ }
179
+
180
+ .opt-item {
181
+ padding: 0.5rem;
182
+ cursor: pointer;
183
+ overflow: hidden;
184
+ text-overflow: ellipsis;
185
+
186
+ &:not(:last-child) {
187
+ border-bottom: 1px solid var(--bs-gray-300);
188
+ }
189
+ }
190
+ }
191
+ }
192
+
193
+ .form-control {
194
+ display: flex;
195
+ align-items: center;
196
+ flex-wrap: wrap;
197
+ padding: .5rem .5rem .25rem .5rem;
198
+
199
+ &.is-disabled:hover {
200
+ cursor: not-allowed;
201
+ }
202
+ }
203
+
204
+ .new-tag-input {
205
+ all: unset;
206
+ flex-grow: 1;
207
+ margin-bottom: .25rem;
208
+ background: var(--bs-gray-100);
209
+ padding: .25rem .75rem;
210
+ border-radius: 99px;
211
+ border: 1px solid rgba(#000, 0);
212
+ }
213
+
214
+ .badge.rounded-pill {
215
+ margin: 0 .25rem .25rem 0;
216
+ display: inline-flex;
217
+ align-items: stretch;
218
+ overflow: hidden;
219
+
220
+ .tag-text {
221
+ margin: auto;
222
+ overflow: hidden;
223
+ text-overflow: ellipsis;
224
+ }
225
+
226
+ .remove-btn-box {
227
+ display: flex;
228
+ align-items: stretch;
229
+
230
+ &::before {
231
+ display: block;
232
+ content: ' ';
233
+ height: 100%;
234
+ border-left: 1px solid var(--bs-gray-300);
235
+ margin: 0 0.25rem;
236
+ }
237
+ }
238
+
239
+ .remove-btn {
240
+ all: unset;
241
+ display: flex;
242
+ align-items: center;
243
+ justify-content: center;
244
+
245
+ .material-icons {
246
+ font-size: 16px;
247
+ line-height: 16px;
248
+ color: var(--bs-purple);
249
+ opacity: .5;
250
+ transition: .3s;
251
+ }
252
+
253
+ &:hover {
254
+ cursor: pointer;
255
+
256
+ .material-icons {
257
+ opacity: 1;
258
+ }
259
+ }
260
+ }
261
+ }
262
+
263
+ }
264
264
  </style>
package/tree.vue CHANGED
@@ -1,62 +1,69 @@
1
- <template>
2
- <tree-item v-for="(item, index) in items" :key="item.id" :item="item" :index="index" :click-item="clickItem" :active-id="activeId" :tree-item-class="treeItemClass">
3
- <template v-slot:icon>
4
- <slot name="icon"></slot>
5
- </template>
6
- </tree-item>
7
- </template>
8
-
9
- <script>
10
- import { ref, computed } from 'vue';
11
- import TreeItem from './treeItem.vue';
12
- export default {
13
- props: {
14
- items: {
15
- type: Array,
16
- default: function () {
17
- return [];
18
- }
19
- },
20
- clickItem: {
21
- type: Function
22
- },
23
- size: {
24
- type: String,
25
- default:""
26
- },
27
- bgColor: {
28
- type: String,
29
- default:""
30
- }
31
- },
32
- components: {
33
- TreeItem
34
- },
35
- setup(props, { emit }) {
36
- const activeId = ref("");
37
- const clickItem = (item) => {
38
- activeId.value = item.id;
39
- props.clickItem(item);
40
- };
41
- const treeItemClass = computed(() => {
42
- var classList = [];
43
- if (props.size == 'sm') {
44
- classList.push('tree-item-sm');
45
- }
46
- if (props.bgColor == 'white') {
47
- classList.push('tree-item-in-white');
48
- }
49
- return classList;
50
- });
51
-
52
- return {
53
- treeItemClass: treeItemClass,
54
- activeId: activeId,
55
- clickItem: clickItem
56
- };
57
- }
58
- }
59
- </script>
60
- <style>
61
-
62
- </style>
1
+ <template>
2
+ <form ref="form">
3
+ <tree-item v-for="(item, index) in items" :key="item.id" :item="item" :index="index" :click-item="clickItem" :active-id="activeId" :tree-item-class="treeItemClass">
4
+ <template v-slot:icon>
5
+ <slot name="icon"></slot>
6
+ </template>
7
+ </tree-item>
8
+ </form>
9
+ </template>
10
+
11
+ <script>
12
+ import { ref, computed } from 'vue';
13
+ import TreeItem from './treeItem.vue';
14
+ export default {
15
+ props: {
16
+ items: {
17
+ type: Array,
18
+ default: function () {
19
+ return [];
20
+ }
21
+ },
22
+ clickItem: {
23
+ type: Function
24
+ },
25
+ size: {
26
+ type: String,
27
+ default: ""
28
+ },
29
+ bgColor: {
30
+ type: String,
31
+ default: ""
32
+ }
33
+ },
34
+ components: {
35
+ TreeItem
36
+ },
37
+ setup(props, { emit }) {
38
+ const form = ref(null);
39
+ const activeId = ref("");
40
+ const clickItem = (item) => {
41
+ activeId.value = item.id;
42
+ props.clickItem(item);
43
+ };
44
+ const treeItemClass = computed(() => {
45
+ var classList = [];
46
+ if (props.size == 'sm') {
47
+ classList.push('tree-item-sm');
48
+ }
49
+ if (props.bgColor == 'white') {
50
+ classList.push('tree-item-in-white');
51
+ }
52
+ return classList;
53
+ });
54
+ const reset = () => {
55
+ activeId.value = "";
56
+ form.reset();
57
+ };
58
+ return {
59
+ form: form,
60
+ treeItemClass: treeItemClass,
61
+ activeId: activeId,
62
+ clickItem: clickItem,
63
+ reset: reset
64
+ };
65
+ }
66
+ }
67
+ </script>
68
+ <style>
69
+ </style>