pro-design-vue 1.4.2 → 1.4.5

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,4 +1,4 @@
1
- /*! Pro Design Vue v1.4.2 */
1
+ /*! Pro Design Vue v1.4.5 */
2
2
 
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('ant-design-vue'), require('vue'), require('ant-design-vue/es/locale/zh_CN.js')) :
@@ -32,7 +32,7 @@
32
32
  const DEFAULT_NAMESPACE = "pro";
33
33
  const DEFAULT_LOCALE = "zh-CN";
34
34
 
35
- const version$1 = "1.4.2";
35
+ const version$1 = "1.4.5";
36
36
 
37
37
  const makeInstaller = (components = []) => {
38
38
  const install = (app) => {
@@ -38236,7 +38236,11 @@
38236
38236
  return (_a2 = tableRef.value) == null ? void 0 : _a2.appendCellToSelectedRange(params);
38237
38237
  },
38238
38238
  reload,
38239
- reset,
38239
+ reset: () => {
38240
+ var _a2;
38241
+ reset();
38242
+ (_a2 = formAction.value) == null ? void 0 : _a2.reset();
38243
+ },
38240
38244
  calcTableHeight,
38241
38245
  formAction: vue.computed(() => {
38242
38246
  return vue.unref(formAction.value);
@@ -38852,7 +38856,8 @@
38852
38856
  tabList: { type: Array, required: false, default: () => [] },
38853
38857
  onTabChange: { type: null, required: false },
38854
38858
  tabProps: { type: Object, required: false },
38855
- loading: { type: [Boolean, Object], required: false }
38859
+ loading: { type: [Boolean, Object], required: false, default: false },
38860
+ contentLoading: { type: [Boolean, Object], required: false, default: false }
38856
38861
  }, {
38857
38862
  "activeKey": { type: null },
38858
38863
  "activeKeyModifiers": {}
@@ -38861,15 +38866,13 @@
38861
38866
  setup(__props) {
38862
38867
  const slots = vue.useSlots();
38863
38868
  const prefixCls = usePrefixCls("page");
38864
- const headerHeight = vue.ref(0);
38865
38869
  const footerHeight = vue.ref(0);
38866
- const tabsHeight = vue.ref(0);
38870
+ const contentHeight = vue.ref(0);
38867
38871
  const shouldAutoHeight = vue.ref(false);
38868
38872
  const { contentOffsetTop, page } = useProConfigInject();
38869
38873
  const tabActiveKey = vue.useModel(__props, "activeKey");
38870
- const headerRef = vue.useTemplateRef("header");
38871
38874
  const footerRef = vue.useTemplateRef("footer");
38872
- const tabsRef = vue.useTemplateRef("tabs");
38875
+ const contentRef = vue.useTemplateRef("content");
38873
38876
  const mergeContentPadding = vue.computed(() => {
38874
38877
  var _a;
38875
38878
  return __props.contentPadding || ((_a = page == null ? void 0 : page.value) == null ? void 0 : _a.contentPadding) || 16;
@@ -38920,7 +38923,7 @@
38920
38923
  var _a, _b;
38921
38924
  if (mergeAutoContentHeight.value) {
38922
38925
  return {
38923
- height: `calc(var(${CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT}) - ${headerHeight.value}px - ${tabsHeight.value}px - ${typeof __props.heightOffset === "number" ? `${__props.heightOffset}px` : __props.heightOffset})`,
38926
+ height: `calc(${contentHeight.value}px - ${typeof __props.heightOffset === "number" ? `${__props.heightOffset}px` : __props.heightOffset})`,
38924
38927
  overflowY: shouldAutoHeight.value ? "auto" : "unset",
38925
38928
  padding: `${mergeContentPadding.value || 0}px`,
38926
38929
  ...(_a = page == null ? void 0 : page.value) == null ? void 0 : _a.contentStyle,
@@ -38933,6 +38936,22 @@
38933
38936
  ...__props.contentStyle
38934
38937
  };
38935
38938
  });
38939
+ const loadingProps = vue.computed(() => {
38940
+ if (typeof __props.loading === "boolean") {
38941
+ return {
38942
+ spinning: __props.loading
38943
+ };
38944
+ }
38945
+ return __props.loading;
38946
+ });
38947
+ const contentLoadingProps = vue.computed(() => {
38948
+ if (typeof __props.contentLoading === "boolean") {
38949
+ return {
38950
+ spinning: __props.contentLoading
38951
+ };
38952
+ }
38953
+ return __props.contentLoading;
38954
+ });
38936
38955
  const mergeTabsProps = vue.computed(
38937
38956
  () => {
38938
38957
  var _a;
@@ -38945,9 +38964,9 @@
38945
38964
  return;
38946
38965
  }
38947
38966
  await vue.nextTick();
38948
- headerHeight.value = ((_a = headerRef.value) == null ? void 0 : _a.offsetHeight) || 0;
38949
- footerHeight.value = ((_b = footerRef.value) == null ? void 0 : _b.offsetHeight) || 0;
38950
- tabsHeight.value = ((_c = tabsRef.value) == null ? void 0 : _c.offsetHeight) || 0;
38967
+ await vue.nextTick();
38968
+ footerHeight.value = ((_a = footerRef.value) == null ? void 0 : _a.offsetHeight) || 0;
38969
+ contentHeight.value = window.innerHeight - (((_c = (_b = contentRef.value) == null ? void 0 : _b.getBoundingClientRect()) == null ? void 0 : _c.top) || 0) - footerHeight.value;
38951
38970
  setTimeout(() => {
38952
38971
  shouldAutoHeight.value = true;
38953
38972
  }, 30);
@@ -38964,7 +38983,7 @@
38964
38983
  calcContentHeight();
38965
38984
  });
38966
38985
  return (_ctx, _cache) => {
38967
- var _a, _b, _c, _d, _e, _f, _g, _h;
38986
+ var _a, _b;
38968
38987
  return vue.openBlock(), vue.createElementBlock(
38969
38988
  "div",
38970
38989
  {
@@ -38972,131 +38991,162 @@
38972
38991
  style: vue.normalizeStyle((_b = vue.unref(page)) == null ? void 0 : _b.pageStyle)
38973
38992
  },
38974
38993
  [
38975
- _ctx.$slots.header || _ctx.description || _ctx.$slots.description || _ctx.title || _ctx.$slots.title || _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock(
38976
- "div",
38977
- {
38978
- key: 0,
38979
- ref: "header",
38980
- class: vue.normalizeClass(headerCls.value)
38981
- },
38982
- [
38983
- vue.renderSlot(_ctx.$slots, "header", {}, () => [
38984
- vue.createElementVNode(
38985
- "div",
38986
- {
38987
- class: vue.normalizeClass(`${vue.unref(prefixCls)}-header-wrap`)
38988
- },
38989
- [
38990
- vue.renderSlot(_ctx.$slots, "title", {}, () => [
38991
- _ctx.title ? (vue.openBlock(), vue.createElementBlock(
38992
- "div",
38993
- {
38994
- key: 0,
38995
- class: vue.normalizeClass(`${vue.unref(prefixCls)}-title`)
38996
- },
38997
- vue.toDisplayString(_ctx.title),
38998
- 3
38999
- /* TEXT, CLASS */
39000
- )) : vue.createCommentVNode("v-if", true)
39001
- ]),
39002
- vue.renderSlot(_ctx.$slots, "description", {}, () => [
39003
- _ctx.description ? (vue.openBlock(), vue.createElementBlock(
39004
- "p",
39005
- {
39006
- key: 0,
39007
- class: vue.normalizeClass(`${vue.unref(prefixCls)}-description`)
39008
- },
39009
- vue.toDisplayString(_ctx.description),
39010
- 3
39011
- /* TEXT, CLASS */
39012
- )) : vue.createCommentVNode("v-if", true)
39013
- ])
39014
- ],
39015
- 2
39016
- /* CLASS */
39017
- ),
39018
- _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
39019
- vue.renderSlot(_ctx.$slots, "extra")
39020
- ])) : vue.createCommentVNode("v-if", true)
39021
- ])
39022
- ],
39023
- 2
39024
- /* CLASS */
39025
- )) : vue.createCommentVNode("v-if", true),
39026
- ((_c = _ctx.tabList) == null ? void 0 : _c.length) ? (vue.openBlock(), vue.createElementBlock(
39027
- "div",
39028
- {
39029
- key: 1,
39030
- ref: "tabs",
39031
- class: vue.normalizeClass(`${vue.unref(prefixCls)}-tabs`)
39032
- },
39033
- [
39034
- vue.createVNode(vue.unref(antDesignVue.Tabs), vue.mergeProps({
39035
- activeKey: tabActiveKey.value,
39036
- "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => tabActiveKey.value = $event)
39037
- }, mergeTabsProps.value, { "tab-position": "top" }), {
39038
- default: vue.withCtx(() => [
39039
- (vue.openBlock(true), vue.createElementBlock(
39040
- vue.Fragment,
39041
- null,
39042
- vue.renderList(_ctx.tabList, (tab) => {
39043
- return vue.openBlock(), vue.createBlock(
39044
- vue.unref(antDesignVue.TabPane),
39045
- vue.mergeProps({
39046
- key: tab.key,
39047
- ref_for: true
39048
- }, tab),
39049
- null,
39050
- 16
39051
- /* FULL_PROPS */
39052
- );
39053
- }),
39054
- 128
39055
- /* KEYED_FRAGMENT */
39056
- ))
39057
- ]),
39058
- _: 1
39059
- /* STABLE */
39060
- }, 16, ["activeKey"])
39061
- ],
39062
- 2
39063
- /* CLASS */
39064
- )) : vue.createCommentVNode("v-if", true),
39065
- vue.createElementVNode(
39066
- "div",
38994
+ vue.createVNode(
38995
+ vue.unref(antDesignVue.Spin),
38996
+ vue.normalizeProps(vue.guardReactiveProps(loadingProps.value)),
39067
38997
  {
39068
- class: vue.normalizeClass(contentCls.value),
39069
- style: vue.normalizeStyle(contentStyles.value)
39070
- },
39071
- [
39072
- vue.renderSlot(_ctx.$slots, "default", {
39073
- activeKey: (_e = tabActiveKey.value) != null ? _e : (_d = _ctx.tabList[0]) == null ? void 0 : _d.key,
39074
- offset: offset.value
38998
+ default: vue.withCtx(() => {
38999
+ var _a2;
39000
+ return [
39001
+ _ctx.$slots.header || _ctx.description || _ctx.$slots.description || _ctx.title || _ctx.$slots.title || _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock(
39002
+ "div",
39003
+ {
39004
+ key: 0,
39005
+ ref: "header",
39006
+ class: vue.normalizeClass(headerCls.value)
39007
+ },
39008
+ [
39009
+ vue.renderSlot(_ctx.$slots, "header", {}, () => [
39010
+ vue.createElementVNode(
39011
+ "div",
39012
+ {
39013
+ class: vue.normalizeClass(`${vue.unref(prefixCls)}-header-wrap`)
39014
+ },
39015
+ [
39016
+ vue.renderSlot(_ctx.$slots, "title", {}, () => [
39017
+ _ctx.title ? (vue.openBlock(), vue.createElementBlock(
39018
+ "div",
39019
+ {
39020
+ key: 0,
39021
+ class: vue.normalizeClass(`${vue.unref(prefixCls)}-title`)
39022
+ },
39023
+ vue.toDisplayString(_ctx.title),
39024
+ 3
39025
+ /* TEXT, CLASS */
39026
+ )) : vue.createCommentVNode("v-if", true)
39027
+ ]),
39028
+ vue.renderSlot(_ctx.$slots, "description", {}, () => [
39029
+ _ctx.description ? (vue.openBlock(), vue.createElementBlock(
39030
+ "p",
39031
+ {
39032
+ key: 0,
39033
+ class: vue.normalizeClass(`${vue.unref(prefixCls)}-description`)
39034
+ },
39035
+ vue.toDisplayString(_ctx.description),
39036
+ 3
39037
+ /* TEXT, CLASS */
39038
+ )) : vue.createCommentVNode("v-if", true)
39039
+ ])
39040
+ ],
39041
+ 2
39042
+ /* CLASS */
39043
+ ),
39044
+ _ctx.$slots.extra ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
39045
+ vue.renderSlot(_ctx.$slots, "extra")
39046
+ ])) : vue.createCommentVNode("v-if", true)
39047
+ ])
39048
+ ],
39049
+ 2
39050
+ /* CLASS */
39051
+ )) : vue.createCommentVNode("v-if", true),
39052
+ ((_a2 = _ctx.tabList) == null ? void 0 : _a2.length) ? (vue.openBlock(), vue.createElementBlock(
39053
+ "div",
39054
+ {
39055
+ key: 1,
39056
+ ref: "tabs",
39057
+ class: vue.normalizeClass(`${vue.unref(prefixCls)}-tabs`)
39058
+ },
39059
+ [
39060
+ vue.createVNode(vue.unref(antDesignVue.Tabs), vue.mergeProps({
39061
+ activeKey: tabActiveKey.value,
39062
+ "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => tabActiveKey.value = $event)
39063
+ }, mergeTabsProps.value, { "tab-position": "top" }), {
39064
+ default: vue.withCtx(() => [
39065
+ (vue.openBlock(true), vue.createElementBlock(
39066
+ vue.Fragment,
39067
+ null,
39068
+ vue.renderList(_ctx.tabList, (tab) => {
39069
+ return vue.openBlock(), vue.createBlock(
39070
+ vue.unref(antDesignVue.TabPane),
39071
+ vue.mergeProps({
39072
+ key: tab.key,
39073
+ ref_for: true
39074
+ }, tab),
39075
+ null,
39076
+ 16
39077
+ /* FULL_PROPS */
39078
+ );
39079
+ }),
39080
+ 128
39081
+ /* KEYED_FRAGMENT */
39082
+ ))
39083
+ ]),
39084
+ _: 1
39085
+ /* STABLE */
39086
+ }, 16, ["activeKey"])
39087
+ ],
39088
+ 2
39089
+ /* CLASS */
39090
+ )) : vue.createCommentVNode("v-if", true),
39091
+ vue.createVNode(
39092
+ vue.unref(antDesignVue.Spin),
39093
+ vue.normalizeProps(vue.guardReactiveProps(contentLoadingProps.value)),
39094
+ {
39095
+ default: vue.withCtx(() => {
39096
+ var _a3, _b2, _c, _d, _e;
39097
+ return [
39098
+ vue.createElementVNode(
39099
+ "div",
39100
+ {
39101
+ ref: "content",
39102
+ class: vue.normalizeClass(contentCls.value),
39103
+ style: vue.normalizeStyle(contentStyles.value)
39104
+ },
39105
+ [
39106
+ vue.renderSlot(_ctx.$slots, "default", {
39107
+ activeKey: (_b2 = tabActiveKey.value) != null ? _b2 : (_a3 = _ctx.tabList[0]) == null ? void 0 : _a3.key,
39108
+ offset: offset.value
39109
+ }),
39110
+ ((_c = _ctx.tabList) == null ? void 0 : _c.length) ? vue.renderSlot(_ctx.$slots, "tabs", {
39111
+ key: 0,
39112
+ activeKey: (_e = tabActiveKey.value) != null ? _e : (_d = _ctx.tabList[0]) == null ? void 0 : _d.key,
39113
+ offset: offset.value
39114
+ }, () => [
39115
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tabComp.value)))
39116
+ ]) : vue.createCommentVNode("v-if", true)
39117
+ ],
39118
+ 6
39119
+ /* CLASS, STYLE */
39120
+ )
39121
+ ];
39122
+ }),
39123
+ _: 3
39124
+ /* FORWARDED */
39125
+ },
39126
+ 16
39127
+ /* FULL_PROPS */
39128
+ ),
39129
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock(
39130
+ "div",
39131
+ {
39132
+ key: 2,
39133
+ ref: "footer",
39134
+ class: vue.normalizeClass(footerCls.value)
39135
+ },
39136
+ [
39137
+ vue.renderSlot(_ctx.$slots, "footer")
39138
+ ],
39139
+ 2
39140
+ /* CLASS */
39141
+ )) : vue.createCommentVNode("v-if", true)
39142
+ ];
39075
39143
  }),
39076
- ((_f = _ctx.tabList) == null ? void 0 : _f.length) ? vue.renderSlot(_ctx.$slots, "tabs", {
39077
- key: 0,
39078
- activeKey: (_h = tabActiveKey.value) != null ? _h : (_g = _ctx.tabList[0]) == null ? void 0 : _g.key,
39079
- offset: offset.value
39080
- }, () => [
39081
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(tabComp.value)))
39082
- ]) : vue.createCommentVNode("v-if", true)
39083
- ],
39084
- 6
39085
- /* CLASS, STYLE */
39086
- ),
39087
- _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock(
39088
- "div",
39089
- {
39090
- key: 2,
39091
- ref: "footer",
39092
- class: vue.normalizeClass(footerCls.value)
39144
+ _: 3
39145
+ /* FORWARDED */
39093
39146
  },
39094
- [
39095
- vue.renderSlot(_ctx.$slots, "footer")
39096
- ],
39097
- 2
39098
- /* CLASS */
39099
- )) : vue.createCommentVNode("v-if", true)
39147
+ 16
39148
+ /* FULL_PROPS */
39149
+ )
39100
39150
  ],
39101
39151
  6
39102
39152
  /* CLASS, STYLE */