@hostlink/nuxt-light 1.23.0 → 1.23.2
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 +1 -4
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -0
- package/dist/runtime/formkit/Repeater.vue +7 -12
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -264,6 +264,7 @@ const module = defineNuxtModule({
|
|
|
264
264
|
nuxt.options.vite.optimizeDeps.include = nuxt.options.vite.optimizeDeps.include || [];
|
|
265
265
|
nuxt.options.vite.optimizeDeps.include.push("axios");
|
|
266
266
|
nuxt.options.vite.optimizeDeps.include.push("json-to-graphql-query");
|
|
267
|
+
nuxt.options.vite.optimizeDeps.include.push("collect.js");
|
|
267
268
|
const resolver = createResolver(import.meta.url);
|
|
268
269
|
const { resolve: resolveQuasar } = createResolver(dirname(await resolvePath("quasar/package.json")));
|
|
269
270
|
const importMap = JSON.parse(await await readFile(resolveQuasar("dist/transforms/import-map.json"), "utf-8"));
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed } from 'vue'
|
|
2
|
+
import { computed, ref } from 'vue'
|
|
3
3
|
import { useDragAndDrop, dragAndDrop } from "@formkit/drag-and-drop/vue";
|
|
4
4
|
import { animations } from "@formkit/drag-and-drop";
|
|
5
5
|
|
|
6
6
|
const props = defineProps({
|
|
7
7
|
context: Object
|
|
8
|
-
|
|
9
8
|
});
|
|
10
9
|
|
|
11
10
|
const node = props.context.node;
|
|
@@ -67,6 +66,7 @@ const isAllowMoveDown = (index) => {
|
|
|
67
66
|
return index < localValue.value.length - 1
|
|
68
67
|
}
|
|
69
68
|
|
|
69
|
+
const cursor = ref('cursor-grab');
|
|
70
70
|
</script>
|
|
71
71
|
|
|
72
72
|
<style>
|
|
@@ -74,20 +74,19 @@ const isAllowMoveDown = (index) => {
|
|
|
74
74
|
</style>
|
|
75
75
|
|
|
76
76
|
<template>
|
|
77
|
-
<FormKit type="list" v-model="localValue" dynamic #default="{ items, node
|
|
78
|
-
{{ sortable }}
|
|
79
|
-
|
|
77
|
+
<FormKit type="list" v-model="localValue" dynamic #default="{ items, node }" :name="node.name">
|
|
80
78
|
<q-list bordered separator ref="parent">
|
|
81
79
|
<FormKit type="group" v-for="(item, index) in items" :index="index" :key="item">
|
|
82
80
|
<q-item class="q-pa-xs">
|
|
83
81
|
<q-item-section avatar class="">
|
|
84
|
-
<div class="l-repeater-handle
|
|
82
|
+
<div class="l-repeater-handle" v-if="sortable" :class="cursor" @mousedown="cursor = 'cursor-grabbing'"
|
|
83
|
+
@mouseup="cursor = 'cursor-grab'" @mouseleave="cursor = 'cursor-grab'">
|
|
85
84
|
<q-icon name="sym_o_drag_indicator" :color="$light.color" size="sm" />
|
|
86
85
|
</div>
|
|
87
86
|
</q-item-section>
|
|
88
87
|
|
|
89
|
-
<q-item-section
|
|
90
|
-
<slot v-bind="{ value: localValue[index] }"></slot>
|
|
88
|
+
<q-item-section>
|
|
89
|
+
<slot v-bind="{ value: localValue[index], index: index, node: node }"></slot>
|
|
91
90
|
</q-item-section>
|
|
92
91
|
|
|
93
92
|
<q-item-section side>
|
|
@@ -102,12 +101,8 @@ const isAllowMoveDown = (index) => {
|
|
|
102
101
|
:color="$light.color" dense flat :disable="!isAllowMoveDown(index)" />
|
|
103
102
|
|
|
104
103
|
</q-item-section>
|
|
105
|
-
|
|
106
|
-
|
|
107
104
|
</q-item>
|
|
108
|
-
|
|
109
105
|
</FormKit>
|
|
110
|
-
|
|
111
106
|
</q-list>
|
|
112
107
|
<q-btn @click="onAdd" label="Add" icon="sym_o_add" :color="$light.color" outline />
|
|
113
108
|
</FormKit>
|