Commit 22ec4b6534ff5c57b3e4432654d4e85e34381ccc

Authored by 刘汉宸
1 parent 1403b7c0

fix: 修复SchemaSelect和Table传值

packages/schema-select/index.vue
@@ -42,7 +42,7 @@ @@ -42,7 +42,7 @@
42 :schema="selectSchema" 42 :schema="selectSchema"
43 :size="selectSize" 43 :size="selectSize"
44 :auto="auto" 44 :auto="auto"
45 - :api-search="apiSearch" 45 + :api-search="e => apiSearch(query, e)"
46 > 46 >
47 <template v-for="(item, index) in tableColumns" #[`table-cell-${item.prop}`]="{ value }"> 47 <template v-for="(item, index) in tableColumns" #[`table-cell-${item.prop}`]="{ value }">
48 <cell-highlight v-if="highlight" :value="value" :keyword="query" :key="index"></cell-highlight> 48 <cell-highlight v-if="highlight" :value="value" :keyword="query" :key="index"></cell-highlight>
packages/table/normal.vue
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <el-table-column v-bind="item" :key="index"> 5 <el-table-column v-bind="item" :key="index">
6 <slot :name="`header-${item.prop}`" slot="header"></slot> 6 <slot :name="`header-${item.prop}`" slot="header"></slot>
7 <template v-if="$scopedSlots[`cell-${item.prop}`]" #default="{ row, column, $index }"> 7 <template v-if="$scopedSlots[`cell-${item.prop}`]" #default="{ row, column, $index }">
8 - <slot :name="`cell-${item.prop}`" :value="row[column.property]" :row="row" :index="$index"></slot> 8 + <slot :name="`cell-${item.prop}`" :value="get(row, item.prop)" :row="row" :column="column" :index="$index"></slot>
9 </template> 9 </template>
10 <template v-else-if="item.render && typeof item.render === 'function'" #default="{ row, column, $index }"> 10 <template v-else-if="item.render && typeof item.render === 'function'" #default="{ row, column, $index }">
11 <cell-render :item="item" :value="get(row, item.prop)" :row="row" :column="column" :index="$index"></cell-render> 11 <cell-render :item="item" :value="get(row, item.prop)" :row="row" :column="column" :index="$index"></cell-render>