@xilonglab/vue-main 1.3.6 → 1.3.8
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
|
@@ -62,24 +62,40 @@ defineExpose({
|
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
<template>
|
|
65
|
-
<xl-dialog
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
<xl-dialog
|
|
66
|
+
class="xl-data-form-dialog"
|
|
67
|
+
:ref="refs.dialog"
|
|
68
|
+
:title="chinese"
|
|
69
|
+
:width="width"
|
|
70
|
+
:validate="validate"
|
|
71
|
+
:handler="handler"
|
|
72
|
+
@finish="emits('finish')"
|
|
73
|
+
>
|
|
74
|
+
<el-form
|
|
75
|
+
:ref="refs.form"
|
|
76
|
+
:model="obj"
|
|
77
|
+
:rules="rules"
|
|
78
|
+
:label-width="`${labelWidth}px`"
|
|
79
|
+
>
|
|
68
80
|
<el-row>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
<template v-for="col in columns" :key="col.prop">
|
|
82
|
+
<slot
|
|
83
|
+
v-if="col.slot"
|
|
84
|
+
:name="col.slot"
|
|
85
|
+
/>
|
|
86
|
+
<xl-form-col
|
|
87
|
+
v-else-if="col.form"
|
|
88
|
+
:span="col.form.span"
|
|
89
|
+
:l="col.label"
|
|
90
|
+
:p="col.prop"
|
|
91
|
+
>
|
|
92
|
+
<component
|
|
93
|
+
:is="`xl-${col.form.type || 'input'}`"
|
|
94
|
+
v-model="obj[col.prop]"
|
|
95
|
+
v-bind="col.form || {}"
|
|
96
|
+
/>
|
|
97
|
+
</xl-form-col>
|
|
98
|
+
</template>
|
|
83
99
|
</el-row>
|
|
84
100
|
<slot />
|
|
85
101
|
</el-form>
|
|
@@ -112,10 +112,65 @@ const { refs, api, params, obj, chartOptions, total } = inject('injections')
|
|
|
112
112
|
</xl-tool-bar>
|
|
113
113
|
<xl-query-page-table v-show="params.view != 'chart'" :ref="refs.table" :api="api" :params="params"
|
|
114
114
|
v-bind="$props" :summary-method="summaryMethod?summaryMethod:()=>({0:total})" :sort-change="(data) => api.sort(data)">
|
|
115
|
-
<
|
|
115
|
+
<template v-for="col in columns" :key="col.prop">
|
|
116
|
+
<template v-if="!col.hidden">
|
|
117
|
+
<!-- 支持通过 slot 属性使用插槽 -->
|
|
118
|
+
<slot
|
|
119
|
+
v-if="col.slot"
|
|
120
|
+
:name="col.slot"
|
|
121
|
+
/>
|
|
122
|
+
<!-- 支持直接指定组件引用 -->
|
|
123
|
+
<component
|
|
124
|
+
v-else-if="col.component"
|
|
125
|
+
:is="col.component"
|
|
126
|
+
/>
|
|
127
|
+
<!-- 内置类型组件 -->
|
|
128
|
+
<xl-datetime-col
|
|
129
|
+
v-else-if="col.type === 'datetime'"
|
|
130
|
+
:l="col.label"
|
|
131
|
+
:p="col.prop"
|
|
132
|
+
/>
|
|
133
|
+
<xl-map-col
|
|
134
|
+
v-else-if="col.type === 'map'"
|
|
135
|
+
:l="col.label"
|
|
136
|
+
:p="col.prop"
|
|
137
|
+
:width="col.width"
|
|
138
|
+
:map="col.map"
|
|
139
|
+
/>
|
|
140
|
+
<xl-status-col
|
|
141
|
+
v-else-if="col.type === 'status'"
|
|
142
|
+
:l="col.label"
|
|
143
|
+
:p="col.prop"
|
|
144
|
+
:map="col.map"
|
|
145
|
+
/>
|
|
146
|
+
<xl-review-col
|
|
147
|
+
v-else-if="col.type === 'review'"
|
|
148
|
+
:l="col.label"
|
|
149
|
+
:p="col.prop"
|
|
150
|
+
/>
|
|
151
|
+
<xl-clamp-col
|
|
152
|
+
v-else-if="col.type === 'clamp'"
|
|
153
|
+
:l="col.label"
|
|
154
|
+
:p="col.prop"
|
|
155
|
+
:width="col.width"
|
|
156
|
+
/>
|
|
157
|
+
<xl-bool-col
|
|
158
|
+
v-else-if="col.type === 'bool'"
|
|
159
|
+
:l="col.label"
|
|
160
|
+
:p="col.prop"
|
|
161
|
+
:width="col.width"
|
|
162
|
+
/>
|
|
163
|
+
<!-- 默认列组件 -->
|
|
164
|
+
<xl-col
|
|
165
|
+
v-else
|
|
166
|
+
:l="col.label"
|
|
167
|
+
:p="col.prop"
|
|
168
|
+
:width="col.width"
|
|
169
|
+
/>
|
|
170
|
+
</template>
|
|
171
|
+
</template>
|
|
116
172
|
<slot name="columns" />
|
|
117
173
|
</xl-query-page-table>
|
|
118
|
-
<!-- <xl-chart v-show="params.view == 'chart'" :options="chartOptions" /> -->
|
|
119
174
|
<xl-data-form-dialog
|
|
120
175
|
:ref="refs.editDialog"
|
|
121
176
|
:chinese="chinese"
|
|
@@ -12,8 +12,19 @@ const props = defineProps({
|
|
|
12
12
|
<template>
|
|
13
13
|
<template v-for="col in columns" :key="col.prop">
|
|
14
14
|
<template v-if="!col.hidden">
|
|
15
|
+
<!-- 支持通过 slot 属性使用插槽 -->
|
|
16
|
+
<slot
|
|
17
|
+
v-if="col.slot"
|
|
18
|
+
:name="col.slot"
|
|
19
|
+
/>
|
|
20
|
+
<!-- 支持直接指定组件引用 -->
|
|
21
|
+
<component
|
|
22
|
+
v-else-if="col.component"
|
|
23
|
+
:is="col.component"
|
|
24
|
+
/>
|
|
25
|
+
<!-- 内置类型组件 -->
|
|
15
26
|
<xl-datetime-col
|
|
16
|
-
v-if="col.type === 'datetime'"
|
|
27
|
+
v-else-if="col.type === 'datetime'"
|
|
17
28
|
:l="col.label"
|
|
18
29
|
:p="col.prop"
|
|
19
30
|
/>
|
|
@@ -47,13 +58,7 @@ const props = defineProps({
|
|
|
47
58
|
:p="col.prop"
|
|
48
59
|
:width="col.width"
|
|
49
60
|
/>
|
|
50
|
-
|
|
51
|
-
v-else-if="col.type"
|
|
52
|
-
:is="`xl-${col.type}-col`"
|
|
53
|
-
:l="col.label"
|
|
54
|
-
:p="col.prop"
|
|
55
|
-
:width="col.width"
|
|
56
|
-
/>
|
|
61
|
+
<!-- 默认列组件 -->
|
|
57
62
|
<xl-col
|
|
58
63
|
v-else
|
|
59
64
|
:l="col.label"
|