@xuekl/cli-components 1.0.9 → 1.1.1

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.
Files changed (2) hide show
  1. package/XklTable.vue +13 -2
  2. package/package.json +4 -1
package/XklTable.vue CHANGED
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <el-table ref="XklTable" :data="table.list" style="width: 100%" :header-cell-style="{ background: '#F1F4F9' }">
3
- <el-table-column v-if="table.selection" type="selection" align="center"></el-table-column>
3
+ <el-table-column v-if="table.selection" v-bind="table.selectionConfig" type="selection"
4
+ align="center"></el-table-column>
4
5
  <el-table-column v-if="table.index" type="index" align="center" v-bind="table.indexConfig"></el-table-column>
5
6
  <el-table-column v-for="item in table.columns" :key="item.prop" :prop="item.prop" :label="item.label"
6
7
  :width="item.width" :align="item.align || 'center'" :sortable="item.sortable">
@@ -41,11 +42,12 @@ export default {
41
42
  </script>
42
43
  <script setup lang="ts">
43
44
  import http from "@/utils/httpRequest"
44
- import { computed } from "vue";
45
+ import { computed, ref } from "vue";
45
46
  const props = defineProps(['table'])
46
47
  const { table } = props
47
48
  const dictTypes = table.columns.map(res => res.dict).filter(res => !!res)
48
49
  const dictStore = {}
50
+ const XklTable = ref(null)
49
51
 
50
52
  dictTypes.forEach((dict: string) => {
51
53
  http({
@@ -83,4 +85,13 @@ const tagColor = computed(() => {
83
85
  }
84
86
  })
85
87
 
88
+ const getRef = () => {
89
+ return XklTable.value
90
+ }
91
+
92
+ defineExpose({
93
+ getRef
94
+ })
95
+
96
+
86
97
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuekl/cli-components",
3
- "version": "1.0.9",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "main": "index.ts",
6
6
  "scripts": {
@@ -11,5 +11,8 @@
11
11
  "license": "ISC",
12
12
  "publishConfig": {
13
13
  "access": "public"
14
+ },
15
+ "dependencies": {
16
+ "@xuekl/cli-base": "^1.2.6"
14
17
  }
15
18
  }