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