@netang/quasar 0.1.25 → 0.1.26
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.
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
v-if="! readonly && ! disable"
|
|
100
100
|
>
|
|
101
101
|
<!-- 快捷表格 -->
|
|
102
|
-
<
|
|
102
|
+
<n-table
|
|
103
103
|
class="n-table n-field-table__popup-table"
|
|
104
104
|
v-model:pagination="tablePagination"
|
|
105
105
|
:selected="selected"
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
dense
|
|
153
153
|
/>
|
|
154
154
|
</template>
|
|
155
|
-
</
|
|
155
|
+
</n-table>
|
|
156
156
|
</q-popup-proxy>
|
|
157
157
|
</q-field>
|
|
158
158
|
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
<!-- 列表 -->
|
|
70
70
|
<q-page-container>
|
|
71
71
|
<q-page>
|
|
72
|
-
<
|
|
72
|
+
<n-table
|
|
73
73
|
class="n-table absolute-full"
|
|
74
74
|
:class="{
|
|
75
75
|
'n-table--last-fixed': showTableFixed,
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
:props="props"
|
|
144
144
|
/>
|
|
145
145
|
</template>
|
|
146
|
-
</
|
|
146
|
+
</n-table>
|
|
147
147
|
</q-page>
|
|
148
148
|
</q-page-container>
|
|
149
149
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<q-table
|
|
3
|
+
class="n-table"
|
|
4
|
+
:virtual-scroll-slice-size="virtualScrollItemSize"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
>
|
|
7
|
+
<!-- 插槽 -->
|
|
8
|
+
<template
|
|
9
|
+
v-for="slotName in slotNames"
|
|
10
|
+
v-slot:[slotName]="props"
|
|
11
|
+
>
|
|
12
|
+
<slot
|
|
13
|
+
:name="slotName"
|
|
14
|
+
v-bind="props"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
17
|
+
</q-table>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
import { computed } from 'vue'
|
|
22
|
+
|
|
23
|
+
import $n_isValidObject from '@netang/utils/isValidObject'
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 标识
|
|
29
|
+
*/
|
|
30
|
+
name: 'NTable',
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 声明属性
|
|
34
|
+
*/
|
|
35
|
+
props: {
|
|
36
|
+
// 以像素为单位的默认行大小
|
|
37
|
+
virtualScrollItemSize: {
|
|
38
|
+
type: [ Number, String ],
|
|
39
|
+
default: 50,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 组合式
|
|
45
|
+
*/
|
|
46
|
+
setup(props, { slots }) {
|
|
47
|
+
|
|
48
|
+
// ==========【计算属性】==========================================================================================
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 插槽标识
|
|
52
|
+
*/
|
|
53
|
+
const slotNames = computed(function() {
|
|
54
|
+
return $n_isValidObject(slots) ? Object.keys(slots) : []
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
// ==========【返回】=============================================================================================
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
// 插槽标识
|
|
61
|
+
slotNames,
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
}
|
|
65
|
+
</script>
|