@qin-ui/antd-vue-pro 1.0.20 → 1.0.21

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.
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, provide, renderSlot } from "vue";
2
2
  import "ant-design-vue";
3
3
  import { I as INJECT_COMPONENT_PROPS_KEYS } from "../form/index-2b6aeb25.js";
4
+ import { PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS } from "../table/index.js";
4
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
6
  __name: "index",
6
7
  props: {
@@ -10,7 +11,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
11
  const props = __props;
11
12
  if (props.componentVars) {
12
13
  Object.values(props.componentVars).forEach((item) => {
13
- const injectKeys = { ...INJECT_COMPONENT_PROPS_KEYS };
14
+ const injectKeys = {
15
+ ...INJECT_COMPONENT_PROPS_KEYS,
16
+ ...PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS
17
+ };
14
18
  Object.entries(item).forEach(([key, value]) => {
15
19
  if (Object.hasOwn(injectKeys, key)) {
16
20
  provide(injectKeys[key], value);
package/es/index.d.ts CHANGED
@@ -281,7 +281,7 @@ export declare type ComponentVars = {
281
281
  proForm?: Record<string, Record<string, any>>;
282
282
  proFormItems?: Record<string, Record<string, any>>;
283
283
  proFormField?: Partial<Record<keyof typeof INJECT_COMPONENT_PROPS_KEYS, Record<string, any>>>;
284
- proTable?: Partial<Record<keyof typeof INJECT_COMPONENT_PROPS_KEYS_2, Record<string, any>>>;
284
+ proTable?: Partial<Record<keyof typeof PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS, Record<string, any>>>;
285
285
  };
286
286
 
287
287
  /**
@@ -1911,12 +1911,6 @@ export declare const INJECT_COMPONENT_PROPS_KEYS: {
1911
1911
  transfer: symbol;
1912
1912
  };
1913
1913
 
1914
- declare const INJECT_COMPONENT_PROPS_KEYS_2: {
1915
- table: symbol;
1916
- searchForm: symbol;
1917
- control: symbol;
1918
- };
1919
-
1920
1914
  declare type InputNumberSlots = FieldSlot<'addonAfter' | 'addonBefore' | 'prefix' | 'upIcon' | 'downIcon'>;
1921
1915
 
1922
1916
  declare type InputSlots = FieldSlot<'addonAfter' | 'addonBefore' | 'clearIcon' | 'prefix' | 'suffix'>;
@@ -1961,6 +1955,14 @@ export declare type ParamCache = {
1961
1955
 
1962
1956
  export declare type PrependField = (path: string | undefined, field: Field) => void;
1963
1957
 
1958
+ export declare const PRO_TABLE_INIT_COMPONENT_PROPS_MAP: Map<symbol, {}>;
1959
+
1960
+ export declare const PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS: {
1961
+ table: symbol;
1962
+ searchForm: symbol;
1963
+ control: symbol;
1964
+ };
1965
+
1964
1966
  export declare const ProComponentProvider: SFCWithInstall<{
1965
1967
  new (...args: any[]): {
1966
1968
  $: ComponentInternalInstance;
package/es/index.js CHANGED
@@ -2,7 +2,7 @@ import "./style.css";
2
2
  import { _ as _sfc_main } from "./form/index-2b6aeb25.js";
3
3
  import { j, B, c, g, C, b, e, F, i, k, I, R, d, h, U, f, l, n, m, r, p, u, q, s } from "./form/index-2b6aeb25.js";
4
4
  import BaseTable from "./table/index.js";
5
- import { useTable } from "./table/index.js";
5
+ import { PRO_TABLE_INIT_COMPONENT_PROPS_MAP, PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS, useTable } from "./table/index.js";
6
6
  import _sfc_main$1 from "./component-provider/index.js";
7
7
  import "vue";
8
8
  import "ant-design-vue";
@@ -35,6 +35,8 @@ export {
35
35
  i as FunctionRegexp,
36
36
  k as INIT_COMPONENT_PROPS_MAP,
37
37
  I as INJECT_COMPONENT_PROPS_KEYS,
38
+ PRO_TABLE_INIT_COMPONENT_PROPS_MAP,
39
+ PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS,
38
40
  ProComponentProvider,
39
41
  ProForm,
40
42
  ProTable,
package/es/style.css CHANGED
@@ -41,11 +41,11 @@
41
41
  padding: 24px 24px 16px;
42
42
  background-color: #fff;
43
43
  }
44
- .pro-table[data-v-4ec30d1d] {
44
+ .pro-table[data-v-b15d517d] {
45
45
  display: flex;
46
46
  flex-direction: column;
47
47
  min-width: 800px;
48
48
  }
49
- .pro-table[data-v-4ec30d1d] .ant-pagination .ant-pagination-total-text {
49
+ .pro-table[data-v-b15d517d] .ant-pagination .ant-pagination-total-text {
50
50
  flex: 1;
51
51
  }
package/es/table/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, computed, watch, Fragment, renderList, withModifiers, renderSlot, useSlots, useAttrs, inject, onBeforeUnmount, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
1
+ import { createVNode, defineComponent, ref, onMounted, openBlock, createElementBlock, unref, normalizeStyle, createElementVNode, withCtx, createTextVNode, createBlock, toDisplayString, createCommentVNode, mergeModels, useModel, computed, watch, Fragment, renderList, withModifiers, renderSlot, useSlots, useAttrs, inject, onBeforeUnmount, mergeProps, createSlots, normalizeProps, guardReactiveProps, nextTick } from "vue";
2
2
  import { Button, Space, Dropdown, Menu, MenuItem, Checkbox, MenuDivider, Table } from "ant-design-vue";
3
3
  import { A as AntdIcon, _ as _sfc_main$6, a as _export_sfc, o as omit, b as _sfc_main$7, u as useForm } from "../form/index-2b6aeb25.js";
4
4
  var ColumnHeightOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M840 836H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm0-724H184c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h656c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM610.8 378c6 0 9.4-7 5.7-11.7L515.7 238.7a7.14 7.14 0 00-11.3 0L403.6 366.3a7.23 7.23 0 005.7 11.7H476v268h-62.8c-6 0-9.4 7-5.7 11.7l100.8 127.5c2.9 3.7 8.5 3.7 11.3 0l100.8-127.5c3.7-4.7.4-11.7-5.7-11.7H548V378h62.8z" } }] }, "name": "column-height", "theme": "outlined" };
@@ -188,13 +188,16 @@ const SearchForm_vue_vue_type_style_index_0_scoped_41c82259_lang = "";
188
188
  const SearchForm = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-41c82259"]]);
189
189
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
190
190
  __name: "Control",
191
- props: {
191
+ props: mergeModels({
192
192
  columns: {},
193
193
  table: { default: void 0 }
194
- },
194
+ }, {
195
+ "size": { default: "large" }
196
+ }),
197
+ emits: ["update:size"],
195
198
  setup(__props) {
196
199
  const props = __props;
197
- const size = defineModel("size", { default: "large" });
200
+ const size = useModel(__props, "size");
198
201
  const onSizeChange = (val) => {
199
202
  size.value = val.key;
200
203
  };
@@ -367,11 +370,17 @@ function _sfc_render(_ctx, _cache) {
367
370
  ]);
368
371
  }
369
372
  const DefaultControlContainer = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render], ["__scopeId", "data-v-1d26ef2f"]]);
370
- const INJECT_COMPONENT_PROPS_KEYS = {
373
+ const PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS = {
371
374
  "table": Symbol(""),
372
375
  "searchForm": Symbol(""),
373
376
  "control": Symbol("")
374
377
  };
378
+ const PROPS_KEYS = PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS;
379
+ const PRO_TABLE_INIT_COMPONENT_PROPS_MAP = /* @__PURE__ */ new Map([
380
+ [PROPS_KEYS.table, {}],
381
+ [PROPS_KEYS.searchForm, {}],
382
+ [PROPS_KEYS.control, {}]
383
+ ]);
375
384
  const _hoisted_1 = {
376
385
  key: 0,
377
386
  style: { "flex": "1" }
@@ -441,7 +450,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
441
450
  searchParam,
442
451
  setSearchParam
443
452
  } = table;
444
- const cache = props.paramCache ?? inject(INJECT_COMPONENT_PROPS_KEYS.table);
453
+ const injectProps = inject(
454
+ PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS.table
455
+ );
456
+ const cache = props.paramCache ?? (injectProps == null ? void 0 : injectProps.paramCache);
445
457
  if (cache) {
446
458
  setPagination({
447
459
  ...unref(pagination),
@@ -570,8 +582,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
570
582
  };
571
583
  }
572
584
  });
573
- const Table_vue_vue_type_style_index_0_scoped_4ec30d1d_lang = "";
574
- const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4ec30d1d"]]);
585
+ const Table_vue_vue_type_style_index_0_scoped_b15d517d_lang = "";
586
+ const BaseTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b15d517d"]]);
575
587
  const getDefaultPagination = () => ({ current: 1, pageSize: 10, total: 0 });
576
588
  const useTable = ({
577
589
  columns: initColumns = [],
@@ -625,6 +637,8 @@ const useTable = ({
625
637
  };
626
638
  };
627
639
  export {
640
+ PRO_TABLE_INIT_COMPONENT_PROPS_MAP,
641
+ PRO_TABLE_INJECT_COMPONENT_PROPS_KEYS,
628
642
  BaseTable as default,
629
643
  useTable
630
644
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qin-ui/antd-vue-pro",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "二次封装antd vue组件",
5
5
  "type": "module",
6
6
  "main": "",