cosey 0.3.12 → 0.3.14

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.
@@ -150,6 +150,7 @@ export interface TableSlots {
150
150
  'toolbar-left'?: (props: Record<string, never>) => any;
151
151
  'toolbar-right'?: (props: Record<string, never>) => any;
152
152
  'before-table'?: (props: Record<string, never>) => any;
153
+ 'stats-table'?: (props: Record<string, never>) => any;
153
154
  }
154
155
  export declare const elSlotsName: readonly ["default", "append", "empty"];
155
156
  export interface TableCustomExpose {
@@ -1,4 +1,4 @@
1
- import { defineComponent, useSlots, unref, computed, ref, useTemplateRef, mergeProps, watch, onMounted, onBeforeUnmount, resolveComponent, resolveDirective, withDirectives, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createElementVNode, createVNode, createBlock, renderSlot, withCtx, createSlots, Fragment, renderList, Teleport, vShow, normalizeProps, guardReactiveProps } from 'vue';
1
+ import { defineComponent, useSlots, unref, computed, ref, useTemplateRef, mergeProps, watch, onMounted, onBeforeUnmount, resolveComponent, resolveDirective, withDirectives, createElementBlock, openBlock, normalizeStyle, normalizeClass, createCommentVNode, createElementVNode, createVNode, renderSlot, createBlock, withCtx, createSlots, Fragment, renderList, Teleport, vShow, normalizeProps, guardReactiveProps } from 'vue';
2
2
  import { merge, cloneDeep, get } from 'lodash-es';
3
3
  import { reactiveComputed, reactiveOmit } from '@vueuse/core';
4
4
  import { useNamespace, useZIndex, ElButton, Mousewheel } from 'element-plus';
@@ -123,6 +123,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
123
123
  };
124
124
  const flattedColumns = computed(() => flatColumns(props.columns));
125
125
  const tableData = ref(props.data || []);
126
+ watch(() => props.data, () => {
127
+ tableData.value = props.data || [];
128
+ });
126
129
  const tableDataWithSummary = computed(() => {
127
130
  const columns = flattedColumns.value.map(column => {
128
131
  return {
@@ -473,7 +476,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
473
476
  key: 1,
474
477
  class: normalizeClass(`${unref(prefixCls)}-before-table`)
475
478
  }, [renderSlot(_ctx.$slots, "before-table")], 2
476
- /* CLASS */)) : createCommentVNode("v-if", true), createElementVNode("div", {
479
+ /* CLASS */)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "stats-table"), createElementVNode("div", {
477
480
  class: normalizeClass(`${unref(prefixCls)}-table`)
478
481
  }, [createVNode(_component_el_table, mergeProps({
479
482
  ref_key: "elTableRef",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cosey",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "基于 Vue3 + vite 的后台管理系统框架",
5
5
  "type": "module",
6
6
  "main": "index.js",