quasar-ui-danx 0.0.18 → 0.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/components/ActionTable/ActionTable.vue +22 -22
- package/src/components/ActionTable/index.ts +1 -1
- package/src/components/Utility/FlatList.vue +19 -0
- package/src/components/Utility/RefreshButton.vue +16 -0
- /package/src/components/ActionTable/{RenderComponentColumn.vue → RenderComponent.vue} +0 -0
package/package.json
CHANGED
@@ -49,27 +49,27 @@
|
|
49
49
|
</template>
|
50
50
|
<template #body-cell="rowProps">
|
51
51
|
<q-td :key="rowProps.key" :props="rowProps">
|
52
|
-
<
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
</
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
</
|
72
|
-
</
|
52
|
+
<component
|
53
|
+
:is="rowProps.col.onClick ? 'a' : 'div'"
|
54
|
+
@click="() => rowProps.col.onClick && rowProps.col.onClick(rowProps.row)"
|
55
|
+
>
|
56
|
+
<template v-if="rowProps.col.component">
|
57
|
+
<RenderComponent
|
58
|
+
:row-props="rowProps"
|
59
|
+
@action="$emit('action', $event)"
|
60
|
+
/>
|
61
|
+
</template>
|
62
|
+
<template v-else-if="rowProps.col.fieldList">
|
63
|
+
<div v-for="field in rowProps.col.fieldList" :key="field">
|
64
|
+
{{ rowProps.row[field] }}
|
65
|
+
</div>
|
66
|
+
</template>
|
67
|
+
<template v-else>
|
68
|
+
<slot v-bind="{name: rowProps.col.name, row: rowProps.row, value: rowProps.value}">
|
69
|
+
{{ rowProps.value }}
|
70
|
+
</slot>
|
71
|
+
</template>
|
72
|
+
</component>
|
73
73
|
</q-td>
|
74
74
|
</template>
|
75
75
|
</q-table>
|
@@ -77,7 +77,7 @@
|
|
77
77
|
|
78
78
|
<script setup>
|
79
79
|
import { ref } from 'vue';
|
80
|
-
import { EmptyTableState, registerStickyScrolling,
|
80
|
+
import { EmptyTableState, registerStickyScrolling, RenderComponent, TableSummaryRow } from '.';
|
81
81
|
import { DragHandleIcon as RowResizeIcon } from '../../svg';
|
82
82
|
import { HandleDraggable } from '../DragAndDrop';
|
83
83
|
|
@@ -6,5 +6,5 @@ export * from "./tableColumns";
|
|
6
6
|
export { default as ActionTable } from "./ActionTable.vue";
|
7
7
|
export { default as BatchActionMenu } from "./BatchActionMenu.vue";
|
8
8
|
export { default as EmptyTableState } from "./EmptyTableState.vue";
|
9
|
-
export { default as
|
9
|
+
export { default as RenderComponent } from "src/components/ActionTable/RenderComponent.vue";
|
10
10
|
export { default as TableSummaryRow } from "./TableSummaryRow.vue";
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<template>
|
2
|
+
<ul>
|
3
|
+
<li v-for="item in items" :key="item[column]">
|
4
|
+
{{ item[column] }}
|
5
|
+
</li>
|
6
|
+
</ul>
|
7
|
+
</template>
|
8
|
+
<script setup>
|
9
|
+
defineProps({
|
10
|
+
items: {
|
11
|
+
type: Array,
|
12
|
+
required: true
|
13
|
+
},
|
14
|
+
column: {
|
15
|
+
type: String,
|
16
|
+
required: true
|
17
|
+
}
|
18
|
+
});
|
19
|
+
</script>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<template>
|
2
|
+
<QBtn
|
3
|
+
class="bg-neutral-plus-6"
|
4
|
+
:loading="loading"
|
5
|
+
>
|
6
|
+
<RefreshIcon class="w-5" />
|
7
|
+
</QBtn>
|
8
|
+
</template>
|
9
|
+
<script setup>
|
10
|
+
import { RefreshIcon } from "@heroicons/vue/solid";
|
11
|
+
|
12
|
+
defineEmits(["refresh"]);
|
13
|
+
defineProps({
|
14
|
+
loading: Boolean
|
15
|
+
});
|
16
|
+
</script>
|
File without changes
|