v-nuxt-ui 0.2.11 → 0.2.13
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/dist/module.json +1 -1
- package/dist/runtime/components/AsyncSelect.vue +14 -14
- package/dist/runtime/components/EChart.client.vue +5 -2
- package/dist/runtime/components/flow/FlowEditor.client.vue +8 -6
- package/dist/runtime/components/table/query/where/simple/item/opr/index.vue +1 -8
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -40,13 +40,13 @@ const allModels = computed(() => {
|
|
|
40
40
|
[props.labelField]: "\u65E0"
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
newSearchedModel.push(searchedItem);
|
|
43
|
+
currentSelectedModels.value.forEach((currentModel) => {
|
|
44
|
+
const existInSearched = searchedModel.value.some((searched) => searched[props.valueField] === currentModel[props.valueField]);
|
|
45
|
+
if (!existInSearched) {
|
|
46
|
+
newSearchedModel.unshift(currentModel);
|
|
48
47
|
}
|
|
49
48
|
});
|
|
49
|
+
newSearchedModel.push(...searchedModel.value);
|
|
50
50
|
return newSearchedModel;
|
|
51
51
|
});
|
|
52
52
|
const items = computed(() => {
|
|
@@ -117,11 +117,14 @@ const onSelect = (values) => {
|
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
|
+
const dropdownOpen = ref(false);
|
|
120
121
|
const searchTerm = ref("");
|
|
121
122
|
const onDebounceFetchItems = useDebounceFn(onFetchItems, 512);
|
|
122
123
|
watch(searchTerm, (newVal) => {
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
if (dropdownOpen.value) {
|
|
125
|
+
onDebounceFetchItems(newVal);
|
|
126
|
+
}
|
|
127
|
+
}, { immediate: true });
|
|
125
128
|
const inputMenuRef = useTemplateRef("inputMenu");
|
|
126
129
|
defineExpose({
|
|
127
130
|
focus: () => {
|
|
@@ -133,8 +136,9 @@ defineExpose({
|
|
|
133
136
|
<template>
|
|
134
137
|
<UInputMenu
|
|
135
138
|
ref="inputMenu"
|
|
139
|
+
v-model:open="dropdownOpen"
|
|
140
|
+
v-model:search-term="searchTerm"
|
|
136
141
|
:model-value="modelValue.values"
|
|
137
|
-
:search-term="searchTerm"
|
|
138
142
|
:items="items"
|
|
139
143
|
:multiple="multiple"
|
|
140
144
|
:size="size"
|
|
@@ -143,7 +147,6 @@ defineExpose({
|
|
|
143
147
|
position: 'top',
|
|
144
148
|
when: 'always'
|
|
145
149
|
}"
|
|
146
|
-
:reset-search-term-on-select="false"
|
|
147
150
|
color="neutral"
|
|
148
151
|
delete-icon="i-lucide-trash"
|
|
149
152
|
value-key="value"
|
|
@@ -154,6 +157,7 @@ defineExpose({
|
|
|
154
157
|
:disabled="disabled"
|
|
155
158
|
open-on-focus
|
|
156
159
|
trailing
|
|
160
|
+
ignore-filter
|
|
157
161
|
:ui="{
|
|
158
162
|
root: 'min-w-32',
|
|
159
163
|
base: 'peer',
|
|
@@ -168,11 +172,7 @@ defineExpose({
|
|
|
168
172
|
onFetchItems(searchTerm);
|
|
169
173
|
}
|
|
170
174
|
}"
|
|
171
|
-
@update:model-value="
|
|
172
|
-
console.log(newValues);
|
|
173
|
-
onSelect(newValues);
|
|
174
|
-
inputMenuRef?.inputRef.focus();
|
|
175
|
-
}"
|
|
175
|
+
@update:model-value="onSelect"
|
|
176
176
|
@create="onCreateNew"
|
|
177
177
|
/>
|
|
178
178
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { use } from "echarts/core";
|
|
3
3
|
import { CanvasRenderer } from "echarts/renderers";
|
|
4
|
-
import { BarChart, PieChart, LineChart } from "echarts/charts";
|
|
4
|
+
import { BarChart, PieChart, LineChart, RadarChart } from "echarts/charts";
|
|
5
5
|
import {
|
|
6
6
|
TitleComponent,
|
|
7
7
|
TooltipComponent,
|
|
@@ -34,6 +34,9 @@ const componentsToUse = [
|
|
|
34
34
|
if (props.useGrid) {
|
|
35
35
|
componentsToUse.push(GridComponent);
|
|
36
36
|
}
|
|
37
|
+
if (props.useRadar) {
|
|
38
|
+
componentsToUse.push(RadarComponent);
|
|
39
|
+
}
|
|
37
40
|
if (props.useBar) {
|
|
38
41
|
chartsToUse.push(BarChart);
|
|
39
42
|
}
|
|
@@ -44,7 +47,7 @@ if (props.useLine) {
|
|
|
44
47
|
chartsToUse.push(LineChart);
|
|
45
48
|
}
|
|
46
49
|
if (props.useRadar) {
|
|
47
|
-
chartsToUse.push(
|
|
50
|
+
chartsToUse.push(RadarChart);
|
|
48
51
|
}
|
|
49
52
|
use([...chartsToUse, ...componentsToUse]);
|
|
50
53
|
const theme = useTheme();
|
|
@@ -75,7 +75,7 @@ const {
|
|
|
75
75
|
effectiveNodeHandleColor,
|
|
76
76
|
effectiveEdgeColor
|
|
77
77
|
} = useFlowStyles();
|
|
78
|
-
const { onConnect, onNodeDragStop, onEdgeUpdate, getSelectedNodes, getSelectedEdges, getViewport, fitView: vueFlowFitView } = useVueFlow();
|
|
78
|
+
const { onConnect, onNodeDragStop, onEdgeUpdate, getSelectedNodes, getSelectedEdges, getViewport, fitView: vueFlowFitView, onNodesInitialized } = useVueFlow();
|
|
79
79
|
const handleResizeEnd = async (nodeId, dimensions) => {
|
|
80
80
|
await updateNodeDimensions(nodeId, dimensions);
|
|
81
81
|
};
|
|
@@ -172,9 +172,6 @@ onMounted(() => {
|
|
|
172
172
|
document.addEventListener("keydown", handleKeyDown, true);
|
|
173
173
|
window.addEventListener("mousemove", handleGlobalMouseMove);
|
|
174
174
|
window.addEventListener("mouseup", handleMouseUp);
|
|
175
|
-
if (props.fitView) {
|
|
176
|
-
setTimeout(() => vueFlowFitView({ padding: props.fitViewPadding }), 100);
|
|
177
|
-
}
|
|
178
175
|
onBeforeUnmount(() => {
|
|
179
176
|
document.removeEventListener("keydown", handleKeyDown, true);
|
|
180
177
|
window.removeEventListener("mousemove", handleGlobalMouseMove);
|
|
@@ -224,7 +221,7 @@ const flowContainer = ref(null);
|
|
|
224
221
|
let resizeObserver = null;
|
|
225
222
|
let prevWidth = 0;
|
|
226
223
|
onMounted(() => {
|
|
227
|
-
|
|
224
|
+
onNodesInitialized(() => {
|
|
228
225
|
const el = flowContainer.value?.$el ?? flowContainer.value;
|
|
229
226
|
if (!el) return;
|
|
230
227
|
prevWidth = el.clientWidth;
|
|
@@ -238,11 +235,16 @@ onMounted(() => {
|
|
|
238
235
|
}
|
|
239
236
|
});
|
|
240
237
|
resizeObserver.observe(el);
|
|
241
|
-
}
|
|
238
|
+
});
|
|
242
239
|
});
|
|
243
240
|
onBeforeUnmount(() => {
|
|
244
241
|
resizeObserver?.disconnect();
|
|
245
242
|
});
|
|
243
|
+
onNodesInitialized(() => {
|
|
244
|
+
if (props.fitView) {
|
|
245
|
+
vueFlowFitView({ padding: props.fitViewPadding });
|
|
246
|
+
}
|
|
247
|
+
});
|
|
246
248
|
const isValidConnection = () => true;
|
|
247
249
|
</script>
|
|
248
250
|
|
|
@@ -62,13 +62,6 @@ defineExpose({
|
|
|
62
62
|
v-model:where-query-item="whereQueryItem"
|
|
63
63
|
:disabled="fetching"
|
|
64
64
|
:trigger-fetching="triggerFetching"
|
|
65
|
-
|
|
66
|
-
:list-api="option.listApi"
|
|
67
|
-
:search-fields="option.searchFields"
|
|
68
|
-
:label-render-fn="option.labelRenderFn"
|
|
69
|
-
:label-field="option.labelField"
|
|
70
|
-
:value-field="option.valueField"
|
|
71
|
-
:multiple="option.multiple"
|
|
72
|
-
:placeholder="option.placeholder"
|
|
65
|
+
v-bind="option"
|
|
73
66
|
/>
|
|
74
67
|
</template>
|
package/package.json
CHANGED