first commit
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
import { SFCWithInstall } from "../../utils/vue/typescript.js";
|
||||
import "../../utils/index.js";
|
||||
import { PaginationEmits, PaginationProps, PaginationPropsPublic, _default, paginationEmits, paginationProps } from "./src/pagination.js";
|
||||
import { ElPaginationContext, elPaginationKey } from "./src/constants.js";
|
||||
|
||||
//#region ../../packages/components/pagination/index.d.ts
|
||||
declare const ElPagination: SFCWithInstall<typeof _default>;
|
||||
//#endregion
|
||||
export { ElPagination, ElPagination as default, ElPaginationContext, PaginationEmits, PaginationProps, PaginationPropsPublic, elPaginationKey, paginationEmits, paginationProps };
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_install = require('../../utils/vue/install.js');
|
||||
const require_constants = require('./src/constants.js');
|
||||
const require_pagination = require('./src/pagination.js');
|
||||
|
||||
//#region ../../packages/components/pagination/index.ts
|
||||
const ElPagination = require_install.withInstall(require_pagination.default);
|
||||
|
||||
//#endregion
|
||||
exports.ElPagination = ElPagination;
|
||||
exports.default = ElPagination;
|
||||
exports.elPaginationKey = require_constants.elPaginationKey;
|
||||
exports.paginationEmits = require_pagination.paginationEmits;
|
||||
exports.paginationProps = require_pagination.paginationProps;
|
||||
//# sourceMappingURL=index.js.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","names":["withInstall","Pagination"],"sources":["../../../../../packages/components/pagination/index.ts"],"sourcesContent":["import { withInstall } from '@element-plus/utils'\nimport Pagination from './src/pagination'\n\nimport type { SFCWithInstall } from '@element-plus/utils'\n\nexport const ElPagination: SFCWithInstall<typeof Pagination> =\n withInstall(Pagination)\nexport default ElPagination\n\nexport * from './src/pagination'\nexport * from './src/constants'\n"],"mappings":";;;;;;AAKA,MAAa,eACXA,4BAAYC,2BAAW"}
|
||||
Generated
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_size = require('../../../../constants/size.js');
|
||||
const require_runtime = require('../../../../utils/vue/props/runtime.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/jumper.ts
|
||||
const paginationJumperProps = require_runtime.buildProps({ size: {
|
||||
type: String,
|
||||
values: require_size.componentSizes
|
||||
} });
|
||||
|
||||
//#endregion
|
||||
exports.paginationJumperProps = paginationJumperProps;
|
||||
//# sourceMappingURL=jumper.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"jumper.js","names":["buildProps","componentSizes"],"sources":["../../../../../../../packages/components/pagination/src/components/jumper.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Jumper from './jumper.vue'\n\nexport const paginationJumperProps = buildProps({\n size: {\n type: String,\n values: componentSizes,\n },\n} as const)\n\nexport type PaginationJumperProps = ExtractPropTypes<\n typeof paginationJumperProps\n>\nexport type PaginationJumperPropsPublic = ExtractPublicPropTypes<\n typeof paginationJumperProps\n>\n\nexport type PaginationJumperInstance = InstanceType<typeof Jumper> & unknown\n"],"mappings":";;;;;AAMA,MAAa,wBAAwBA,2BAAW,EAC9C,MAAM;CACJ,MAAM;CACN,QAAQC;CACT,EACF,CAAU"}
|
||||
Generated
Vendored
+63
@@ -0,0 +1,63 @@
|
||||
const require_runtime = require('../../../../_virtual/_rolldown/runtime.js');
|
||||
const require_index = require('../../../../hooks/use-locale/index.js');
|
||||
const require_index$1 = require('../../../../hooks/use-namespace/index.js');
|
||||
const require_index$2 = require('../../../input/index.js');
|
||||
const require_usePagination = require('../usePagination.js');
|
||||
const require_jumper = require('./jumper.js');
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/jumper.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = ["disabled"];
|
||||
var jumper_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElPaginationJumper",
|
||||
__name: "jumper",
|
||||
props: require_jumper.paginationJumperProps,
|
||||
setup(__props) {
|
||||
const { t } = require_index.useLocale();
|
||||
const ns = require_index$1.useNamespace("pagination");
|
||||
const { pageCount, disabled, currentPage, changeEvent } = require_usePagination.usePagination();
|
||||
const userInput = (0, vue.ref)();
|
||||
const innerValue = (0, vue.computed)(() => userInput.value ?? currentPage?.value);
|
||||
function handleInput(val) {
|
||||
userInput.value = val ? +val : "";
|
||||
}
|
||||
function handleChange(val) {
|
||||
val = Math.trunc(+val);
|
||||
changeEvent?.(val);
|
||||
userInput.value = void 0;
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("jump")),
|
||||
disabled: (0, vue.unref)(disabled)
|
||||
}, [
|
||||
(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("goto")]) }, (0, vue.toDisplayString)((0, vue.unref)(t)("el.pagination.goto")), 3),
|
||||
(0, vue.createVNode)((0, vue.unref)(require_index$2.ElInput), {
|
||||
size: _ctx.size,
|
||||
class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("editor"), (0, vue.unref)(ns).is("in-pagination")]),
|
||||
min: 1,
|
||||
max: (0, vue.unref)(pageCount),
|
||||
disabled: (0, vue.unref)(disabled),
|
||||
"model-value": innerValue.value,
|
||||
"validate-event": false,
|
||||
"aria-label": (0, vue.unref)(t)("el.pagination.page"),
|
||||
type: "number",
|
||||
"onUpdate:modelValue": handleInput,
|
||||
onChange: handleChange
|
||||
}, null, 8, [
|
||||
"size",
|
||||
"class",
|
||||
"max",
|
||||
"disabled",
|
||||
"model-value",
|
||||
"aria-label"
|
||||
]),
|
||||
(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)([(0, vue.unref)(ns).e("classifier")]) }, (0, vue.toDisplayString)((0, vue.unref)(t)("el.pagination.pageClassifier")), 3)
|
||||
], 10, _hoisted_1);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = jumper_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=jumper.vue_vue_type_script_setup_true_lang.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"jumper.vue_vue_type_script_setup_true_lang.js","names":["size"],"sources":["../../../../../../../packages/components/pagination/src/components/jumper.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('jump')\" :disabled=\"disabled\">\n <span :class=\"[ns.e('goto')]\">{{ t('el.pagination.goto') }}</span>\n <el-input\n :size=\"size\"\n :class=\"[ns.e('editor'), ns.is('in-pagination')]\"\n :min=\"1\"\n :max=\"pageCount\"\n :disabled=\"disabled\"\n :model-value=\"innerValue\"\n :validate-event=\"false\"\n :aria-label=\"t('el.pagination.page')\"\n type=\"number\"\n @update:model-value=\"handleInput\"\n @change=\"handleChange\"\n />\n <span :class=\"[ns.e('classifier')]\">{{\n t('el.pagination.pageClassifier')\n }}</span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { usePagination } from '../usePagination'\nimport { paginationJumperProps } from './jumper'\n\ndefineOptions({\n name: 'ElPaginationJumper',\n})\n\ndefineProps(paginationJumperProps)\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst { pageCount, disabled, currentPage, changeEvent } = usePagination()\nconst userInput = ref<number | string>()\nconst innerValue = computed(() => userInput.value ?? currentPage?.value)\n\nfunction handleInput(val: number | string) {\n userInput.value = val ? +val : ''\n}\n\nfunction handleChange(val: number | string) {\n val = Math.trunc(+val)\n changeEvent?.(val)\n userInput.value = undefined\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;EAkCA,MAAM,EAAE,MAAM,yBAAU;EACxB,MAAM,KAAK,6BAAa,aAAY;EACpC,MAAM,EAAE,WAAW,UAAU,aAAa,gBAAgB,qCAAc;EACxE,MAAM,0BAAiC;EACvC,MAAM,qCAA4B,UAAU,SAAS,aAAa,MAAK;EAEvE,SAAS,YAAY,KAAsB;AACzC,aAAU,QAAQ,MAAM,CAAC,MAAM;;EAGjC,SAAS,aAAa,KAAsB;AAC1C,SAAM,KAAK,MAAM,CAAC,IAAG;AACrB,iBAAc,IAAG;AACjB,aAAU,QAAQ;;;4DA5BX,QAAA;IAlBA,8CAAO,GAAE,CAAC,EAAC,OAAA,CAAA;IAAW,yBAAU,SAAQ;;gCACqB,QAAA,EAA3D,+BAAK,gBAAG,GAAE,CAAC,EAAC,OAAA,CAAA,CAAA,4CAAc,EAAC,CAAA,qBAAA,CAAA,EAAA,EAAA;wCAahC,wBAAA,EAAA;KAXC,MAAMA,KAAAA;KACN,+BAAK,gBAAG,GAAE,CAAC,EAAC,SAAA,iBAAY,GAAE,CAAC,GAAE,gBAAA,CAAA,CAAA;KAC7B,KAAK;KACL,oBAAK,UAAS;KACd,yBAAU,SAAQ;KAClB,eAAa,WAAA;KACb,kBAAgB;KAChB,6BAAY,EAAC,CAAA,qBAAA;KACd,MAAK;KACJ,uBAAoB;KACpB,UAAQ;;;;;;;;;gCAIF,QAAA,EAFF,+BAAK,gBAAG,GAAE,CAAC,EAAC,aAAA,CAAA,CAAA,4CACjB,EAAC,CAAA,+BAAA,CAAA,EAAA,EAAA"}
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_jumper_vue_vue_type_script_setup_true_lang = require('./jumper.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/jumper.vue
|
||||
var jumper_default = require_jumper_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = jumper_default;
|
||||
//# sourceMappingURL=jumper2.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"jumper2.js","names":[],"sources":["../../../../../../../packages/components/pagination/src/components/jumper.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('jump')\" :disabled=\"disabled\">\n <span :class=\"[ns.e('goto')]\">{{ t('el.pagination.goto') }}</span>\n <el-input\n :size=\"size\"\n :class=\"[ns.e('editor'), ns.is('in-pagination')]\"\n :min=\"1\"\n :max=\"pageCount\"\n :disabled=\"disabled\"\n :model-value=\"innerValue\"\n :validate-event=\"false\"\n :aria-label=\"t('el.pagination.page')\"\n type=\"number\"\n @update:model-value=\"handleInput\"\n @change=\"handleChange\"\n />\n <span :class=\"[ns.e('classifier')]\">{{\n t('el.pagination.pageClassifier')\n }}</span>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref } from 'vue'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport ElInput from '@element-plus/components/input'\nimport { usePagination } from '../usePagination'\nimport { paginationJumperProps } from './jumper'\n\ndefineOptions({\n name: 'ElPaginationJumper',\n})\n\ndefineProps(paginationJumperProps)\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst { pageCount, disabled, currentPage, changeEvent } = usePagination()\nconst userInput = ref<number | string>()\nconst innerValue = computed(() => userInput.value ?? currentPage?.value)\n\nfunction handleInput(val: number | string) {\n userInput.value = val ? +val : ''\n}\n\nfunction handleChange(val: number | string) {\n val = Math.trunc(+val)\n changeEvent?.(val)\n userInput.value = undefined\n}\n</script>\n"],"mappings":""}
|
||||
Generated
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../../utils/vue/props/runtime.js');
|
||||
const require_icon = require('../../../../utils/vue/icon.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/next.ts
|
||||
const paginationNextProps = require_runtime.buildProps({
|
||||
disabled: Boolean,
|
||||
currentPage: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
pageCount: {
|
||||
type: Number,
|
||||
default: 50
|
||||
},
|
||||
nextText: { type: String },
|
||||
nextIcon: { type: require_icon.iconPropType }
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.paginationNextProps = paginationNextProps;
|
||||
//# sourceMappingURL=next.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"next.js","names":["buildProps","iconPropType"],"sources":["../../../../../../../packages/components/pagination/src/components/next.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Next from './next.vue'\n\nexport const paginationNextProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n default: 50,\n },\n nextText: {\n type: String,\n },\n nextIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport type PaginationNextProps = ExtractPropTypes<typeof paginationNextProps>\nexport type PaginationNextPropsPublic = ExtractPublicPropTypes<\n typeof paginationNextProps\n>\n\nexport type NextInstance = InstanceType<typeof Next> & unknown\n"],"mappings":";;;;;AAKA,MAAa,sBAAsBA,2BAAW;CAC5C,UAAU;CACV,aAAa;EACX,MAAM;EACN,SAAS;EACV;CACD,WAAW;EACT,MAAM;EACN,SAAS;EACV;CACD,UAAU,EACR,MAAM,QACP;CACD,UAAU,EACR,MAAMC,2BACP;CACF,CAAU"}
|
||||
Generated
Vendored
+41
@@ -0,0 +1,41 @@
|
||||
const require_runtime = require('../../../../_virtual/_rolldown/runtime.js');
|
||||
const require_index = require('../../../../hooks/use-locale/index.js');
|
||||
const require_index$1 = require('../../../icon/index.js');
|
||||
const require_next = require('./next.js');
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/next.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = [
|
||||
"disabled",
|
||||
"aria-label",
|
||||
"aria-disabled"
|
||||
];
|
||||
const _hoisted_2 = { key: 0 };
|
||||
var next_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElPaginationNext",
|
||||
__name: "next",
|
||||
props: require_next.paginationNextProps,
|
||||
emits: ["click"],
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const { t } = require_index.useLocale();
|
||||
const internalDisabled = (0, vue.computed)(() => props.disabled || props.currentPage === props.pageCount || props.pageCount === 0);
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
||||
type: "button",
|
||||
class: "btn-next",
|
||||
disabled: internalDisabled.value,
|
||||
"aria-label": _ctx.nextText || (0, vue.unref)(t)("el.pagination.next"),
|
||||
"aria-disabled": internalDisabled.value,
|
||||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
||||
}, [_ctx.nextText ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2, (0, vue.toDisplayString)(_ctx.nextText), 1)) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$1.ElIcon), { key: 1 }, {
|
||||
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(_ctx.nextIcon)))]),
|
||||
_: 1
|
||||
}))], 8, _hoisted_1);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = next_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=next.vue_vue_type_script_setup_true_lang.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"next.vue_vue_type_script_setup_true_lang.js","names":["nextText","$emit","nextIcon"],"sources":["../../../../../../../packages/components/pagination/src/components/next.vue"],"sourcesContent":["<template>\n <button\n type=\"button\"\n class=\"btn-next\"\n :disabled=\"internalDisabled\"\n :aria-label=\"nextText || t('el.pagination.next')\"\n :aria-disabled=\"internalDisabled\"\n @click=\"$emit('click', $event)\"\n >\n <span v-if=\"nextText\">{{ nextText }}</span>\n <el-icon v-else>\n <component :is=\"nextIcon\" />\n </el-icon>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { paginationNextProps } from './next'\n\ndefineOptions({\n name: 'ElPaginationNext',\n})\n\nconst props = defineProps(paginationNextProps)\n\ndefineEmits(['click'])\n\nconst { t } = useLocale()\n\nconst internalDisabled = computed(\n () =>\n props.disabled ||\n props.currentPage === props.pageCount ||\n props.pageCount === 0\n)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EA0BA,MAAM,QAAQ;EAId,MAAM,EAAE,MAAM,yBAAU;EAExB,MAAM,2CAEF,MAAM,YACN,MAAM,gBAAgB,MAAM,aAC5B,MAAM,cAAc,EACxB;;4DAxBW,UAAA;IAXP,MAAK;IACL,OAAM;IACL,UAAU,iBAAA;IACV,cAAYA,KAAAA,2BAAY,EAAC,CAAA,qBAAA;IACzB,iBAAe,iBAAA;IACf,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEC,KAAAA,MAAK,SAAU,OAAM;OAEjBD,KAAAA,8DAA+B,QAAA,qCAAlBA,KAAAA,SAAQ,EAAA,EAAA,+DAGvB,uBAAA,EAAA,EAAA,KAAA,GAAA,EAAA;oCADoB,8EAAZE,KAAAA,SAAQ,CAAA"}
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_next_vue_vue_type_script_setup_true_lang = require('./next.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/next.vue
|
||||
var next_default = require_next_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = next_default;
|
||||
//# sourceMappingURL=next2.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"next2.js","names":[],"sources":["../../../../../../../packages/components/pagination/src/components/next.vue"],"sourcesContent":["<template>\n <button\n type=\"button\"\n class=\"btn-next\"\n :disabled=\"internalDisabled\"\n :aria-label=\"nextText || t('el.pagination.next')\"\n :aria-disabled=\"internalDisabled\"\n @click=\"$emit('click', $event)\"\n >\n <span v-if=\"nextText\">{{ nextText }}</span>\n <el-icon v-else>\n <component :is=\"nextIcon\" />\n </el-icon>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { paginationNextProps } from './next'\n\ndefineOptions({\n name: 'ElPaginationNext',\n})\n\nconst props = defineProps(paginationNextProps)\n\ndefineEmits(['click'])\n\nconst { t } = useLocale()\n\nconst internalDisabled = computed(\n () =>\n props.disabled ||\n props.currentPage === props.pageCount ||\n props.pageCount === 0\n)\n</script>\n"],"mappings":""}
|
||||
Generated
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../../utils/vue/props/runtime.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/pager.ts
|
||||
const paginationPagerProps = require_runtime.buildProps({
|
||||
currentPage: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
pageCount: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
pagerCount: {
|
||||
type: Number,
|
||||
default: 7
|
||||
},
|
||||
disabled: Boolean
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.paginationPagerProps = paginationPagerProps;
|
||||
//# sourceMappingURL=pager.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"pager.js","names":["buildProps"],"sources":["../../../../../../../packages/components/pagination/src/components/pager.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Pager from './pager.vue'\n\nexport const paginationPagerProps = buildProps({\n currentPage: {\n type: Number,\n default: 1,\n },\n pageCount: {\n type: Number,\n required: true,\n },\n pagerCount: {\n type: Number,\n default: 7,\n },\n disabled: Boolean,\n} as const)\n\nexport type PaginationPagerProps = ExtractPropTypes<typeof paginationPagerProps>\nexport type PaginationPagerPropsPublic = ExtractPublicPropTypes<\n typeof paginationPagerProps\n>\n\nexport type PagerInstance = InstanceType<typeof Pager> & unknown\n"],"mappings":";;;;AAKA,MAAa,uBAAuBA,2BAAW;CAC7C,aAAa;EACX,MAAM;EACN,SAAS;EACV;CACD,WAAW;EACT,MAAM;EACN,UAAU;EACX;CACD,YAAY;EACV,MAAM;EACN,SAAS;EACV;CACD,UAAU;CACX,CAAU"}
|
||||
Generated
Vendored
+185
@@ -0,0 +1,185 @@
|
||||
const require_runtime = require('../../../../_virtual/_rolldown/runtime.js');
|
||||
const require_event = require('../../../../constants/event.js');
|
||||
const require_index = require('../../../../hooks/use-locale/index.js');
|
||||
const require_index$1 = require('../../../../hooks/use-namespace/index.js');
|
||||
const require_pager = require('./pager.js');
|
||||
let _element_plus_icons_vue = require("@element-plus/icons-vue");
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/pager.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = [
|
||||
"aria-current",
|
||||
"aria-label",
|
||||
"tabindex"
|
||||
];
|
||||
const _hoisted_2 = ["tabindex", "aria-label"];
|
||||
const _hoisted_3 = [
|
||||
"aria-current",
|
||||
"aria-label",
|
||||
"tabindex"
|
||||
];
|
||||
const _hoisted_4 = ["tabindex", "aria-label"];
|
||||
const _hoisted_5 = [
|
||||
"aria-current",
|
||||
"aria-label",
|
||||
"tabindex"
|
||||
];
|
||||
var pager_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElPaginationPager",
|
||||
__name: "pager",
|
||||
props: require_pager.paginationPagerProps,
|
||||
emits: [require_event.CHANGE_EVENT],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const nsPager = require_index$1.useNamespace("pager");
|
||||
const nsIcon = require_index$1.useNamespace("icon");
|
||||
const { t } = require_index.useLocale();
|
||||
const showPrevMore = (0, vue.ref)(false);
|
||||
const showNextMore = (0, vue.ref)(false);
|
||||
const quickPrevHover = (0, vue.ref)(false);
|
||||
const quickNextHover = (0, vue.ref)(false);
|
||||
const quickPrevFocus = (0, vue.ref)(false);
|
||||
const quickNextFocus = (0, vue.ref)(false);
|
||||
const pagers = (0, vue.computed)(() => {
|
||||
const pagerCount = props.pagerCount;
|
||||
const halfPagerCount = (pagerCount - 1) / 2;
|
||||
const currentPage = Number(props.currentPage);
|
||||
const pageCount = Number(props.pageCount);
|
||||
let showPrevMore = false;
|
||||
let showNextMore = false;
|
||||
if (pageCount > pagerCount) {
|
||||
if (currentPage > pagerCount - halfPagerCount) showPrevMore = true;
|
||||
if (currentPage < pageCount - halfPagerCount) showNextMore = true;
|
||||
}
|
||||
const array = [];
|
||||
if (showPrevMore && !showNextMore) {
|
||||
const startPage = pageCount - (pagerCount - 2);
|
||||
for (let i = startPage; i < pageCount; i++) array.push(i);
|
||||
} else if (!showPrevMore && showNextMore) for (let i = 2; i < pagerCount; i++) array.push(i);
|
||||
else if (showPrevMore && showNextMore) {
|
||||
const offset = Math.floor(pagerCount / 2) - 1;
|
||||
for (let i = currentPage - offset; i <= currentPage + offset; i++) array.push(i);
|
||||
} else for (let i = 2; i < pageCount; i++) array.push(i);
|
||||
return array;
|
||||
});
|
||||
const prevMoreKls = (0, vue.computed)(() => [
|
||||
"more",
|
||||
"btn-quickprev",
|
||||
nsIcon.b(),
|
||||
nsPager.is("disabled", props.disabled)
|
||||
]);
|
||||
const nextMoreKls = (0, vue.computed)(() => [
|
||||
"more",
|
||||
"btn-quicknext",
|
||||
nsIcon.b(),
|
||||
nsPager.is("disabled", props.disabled)
|
||||
]);
|
||||
const tabindex = (0, vue.computed)(() => props.disabled ? -1 : 0);
|
||||
(0, vue.watch)(() => [
|
||||
props.pageCount,
|
||||
props.pagerCount,
|
||||
props.currentPage
|
||||
], ([pageCount, pagerCount, currentPage]) => {
|
||||
const halfPagerCount = (pagerCount - 1) / 2;
|
||||
let showPrev = false;
|
||||
let showNext = false;
|
||||
if (pageCount > pagerCount) {
|
||||
showPrev = currentPage > pagerCount - halfPagerCount;
|
||||
showNext = currentPage < pageCount - halfPagerCount;
|
||||
}
|
||||
quickPrevHover.value &&= showPrev;
|
||||
quickNextHover.value &&= showNext;
|
||||
showPrevMore.value = showPrev;
|
||||
showNextMore.value = showNext;
|
||||
}, { immediate: true });
|
||||
function onMouseEnter(forward = false) {
|
||||
if (props.disabled) return;
|
||||
if (forward) quickPrevHover.value = true;
|
||||
else quickNextHover.value = true;
|
||||
}
|
||||
function onFocus(forward = false) {
|
||||
if (forward) quickPrevFocus.value = true;
|
||||
else quickNextFocus.value = true;
|
||||
}
|
||||
function onEnter(e) {
|
||||
const target = e.target;
|
||||
if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("number")) {
|
||||
const newPage = Number(target.textContent);
|
||||
if (newPage !== props.currentPage) emit(require_event.CHANGE_EVENT, newPage);
|
||||
} else if (target.tagName.toLowerCase() === "li" && Array.from(target.classList).includes("more")) onPagerClick(e);
|
||||
}
|
||||
function onPagerClick(event) {
|
||||
const target = event.target;
|
||||
if (target.tagName.toLowerCase() === "ul" || props.disabled) return;
|
||||
let newPage = Number(target.textContent);
|
||||
const pageCount = props.pageCount;
|
||||
const currentPage = props.currentPage;
|
||||
const pagerCountOffset = props.pagerCount - 2;
|
||||
if (target.className.includes("more")) {
|
||||
if (target.className.includes("quickprev")) newPage = currentPage - pagerCountOffset;
|
||||
else if (target.className.includes("quicknext")) newPage = currentPage + pagerCountOffset;
|
||||
}
|
||||
if (!Number.isNaN(+newPage)) {
|
||||
if (newPage < 1) newPage = 1;
|
||||
if (newPage > pageCount) newPage = pageCount;
|
||||
}
|
||||
if (newPage !== currentPage) emit(require_event.CHANGE_EVENT, newPage);
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("ul", {
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(nsPager).b()),
|
||||
onClick: onPagerClick,
|
||||
onKeyup: (0, vue.withKeys)(onEnter, ["enter"])
|
||||
}, [
|
||||
_ctx.pageCount > 0 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
||||
key: 0,
|
||||
class: (0, vue.normalizeClass)([[(0, vue.unref)(nsPager).is("active", _ctx.currentPage === 1), (0, vue.unref)(nsPager).is("disabled", _ctx.disabled)], "number"]),
|
||||
"aria-current": _ctx.currentPage === 1,
|
||||
"aria-label": (0, vue.unref)(t)("el.pagination.currentPage", { pager: 1 }),
|
||||
tabindex: tabindex.value
|
||||
}, " 1 ", 10, _hoisted_1)) : (0, vue.createCommentVNode)("v-if", true),
|
||||
showPrevMore.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
||||
key: 1,
|
||||
class: (0, vue.normalizeClass)(prevMoreKls.value),
|
||||
tabindex: tabindex.value,
|
||||
"aria-label": (0, vue.unref)(t)("el.pagination.prevPages", { pager: _ctx.pagerCount - 2 }),
|
||||
onMouseenter: _cache[0] || (_cache[0] = ($event) => onMouseEnter(true)),
|
||||
onMouseleave: _cache[1] || (_cache[1] = ($event) => quickPrevHover.value = false),
|
||||
onFocus: _cache[2] || (_cache[2] = ($event) => onFocus(true)),
|
||||
onBlur: _cache[3] || (_cache[3] = ($event) => quickPrevFocus.value = false)
|
||||
}, [(quickPrevHover.value || quickPrevFocus.value) && !_ctx.disabled ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.DArrowLeft), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.MoreFilled), { key: 1 }))], 42, _hoisted_2)) : (0, vue.createCommentVNode)("v-if", true),
|
||||
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(pagers.value, (pager) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
||||
key: pager,
|
||||
class: (0, vue.normalizeClass)([[(0, vue.unref)(nsPager).is("active", _ctx.currentPage === pager), (0, vue.unref)(nsPager).is("disabled", _ctx.disabled)], "number"]),
|
||||
"aria-current": _ctx.currentPage === pager,
|
||||
"aria-label": (0, vue.unref)(t)("el.pagination.currentPage", { pager }),
|
||||
tabindex: tabindex.value
|
||||
}, (0, vue.toDisplayString)(pager), 11, _hoisted_3);
|
||||
}), 128)),
|
||||
showNextMore.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
||||
key: 2,
|
||||
class: (0, vue.normalizeClass)(nextMoreKls.value),
|
||||
tabindex: tabindex.value,
|
||||
"aria-label": (0, vue.unref)(t)("el.pagination.nextPages", { pager: _ctx.pagerCount - 2 }),
|
||||
onMouseenter: _cache[4] || (_cache[4] = ($event) => onMouseEnter()),
|
||||
onMouseleave: _cache[5] || (_cache[5] = ($event) => quickNextHover.value = false),
|
||||
onFocus: _cache[6] || (_cache[6] = ($event) => onFocus()),
|
||||
onBlur: _cache[7] || (_cache[7] = ($event) => quickNextFocus.value = false)
|
||||
}, [(quickNextHover.value || quickNextFocus.value) && !_ctx.disabled ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.DArrowRight), { key: 0 })) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_element_plus_icons_vue.MoreFilled), { key: 1 }))], 42, _hoisted_4)) : (0, vue.createCommentVNode)("v-if", true),
|
||||
_ctx.pageCount > 1 ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("li", {
|
||||
key: 3,
|
||||
class: (0, vue.normalizeClass)([[(0, vue.unref)(nsPager).is("active", _ctx.currentPage === _ctx.pageCount), (0, vue.unref)(nsPager).is("disabled", _ctx.disabled)], "number"]),
|
||||
"aria-current": _ctx.currentPage === _ctx.pageCount,
|
||||
"aria-label": (0, vue.unref)(t)("el.pagination.currentPage", { pager: _ctx.pageCount }),
|
||||
tabindex: tabindex.value
|
||||
}, (0, vue.toDisplayString)(_ctx.pageCount), 11, _hoisted_5)) : (0, vue.createCommentVNode)("v-if", true)
|
||||
], 34);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = pager_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=pager.vue_vue_type_script_setup_true_lang.js.map
|
||||
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_pager_vue_vue_type_script_setup_true_lang = require('./pager.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/pager.vue
|
||||
var pager_default = require_pager_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = pager_default;
|
||||
//# sourceMappingURL=pager2.js.map
|
||||
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../../utils/vue/props/runtime.js');
|
||||
const require_icon = require('../../../../utils/vue/icon.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/prev.ts
|
||||
const paginationPrevProps = require_runtime.buildProps({
|
||||
disabled: Boolean,
|
||||
currentPage: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
prevText: { type: String },
|
||||
prevIcon: { type: require_icon.iconPropType }
|
||||
});
|
||||
const paginationPrevEmits = { click: (evt) => evt instanceof MouseEvent };
|
||||
|
||||
//#endregion
|
||||
exports.paginationPrevEmits = paginationPrevEmits;
|
||||
exports.paginationPrevProps = paginationPrevProps;
|
||||
//# sourceMappingURL=prev.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"prev.js","names":["buildProps","iconPropType"],"sources":["../../../../../../../packages/components/pagination/src/components/prev.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type Prev from './prev.vue'\n\nexport const paginationPrevProps = buildProps({\n disabled: Boolean,\n currentPage: {\n type: Number,\n default: 1,\n },\n prevText: {\n type: String,\n },\n prevIcon: {\n type: iconPropType,\n },\n} as const)\n\nexport const paginationPrevEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\n\nexport type PaginationPrevProps = ExtractPropTypes<typeof paginationPrevProps>\nexport type PaginationPrevPropsPublic = ExtractPublicPropTypes<\n typeof paginationPrevProps\n>\n\nexport type PrevInstance = InstanceType<typeof Prev> & unknown\n"],"mappings":";;;;;AAKA,MAAa,sBAAsBA,2BAAW;CAC5C,UAAU;CACV,aAAa;EACX,MAAM;EACN,SAAS;EACV;CACD,UAAU,EACR,MAAM,QACP;CACD,UAAU,EACR,MAAMC,2BACP;CACF,CAAU;AAEX,MAAa,sBAAsB,EACjC,QAAQ,QAAoB,eAAe,YAC5C"}
|
||||
Generated
Vendored
+41
@@ -0,0 +1,41 @@
|
||||
const require_runtime = require('../../../../_virtual/_rolldown/runtime.js');
|
||||
const require_index = require('../../../../hooks/use-locale/index.js');
|
||||
const require_index$1 = require('../../../icon/index.js');
|
||||
const require_prev = require('./prev.js');
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/prev.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = [
|
||||
"disabled",
|
||||
"aria-label",
|
||||
"aria-disabled"
|
||||
];
|
||||
const _hoisted_2 = { key: 0 };
|
||||
var prev_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElPaginationPrev",
|
||||
__name: "prev",
|
||||
props: require_prev.paginationPrevProps,
|
||||
emits: require_prev.paginationPrevEmits,
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
const { t } = require_index.useLocale();
|
||||
const internalDisabled = (0, vue.computed)(() => props.disabled || props.currentPage <= 1);
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
||||
type: "button",
|
||||
class: "btn-prev",
|
||||
disabled: internalDisabled.value,
|
||||
"aria-label": _ctx.prevText || (0, vue.unref)(t)("el.pagination.prev"),
|
||||
"aria-disabled": internalDisabled.value,
|
||||
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("click", $event))
|
||||
}, [_ctx.prevText ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2, (0, vue.toDisplayString)(_ctx.prevText), 1)) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$1.ElIcon), { key: 1 }, {
|
||||
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(_ctx.prevIcon)))]),
|
||||
_: 1
|
||||
}))], 8, _hoisted_1);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = prev_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=prev.vue_vue_type_script_setup_true_lang.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"prev.vue_vue_type_script_setup_true_lang.js","names":["prevText","$emit","prevIcon"],"sources":["../../../../../../../packages/components/pagination/src/components/prev.vue"],"sourcesContent":["<template>\n <button\n type=\"button\"\n class=\"btn-prev\"\n :disabled=\"internalDisabled\"\n :aria-label=\"prevText || t('el.pagination.prev')\"\n :aria-disabled=\"internalDisabled\"\n @click=\"$emit('click', $event)\"\n >\n <span v-if=\"prevText\">{{ prevText }}</span>\n <el-icon v-else>\n <component :is=\"prevIcon\" />\n </el-icon>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { paginationPrevEmits, paginationPrevProps } from './prev'\n\ndefineOptions({\n name: 'ElPaginationPrev',\n})\n\nconst props = defineProps(paginationPrevProps)\ndefineEmits(paginationPrevEmits)\n\nconst { t } = useLocale()\n\nconst internalDisabled = computed(\n () => props.disabled || props.currentPage <= 1\n)\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EA0BA,MAAM,QAAQ;EAGd,MAAM,EAAE,MAAM,yBAAU;EAExB,MAAM,2CACE,MAAM,YAAY,MAAM,eAAe,EAC/C;;4DApBW,UAAA;IAXP,MAAK;IACL,OAAM;IACL,UAAU,iBAAA;IACV,cAAYA,KAAAA,2BAAY,EAAC,CAAA,qBAAA;IACzB,iBAAe,iBAAA;IACf,SAAK,OAAA,OAAA,OAAA,MAAA,WAAEC,KAAAA,MAAK,SAAU,OAAM;OAEjBD,KAAAA,8DAA+B,QAAA,qCAAlBA,KAAAA,SAAQ,EAAA,EAAA,+DAGvB,uBAAA,EAAA,EAAA,KAAA,GAAA,EAAA;oCADoB,8EAAZE,KAAAA,SAAQ,CAAA"}
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_prev_vue_vue_type_script_setup_true_lang = require('./prev.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/prev.vue
|
||||
var prev_default = require_prev_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = prev_default;
|
||||
//# sourceMappingURL=prev2.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"prev2.js","names":[],"sources":["../../../../../../../packages/components/pagination/src/components/prev.vue"],"sourcesContent":["<template>\n <button\n type=\"button\"\n class=\"btn-prev\"\n :disabled=\"internalDisabled\"\n :aria-label=\"prevText || t('el.pagination.prev')\"\n :aria-disabled=\"internalDisabled\"\n @click=\"$emit('click', $event)\"\n >\n <span v-if=\"prevText\">{{ prevText }}</span>\n <el-icon v-else>\n <component :is=\"prevIcon\" />\n </el-icon>\n </button>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed } from 'vue'\nimport { useLocale } from '@element-plus/hooks'\nimport { ElIcon } from '@element-plus/components/icon'\nimport { paginationPrevEmits, paginationPrevProps } from './prev'\n\ndefineOptions({\n name: 'ElPaginationPrev',\n})\n\nconst props = defineProps(paginationPrevProps)\ndefineEmits(paginationPrevEmits)\n\nconst { t } = useLocale()\n\nconst internalDisabled = computed(\n () => props.disabled || props.currentPage <= 1\n)\n</script>\n"],"mappings":""}
|
||||
Generated
Vendored
+36
@@ -0,0 +1,36 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_size = require('../../../../constants/size.js');
|
||||
const require_runtime = require('../../../../utils/vue/props/runtime.js');
|
||||
const require_typescript = require('../../../../utils/typescript.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/sizes.ts
|
||||
const paginationSizesProps = require_runtime.buildProps({
|
||||
pageSize: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
pageSizes: {
|
||||
type: require_runtime.definePropType(Array),
|
||||
default: () => require_typescript.mutable([
|
||||
10,
|
||||
20,
|
||||
30,
|
||||
40,
|
||||
50,
|
||||
100
|
||||
])
|
||||
},
|
||||
popperClass: { type: String },
|
||||
popperStyle: { type: require_runtime.definePropType([String, Object]) },
|
||||
disabled: Boolean,
|
||||
teleported: Boolean,
|
||||
size: {
|
||||
type: String,
|
||||
values: require_size.componentSizes
|
||||
},
|
||||
appendSizeTo: String
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.paginationSizesProps = paginationSizesProps;
|
||||
//# sourceMappingURL=sizes.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sizes.js","names":["buildProps","definePropType","mutable","componentSizes"],"sources":["../../../../../../../packages/components/pagination/src/components/sizes.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '@element-plus/utils'\nimport { componentSizes } from '@element-plus/constants'\n\nimport type {\n CSSProperties,\n ExtractPropTypes,\n ExtractPublicPropTypes,\n} from 'vue'\nimport type Sizes from './sizes.vue'\n\nexport const paginationSizesProps = buildProps({\n pageSize: {\n type: Number,\n required: true,\n },\n pageSizes: {\n type: definePropType<number[]>(Array),\n default: () => mutable([10, 20, 30, 40, 50, 100] as const),\n },\n popperClass: {\n type: String,\n },\n popperStyle: {\n type: definePropType<string | CSSProperties>([String, Object]),\n },\n disabled: Boolean,\n teleported: Boolean,\n size: {\n type: String,\n values: componentSizes,\n },\n appendSizeTo: String,\n} as const)\n\nexport type PaginationSizesProps = ExtractPropTypes<typeof paginationSizesProps>\nexport type PaginationSizesPropsPublic = ExtractPublicPropTypes<\n typeof paginationSizesProps\n>\n\nexport type SizesInstance = InstanceType<typeof Sizes> & unknown\n"],"mappings":";;;;;;AAUA,MAAa,uBAAuBA,2BAAW;CAC7C,UAAU;EACR,MAAM;EACN,UAAU;EACX;CACD,WAAW;EACT,MAAMC,+BAAyB,MAAM;EACrC,eAAeC,2BAAQ;GAAC;GAAI;GAAI;GAAI;GAAI;GAAI;GAAI,CAAU;EAC3D;CACD,aAAa,EACX,MAAM,QACP;CACD,aAAa,EACX,MAAMD,+BAAuC,CAAC,QAAQ,OAAO,CAAC,EAC/D;CACD,UAAU;CACV,YAAY;CACZ,MAAM;EACJ,MAAM;EACN,QAAQE;EACT;CACD,cAAc;CACf,CAAU"}
|
||||
Generated
Vendored
+73
@@ -0,0 +1,73 @@
|
||||
const require_runtime = require('../../../../_virtual/_rolldown/runtime.js');
|
||||
const require_index = require('../../../../hooks/use-locale/index.js');
|
||||
const require_index$1 = require('../../../../hooks/use-namespace/index.js');
|
||||
const require_index$2 = require('../../../select/index.js');
|
||||
const require_usePagination = require('../usePagination.js');
|
||||
const require_sizes = require('./sizes.js');
|
||||
let lodash_unified = require("lodash-unified");
|
||||
let vue = require("vue");
|
||||
let _vue_shared = require("@vue/shared");
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/sizes.vue?vue&type=script&setup=true&lang.ts
|
||||
var sizes_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElPaginationSizes",
|
||||
__name: "sizes",
|
||||
props: require_sizes.paginationSizesProps,
|
||||
emits: ["page-size-change"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const { t } = require_index.useLocale();
|
||||
const ns = require_index$1.useNamespace("pagination");
|
||||
const pagination = require_usePagination.usePagination();
|
||||
const innerPageSize = (0, vue.ref)(props.pageSize);
|
||||
(0, vue.watch)(() => props.pageSizes, (newVal, oldVal) => {
|
||||
if ((0, lodash_unified.isEqual)(newVal, oldVal)) return;
|
||||
if ((0, _vue_shared.isArray)(newVal)) emit("page-size-change", newVal.includes(props.pageSize) ? props.pageSize : props.pageSizes[0]);
|
||||
});
|
||||
(0, vue.watch)(() => props.pageSize, (newVal) => {
|
||||
innerPageSize.value = newVal;
|
||||
});
|
||||
const innerPageSizes = (0, vue.computed)(() => props.pageSizes);
|
||||
function handleChange(val) {
|
||||
if (val !== innerPageSize.value) {
|
||||
innerPageSize.value = val;
|
||||
pagination.handleSizeChange?.(Number(val));
|
||||
}
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", { class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("sizes")) }, [(0, vue.createVNode)((0, vue.unref)(require_index$2.ElSelect), {
|
||||
"model-value": innerPageSize.value,
|
||||
disabled: _ctx.disabled,
|
||||
"popper-class": _ctx.popperClass,
|
||||
"popper-style": _ctx.popperStyle,
|
||||
size: _ctx.size,
|
||||
teleported: _ctx.teleported,
|
||||
"validate-event": false,
|
||||
"append-to": _ctx.appendSizeTo,
|
||||
onChange: handleChange
|
||||
}, {
|
||||
default: (0, vue.withCtx)(() => [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(innerPageSizes.value, (item) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_index$2.ElOption), {
|
||||
key: item,
|
||||
value: item,
|
||||
label: item + (0, vue.unref)(t)("el.pagination.pagesize")
|
||||
}, null, 8, ["value", "label"]);
|
||||
}), 128))]),
|
||||
_: 1
|
||||
}, 8, [
|
||||
"model-value",
|
||||
"disabled",
|
||||
"popper-class",
|
||||
"popper-style",
|
||||
"size",
|
||||
"teleported",
|
||||
"append-to"
|
||||
])], 2);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = sizes_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=sizes.vue_vue_type_script_setup_true_lang.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sizes.vue_vue_type_script_setup_true_lang.js","names":["disabled","popperClass","popperStyle","size","teleported","appendSizeTo"],"sources":["../../../../../../../packages/components/pagination/src/components/sizes.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('sizes')\">\n <el-select\n :model-value=\"innerPageSize\"\n :disabled=\"disabled\"\n :popper-class=\"popperClass\"\n :popper-style=\"popperStyle\"\n :size=\"size\"\n :teleported=\"teleported\"\n :validate-event=\"false\"\n :append-to=\"appendSizeTo\"\n @change=\"handleChange\"\n >\n <el-option\n v-for=\"item in innerPageSizes\"\n :key=\"item\"\n :value=\"item\"\n :label=\"item + t('el.pagination.pagesize')\"\n />\n </el-select>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { ElOption, ElSelect } from '@element-plus/components/select'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { isArray } from '@element-plus/utils'\nimport { usePagination } from '../usePagination'\nimport { paginationSizesProps } from './sizes'\n\ndefineOptions({\n name: 'ElPaginationSizes',\n})\n\nconst props = defineProps(paginationSizesProps)\nconst emit = defineEmits(['page-size-change'])\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst pagination = usePagination()\nconst innerPageSize = ref<number>(props.pageSize!)\n\nwatch(\n () => props.pageSizes,\n (newVal, oldVal) => {\n if (isEqual(newVal, oldVal)) return\n if (isArray(newVal)) {\n const pageSize = newVal.includes(props.pageSize!)\n ? props.pageSize\n : props.pageSizes[0]\n emit('page-size-change', pageSize)\n }\n }\n)\n\nwatch(\n () => props.pageSize,\n (newVal) => {\n innerPageSize.value = newVal!\n }\n)\n\nconst innerPageSizes = computed(() => props.pageSizes)\nfunction handleChange(val: number) {\n if (val !== innerPageSize.value) {\n innerPageSize.value = val\n pagination.handleSizeChange?.(Number(val))\n }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;EAoCA,MAAM,QAAQ;EACd,MAAM,OAAO;EACb,MAAM,EAAE,MAAM,yBAAU;EACxB,MAAM,KAAK,6BAAa,aAAY;EACpC,MAAM,aAAa,qCAAc;EACjC,MAAM,6BAA4B,MAAM,SAAS;AAEjD,uBACQ,MAAM,YACX,QAAQ,WAAW;AAClB,mCAAY,QAAQ,OAAO,CAAE;AAC7B,gCAAY,OAAO,CAIjB,MAAK,oBAHY,OAAO,SAAS,MAAM,SAAS,GAC5C,MAAM,WACN,MAAM,UAAU,GACa;IAGvC;AAEA,uBACQ,MAAM,WACX,WAAW;AACV,iBAAc,QAAQ;IAE1B;EAEA,MAAM,yCAAgC,MAAM,UAAS;EACrD,SAAS,aAAa,KAAa;AACjC,OAAI,QAAQ,cAAc,OAAO;AAC/B,kBAAc,QAAQ;AACtB,eAAW,mBAAmB,OAAO,IAAI,CAAA;;;;4DA/CpC,QAAA,EAnBA,8CAAO,GAAE,CAAC,EAAC,QAAA,CAAA,yCAkBJ,yBAAA,EAAA;IAhBT,eAAa,cAAA;IACb,UAAUA,KAAAA;IACV,gBAAcC,KAAAA;IACd,gBAAcC,KAAAA;IACd,MAAMC,KAAAA;IACN,YAAYC,KAAAA;IACZ,kBAAgB;IAChB,aAAWC,KAAAA;IACX,UAAQ;;oCAGuB,wDAI9B,cAAA,0BAJe,eAAA,QAAR,SAAI;sEAIX,yBAAA,EAAA;MAHC,KAAK;MACL,OAAO;MACP,OAAO,sBAAO,EAAC,CAAA,yBAAA"}
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_sizes_vue_vue_type_script_setup_true_lang = require('./sizes.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/sizes.vue
|
||||
var sizes_default = require_sizes_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = sizes_default;
|
||||
//# sourceMappingURL=sizes2.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sizes2.js","names":[],"sources":["../../../../../../../packages/components/pagination/src/components/sizes.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('sizes')\">\n <el-select\n :model-value=\"innerPageSize\"\n :disabled=\"disabled\"\n :popper-class=\"popperClass\"\n :popper-style=\"popperStyle\"\n :size=\"size\"\n :teleported=\"teleported\"\n :validate-event=\"false\"\n :append-to=\"appendSizeTo\"\n @change=\"handleChange\"\n >\n <el-option\n v-for=\"item in innerPageSizes\"\n :key=\"item\"\n :value=\"item\"\n :label=\"item + t('el.pagination.pagesize')\"\n />\n </el-select>\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch } from 'vue'\nimport { isEqual } from 'lodash-unified'\nimport { ElOption, ElSelect } from '@element-plus/components/select'\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { isArray } from '@element-plus/utils'\nimport { usePagination } from '../usePagination'\nimport { paginationSizesProps } from './sizes'\n\ndefineOptions({\n name: 'ElPaginationSizes',\n})\n\nconst props = defineProps(paginationSizesProps)\nconst emit = defineEmits(['page-size-change'])\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst pagination = usePagination()\nconst innerPageSize = ref<number>(props.pageSize!)\n\nwatch(\n () => props.pageSizes,\n (newVal, oldVal) => {\n if (isEqual(newVal, oldVal)) return\n if (isArray(newVal)) {\n const pageSize = newVal.includes(props.pageSize!)\n ? props.pageSize\n : props.pageSizes[0]\n emit('page-size-change', pageSize)\n }\n }\n)\n\nwatch(\n () => props.pageSize,\n (newVal) => {\n innerPageSize.value = newVal!\n }\n)\n\nconst innerPageSizes = computed(() => props.pageSizes)\nfunction handleChange(val: number) {\n if (val !== innerPageSize.value) {\n innerPageSize.value = val\n pagination.handleSizeChange?.(Number(val))\n }\n}\n</script>\n"],"mappings":""}
|
||||
Generated
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../../utils/vue/props/runtime.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/total.ts
|
||||
const paginationTotalProps = require_runtime.buildProps({ total: {
|
||||
type: Number,
|
||||
default: 1e3
|
||||
} });
|
||||
|
||||
//#endregion
|
||||
exports.paginationTotalProps = paginationTotalProps;
|
||||
//# sourceMappingURL=total.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"total.js","names":["buildProps"],"sources":["../../../../../../../packages/components/pagination/src/components/total.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\n\nimport type Total from './total.vue'\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const paginationTotalProps = buildProps({\n total: {\n type: Number,\n default: 1000,\n },\n} as const)\n\nexport type PaginationTotalProps = ExtractPropTypes<typeof paginationTotalProps>\nexport type PaginationTotalPropsPublic = ExtractPublicPropTypes<\n typeof paginationTotalProps\n>\n\nexport type TotalInstance = InstanceType<typeof Total> & unknown\n"],"mappings":";;;;AAKA,MAAa,uBAAuBA,2BAAW,EAC7C,OAAO;CACL,MAAM;CACN,SAAS;CACV,EACF,CAAU"}
|
||||
Generated
Vendored
+29
@@ -0,0 +1,29 @@
|
||||
const require_runtime = require('../../../../_virtual/_rolldown/runtime.js');
|
||||
const require_index = require('../../../../hooks/use-locale/index.js');
|
||||
const require_index$1 = require('../../../../hooks/use-namespace/index.js');
|
||||
const require_usePagination = require('../usePagination.js');
|
||||
const require_total = require('./total.js');
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/total.vue?vue&type=script&setup=true&lang.ts
|
||||
const _hoisted_1 = ["disabled"];
|
||||
var total_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
||||
name: "ElPaginationTotal",
|
||||
__name: "total",
|
||||
props: require_total.paginationTotalProps,
|
||||
setup(__props) {
|
||||
const { t } = require_index.useLocale();
|
||||
const ns = require_index$1.useNamespace("pagination");
|
||||
const { disabled } = require_usePagination.usePagination();
|
||||
return (_ctx, _cache) => {
|
||||
return (0, vue.openBlock)(), (0, vue.createElementBlock)("span", {
|
||||
class: (0, vue.normalizeClass)((0, vue.unref)(ns).e("total")),
|
||||
disabled: (0, vue.unref)(disabled)
|
||||
}, (0, vue.toDisplayString)((0, vue.unref)(t)("el.pagination.total", { total: _ctx.total })), 11, _hoisted_1);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = total_vue_vue_type_script_setup_true_lang_default;
|
||||
//# sourceMappingURL=total.vue_vue_type_script_setup_true_lang.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"total.vue_vue_type_script_setup_true_lang.js","names":["total"],"sources":["../../../../../../../packages/components/pagination/src/components/total.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('total')\" :disabled=\"disabled\">\n {{\n t('el.pagination.total', {\n total,\n })\n }}\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { usePagination } from '../usePagination'\nimport { paginationTotalProps } from './total'\n\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst { disabled } = usePagination()\n\ndefineOptions({\n name: 'ElPaginationTotal',\n})\n\ndefineProps(paginationTotalProps)\n</script>\n"],"mappings":";;;;;;;;;;;;;;EAeA,MAAM,EAAE,MAAM,yBAAU;EACxB,MAAM,KAAK,6BAAa,aAAY;EACpC,MAAM,EAAE,aAAa,qCAAc;;4DAV1B,QAAA;IANA,8CAAO,GAAE,CAAC,EAAC,QAAA,CAAA;IAAY,yBAAU,SAAQ;8CAE5C,EAAC,CAAA,uBAAA,SAAkCA,KAAAA"}
|
||||
Generated
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_total_vue_vue_type_script_setup_true_lang = require('./total.vue_vue_type_script_setup_true_lang.js');
|
||||
|
||||
//#region ../../packages/components/pagination/src/components/total.vue
|
||||
var total_default = require_total_vue_vue_type_script_setup_true_lang.default;
|
||||
|
||||
//#endregion
|
||||
exports.default = total_default;
|
||||
//# sourceMappingURL=total2.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"total2.js","names":[],"sources":["../../../../../../../packages/components/pagination/src/components/total.vue"],"sourcesContent":["<template>\n <span :class=\"ns.e('total')\" :disabled=\"disabled\">\n {{\n t('el.pagination.total', {\n total,\n })\n }}\n </span>\n</template>\n\n<script lang=\"ts\" setup>\nimport { useLocale, useNamespace } from '@element-plus/hooks'\nimport { usePagination } from '../usePagination'\nimport { paginationTotalProps } from './total'\n\nconst { t } = useLocale()\nconst ns = useNamespace('pagination')\nconst { disabled } = usePagination()\n\ndefineOptions({\n name: 'ElPaginationTotal',\n})\n\ndefineProps(paginationTotalProps)\n</script>\n"],"mappings":""}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { ComputedRef, InjectionKey, WritableComputedRef } from "vue";
|
||||
|
||||
//#region ../../packages/components/pagination/src/constants.d.ts
|
||||
interface ElPaginationContext {
|
||||
currentPage?: WritableComputedRef<number>;
|
||||
pageCount?: ComputedRef<number>;
|
||||
disabled?: ComputedRef<boolean>;
|
||||
changeEvent?: (val: number) => void;
|
||||
handleSizeChange?: (val: number) => void;
|
||||
}
|
||||
declare const elPaginationKey: InjectionKey<ElPaginationContext>;
|
||||
//#endregion
|
||||
export { ElPaginationContext, elPaginationKey };
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
|
||||
//#region ../../packages/components/pagination/src/constants.ts
|
||||
const elPaginationKey = Symbol("elPaginationKey");
|
||||
|
||||
//#endregion
|
||||
exports.elPaginationKey = elPaginationKey;
|
||||
//# sourceMappingURL=constants.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constants.js","names":[],"sources":["../../../../../../packages/components/pagination/src/constants.ts"],"sourcesContent":["import type { ComputedRef, InjectionKey, WritableComputedRef } from 'vue'\n\nexport interface ElPaginationContext {\n currentPage?: WritableComputedRef<number>\n pageCount?: ComputedRef<number>\n disabled?: ComputedRef<boolean>\n changeEvent?: (val: number) => void\n handleSizeChange?: (val: number) => void\n}\n\nexport const elPaginationKey: InjectionKey<ElPaginationContext> =\n Symbol('elPaginationKey')\n"],"mappings":";;;AAUA,MAAa,kBACX,OAAO,kBAAkB"}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
import { EpPropFinalized, EpPropMergeType } from "../../../utils/vue/props/types.js";
|
||||
import "../../../utils/index.js";
|
||||
import * as vue from "vue";
|
||||
import { CSSProperties, ExtractPropTypes, ExtractPublicPropTypes, VNode } from "vue";
|
||||
|
||||
//#region ../../packages/components/pagination/src/pagination.d.ts
|
||||
declare const paginationProps: {
|
||||
readonly pageSize: NumberConstructor;
|
||||
readonly defaultPageSize: NumberConstructor;
|
||||
readonly total: NumberConstructor;
|
||||
readonly pageCount: NumberConstructor;
|
||||
readonly pagerCount: EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
||||
readonly currentPage: NumberConstructor;
|
||||
readonly defaultCurrentPage: NumberConstructor;
|
||||
readonly layout: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
readonly pageSizes: EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | (((new (...args: any[]) => number[]) | (() => number[])) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
||||
readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly popperStyle: {
|
||||
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly prevText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly prevIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, () => vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly nextText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly nextIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, () => vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly small: BooleanConstructor;
|
||||
readonly size: {
|
||||
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly background: BooleanConstructor;
|
||||
readonly disabled: BooleanConstructor;
|
||||
readonly hideOnSinglePage: BooleanConstructor;
|
||||
readonly appendSizeTo: StringConstructor;
|
||||
};
|
||||
type PaginationProps = ExtractPropTypes<typeof paginationProps>;
|
||||
type PaginationPropsPublic = ExtractPublicPropTypes<typeof paginationProps>;
|
||||
declare const paginationEmits: {
|
||||
'update:current-page': (val: number) => boolean;
|
||||
'update:page-size': (val: number) => boolean;
|
||||
'size-change': (val: number) => boolean;
|
||||
change: (currentPage: number, pageSize: number) => boolean;
|
||||
'current-change': (val: number) => boolean;
|
||||
'prev-click': (val: number) => boolean;
|
||||
'next-click': (val: number) => boolean;
|
||||
};
|
||||
type PaginationEmits = typeof paginationEmits;
|
||||
declare const _default: vue.DefineComponent<ExtractPropTypes<{
|
||||
readonly pageSize: NumberConstructor;
|
||||
readonly defaultPageSize: NumberConstructor;
|
||||
readonly total: NumberConstructor;
|
||||
readonly pageCount: NumberConstructor;
|
||||
readonly pagerCount: EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
||||
readonly currentPage: NumberConstructor;
|
||||
readonly defaultCurrentPage: NumberConstructor;
|
||||
readonly layout: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
readonly pageSizes: EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | (((new (...args: any[]) => number[]) | (() => number[])) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
||||
readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly popperStyle: {
|
||||
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly prevText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly prevIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, () => vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly nextText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly nextIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, () => vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly small: BooleanConstructor;
|
||||
readonly size: {
|
||||
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly background: BooleanConstructor;
|
||||
readonly disabled: BooleanConstructor;
|
||||
readonly hideOnSinglePage: BooleanConstructor;
|
||||
readonly appendSizeTo: StringConstructor;
|
||||
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
||||
[key: string]: any;
|
||||
}> | null, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
||||
'update:current-page': (val: number) => boolean;
|
||||
'update:page-size': (val: number) => boolean;
|
||||
'size-change': (val: number) => boolean;
|
||||
change: (currentPage: number, pageSize: number) => boolean;
|
||||
'current-change': (val: number) => boolean;
|
||||
'prev-click': (val: number) => boolean;
|
||||
'next-click': (val: number) => boolean;
|
||||
}, string, vue.PublicProps, Readonly<ExtractPropTypes<{
|
||||
readonly pageSize: NumberConstructor;
|
||||
readonly defaultPageSize: NumberConstructor;
|
||||
readonly total: NumberConstructor;
|
||||
readonly pageCount: NumberConstructor;
|
||||
readonly pagerCount: EpPropFinalized<NumberConstructor, unknown, unknown, 7, boolean>;
|
||||
readonly currentPage: NumberConstructor;
|
||||
readonly defaultCurrentPage: NumberConstructor;
|
||||
readonly layout: EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
|
||||
readonly pageSizes: EpPropFinalized<(new (...args: any[]) => number[]) | (() => number[]) | (((new (...args: any[]) => number[]) | (() => number[])) | null)[], unknown, unknown, () => [10, 20, 30, 40, 50, 100], boolean>;
|
||||
readonly popperClass: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly popperStyle: {
|
||||
readonly type: vue.PropType<EpPropMergeType<(new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties) | (((new (...args: any[]) => string | CSSProperties) | (() => string | CSSProperties)) | null)[], unknown, unknown>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly prevText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly prevIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, () => vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly nextText: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
||||
readonly nextIcon: EpPropFinalized<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown, () => vue.DefineComponent<{}, void, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>, boolean>;
|
||||
readonly teleported: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
||||
readonly small: BooleanConstructor;
|
||||
readonly size: {
|
||||
readonly type: vue.PropType<EpPropMergeType<StringConstructor, "" | "default" | "large" | "small", never>>;
|
||||
readonly required: false;
|
||||
readonly validator: ((val: unknown) => boolean) | undefined;
|
||||
__epPropKey: true;
|
||||
};
|
||||
readonly background: BooleanConstructor;
|
||||
readonly disabled: BooleanConstructor;
|
||||
readonly hideOnSinglePage: BooleanConstructor;
|
||||
readonly appendSizeTo: StringConstructor;
|
||||
}>> & Readonly<{
|
||||
onChange?: ((currentPage: number, pageSize: number) => any) | undefined;
|
||||
"onUpdate:current-page"?: ((val: number) => any) | undefined;
|
||||
"onUpdate:page-size"?: ((val: number) => any) | undefined;
|
||||
"onSize-change"?: ((val: number) => any) | undefined;
|
||||
"onCurrent-change"?: ((val: number) => any) | undefined;
|
||||
"onPrev-click"?: ((val: number) => any) | undefined;
|
||||
"onNext-click"?: ((val: number) => any) | undefined;
|
||||
}>, {
|
||||
readonly disabled: boolean;
|
||||
readonly popperClass: string;
|
||||
readonly teleported: EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
||||
readonly background: boolean;
|
||||
readonly layout: string;
|
||||
readonly small: boolean;
|
||||
readonly pagerCount: number;
|
||||
readonly pageSizes: number[];
|
||||
readonly prevText: string;
|
||||
readonly prevIcon: EpPropMergeType<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown>;
|
||||
readonly nextText: string;
|
||||
readonly nextIcon: EpPropMergeType<(new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component) | (((new (...args: any[]) => (string | vue.Component) & {}) | (() => string | vue.Component)) | null)[], unknown, unknown>;
|
||||
readonly hideOnSinglePage: boolean;
|
||||
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
||||
//#endregion
|
||||
export { PaginationEmits, PaginationProps, PaginationPropsPublic, _default, paginationEmits, paginationProps };
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
||||
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
||||
const require_event = require('../../../constants/event.js');
|
||||
const require_types = require('../../../utils/types.js');
|
||||
const require_error = require('../../../utils/error.js');
|
||||
const require_runtime$1 = require('../../../utils/vue/props/runtime.js');
|
||||
const require_icon = require('../../../utils/vue/icon.js');
|
||||
const require_typescript = require('../../../utils/typescript.js');
|
||||
const require_index = require('../../../hooks/use-deprecated/index.js');
|
||||
const require_index$1 = require('../../../hooks/use-locale/index.js');
|
||||
const require_index$2 = require('../../../hooks/use-namespace/index.js');
|
||||
const require_index$3 = require('../../../hooks/use-size/index.js');
|
||||
const require_constants = require('./constants.js');
|
||||
const require_prev = require('./components/prev2.js');
|
||||
const require_next = require('./components/next2.js');
|
||||
const require_sizes = require('./components/sizes2.js');
|
||||
const require_jumper = require('./components/jumper2.js');
|
||||
const require_total = require('./components/total2.js');
|
||||
const require_pager = require('./components/pager2.js');
|
||||
let _element_plus_icons_vue = require("@element-plus/icons-vue");
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/pagination/src/pagination.ts
|
||||
/**
|
||||
* It it user's responsibility to guarantee that the value of props.total... is number
|
||||
* (same as pageSize, defaultPageSize, currentPage, defaultCurrentPage, pageCount)
|
||||
* Otherwise we can reasonable infer that the corresponding field is absent
|
||||
*/
|
||||
const isAbsent = (v) => typeof v !== "number";
|
||||
const paginationProps = require_runtime$1.buildProps({
|
||||
pageSize: Number,
|
||||
defaultPageSize: Number,
|
||||
total: Number,
|
||||
pageCount: Number,
|
||||
pagerCount: {
|
||||
type: Number,
|
||||
validator: (value) => {
|
||||
return require_types.isNumber(value) && Math.trunc(value) === value && value > 4 && value < 22 && value % 2 === 1;
|
||||
},
|
||||
default: 7
|
||||
},
|
||||
currentPage: Number,
|
||||
defaultCurrentPage: Number,
|
||||
layout: {
|
||||
type: String,
|
||||
default: [
|
||||
"prev",
|
||||
"pager",
|
||||
"next",
|
||||
"jumper",
|
||||
"->",
|
||||
"total"
|
||||
].join(", ")
|
||||
},
|
||||
pageSizes: {
|
||||
type: require_runtime$1.definePropType(Array),
|
||||
default: () => require_typescript.mutable([
|
||||
10,
|
||||
20,
|
||||
30,
|
||||
40,
|
||||
50,
|
||||
100
|
||||
])
|
||||
},
|
||||
popperClass: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
popperStyle: { type: require_runtime$1.definePropType([String, Object]) },
|
||||
prevText: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
prevIcon: {
|
||||
type: require_icon.iconPropType,
|
||||
default: () => _element_plus_icons_vue.ArrowLeft
|
||||
},
|
||||
nextText: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
nextIcon: {
|
||||
type: require_icon.iconPropType,
|
||||
default: () => _element_plus_icons_vue.ArrowRight
|
||||
},
|
||||
teleported: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
small: Boolean,
|
||||
size: require_index$3.useSizeProp,
|
||||
background: Boolean,
|
||||
disabled: Boolean,
|
||||
hideOnSinglePage: Boolean,
|
||||
appendSizeTo: String
|
||||
});
|
||||
const paginationEmits = {
|
||||
"update:current-page": (val) => require_types.isNumber(val),
|
||||
"update:page-size": (val) => require_types.isNumber(val),
|
||||
"size-change": (val) => require_types.isNumber(val),
|
||||
change: (currentPage, pageSize) => require_types.isNumber(currentPage) && require_types.isNumber(pageSize),
|
||||
"current-change": (val) => require_types.isNumber(val),
|
||||
"prev-click": (val) => require_types.isNumber(val),
|
||||
"next-click": (val) => require_types.isNumber(val)
|
||||
};
|
||||
const componentName = "ElPagination";
|
||||
var pagination_default = (0, vue.defineComponent)({
|
||||
name: componentName,
|
||||
props: paginationProps,
|
||||
emits: paginationEmits,
|
||||
setup(props, { emit, slots }) {
|
||||
const { t } = require_index$1.useLocale();
|
||||
const ns = require_index$2.useNamespace("pagination");
|
||||
const vnodeProps = (0, vue.getCurrentInstance)().vnode.props || {};
|
||||
const _globalSize = require_index$3.useGlobalSize();
|
||||
const _size = (0, vue.computed)(() => props.small ? "small" : props.size ?? _globalSize.value);
|
||||
require_index.useDeprecated({
|
||||
from: "small",
|
||||
replacement: "size",
|
||||
version: "3.0.0",
|
||||
scope: "el-pagination",
|
||||
ref: "https://element-plus.org/zh-CN/component/pagination.html"
|
||||
}, (0, vue.computed)(() => !!props.small));
|
||||
const hasCurrentPageListener = "onUpdate:currentPage" in vnodeProps || "onUpdate:current-page" in vnodeProps || "onCurrentChange" in vnodeProps;
|
||||
const hasPageSizeListener = "onUpdate:pageSize" in vnodeProps || "onUpdate:page-size" in vnodeProps || "onSizeChange" in vnodeProps;
|
||||
const assertValidUsage = (0, vue.computed)(() => {
|
||||
if (isAbsent(props.total) && isAbsent(props.pageCount)) return false;
|
||||
if (!isAbsent(props.currentPage) && !hasCurrentPageListener) return false;
|
||||
if (props.layout.includes("sizes")) {
|
||||
if (!isAbsent(props.pageCount)) {
|
||||
if (!hasPageSizeListener) return false;
|
||||
} else if (!isAbsent(props.total)) {
|
||||
if (!isAbsent(props.pageSize)) {
|
||||
if (!hasPageSizeListener) return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
const innerPageSize = (0, vue.ref)(isAbsent(props.defaultPageSize) ? 10 : props.defaultPageSize);
|
||||
const innerCurrentPage = (0, vue.ref)(isAbsent(props.defaultCurrentPage) ? 1 : props.defaultCurrentPage);
|
||||
const pageSizeBridge = (0, vue.computed)({
|
||||
get() {
|
||||
return isAbsent(props.pageSize) ? innerPageSize.value : props.pageSize;
|
||||
},
|
||||
set(v) {
|
||||
if (isAbsent(props.pageSize)) innerPageSize.value = v;
|
||||
if (hasPageSizeListener) {
|
||||
emit("update:page-size", v);
|
||||
emit("size-change", v);
|
||||
}
|
||||
}
|
||||
});
|
||||
const pageCountBridge = (0, vue.computed)(() => {
|
||||
let pageCount = 0;
|
||||
if (!isAbsent(props.pageCount)) pageCount = props.pageCount;
|
||||
else if (!isAbsent(props.total)) pageCount = Math.max(1, Math.ceil(props.total / pageSizeBridge.value));
|
||||
return pageCount;
|
||||
});
|
||||
const currentPageBridge = (0, vue.computed)({
|
||||
get() {
|
||||
return isAbsent(props.currentPage) ? innerCurrentPage.value : props.currentPage;
|
||||
},
|
||||
set(v) {
|
||||
let newCurrentPage = v;
|
||||
if (v < 1) newCurrentPage = 1;
|
||||
else if (v > pageCountBridge.value) newCurrentPage = pageCountBridge.value;
|
||||
if (isAbsent(props.currentPage)) innerCurrentPage.value = newCurrentPage;
|
||||
if (hasCurrentPageListener) {
|
||||
emit("update:current-page", newCurrentPage);
|
||||
emit("current-change", newCurrentPage);
|
||||
}
|
||||
}
|
||||
});
|
||||
(0, vue.watch)(pageCountBridge, (val) => {
|
||||
if (currentPageBridge.value > val) currentPageBridge.value = val;
|
||||
});
|
||||
(0, vue.watch)([currentPageBridge, pageSizeBridge], (value) => {
|
||||
emit(require_event.CHANGE_EVENT, ...value);
|
||||
}, { flush: "post" });
|
||||
function handleCurrentChange(val) {
|
||||
currentPageBridge.value = val;
|
||||
}
|
||||
function handleSizeChange(val) {
|
||||
pageSizeBridge.value = val;
|
||||
const newPageCount = pageCountBridge.value;
|
||||
if (currentPageBridge.value > newPageCount) currentPageBridge.value = newPageCount;
|
||||
}
|
||||
function prev() {
|
||||
if (props.disabled) return;
|
||||
currentPageBridge.value -= 1;
|
||||
emit("prev-click", currentPageBridge.value);
|
||||
}
|
||||
function next() {
|
||||
if (props.disabled) return;
|
||||
currentPageBridge.value += 1;
|
||||
emit("next-click", currentPageBridge.value);
|
||||
}
|
||||
function addClass(element, cls) {
|
||||
if (element) {
|
||||
if (!element.props) element.props = {};
|
||||
element.props.class = [element.props.class, cls].join(" ");
|
||||
}
|
||||
}
|
||||
(0, vue.provide)(require_constants.elPaginationKey, {
|
||||
pageCount: pageCountBridge,
|
||||
disabled: (0, vue.computed)(() => props.disabled),
|
||||
currentPage: currentPageBridge,
|
||||
changeEvent: handleCurrentChange,
|
||||
handleSizeChange
|
||||
});
|
||||
return () => {
|
||||
if (!assertValidUsage.value) {
|
||||
require_error.debugWarn(componentName, t("el.pagination.deprecationWarning"));
|
||||
return null;
|
||||
}
|
||||
if (!props.layout) return null;
|
||||
if (props.hideOnSinglePage && pageCountBridge.value <= 1) return null;
|
||||
const rootChildren = [];
|
||||
const rightWrapperChildren = [];
|
||||
const rightWrapperRoot = (0, vue.h)("div", { class: ns.e("rightwrapper") }, rightWrapperChildren);
|
||||
const TEMPLATE_MAP = {
|
||||
prev: (0, vue.h)(require_prev.default, {
|
||||
disabled: props.disabled,
|
||||
currentPage: currentPageBridge.value,
|
||||
prevText: props.prevText,
|
||||
prevIcon: props.prevIcon,
|
||||
onClick: prev
|
||||
}),
|
||||
jumper: (0, vue.h)(require_jumper.default, { size: _size.value }),
|
||||
pager: (0, vue.h)(require_pager.default, {
|
||||
currentPage: currentPageBridge.value,
|
||||
pageCount: pageCountBridge.value,
|
||||
pagerCount: props.pagerCount,
|
||||
onChange: handleCurrentChange,
|
||||
disabled: props.disabled
|
||||
}),
|
||||
next: (0, vue.h)(require_next.default, {
|
||||
disabled: props.disabled,
|
||||
currentPage: currentPageBridge.value,
|
||||
pageCount: pageCountBridge.value,
|
||||
nextText: props.nextText,
|
||||
nextIcon: props.nextIcon,
|
||||
onClick: next
|
||||
}),
|
||||
sizes: (0, vue.h)(require_sizes.default, {
|
||||
pageSize: pageSizeBridge.value,
|
||||
pageSizes: props.pageSizes,
|
||||
popperClass: props.popperClass,
|
||||
popperStyle: props.popperStyle,
|
||||
disabled: props.disabled,
|
||||
teleported: props.teleported,
|
||||
size: _size.value,
|
||||
appendSizeTo: props.appendSizeTo
|
||||
}),
|
||||
slot: slots?.default?.() ?? null,
|
||||
total: (0, vue.h)(require_total.default, { total: isAbsent(props.total) ? 0 : props.total })
|
||||
};
|
||||
const components = props.layout.split(",").map((item) => item.trim());
|
||||
let haveRightWrapper = false;
|
||||
components.forEach((c) => {
|
||||
if (c === "->") {
|
||||
haveRightWrapper = true;
|
||||
return;
|
||||
}
|
||||
if (!haveRightWrapper) rootChildren.push(TEMPLATE_MAP[c]);
|
||||
else rightWrapperChildren.push(TEMPLATE_MAP[c]);
|
||||
});
|
||||
addClass(rootChildren[0], ns.is("first"));
|
||||
addClass(rootChildren[rootChildren.length - 1], ns.is("last"));
|
||||
if (haveRightWrapper && rightWrapperChildren.length > 0) {
|
||||
addClass(rightWrapperChildren[0], ns.is("first"));
|
||||
addClass(rightWrapperChildren[rightWrapperChildren.length - 1], ns.is("last"));
|
||||
rootChildren.push(rightWrapperRoot);
|
||||
}
|
||||
return (0, vue.h)("div", { class: [
|
||||
ns.b(),
|
||||
ns.is("background", props.background),
|
||||
ns.m(_size.value)
|
||||
] }, rootChildren);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//#endregion
|
||||
exports.default = pagination_default;
|
||||
exports.paginationEmits = paginationEmits;
|
||||
exports.paginationProps = paginationProps;
|
||||
//# sourceMappingURL=pagination.js.map
|
||||
Generated
Vendored
+1
File diff suppressed because one or more lines are too long
Generated
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
||||
const require_constants = require('./constants.js');
|
||||
let vue = require("vue");
|
||||
|
||||
//#region ../../packages/components/pagination/src/usePagination.ts
|
||||
const usePagination = () => (0, vue.inject)(require_constants.elPaginationKey, {});
|
||||
|
||||
//#endregion
|
||||
exports.usePagination = usePagination;
|
||||
//# sourceMappingURL=usePagination.js.map
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"usePagination.js","names":["elPaginationKey"],"sources":["../../../../../../packages/components/pagination/src/usePagination.ts"],"sourcesContent":["import { inject } from 'vue'\nimport { elPaginationKey } from './constants'\n\nexport const usePagination = () => inject(elPaginationKey, {})\n"],"mappings":";;;;;;AAGA,MAAa,sCAA6BA,mCAAiB,EAAE,CAAC"}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
require('../../base/style/css.js');
|
||||
require('../../input/style/css.js');
|
||||
require('../../select/style/css.js');
|
||||
require("element-plus/theme-chalk/el-pagination.css");
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
require('../../base/style/index.js');
|
||||
require('../../input/style/index.js');
|
||||
require('../../select/style/index.js');
|
||||
require("element-plus/theme-chalk/src/pagination.scss");
|
||||
Reference in New Issue
Block a user