@xuekl/cli-components 1.2.1 → 1.2.3
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/PaddingBox.vue +27 -8
- package/XklTable.vue +4 -2
- package/package.json +1 -1
package/PaddingBox.vue
CHANGED
|
@@ -1,19 +1,38 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="padding-box">
|
|
3
|
-
<
|
|
2
|
+
<div class="padding-box" :class="['pb-' + (padding || 22)]">
|
|
3
|
+
<div class="content">
|
|
4
|
+
<slot></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="end">
|
|
7
|
+
<slot name="end"></slot>
|
|
8
|
+
</div>
|
|
9
|
+
|
|
4
10
|
</div>
|
|
5
11
|
</template>
|
|
6
12
|
<script lang="ts">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@Options({
|
|
13
|
+
export default {
|
|
10
14
|
name: 'PaddingBox'
|
|
11
|
-
}
|
|
12
|
-
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
const props = defineProps(['padding'])
|
|
19
|
+
const { padding } = props
|
|
13
20
|
</script>
|
|
14
21
|
|
|
15
22
|
<style lang="scss" scoped>
|
|
16
23
|
.padding-box {
|
|
17
|
-
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
|
|
27
|
+
.content {
|
|
28
|
+
flex: 1;
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.end {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
}
|
|
18
37
|
}
|
|
19
38
|
</style>
|
package/XklTable.vue
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-table ref="XklTable" :data="table.list" style="width: 100%" :header-cell-style="
|
|
2
|
+
<el-table ref="XklTable" :data="table.list" style="width: 100%" :header-cell-style="table.headerCellStyle || {
|
|
3
|
+
'backgroundColor': '#f5f7f9'
|
|
4
|
+
}" :header-cell-class-name="table.headerCellClassName" :cell-class-name="table.cellClassName">
|
|
3
5
|
<el-table-column v-if="table.selection" v-bind="table.selectionConfig" type="selection"
|
|
4
6
|
align="center"></el-table-column>
|
|
5
7
|
<el-table-column v-if="table.index" type="index" align="center" v-bind="table.indexConfig"></el-table-column>
|
|
6
|
-
<el-table-column v-for="item
|
|
8
|
+
<el-table-column v-for=" item in table.columns " :key="item.prop" :prop="item.prop" :label="item.label"
|
|
7
9
|
:width="item.width" :align="item.align || 'center'" :sortable="item.sortable" v-bind="item.element">
|
|
8
10
|
<template v-if="item.reflect" v-slot="{ row }">
|
|
9
11
|
{{ row[item.reflect] }}
|