@pisell/materials 1.0.10 → 1.0.12
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/es/components/config-provider/index.d.ts +6 -2
- package/es/components/config-provider/index.js +10 -11
- package/es/components/page/index.d.ts +6 -0
- package/es/components/page/index.js +85 -0
- package/es/components/table/Actions/Filter/Dropdown/index.less +1 -1
- package/es/components/table/Actions/index.less +1 -1
- package/es/components/table/Pagination/index.d.ts +3 -1
- package/es/components/table/Pagination/index.js +3 -1
- package/es/components/table/Pagination/index.less +11 -11
- package/es/components/table/Table/AddFieldModal/index.less +1 -1
- package/es/components/table/Table/index.js +16 -4
- package/es/hooks/index.d.ts +2 -1
- package/es/hooks/index.js +2 -1
- package/es/hooks/useResponsive.d.ts +4 -0
- package/es/hooks/useResponsive.js +95 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +1 -0
- package/lib/components/config-provider/index.d.ts +6 -2
- package/lib/components/page/index.d.ts +6 -0
- package/lib/components/page/index.js +122 -0
- package/lib/components/table/Actions/Filter/Dropdown/index.less +1 -1
- package/lib/components/table/Actions/index.less +1 -1
- package/lib/components/table/Pagination/index.d.ts +3 -1
- package/lib/components/table/Pagination/index.js +3 -1
- package/lib/components/table/Pagination/index.less +11 -11
- package/lib/components/table/Table/AddFieldModal/index.less +1 -1
- package/lib/components/table/Table/index.js +18 -5
- package/lib/hooks/index.d.ts +2 -1
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/useResponsive.d.ts +4 -0
- package/lib/hooks/useResponsive.js +104 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +29 -0
- package/lowcode/config-provider/meta.ts +113 -109
- package/lowcode/page/meta.ts +44 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
padding: 0 20px;
|
|
13
13
|
margin: 0 !important;
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.pisell-lowcode-pagination-total-text {
|
|
16
16
|
margin-right: auto;
|
|
17
17
|
color: var(--gray-500, #667085);
|
|
18
18
|
/* Text sm/Medium */
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
/* 142.857% */
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
26
|
+
.pisell-lowcode-pagination-item {
|
|
27
27
|
position: relative;
|
|
28
28
|
border: none;
|
|
29
29
|
margin: 0;
|
|
@@ -32,37 +32,37 @@
|
|
|
32
32
|
border-right: 0;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
.
|
|
35
|
+
.pisell-lowcode-pagination-jump-prev {
|
|
36
36
|
border: 1px solid #D0D5DD;
|
|
37
37
|
margin: 0;
|
|
38
38
|
border-radius: 0;
|
|
39
39
|
border-right: none;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
.
|
|
42
|
+
.pisell-lowcode-pagination-jump-next {
|
|
43
43
|
border: 1px solid #D0D5DD;
|
|
44
44
|
margin: 0;
|
|
45
45
|
border-radius: 0;
|
|
46
46
|
border-right: none;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.
|
|
49
|
+
.pisell-lowcode-pagination-item-link:hover {
|
|
50
50
|
font-weight: 450 !important;
|
|
51
51
|
color: rgba(0, 0, 0, 0.88) !important;
|
|
52
52
|
|
|
53
|
-
.
|
|
53
|
+
.pisell-lowcode-pagination-item-link-icon {
|
|
54
54
|
font-weight: 450 !important;
|
|
55
55
|
color: rgba(0, 0, 0, 0.88) !important;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
.
|
|
59
|
+
.pisell-lowcode-pagination-disabled {}
|
|
60
60
|
|
|
61
|
-
.
|
|
61
|
+
.pisell-lowcode-pagination-item-active:hover {
|
|
62
62
|
border-color: #D0D5DD !important;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
.
|
|
65
|
+
.pisell-lowcode-pagination-item-active {
|
|
66
66
|
a {
|
|
67
67
|
font-weight: 450 !important;
|
|
68
68
|
color: rgba(0, 0, 0, 0.88) !important;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
background-color: rgba(0, 0, 0, 0.06);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
.
|
|
75
|
+
.pisell-lowcode-pagination-prev {
|
|
76
76
|
display: flex;
|
|
77
77
|
align-items: center;
|
|
78
78
|
justify-content: center;
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
|
|
87
|
-
.
|
|
87
|
+
.pisell-lowcode-pagination-next {
|
|
88
88
|
display: flex;
|
|
89
89
|
align-items: center;
|
|
90
90
|
justify-content: center;
|
|
@@ -43,6 +43,7 @@ var import_body = __toESM(require("./tableConfig/body"));
|
|
|
43
43
|
var import_header = __toESM(require("./tableConfig/header"));
|
|
44
44
|
var import_Pagination = require("../Pagination");
|
|
45
45
|
var GridViewTable = ({ tableProps }) => {
|
|
46
|
+
const responsive = (0, import_hooks.useResponsive)();
|
|
46
47
|
const { state, dispatch } = (0, import_hooks.useSharedState)(import_model.Context);
|
|
47
48
|
const { dataSource, defaultColumns } = state;
|
|
48
49
|
const handleSave = (0, import_ahooks.useMemoizedFn)((row) => {
|
|
@@ -107,6 +108,22 @@ var GridViewTable = ({ tableProps }) => {
|
|
|
107
108
|
},
|
|
108
109
|
[tableProps.pagination.pageSize]
|
|
109
110
|
);
|
|
111
|
+
const _paginationConfig = (0, import_react.useMemo)(() => {
|
|
112
|
+
if (tableProps.pagination === false) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
if (responsive === "phone") {
|
|
116
|
+
return {
|
|
117
|
+
...tableProps.pagination,
|
|
118
|
+
size: "small"
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return {
|
|
122
|
+
...import_Pagination.paginationConfig,
|
|
123
|
+
...tableProps.pagination,
|
|
124
|
+
showTotal
|
|
125
|
+
};
|
|
126
|
+
}, [responsive, tableProps.pagination]);
|
|
110
127
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: "materials-grid-table-wrap" }, /* @__PURE__ */ import_react.default.createElement(import_SortRow.default, null, /* @__PURE__ */ import_react.default.createElement(
|
|
111
128
|
import_antd.Table,
|
|
112
129
|
{
|
|
@@ -127,11 +144,7 @@ var GridViewTable = ({ tableProps }) => {
|
|
|
127
144
|
scroll: {
|
|
128
145
|
x: "max-content"
|
|
129
146
|
},
|
|
130
|
-
pagination:
|
|
131
|
-
...import_Pagination.paginationConfig,
|
|
132
|
-
...tableProps.pagination,
|
|
133
|
-
showTotal
|
|
134
|
-
}
|
|
147
|
+
pagination: _paginationConfig
|
|
135
148
|
}
|
|
136
149
|
)));
|
|
137
150
|
};
|
package/lib/hooks/index.d.ts
CHANGED
package/lib/hooks/index.js
CHANGED
|
@@ -29,11 +29,14 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/hooks/index.ts
|
|
30
30
|
var hooks_exports = {};
|
|
31
31
|
__export(hooks_exports, {
|
|
32
|
+
useResponsive: () => import_useResponsive.default,
|
|
32
33
|
useSharedState: () => import_useSharedState.default
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(hooks_exports);
|
|
35
36
|
var import_useSharedState = __toESM(require("./useSharedState"));
|
|
37
|
+
var import_useResponsive = __toESM(require("./useResponsive"));
|
|
36
38
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
39
|
0 && (module.exports = {
|
|
40
|
+
useResponsive,
|
|
38
41
|
useSharedState
|
|
39
42
|
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/hooks/useResponsive.ts
|
|
20
|
+
var useResponsive_exports = {};
|
|
21
|
+
__export(useResponsive_exports, {
|
|
22
|
+
configResponsive: () => configResponsive,
|
|
23
|
+
default: () => useResponsive
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useResponsive_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_utils = require("../utils");
|
|
28
|
+
var subscribers = /* @__PURE__ */ new Set();
|
|
29
|
+
var info;
|
|
30
|
+
var responsiveConfig = {
|
|
31
|
+
phone: 0,
|
|
32
|
+
ipad: 700,
|
|
33
|
+
pc: 1080
|
|
34
|
+
};
|
|
35
|
+
function handleResize() {
|
|
36
|
+
const oldInfo = info;
|
|
37
|
+
calculate();
|
|
38
|
+
if (oldInfo === info)
|
|
39
|
+
return;
|
|
40
|
+
for (const subscriber of subscribers) {
|
|
41
|
+
subscriber();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
var listening = false;
|
|
45
|
+
function calculate() {
|
|
46
|
+
const width = window.innerWidth;
|
|
47
|
+
const newInfo = {};
|
|
48
|
+
let shouldUpdate = false;
|
|
49
|
+
for (const key of Object.keys(responsiveConfig)) {
|
|
50
|
+
newInfo[key] = width >= responsiveConfig[key];
|
|
51
|
+
if (newInfo[key] !== info[key]) {
|
|
52
|
+
shouldUpdate = true;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (shouldUpdate) {
|
|
56
|
+
info = newInfo;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function configResponsive(config) {
|
|
60
|
+
responsiveConfig = config;
|
|
61
|
+
if (info)
|
|
62
|
+
calculate();
|
|
63
|
+
}
|
|
64
|
+
function useResponsive() {
|
|
65
|
+
if (import_utils.isBrowser && !listening) {
|
|
66
|
+
info = {};
|
|
67
|
+
calculate();
|
|
68
|
+
window.addEventListener("resize", handleResize);
|
|
69
|
+
listening = true;
|
|
70
|
+
}
|
|
71
|
+
const [state, setState] = (0, import_react.useState)(info);
|
|
72
|
+
(0, import_react.useEffect)(() => {
|
|
73
|
+
if (!import_utils.isBrowser)
|
|
74
|
+
return;
|
|
75
|
+
if (!listening) {
|
|
76
|
+
window.addEventListener("resize", handleResize);
|
|
77
|
+
}
|
|
78
|
+
const subscriber = () => {
|
|
79
|
+
setState(info);
|
|
80
|
+
};
|
|
81
|
+
subscribers.add(subscriber);
|
|
82
|
+
return () => {
|
|
83
|
+
subscribers.delete(subscriber);
|
|
84
|
+
if (subscribers.size === 0) {
|
|
85
|
+
window.removeEventListener("resize", handleResize);
|
|
86
|
+
listening = false;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}, []);
|
|
90
|
+
const current = (0, import_react.useMemo)(() => {
|
|
91
|
+
if (state == null ? void 0 : state.pc) {
|
|
92
|
+
return "pc";
|
|
93
|
+
}
|
|
94
|
+
if (state == null ? void 0 : state.ipad) {
|
|
95
|
+
return "ipad";
|
|
96
|
+
}
|
|
97
|
+
return "phone";
|
|
98
|
+
}, [state]);
|
|
99
|
+
return current;
|
|
100
|
+
}
|
|
101
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
102
|
+
0 && (module.exports = {
|
|
103
|
+
configResponsive
|
|
104
|
+
});
|
package/lib/index.d.ts
CHANGED
|
@@ -61,3 +61,4 @@ export { default as Select } from './components/select';
|
|
|
61
61
|
export { default as Cascader } from './components/cascader';
|
|
62
62
|
export { default as AutoComplete } from './components/auto-complete';
|
|
63
63
|
export { default as Div } from './components/div';
|
|
64
|
+
export { default as Page } from './components/page';
|
package/lib/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __export(src_exports, {
|
|
|
62
62
|
Mentions: () => import_antd20.Mentions,
|
|
63
63
|
Menu: () => import_antd19.Menu,
|
|
64
64
|
Modal: () => import_modal.default,
|
|
65
|
+
Page: () => import_page.default,
|
|
65
66
|
Pagination: () => import_antd23.Pagination,
|
|
66
67
|
Popconfirm: () => import_antd24.Popconfirm,
|
|
67
68
|
Popover: () => import_antd25.Popover,
|
|
@@ -157,6 +158,7 @@ var import_select = __toESM(require("./components/select"));
|
|
|
157
158
|
var import_cascader = __toESM(require("./components/cascader"));
|
|
158
159
|
var import_auto_complete = __toESM(require("./components/auto-complete"));
|
|
159
160
|
var import_div = __toESM(require("./components/div"));
|
|
161
|
+
var import_page = __toESM(require("./components/page"));
|
|
160
162
|
// Annotate the CommonJS export names for ESM import in node:
|
|
161
163
|
0 && (module.exports = {
|
|
162
164
|
Affix,
|
|
@@ -192,6 +194,7 @@ var import_div = __toESM(require("./components/div"));
|
|
|
192
194
|
Mentions,
|
|
193
195
|
Menu,
|
|
194
196
|
Modal,
|
|
197
|
+
Page,
|
|
195
198
|
Pagination,
|
|
196
199
|
Popconfirm,
|
|
197
200
|
Popover,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isBrowser: boolean;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/utils/index.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
isBrowser: () => isBrowser
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var isBrowser = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
26
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
+
0 && (module.exports = {
|
|
28
|
+
isBrowser
|
|
29
|
+
});
|
|
@@ -16,125 +16,129 @@ export default {
|
|
|
16
16
|
destructuring: true,
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
tip: "自动在按钮中 2 个汉字之间插入空格",
|
|
26
|
-
},
|
|
27
|
-
propType: "bool",
|
|
28
|
-
defaultValue: true,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "componentSize",
|
|
32
|
-
title: { label: "组件大小", tip: "设置 antd 组件大小" },
|
|
33
|
-
propType: { type: "oneOf", value: ["small", "middle", "large"] },
|
|
34
|
-
default: "middle",
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: "csp",
|
|
38
|
-
title: {
|
|
39
|
-
label: "CSP配置",
|
|
40
|
-
tip: "设置Content Security Policy配置",
|
|
41
|
-
},
|
|
42
|
-
propType: "object",
|
|
43
|
-
setter: "JsonSetter",
|
|
19
|
+
props: [
|
|
20
|
+
{
|
|
21
|
+
name: "autoInsertSpaceInButton",
|
|
22
|
+
title: {
|
|
23
|
+
label: "按钮插入空格",
|
|
24
|
+
tip: "自动在按钮中 2 个汉字之间插入空格",
|
|
44
25
|
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
26
|
+
propType: "bool",
|
|
27
|
+
defaultValue: true,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: "componentSize",
|
|
31
|
+
title: { label: "组件大小", tip: "设置 antd 组件大小" },
|
|
32
|
+
propType: { type: "oneOf", value: ["small", "middle", "large"] },
|
|
33
|
+
default: "middle",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "csp",
|
|
37
|
+
title: {
|
|
38
|
+
label: "CSP配置",
|
|
39
|
+
tip: "设置Content Security Policy配置",
|
|
53
40
|
},
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
41
|
+
propType: "object",
|
|
42
|
+
setter: "JsonSetter",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "form",
|
|
46
|
+
title: {
|
|
47
|
+
label: "Form通用属性",
|
|
48
|
+
tip: "设置 Form 组件的通用属性",
|
|
62
49
|
},
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
label: "弹出框父节点",
|
|
72
|
-
tip: "弹出框渲染父节点,默认渲染到 body 上。",
|
|
73
|
-
},
|
|
74
|
-
propType: "func",
|
|
50
|
+
propType: "object",
|
|
51
|
+
setter: "JsonSetter",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "input",
|
|
55
|
+
title: {
|
|
56
|
+
label: "Input通用属性",
|
|
57
|
+
tip: "设置 Input 组件的通用属性",
|
|
75
58
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
59
|
+
propType: "object",
|
|
60
|
+
setter: "JsonSetter",
|
|
61
|
+
},
|
|
62
|
+
// {
|
|
63
|
+
// name: 'renderEmpty',
|
|
64
|
+
// title: { label: '自定义组件空状态', tip: '自定义组件空状态' },
|
|
65
|
+
// propType: 'func',
|
|
66
|
+
// },
|
|
67
|
+
{
|
|
68
|
+
name: "getPopupContainer",
|
|
69
|
+
title: {
|
|
70
|
+
label: "弹出框父节点",
|
|
71
|
+
tip: "弹出框渲染父节点,默认渲染到 body 上。",
|
|
83
72
|
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
defaultValue: "en-US",
|
|
73
|
+
propType: "func",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "getTargetContainer",
|
|
77
|
+
title: {
|
|
78
|
+
label: "滚动监听容器",
|
|
79
|
+
tip: "配置 Affix、Anchor 滚动监听容器。",
|
|
92
80
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
propType: "func",
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "locale",
|
|
85
|
+
title: { label: "语言", tip: "语言" },
|
|
86
|
+
propType: {
|
|
87
|
+
type: "oneOf",
|
|
88
|
+
value: ["zh-CN", "en-US"],
|
|
100
89
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
setter: "JsonSetter",
|
|
90
|
+
defaultValue: "en-US",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "prefixCls",
|
|
94
|
+
title: {
|
|
95
|
+
label: "样式前缀",
|
|
96
|
+
tip: "设置统一样式前缀。`注意:这将不会应用由 antd 提供的默认样式`",
|
|
109
97
|
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
98
|
+
propType: "string",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "pageHeader",
|
|
102
|
+
title: {
|
|
103
|
+
label: "统一设置 PageHeader 的 ghost",
|
|
104
|
+
tip: "统一设置 PageHeader 的 ghost",
|
|
114
105
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
106
|
+
propType: "object",
|
|
107
|
+
setter: "JsonSetter",
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: "direction",
|
|
111
|
+
title: { label: "文本方向", tip: "设置文本展示方向" },
|
|
112
|
+
propType: { type: "oneOf", value: ["ltr", "rtl"] },
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "space",
|
|
116
|
+
title: { label: "设置 Space 的 尺寸", tip: "设置 Space 的 `size`" },
|
|
117
|
+
propType: {
|
|
118
|
+
type: "oneOf",
|
|
119
|
+
value: ["small", "middle", "large", "number"],
|
|
122
120
|
},
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
propType: "bool",
|
|
130
|
-
defaultValue: true,
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "virtual",
|
|
124
|
+
title: {
|
|
125
|
+
label: "虚拟滚动",
|
|
126
|
+
tip: "设置 `false` 时关闭虚拟滚动",
|
|
131
127
|
},
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
propType: "bool",
|
|
129
|
+
defaultValue: true,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "dropdownMatchSelectWidth",
|
|
133
|
+
title: { label: "下拉菜单和选择器同宽", tip: "下拉菜单和选择器同宽" },
|
|
134
|
+
propType: { type: "oneOfType", value: ["bool", "number"] },
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
configure: {
|
|
138
|
+
component: {
|
|
139
|
+
isContainer: true,
|
|
140
|
+
isPage: true,
|
|
141
|
+
disableBehaviors: '*',
|
|
142
|
+
},
|
|
139
143
|
},
|
|
140
144
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ComponentMetadata, Snippet } from "@alilc/lowcode-types";
|
|
2
|
+
|
|
3
|
+
const PageMeta: ComponentMetadata = {
|
|
4
|
+
componentName: "Page",
|
|
5
|
+
title: "Page",
|
|
6
|
+
docUrl: "",
|
|
7
|
+
screenshot: "",
|
|
8
|
+
devMode: "proCode",
|
|
9
|
+
npm: {
|
|
10
|
+
package: "@pisell/materials",
|
|
11
|
+
version: "1.0.11",
|
|
12
|
+
exportName: "Page",
|
|
13
|
+
main: "src/index.tsx",
|
|
14
|
+
destructuring: true,
|
|
15
|
+
subName: "",
|
|
16
|
+
},
|
|
17
|
+
configure: {
|
|
18
|
+
props: [],
|
|
19
|
+
supports: {
|
|
20
|
+
style: true,
|
|
21
|
+
},
|
|
22
|
+
component: {
|
|
23
|
+
isContainer: true,
|
|
24
|
+
isPage: true,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
const snippets: Snippet[] = [
|
|
29
|
+
{
|
|
30
|
+
title: "Page",
|
|
31
|
+
screenshot: "",
|
|
32
|
+
schema: {
|
|
33
|
+
componentName: "Page",
|
|
34
|
+
props: {
|
|
35
|
+
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
export default {
|
|
42
|
+
...PageMeta,
|
|
43
|
+
snippets,
|
|
44
|
+
};
|