@mixd-id/web-scaffold 0.1.230406391 → 0.1.230406393
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
package/src/components/List.vue
CHANGED
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
<div class="p-3 flex flex-col gap-1 bg-base-300">
|
|
58
58
|
<button v-for="(preset, idx) in config.presets"
|
|
59
59
|
class="p-2 px-5 text-left flex flex-row items-center rounded-md"
|
|
60
|
-
:class="
|
|
60
|
+
:class="configParams.presetIdx === preset.uid ? 'bg-primary-200 text-white' : 'hover:bg-primary-100'"
|
|
61
61
|
type="button"
|
|
62
62
|
@click="selectPreset(idx)">
|
|
63
63
|
<label class="flex-1 pr-12">
|
|
@@ -965,7 +965,9 @@ export default{
|
|
|
965
965
|
if(!this.config.params)
|
|
966
966
|
this.config.params = {}
|
|
967
967
|
|
|
968
|
-
if(
|
|
968
|
+
if(this.config.presets.length > 0 &&
|
|
969
|
+
(!this.config.params.presetIdx ||
|
|
970
|
+
!this.config.presets.find(_ => _.uid === this.config.params.presetIdx)))
|
|
969
971
|
this.config.params.presetIdx = this.config.presets[0].uid
|
|
970
972
|
|
|
971
973
|
return this.config.params
|
|
@@ -777,7 +777,9 @@ export default{
|
|
|
777
777
|
if(!this.config.params)
|
|
778
778
|
this.config.params = {}
|
|
779
779
|
|
|
780
|
-
if(
|
|
780
|
+
if(this.config.presets.length > 0 &&
|
|
781
|
+
(!this.config.params.presetIdx ||
|
|
782
|
+
!this.config.presets.find(_ => _.uid === this.config.params.presetIdx)))
|
|
781
783
|
this.config.params.presetIdx = this.config.presets[0].uid
|
|
782
784
|
|
|
783
785
|
return this.config.params
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
<div class="flex flex-col bg-base-300 border-t-[1px] border-b-[1px] border-text-50 divide-y divide-text-50">
|
|
56
56
|
<div v-for="(preset, idx) in config.presets"
|
|
57
57
|
class="px-6 text-left hover:bg-primary-200 hover:text-white flex flex-row items-center">
|
|
58
|
-
<div class="flex-1 py-4" @click="select(
|
|
58
|
+
<div class="flex-1 py-4" @click="select(preset)">
|
|
59
59
|
{{ preset.name }}
|
|
60
60
|
</div>
|
|
61
61
|
<button type="button"
|
|
@@ -479,6 +479,18 @@ export default{
|
|
|
479
479
|
|
|
480
480
|
computed: {
|
|
481
481
|
|
|
482
|
+
configParams(){
|
|
483
|
+
if(!this.config.params)
|
|
484
|
+
this.config.params = {}
|
|
485
|
+
|
|
486
|
+
if(this.config.presets.length > 0 &&
|
|
487
|
+
(!this.config.params.presetIdx ||
|
|
488
|
+
!this.config.presets.find(_ => _.uid === this.config.params.presetIdx)))
|
|
489
|
+
this.config.params.presetIdx = this.config.presets[0].uid
|
|
490
|
+
|
|
491
|
+
return this.config.params
|
|
492
|
+
},
|
|
493
|
+
|
|
482
494
|
filterColumns(){
|
|
483
495
|
return JSON.parse(JSON.stringify(this.config.columns ?? []))
|
|
484
496
|
.filter(_ => !('filterable' in _) || _.filterable)
|
|
@@ -641,8 +653,8 @@ export default{
|
|
|
641
653
|
})
|
|
642
654
|
},
|
|
643
655
|
|
|
644
|
-
select(
|
|
645
|
-
this.
|
|
656
|
+
select(item){
|
|
657
|
+
this.configParams.presetIdx = item.uid
|
|
646
658
|
this.close()
|
|
647
659
|
this.$emit('select')
|
|
648
660
|
},
|