@mixd-id/web-scaffold 0.1.230406249 → 0.1.230406250
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 +1 -1
- package/src/components/List.vue +9 -7
package/package.json
CHANGED
package/src/components/List.vue
CHANGED
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
|
|
27
27
|
<slot name="head"
|
|
28
28
|
:preset="preset"
|
|
29
|
-
:badge-count="badgeCount"
|
|
30
29
|
:presetSelector="$refs.presetSelector"
|
|
31
30
|
:compPrefix="compPrefix">
|
|
32
31
|
<div class="flex flex-col md:flex-row gap-3 md:items-start overflow-hidden leading-tight p-3 md:p-0 md:pl-3"
|
|
@@ -38,9 +37,6 @@
|
|
|
38
37
|
<h4 class="cursor-pointer whitespace-nowrap text-ellipsis overflow-hidden group hover:text-primary"
|
|
39
38
|
@click="openPreset">
|
|
40
39
|
{{ preset.name ?? 'Preset Name' }}
|
|
41
|
-
<span v-if="badgeCount > 0" class="inline mx-1 min-w-[19px] px-2 h-[19px] relative top-[-2px] rounded-full bg-primary text-white inline-flex items-center justify-center">
|
|
42
|
-
{{ badgeCount }}
|
|
43
|
-
</span>
|
|
44
40
|
<svg v-if="computedPresetMode === 'sidebar'" width="14" height="14" class="ml-1 inline fill-text pointer-events-none group-hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M280.3 134.4c-9.719-9-24.91-8.438-33.94 1.25c-9 9.719-8.469 24.88 1.25 33.94L314.9 232H144C130.8 232 120 242.8 120 256S130.8 280 144 280h170.9l-67.21 62.41c-9.719 9.062-10.25 24.22-1.25 33.94c9.031 9.688 24.22 10.25 33.94 1.25l112-104C397.2 269 400 262.7 400 256s-2.781-13.03-7.656-17.59L280.3 134.4zM256 0C114.6 0 0 114.6 0 256s114.6 256 256 256s256-114.6 256-256S397.4 0 256 0zM256 464c-114.7 0-208-93.31-208-208S141.3 48 256 48s208 93.31 208 208S370.7 464 256 464z"/></svg>
|
|
45
41
|
<svg v-else-if="![ 'external' ].includes(computedPresetMode)" width="14" height="14" class="inline fill-text pointer-events-none group-hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
|
|
46
42
|
</h4>
|
|
@@ -51,7 +47,7 @@
|
|
|
51
47
|
<slot name="toolbar"></slot>
|
|
52
48
|
</div>
|
|
53
49
|
|
|
54
|
-
<div class="flex flex-row gap-2 gap-1">
|
|
50
|
+
<div class="flex flex-row gap-2 gap-1" v-if="Boolean(toolbar)">
|
|
55
51
|
<Textbox class="flex-1 bg-base-500 md:w-[240px]" placeholder="Search..." clearable="1"
|
|
56
52
|
v-model="preset.search"
|
|
57
53
|
@clear="delete preset.search; load()"
|
|
@@ -165,6 +161,10 @@ export default{
|
|
|
165
161
|
headerClass: String,
|
|
166
162
|
presetMode: String,
|
|
167
163
|
containerClass: String,
|
|
164
|
+
toolbar: {
|
|
165
|
+
type: [ String, Boolean ],
|
|
166
|
+
default: true
|
|
167
|
+
},
|
|
168
168
|
},
|
|
169
169
|
|
|
170
170
|
methods: {
|
|
@@ -215,6 +215,8 @@ export default{
|
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
this.data = data
|
|
218
|
+
|
|
219
|
+
this.$emit('after-load')
|
|
218
220
|
})
|
|
219
221
|
.catch(err => this.toast(err))
|
|
220
222
|
}
|
|
@@ -325,6 +327,7 @@ export default{
|
|
|
325
327
|
|
|
326
328
|
default:
|
|
327
329
|
this.socket.send(this.src, {
|
|
330
|
+
...this.preset,
|
|
328
331
|
id: items.map(item => item.id)
|
|
329
332
|
})
|
|
330
333
|
.then(({ items:nextItems }) => {
|
|
@@ -340,7 +343,7 @@ export default{
|
|
|
340
343
|
|
|
341
344
|
components: {PresetSelector, VirtualTable},
|
|
342
345
|
|
|
343
|
-
emits: [ 'open-preset' ],
|
|
346
|
+
emits: [ 'after-load', 'open-preset' ],
|
|
344
347
|
|
|
345
348
|
inject: [ 'socket', 'toast' ],
|
|
346
349
|
|
|
@@ -456,7 +459,6 @@ export default{
|
|
|
456
459
|
|
|
457
460
|
data(){
|
|
458
461
|
return {
|
|
459
|
-
badgeCount: 0,
|
|
460
462
|
readyState: 0,
|
|
461
463
|
data: {
|
|
462
464
|
itemsPerPage: 15,
|