hzzt-plus 0.0.2-dev-01 → 0.0.2-dev-02
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.css +1 -1
- package/dist/index.full.js +121 -53
- package/dist/index.full.min.js +7 -7
- package/dist/index.full.min.js.map +1 -1
- package/dist/index.full.min.mjs +8 -8
- package/dist/index.full.min.mjs.map +1 -1
- package/dist/index.full.mjs +122 -55
- package/dist/locale/en.js +4 -0
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.js.map +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.min.mjs.map +1 -1
- package/dist/locale/en.mjs +4 -0
- package/dist/locale/zh-cn.js +4 -0
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.js.map +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.min.mjs.map +1 -1
- package/dist/locale/zh-cn.mjs +4 -0
- package/es/component.mjs +3 -1
- package/es/component.mjs.map +1 -1
- package/es/components/index.d.ts +1 -0
- package/es/components/index.mjs +1 -0
- package/es/components/index.mjs.map +1 -1
- package/es/components/pagination/index.d.ts +46 -0
- package/es/components/pagination/index.mjs +8 -0
- package/es/components/pagination/index.mjs.map +1 -0
- package/es/components/pagination/src/index.mjs +68 -0
- package/es/components/pagination/src/index.mjs.map +1 -0
- package/es/components/pagination/src/index.vue.d.ts +46 -0
- package/es/components/pagination/style/css.d.ts +2 -0
- package/es/components/pagination/style/css.mjs +3 -0
- package/es/components/pagination/style/css.mjs.map +1 -0
- package/es/components/pagination/style/index.d.ts +2 -0
- package/es/components/pagination/style/index.mjs +3 -0
- package/es/components/pagination/style/index.mjs.map +1 -0
- package/es/index.mjs +1 -0
- package/es/index.mjs.map +1 -1
- package/es/locale/lang/en.d.ts +4 -0
- package/es/locale/lang/en.mjs +4 -0
- package/es/locale/lang/en.mjs.map +1 -1
- package/es/locale/lang/zh-cn.d.ts +4 -0
- package/es/locale/lang/zh-cn.mjs +4 -0
- package/es/locale/lang/zh-cn.mjs.map +1 -1
- package/global.d.ts +1 -0
- package/lib/component.js +3 -1
- package/lib/component.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.js +2 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/pagination/index.d.ts +46 -0
- package/lib/components/pagination/index.js +13 -0
- package/lib/components/pagination/index.js.map +1 -0
- package/lib/components/pagination/src/index.js +72 -0
- package/lib/components/pagination/src/index.js.map +1 -0
- package/lib/components/pagination/src/index.vue.d.ts +46 -0
- package/lib/components/pagination/style/css.d.ts +2 -0
- package/lib/components/pagination/style/css.js +6 -0
- package/lib/components/pagination/style/css.js.map +1 -0
- package/lib/components/pagination/style/index.d.ts +2 -0
- package/lib/components/pagination/style/index.js +6 -0
- package/lib/components/pagination/style/index.js.map +1 -0
- package/lib/index.js +21 -19
- package/lib/index.js.map +1 -1
- package/lib/locale/lang/en.d.ts +4 -0
- package/lib/locale/lang/en.js +4 -0
- package/lib/locale/lang/en.js.map +1 -1
- package/lib/locale/lang/zh-cn.d.ts +4 -0
- package/lib/locale/lang/zh-cn.js +4 -0
- package/lib/locale/lang/zh-cn.js.map +1 -1
- package/package.json +1 -1
- package/theme/base.css +1 -1
- package/theme/hzzt-pagination.css +1 -0
- package/theme/index.css +1 -1
- package/theme/src/base.scss +4 -3
- package/theme/src/common/index.scss +48 -0
- package/theme/src/index.scss +2 -0
- package/theme/src/pagination.scss +17 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
pagination: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
total: number;
|
|
6
|
+
current_page: number;
|
|
7
|
+
total_pages: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
pagination: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: () => {
|
|
15
|
+
total: number;
|
|
16
|
+
current_page: number;
|
|
17
|
+
total_pages: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>>;
|
|
24
|
+
emit: (event: "prev" | "next", ...args: any[]) => void;
|
|
25
|
+
t: import("hzzt-plus/es/hooks").Translator;
|
|
26
|
+
prePage: () => false | undefined;
|
|
27
|
+
nextPage: () => false | undefined;
|
|
28
|
+
HzztIcon: {
|
|
29
|
+
install(app: import("vue").App<any>): void;
|
|
30
|
+
};
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("prev" | "next")[], "prev" | "next", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
pagination: {
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
default: () => {
|
|
35
|
+
total: number;
|
|
36
|
+
current_page: number;
|
|
37
|
+
total_pages: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}>> & {
|
|
41
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
pagination: Record<string, any>;
|
|
45
|
+
}>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/es/index.mjs
CHANGED
|
@@ -14,6 +14,7 @@ export { provideGlobalConfig, useGlobalConfig } from './components/config-provid
|
|
|
14
14
|
export { HzztConfigProvider } from './components/config-provider/index.mjs';
|
|
15
15
|
export { HzztTab } from './components/tab/index.mjs';
|
|
16
16
|
export { HzztIcon } from './components/icon/index.mjs';
|
|
17
|
+
export { HzztPagination } from './components/pagination/index.mjs';
|
|
17
18
|
export { INSTALLED_KEY } from './constants/key.mjs';
|
|
18
19
|
export { componentSizeMap, componentSizes } from './constants/size.mjs';
|
|
19
20
|
export { WEEK_DAYS, datePickTypes } from './constants/date.mjs';
|
package/es/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAG,SAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAG,SAAS,CAAC;;;;"}
|
package/es/locale/lang/en.d.ts
CHANGED
package/es/locale/lang/en.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.mjs","sources":["../../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n }\n },\n}\n"],"names":[],"mappings":"AAAA,cAAe;AACf,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,QAAQ;AACtB,MAAM,OAAO,EAAE,SAAS;AACxB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"en.mjs","sources":["../../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n },\n pagination: {\n total: 'total',\n strip: 'strip',\n }\n },\n}\n"],"names":[],"mappings":"AAAA,cAAe;AACf,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,QAAQ;AACtB,MAAM,OAAO,EAAE,SAAS;AACxB,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,KAAK,EAAE,OAAO;AACpB,MAAM,KAAK,EAAE,OAAO;AACpB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
package/es/locale/lang/zh-cn.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-cn.mjs","sources":["../../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n }\n },\n}\n"],"names":[],"mappings":"AAAA,WAAe;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,cAAc;AAC5B,MAAM,OAAO,EAAE,cAAc;AAC7B,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"zh-cn.mjs","sources":["../../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n },\n pagination: {\n total: '共',\n strip: '条',\n }\n },\n}\n"],"names":[],"mappings":"AAAA,WAAe;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,cAAc;AAC5B,MAAM,OAAO,EAAE,cAAc;AAC7B,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,KAAK,EAAE,QAAQ;AACrB,MAAM,KAAK,EAAE,QAAQ;AACrB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
package/global.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ declare module 'vue' {
|
|
|
7
7
|
HzztConfigProvider: typeof import('hzzt-plus')['HzztConfigProvider']
|
|
8
8
|
HzztTab: typeof import('hzzt-plus')['HzztTab']
|
|
9
9
|
HzztIcon: typeof import('hzzt-plus')['HzztIcon']
|
|
10
|
+
HzztPagination: typeof import('hzzt-plus')['HzztPagination']
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
|
package/lib/component.js
CHANGED
|
@@ -8,6 +8,7 @@ var index$3 = require('./components/collapse/index.js');
|
|
|
8
8
|
var index = require('./components/config-provider/index.js');
|
|
9
9
|
var index$4 = require('./components/tab/index.js');
|
|
10
10
|
var index$5 = require('./components/icon/index.js');
|
|
11
|
+
var index$6 = require('./components/pagination/index.js');
|
|
11
12
|
|
|
12
13
|
var Components = [
|
|
13
14
|
index.HzztConfigProvider,
|
|
@@ -15,7 +16,8 @@ var Components = [
|
|
|
15
16
|
index$2.HzztDropdown,
|
|
16
17
|
index$3.HzztCollapse,
|
|
17
18
|
index$4.HzztTab,
|
|
18
|
-
index$5.HzztIcon
|
|
19
|
+
index$5.HzztIcon,
|
|
20
|
+
index$6.HzztPagination
|
|
19
21
|
];
|
|
20
22
|
|
|
21
23
|
exports["default"] = Components;
|
package/lib/component.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {HzztTitle} from '@hzzt-plus/components/title'\nimport {HzztDropdown} from '@hzzt-plus/components/dropdown'\nimport {HzztCollapse} from '@hzzt-plus/components/collapse'\nimport {HzztConfigProvider} from '@hzzt-plus/components/config-provider'\nimport {HzztTab} from '@hzzt-plus/components/tab'\nimport {HzztIcon} from '@hzzt-plus/components/icon'\n\nimport type {Plugin} from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab","HzztIcon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../packages/hzzt-plus/component.ts"],"sourcesContent":["import {HzztTitle} from '@hzzt-plus/components/title'\nimport {HzztDropdown} from '@hzzt-plus/components/dropdown'\nimport {HzztCollapse} from '@hzzt-plus/components/collapse'\nimport {HzztConfigProvider} from '@hzzt-plus/components/config-provider'\nimport {HzztTab} from '@hzzt-plus/components/tab'\nimport {HzztIcon} from '@hzzt-plus/components/icon'\nimport {HzztPagination} from '@hzzt-plus/components/pagination'\n\nimport type {Plugin} from 'vue'\n\nexport default [\n HzztConfigProvider,\n HzztTitle,\n HzztDropdown,\n HzztCollapse,\n HzztTab,\n HzztIcon,\n HzztPagination,\n] as Plugin[]\n"],"names":["HzztConfigProvider","HzztTitle","HzztDropdown","HzztCollapse","HzztTab","HzztIcon","HzztPagination"],"mappings":";;;;;;;;;;;;AAOA,iBAAe;AACf,EAAEA,wBAAkB;AACpB,EAAEC,iBAAS;AACX,EAAEC,oBAAY;AACd,EAAEC,oBAAY;AACd,EAAEC,eAAO;AACT,EAAEC,gBAAQ;AACV,EAAEC,sBAAc;AAChB,CAAC;;;;"}
|
package/lib/components/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var index$2 = require('./collapse/index.js');
|
|
|
8
8
|
var index$3 = require('./config-provider/index.js');
|
|
9
9
|
var index$4 = require('./tab/index.js');
|
|
10
10
|
var index$5 = require('./icon/index.js');
|
|
11
|
+
var index$6 = require('./pagination/index.js');
|
|
11
12
|
var configProviderProps = require('./config-provider/src/config-provider-props.js');
|
|
12
13
|
var constants = require('./config-provider/src/constants.js');
|
|
13
14
|
var useGlobalConfig = require('./config-provider/src/hooks/use-global-config.js');
|
|
@@ -20,6 +21,7 @@ exports.HzztCollapse = index$2.HzztCollapse;
|
|
|
20
21
|
exports.HzztConfigProvider = index$3.HzztConfigProvider;
|
|
21
22
|
exports.HzztTab = index$4.HzztTab;
|
|
22
23
|
exports.HzztIcon = index$5.HzztIcon;
|
|
24
|
+
exports.HzztPagination = index$6.HzztPagination;
|
|
23
25
|
exports.configProviderProps = configProviderProps.configProviderProps;
|
|
24
26
|
exports.configProviderContextKey = constants.configProviderContextKey;
|
|
25
27
|
exports.provideGlobalConfig = useGlobalConfig.provideGlobalConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export declare const HzztPagination: import("hzzt-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
2
|
+
pagination: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
total: number;
|
|
6
|
+
current_page: number;
|
|
7
|
+
total_pages: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
pagination: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: () => {
|
|
15
|
+
total: number;
|
|
16
|
+
current_page: number;
|
|
17
|
+
total_pages: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>>;
|
|
24
|
+
emit: (event: "prev" | "next", ...args: any[]) => void;
|
|
25
|
+
t: import("../..").Translator;
|
|
26
|
+
prePage: () => false | undefined;
|
|
27
|
+
nextPage: () => false | undefined;
|
|
28
|
+
HzztIcon: {
|
|
29
|
+
install(app: import("vue").App<any>): void;
|
|
30
|
+
};
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("prev" | "next")[], "prev" | "next", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
pagination: {
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
default: () => {
|
|
35
|
+
total: number;
|
|
36
|
+
current_page: number;
|
|
37
|
+
total_pages: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}>> & {
|
|
41
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
pagination: Record<string, any>;
|
|
45
|
+
}>> & Record<string, any>;
|
|
46
|
+
export default HzztPagination;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../utils/index.js');
|
|
6
|
+
var index = require('./src/index.js');
|
|
7
|
+
var install = require('../../utils/vue/install.js');
|
|
8
|
+
|
|
9
|
+
const HzztPagination = install.withInstall(index["default"]);
|
|
10
|
+
|
|
11
|
+
exports.HzztPagination = HzztPagination;
|
|
12
|
+
exports["default"] = HzztPagination;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../packages/components/pagination/index.ts"],"sourcesContent":["import { withInstall } from '@hzzt-plus/utils'\n\nimport Pagination from './src/index.vue';\n\nexport const HzztPagination = withInstall(Pagination);\nexport default HzztPagination\n"],"names":["withInstall","Pagination"],"mappings":";;;;;;;;AAEY,MAAC,cAAc,GAAGA,mBAAW,CAACC,gBAAU;;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
var index$1 = require('../../icon/index.js');
|
|
7
|
+
require('../../../hooks/index.js');
|
|
8
|
+
var pluginVue_exportHelper = require('../../../_virtual/plugin-vue_export-helper.js');
|
|
9
|
+
var index = require('../../../hooks/use-locale/index.js');
|
|
10
|
+
|
|
11
|
+
const _hoisted_1 = { class: "flex justify-content-between hzzt-pagination" };
|
|
12
|
+
const _hoisted_2 = { class: "flex align-items-center font-12" };
|
|
13
|
+
const _hoisted_3 = { class: "flex align-items-center font-14" };
|
|
14
|
+
const _hoisted_4 = { class: "flex" };
|
|
15
|
+
const __default__ = vue.defineComponent({
|
|
16
|
+
name: "HzztPagination"
|
|
17
|
+
});
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
19
|
+
...__default__,
|
|
20
|
+
props: {
|
|
21
|
+
pagination: {
|
|
22
|
+
type: Object,
|
|
23
|
+
default: () => ({
|
|
24
|
+
total: 0,
|
|
25
|
+
current_page: 1,
|
|
26
|
+
total_pages: 1
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
emits: ["prev", "next"],
|
|
31
|
+
setup(__props, { emit }) {
|
|
32
|
+
const props = __props;
|
|
33
|
+
const { t } = index.useLocale();
|
|
34
|
+
function prePage() {
|
|
35
|
+
if (props.pagination.current_page > 1) {
|
|
36
|
+
emit("prev", props.pagination.current_page - 1);
|
|
37
|
+
} else {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function nextPage() {
|
|
42
|
+
if (props.pagination.current_page < props.pagination.total_pages) {
|
|
43
|
+
emit("next", props.pagination.current_page + 1);
|
|
44
|
+
} else {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
50
|
+
vue.createElementVNode("p", _hoisted_2, vue.toDisplayString(vue.unref(t)("hzzt.pagination.total")) + vue.toDisplayString(__props.pagination.total) + vue.toDisplayString(vue.unref(t)("hzzt.pagination.strip")), 1),
|
|
51
|
+
vue.createElementVNode("div", _hoisted_3, [
|
|
52
|
+
vue.renderSlot(_ctx.$slots, "right"),
|
|
53
|
+
vue.createVNode(vue.unref(index$1.HzztIcon), {
|
|
54
|
+
class: vue.normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page > 1 }]),
|
|
55
|
+
name: "arrow-left",
|
|
56
|
+
onClick: prePage
|
|
57
|
+
}, null, 8, ["class"]),
|
|
58
|
+
vue.createElementVNode("p", _hoisted_4, vue.toDisplayString(__props.pagination.current_page) + "/" + vue.toDisplayString(__props.pagination.total_pages), 1),
|
|
59
|
+
vue.createVNode(vue.unref(index$1.HzztIcon), {
|
|
60
|
+
class: vue.normalizeClass(["hzzt-pagination-arrow", { active: __props.pagination.current_page < __props.pagination.total_pages }]),
|
|
61
|
+
name: "arrow-right",
|
|
62
|
+
onClick: nextPage
|
|
63
|
+
}, null, 8, ["class"])
|
|
64
|
+
])
|
|
65
|
+
]);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
var Pagination = /* @__PURE__ */ pluginVue_exportHelper["default"](_sfc_main, [["__file", "index.vue"]]);
|
|
70
|
+
|
|
71
|
+
exports["default"] = Pagination;
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../packages/components/pagination/src/index.vue"],"sourcesContent":["<template>\n <div class=\"flex justify-content-between hzzt-pagination\">\n <p class=\"flex align-items-center font-12\">\n {{ t('hzzt.pagination.total') }}{{ pagination.total }}{{ t('hzzt.pagination.strip') }}\n </p>\n <div class=\"flex align-items-center font-14\">\n <slot name=\"right\" />\n <hzzt-icon class=\"hzzt-pagination-arrow\" :class=\"{ active: pagination.current_page > 1 }\" name=\"arrow-left\"\n @click=\"prePage\" />\n <p class=\"flex\">\n {{ pagination.current_page }}/{{ pagination.total_pages }}\n </p>\n <hzzt-icon\n class=\"hzzt-pagination-arrow\"\n :class=\"{ active: pagination.current_page < pagination.total_pages }\"\n name=\"arrow-right\"\n @click=\"nextPage\"\n />\n </div>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\n\n import {HzztIcon} from '@hzzt-plus/components/icon'\n import {useLocale} from '@hzzt-plus/hooks'\n\n defineOptions({\n name: 'HzztPagination',\n });\n\n const props = defineProps({\n pagination: {\n type: Object,\n default: () => ({\n total: 0,\n current_page: 1,\n total_pages: 1,\n }),\n },\n });\n\n const emit = defineEmits(['prev', 'next']);\n const {t} = useLocale();\n\n function prePage() {\n if (props.pagination.current_page > 1) {\n emit('prev', props.pagination.current_page - 1);\n } else {\n return false;\n }\n }\n\n function nextPage() {\n if (props.pagination.current_page < props.pagination.total_pages) {\n emit('next', props.pagination.current_page + 1);\n } else {\n return false;\n }\n }\n</script>\n"],"names":["useLocale"],"mappings":";;;;;;;;;;;;;;uCA2BgB,CAAA;AAAA,EACZ,IAAM,EAAA,gBAAA;AACR,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;AAcA,IAAM,MAAA,EAAC,MAAKA,eAAU,EAAA,CAAA;AAEtB,IAAmB,SAAA,OAAA,GAAA;AACjB,MAAI,IAAA,KAAA,CAAM,UAAW,CAAA,YAAA,GAAe,CAAG,EAAA;AACrC,QAAA,IAAA,CAAK,MAAQ,EAAA,KAAA,CAAM,UAAW,CAAA,YAAA,GAAe,CAAC,CAAA,CAAA;AAAA,OACzC,MAAA;AACL,QAAO,OAAA,KAAA,CAAA;AAAA,OACT;AAAA,KACF;AAEA,IAAoB,SAAA,QAAA,GAAA;AAClB,MAAA,IAAI,KAAM,CAAA,UAAA,CAAW,YAAe,GAAA,KAAA,CAAM,WAAW,WAAa,EAAA;AAChE,QAAA,IAAA,CAAK,MAAQ,EAAA,KAAA,CAAM,UAAW,CAAA,YAAA,GAAe,CAAC,CAAA,CAAA;AAAA,OACzC,MAAA;AACL,QAAO,OAAA,KAAA,CAAA;AAAA,OACT;AAAA,KACF;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
pagination: {
|
|
3
|
+
type: ObjectConstructor;
|
|
4
|
+
default: () => {
|
|
5
|
+
total: number;
|
|
6
|
+
current_page: number;
|
|
7
|
+
total_pages: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
}, {
|
|
11
|
+
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
pagination: {
|
|
13
|
+
type: ObjectConstructor;
|
|
14
|
+
default: () => {
|
|
15
|
+
total: number;
|
|
16
|
+
current_page: number;
|
|
17
|
+
total_pages: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}>> & {
|
|
21
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
22
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
23
|
+
}>>;
|
|
24
|
+
emit: (event: "prev" | "next", ...args: any[]) => void;
|
|
25
|
+
t: import("hzzt-plus/es/hooks").Translator;
|
|
26
|
+
prePage: () => false | undefined;
|
|
27
|
+
nextPage: () => false | undefined;
|
|
28
|
+
HzztIcon: {
|
|
29
|
+
install(app: import("vue").App<any>): void;
|
|
30
|
+
};
|
|
31
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("prev" | "next")[], "prev" | "next", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
32
|
+
pagination: {
|
|
33
|
+
type: ObjectConstructor;
|
|
34
|
+
default: () => {
|
|
35
|
+
total: number;
|
|
36
|
+
current_page: number;
|
|
37
|
+
total_pages: number;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}>> & {
|
|
41
|
+
onPrev?: ((...args: any[]) => any) | undefined;
|
|
42
|
+
onNext?: ((...args: any[]) => any) | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
pagination: Record<string, any>;
|
|
45
|
+
}>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/lib/index.js
CHANGED
|
@@ -17,15 +17,16 @@ var useGlobalConfig = require('./components/config-provider/src/hooks/use-global
|
|
|
17
17
|
var index$3 = require('./components/config-provider/index.js');
|
|
18
18
|
var index$4 = require('./components/tab/index.js');
|
|
19
19
|
var index$5 = require('./components/icon/index.js');
|
|
20
|
+
var index$6 = require('./components/pagination/index.js');
|
|
20
21
|
var key = require('./constants/key.js');
|
|
21
22
|
var size = require('./constants/size.js');
|
|
22
23
|
var date = require('./constants/date.js');
|
|
23
|
-
var index$
|
|
24
|
-
var index$
|
|
25
|
-
var index$
|
|
26
|
-
var index$
|
|
27
|
-
var index$
|
|
28
|
-
var index$
|
|
24
|
+
var index$7 = require('./directives/download/index.js');
|
|
25
|
+
var index$8 = require('./directives/height/index.js');
|
|
26
|
+
var index$9 = require('./directives/blur/index.js');
|
|
27
|
+
var index$a = require('./directives/highlight/index.js');
|
|
28
|
+
var index$b = require('./hooks/use-locale/index.js');
|
|
29
|
+
var index$c = require('./hooks/use-size/index.js');
|
|
29
30
|
|
|
30
31
|
const install = defaults["default"].install;
|
|
31
32
|
const version = defaults["default"].version;
|
|
@@ -42,24 +43,25 @@ exports.useGlobalConfig = useGlobalConfig.useGlobalConfig;
|
|
|
42
43
|
exports.HzztConfigProvider = index$3.HzztConfigProvider;
|
|
43
44
|
exports.HzztTab = index$4.HzztTab;
|
|
44
45
|
exports.HzztIcon = index$5.HzztIcon;
|
|
46
|
+
exports.HzztPagination = index$6.HzztPagination;
|
|
45
47
|
exports.INSTALLED_KEY = key.INSTALLED_KEY;
|
|
46
48
|
exports.componentSizeMap = size.componentSizeMap;
|
|
47
49
|
exports.componentSizes = size.componentSizes;
|
|
48
50
|
exports.WEEK_DAYS = date.WEEK_DAYS;
|
|
49
51
|
exports.datePickTypes = date.datePickTypes;
|
|
50
|
-
exports.Download = index$
|
|
51
|
-
exports.Height = index$
|
|
52
|
-
exports.Blur = index$
|
|
53
|
-
exports.Highlight = index$
|
|
54
|
-
exports.buildLocaleContext = index$
|
|
55
|
-
exports.buildTranslator = index$
|
|
56
|
-
exports.localeContextKey = index$
|
|
57
|
-
exports.translate = index$
|
|
58
|
-
exports.useLocale = index$
|
|
59
|
-
exports.SIZE_INJECTION_KEY = index$
|
|
60
|
-
exports.useGlobalSize = index$
|
|
61
|
-
exports.useSizeProp = index$
|
|
62
|
-
exports.useSizeProps = index$
|
|
52
|
+
exports.Download = index$7["default"];
|
|
53
|
+
exports.Height = index$8["default"];
|
|
54
|
+
exports.Blur = index$9["default"];
|
|
55
|
+
exports.Highlight = index$a["default"];
|
|
56
|
+
exports.buildLocaleContext = index$b.buildLocaleContext;
|
|
57
|
+
exports.buildTranslator = index$b.buildTranslator;
|
|
58
|
+
exports.localeContextKey = index$b.localeContextKey;
|
|
59
|
+
exports.translate = index$b.translate;
|
|
60
|
+
exports.useLocale = index$b.useLocale;
|
|
61
|
+
exports.SIZE_INJECTION_KEY = index$c.SIZE_INJECTION_KEY;
|
|
62
|
+
exports.useGlobalSize = index$c.useGlobalSize;
|
|
63
|
+
exports.useSizeProp = index$c.useSizeProp;
|
|
64
|
+
exports.useSizeProps = index$c.useSizeProps;
|
|
63
65
|
exports.install = install;
|
|
64
66
|
exports.version = version;
|
|
65
67
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":["installer"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../packages/hzzt-plus/index.ts"],"sourcesContent":["import installer from './defaults'\nexport * from '@hzzt-plus/components'\nexport * from '@hzzt-plus/constants'\nexport * from '@hzzt-plus/directives'\nexport * from '@hzzt-plus/hooks'\nexport * from './make-installer'\n\nexport const install = installer.install\nexport const version = installer.version\nexport default installer;\n"],"names":["installer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMY,MAAC,OAAO,GAAGA,mBAAS,CAAC,QAAQ;AAC7B,MAAC,OAAO,GAAGA,mBAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/locale/lang/en.d.ts
CHANGED
package/lib/locale/lang/en.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","sources":["../../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n }\n },\n}\n"],"names":[],"mappings":";;;;AAAA,cAAe;AACf,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,QAAQ;AACtB,MAAM,OAAO,EAAE,SAAS;AACxB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"en.js","sources":["../../../../../packages/locale/lang/en.ts"],"sourcesContent":["export default {\n name: 'en',\n hzzt: {\n collapse: {\n expand: 'expand',\n retract: 'retract',\n },\n pagination: {\n total: 'total',\n strip: 'strip',\n }\n },\n}\n"],"names":[],"mappings":";;;;AAAA,cAAe;AACf,EAAE,IAAI,EAAE,IAAI;AACZ,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,QAAQ;AACtB,MAAM,OAAO,EAAE,SAAS;AACxB,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,KAAK,EAAE,OAAO;AACpB,MAAM,KAAK,EAAE,OAAO;AACpB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
package/lib/locale/lang/zh-cn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zh-cn.js","sources":["../../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n }\n },\n}\n"],"names":[],"mappings":";;;;AAAA,WAAe;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,cAAc;AAC5B,MAAM,OAAO,EAAE,cAAc;AAC7B,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"zh-cn.js","sources":["../../../../../packages/locale/lang/zh-cn.ts"],"sourcesContent":["export default {\n name: 'zh-cn',\n hzzt: {\n collapse: {\n expand: '展开',\n retract: '收起',\n },\n pagination: {\n total: '共',\n strip: '条',\n }\n },\n}\n"],"names":[],"mappings":";;;;AAAA,WAAe;AACf,EAAE,IAAI,EAAE,OAAO;AACf,EAAE,IAAI,EAAE;AACR,IAAI,QAAQ,EAAE;AACd,MAAM,MAAM,EAAE,cAAc;AAC5B,MAAM,OAAO,EAAE,cAAc;AAC7B,KAAK;AACL,IAAI,UAAU,EAAE;AAChB,MAAM,KAAK,EAAE,QAAQ;AACrB,MAAM,KAAK,EAAE,QAAQ;AACrB,KAAK;AACL,GAAG;AACH,CAAC;;;;"}
|