@pisell/materials 1.0.511 → 1.0.513

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.
Files changed (41) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +3 -3
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +21 -21
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +13 -13
  11. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  12. package/es/components/pisellAnchor/index.js +6 -37
  13. package/es/components/pisellAnchor/index.less +36 -34
  14. package/es/components/pisellHeaderProgressBar/index.js +3 -4
  15. package/es/components/pisellHeaderProgressBar/index.less +0 -1
  16. package/es/components/pisellImageCarousels/index.d.ts +1 -0
  17. package/es/components/pisellImageCarousels/index.js +4 -2
  18. package/es/components/pisellList01/index.d.ts +1 -0
  19. package/es/components/pisellList01/index.js +11 -7
  20. package/es/components/profileMenu/index.d.ts +25 -0
  21. package/es/components/profileMenu/index.js +110 -0
  22. package/es/components/profileMenu/index.less +112 -0
  23. package/es/index.d.ts +1 -0
  24. package/es/index.js +1 -0
  25. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  26. package/lib/components/pisellAnchor/index.js +8 -35
  27. package/lib/components/pisellAnchor/index.less +36 -34
  28. package/lib/components/pisellHeaderProgressBar/index.js +3 -2
  29. package/lib/components/pisellHeaderProgressBar/index.less +0 -1
  30. package/lib/components/pisellImageCarousels/index.d.ts +1 -0
  31. package/lib/components/pisellImageCarousels/index.js +3 -2
  32. package/lib/components/pisellList01/index.d.ts +1 -0
  33. package/lib/components/pisellList01/index.js +8 -3
  34. package/lib/components/profileMenu/index.d.ts +25 -0
  35. package/lib/components/profileMenu/index.js +118 -0
  36. package/lib/components/profileMenu/index.less +112 -0
  37. package/lib/index.d.ts +1 -0
  38. package/lib/index.js +3 -0
  39. package/lowcode/profile-menu/meta.ts +175 -0
  40. package/lowcode/profile-menu/snippets.ts +67 -0
  41. package/package.json +2 -2
@@ -1,47 +1,49 @@
1
- .pisell-anchor-container {
2
- position: sticky;
3
- top: 0;
4
- z-index: 999;
5
- display: flex;
6
- align-items: center;
7
- background-color: #fff;
8
- height: 40px;
9
-
10
- .pisell-lowcode-anchor {
11
- height: 40px;
12
- border-bottom: none !important;
13
-
14
- .pisell-lowcode-anchor-ink {
1
+ .pisell-anchor-containers {
2
+ // display: flex;
3
+ // align-items: center;
4
+ // background-color: #fff;
5
+ // height: 40px;
6
+ .pisell-lowcode-anchor-wrapper {
7
+ &::before {
8
+ content: '';
15
9
  display: none;
16
10
  }
11
+ .pisell-lowcode-anchor {
12
+ height: 40px;
13
+ border-bottom: none !important;
14
+ background-color: #fff;
17
15
 
18
- .pisell-lowcode-anchor-link {
19
- height: 100%;
20
- padding: 0 16px;
21
- display: flex;
22
- align-items: center;
16
+ .pisell-lowcode-anchor-ink {
17
+ display: none;
18
+ }
19
+
20
+ .pisell-lowcode-anchor-link {
21
+ height: 100%;
22
+ padding: 0 16px;
23
+ display: flex;
24
+ align-items: center;
23
25
 
24
- &-title {
25
- color: var(--Gray-900, #101828);
26
- font-family: Inter;
27
- font-size: 16px;
28
- font-weight: 600;
29
- line-height: 40px;
26
+ &-title {
27
+ color: var(--Gray-900, #101828);
28
+ font-family: Inter;
29
+ font-size: 16px;
30
+ font-weight: 600;
31
+ line-height: 40px;
32
+ }
30
33
  }
31
- }
32
34
 
33
- .pisell-lowcode-anchor-link-active {
34
- border-radius: 100px;
35
- background: var(--theme-color, #7f56d9);
36
- height: 40px;
35
+ .pisell-lowcode-anchor-link-active {
36
+ border-radius: 100px;
37
+ background: var(--theme-color, #7f56d9);
38
+ height: 40px;
37
39
 
38
- .pisell-lowcode-anchor-link-title {
39
- color: var(--White, #fff);
40
- line-height: 40px;
40
+ .pisell-lowcode-anchor-link-title {
41
+ color: var(--White, #fff);
42
+ line-height: 40px;
43
+ }
41
44
  }
42
45
  }
43
46
  }
44
-
45
47
  .pisell-anchor-scroll {
46
48
  height: 40px;
47
49
  flex: 1;
@@ -59,7 +59,7 @@ var PisellHeaderProgressBar = ({
59
59
  boxShadow: enableShadow ? "0px 1px 2px 0px rgba(16, 24, 40, 0.05)" : "none",
60
60
  borderBottom: enableBorder ? `${borderWidth}px solid ${borderColor}` : "none"
61
61
  };
62
- return /* @__PURE__ */ import_react.default.createElement("div", { className: classes }, /* @__PURE__ */ import_react.default.createElement(
62
+ return /* @__PURE__ */ import_react.default.createElement(
63
63
  import_pisellSectionHeaders.default,
64
64
  {
65
65
  backNode: /* @__PURE__ */ import_react.default.createElement(
@@ -78,9 +78,10 @@ var PisellHeaderProgressBar = ({
78
78
  }
79
79
  ) : null,
80
80
  style: customStyle,
81
+ className: classes,
81
82
  onAction: onClose,
82
83
  onBack
83
84
  }
84
- ));
85
+ );
85
86
  };
86
87
  var pisellHeaderProgressBar_default = PisellHeaderProgressBar;
@@ -1,5 +1,4 @@
1
1
  .pisell-header-progress-bar {
2
- position: relative;
3
2
  width: 100%;
4
3
 
5
4
  &-center {
@@ -13,6 +13,7 @@ export interface PisellImageCarouselsProps {
13
13
  autoplay?: boolean;
14
14
  interval?: number;
15
15
  borderRadius?: number;
16
+ loop?: boolean;
16
17
  className?: string;
17
18
  style?: React.CSSProperties;
18
19
  }
@@ -48,6 +48,7 @@ var PisellImageCarousels = ({
48
48
  autoplay = true,
49
49
  interval = 3e3,
50
50
  borderRadius = 8,
51
+ loop = true,
51
52
  className,
52
53
  style
53
54
  }) => {
@@ -59,7 +60,7 @@ var PisellImageCarousels = ({
59
60
  modules: [import_swiper.Navigation, import_swiper.Pagination, import_swiper.Autoplay],
60
61
  slidesPerView: 1,
61
62
  spaceBetween: 0,
62
- loop: true,
63
+ loop,
63
64
  // 导航箭头
64
65
  navigation: showArrows ? {
65
66
  nextEl: ".pisell-carousel-next",
@@ -82,7 +83,7 @@ var PisellImageCarousels = ({
82
83
  swiperInstance.current.destroy();
83
84
  }
84
85
  };
85
- }, [showArrows, showDots, autoplay, interval]);
86
+ }, [showArrows, showDots, autoplay, interval, loop]);
86
87
  return /* @__PURE__ */ import_react.default.createElement(
87
88
  "div",
88
89
  {
@@ -8,6 +8,7 @@ export interface PisellList01Props {
8
8
  className?: string;
9
9
  style?: React.CSSProperties;
10
10
  onChange?: (anchor: string) => void;
11
+ onSearch?: (value: any) => void;
11
12
  }
12
13
  declare const PisellList01: React.FC<PisellList01Props>;
13
14
  export default PisellList01;
@@ -45,18 +45,22 @@ var PisellList01 = ({
45
45
  renderItem,
46
46
  className,
47
47
  style,
48
- onChange
48
+ onChange,
49
+ onSearch
49
50
  }) => {
50
51
  const [currentAnchor, setCurrentAnchor] = (0, import_react.useState)("");
51
52
  const [products, setProducts] = (0, import_react.useState)([]);
52
53
  (0, import_react.useEffect)(() => {
54
+ if (!showCategory) {
55
+ return setProducts(dataSource ?? []);
56
+ }
53
57
  if (currentAnchor) {
54
58
  const currentData = dataSource == null ? void 0 : dataSource.find(
55
59
  (item) => item.href === currentAnchor
56
60
  );
57
61
  setProducts((currentData == null ? void 0 : currentData.children) ?? []);
58
62
  }
59
- }, [currentAnchor, dataSource]);
63
+ }, [currentAnchor, dataSource, showCategory]);
60
64
  (0, import_react.useEffect)(() => {
61
65
  var _a;
62
66
  setCurrentAnchor(((_a = dataSource == null ? void 0 : dataSource[0]) == null ? void 0 : _a.href) ?? "");
@@ -70,6 +74,7 @@ var PisellList01 = ({
70
74
  {
71
75
  placeholder: "Search",
72
76
  prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.SearchOutlined, { style: { color: "#667085" } }),
77
+ onChange: onSearch,
73
78
  allowClear: true,
74
79
  size: "large",
75
80
  className: "pisell-list-01-search-input"
@@ -84,7 +89,7 @@ var PisellList01 = ({
84
89
  setCurrentAnchor(e);
85
90
  }
86
91
  }
87
- )) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-products" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-products-title" }, categoryTitle), /* @__PURE__ */ import_react.default.createElement(
92
+ )) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-products" }, showCategory ? /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-list-01-products-title" }, categoryTitle) : null, /* @__PURE__ */ import_react.default.createElement(
88
93
  import_pisellViewGrid.default,
89
94
  {
90
95
  dataSource: products,
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { MenuProps } from 'antd';
3
+ import './index.less';
4
+ interface ProfileMenuProps {
5
+ menuIcon?: React.ReactNode;
6
+ userName?: string;
7
+ email?: string;
8
+ isShowUserName?: boolean;
9
+ isShowEmail?: boolean;
10
+ isShowUserInfo?: boolean;
11
+ onClick?: () => void;
12
+ avatar?: {
13
+ src?: string;
14
+ alt?: string;
15
+ };
16
+ className?: string;
17
+ style?: React.CSSProperties;
18
+ menuItems?: MenuProps['items'];
19
+ placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
20
+ trigger?: ('click' | 'hover')[];
21
+ showBadge?: boolean;
22
+ badgeCount?: number;
23
+ }
24
+ declare const ProfileMenu: React.FC<ProfileMenuProps>;
25
+ export default ProfileMenu;
@@ -0,0 +1,118 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/profileMenu/index.tsx
30
+ var profileMenu_exports = {};
31
+ __export(profileMenu_exports, {
32
+ default: () => profileMenu_default
33
+ });
34
+ module.exports = __toCommonJS(profileMenu_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var import_pisellAvatar = __toESM(require("./../pisellAvatar"));
39
+ var import_index = require("./index.less");
40
+ var ProfileMenu = ({
41
+ menuIcon,
42
+ userName = "",
43
+ email = "",
44
+ isShowUserName = false,
45
+ isShowEmail = false,
46
+ isShowUserInfo = false,
47
+ onClick,
48
+ avatar,
49
+ className,
50
+ style,
51
+ menuItems = [],
52
+ placement = "bottomRight",
53
+ trigger = ["click"],
54
+ showBadge = false,
55
+ badgeCount = 1
56
+ }) => {
57
+ (0, import_react.useEffect)(() => {
58
+ document.body.id = "body";
59
+ }, []);
60
+ const handleClick = (e) => {
61
+ e.preventDefault();
62
+ onClick == null ? void 0 : onClick();
63
+ };
64
+ const finalMenuItems = (0, import_react.useMemo)(() => {
65
+ if (!isShowUserInfo)
66
+ return menuItems;
67
+ const userInfoItem = {
68
+ key: "user-info",
69
+ label: /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-user-info-item" }, /* @__PURE__ */ import_react.default.createElement(
70
+ import_pisellAvatar.default,
71
+ {
72
+ size: "md",
73
+ src: avatar == null ? void 0 : avatar.src,
74
+ alt: avatar == null ? void 0 : avatar.alt
75
+ }
76
+ ), /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-user-info" }, userName && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-name" }, userName), email && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-email" }, email)))
77
+ };
78
+ return [
79
+ userInfoItem,
80
+ { type: "divider" },
81
+ ...menuItems || []
82
+ ];
83
+ }, [isShowUserInfo, menuItems, userName, email, avatar]);
84
+ return /* @__PURE__ */ import_react.default.createElement(
85
+ import_antd.Dropdown,
86
+ {
87
+ menu: { items: finalMenuItems },
88
+ placement,
89
+ trigger,
90
+ overlayClassName: "profile-menu-dropdown"
91
+ },
92
+ /* @__PURE__ */ import_react.default.createElement(
93
+ "div",
94
+ {
95
+ className: (0, import_classnames.default)("profile-menu-wrap", className),
96
+ style: {
97
+ ...style,
98
+ paddingRight: isShowUserName && userName || isShowEmail && email ? 16 : 0
99
+ },
100
+ onClick: handleClick
101
+ },
102
+ menuIcon && /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-icon" }, menuIcon),
103
+ /* @__PURE__ */ import_react.default.createElement(import_antd.Badge, { count: showBadge ? badgeCount : 0, offset: [-6, 6] }, /* @__PURE__ */ import_react.default.createElement(
104
+ import_pisellAvatar.default,
105
+ {
106
+ size: "md",
107
+ style: {
108
+ margin: "0 6px"
109
+ },
110
+ src: avatar == null ? void 0 : avatar.src,
111
+ alt: avatar == null ? void 0 : avatar.alt
112
+ }
113
+ )),
114
+ (isShowUserName && userName || isShowEmail && email) && /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-user-info" }, isShowUserName && userName && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-name", title: userName }, userName), isShowEmail && email && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-email", title: email }, email))
115
+ )
116
+ );
117
+ };
118
+ var profileMenu_default = ProfileMenu;
@@ -0,0 +1,112 @@
1
+ .profile-menu-wrap {
2
+ display: flex;
3
+
4
+ gap: 10px;
5
+ width: fit-content;
6
+ align-items: center;
7
+ padding-top: 6px;
8
+ padding-bottom: 6px;
9
+ padding-left: 16px;
10
+
11
+ border-radius: 50px;
12
+ border: 1px solid var(--Gray-100, #f2f4f7);
13
+ background: var(--Base-White, #fff);
14
+ cursor: pointer;
15
+ transition: all 0.3s ease;
16
+
17
+ /* Shadow/sm */
18
+ box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1),
19
+ 0px 1px 2px 0px rgba(16, 24, 40, 0.06);
20
+
21
+ &:hover {
22
+ border-color: var(--Gray-200, #e5e7eb);
23
+ box-shadow: 0px 2px 4px 0px rgba(16, 24, 40, 0.15);
24
+ }
25
+
26
+ .profile-menu-icon {
27
+ display: flex;
28
+ align-items: center;
29
+ }
30
+
31
+ }
32
+
33
+
34
+ .profile-menu-user-info {
35
+ display: flex;
36
+ flex-direction: column;
37
+ justify-content: center;
38
+ min-width: 0;
39
+ padding: 0;
40
+
41
+ &-item {
42
+ display: flex;
43
+ align-items: center;
44
+ gap: 12px;
45
+ width: 100%;
46
+ flex-wrap: nowrap;
47
+ }
48
+
49
+ &-name {
50
+ color: var(--Gray-700, #344054);
51
+ font-family: Inter;
52
+ font-size: 14px;
53
+ font-weight: 600;
54
+ line-height: 20px;
55
+ margin: 0;
56
+ white-space: nowrap;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ }
60
+
61
+ &-email {
62
+ color: var(--Gray-600, #475467);
63
+ font-family: Inter;
64
+ font-size: 14px;
65
+ font-weight: 400;
66
+ line-height: 20px;
67
+ margin: 0;
68
+ white-space: nowrap;
69
+ overflow: hidden;
70
+ text-overflow: ellipsis;
71
+ }
72
+ }
73
+
74
+ .profile-menu-dropdown {
75
+ .ant-dropdown-menu {
76
+ padding: 8px;
77
+ border-radius: 8px;
78
+ border: 1px solid var(--Gray-100, #f2f4f7);
79
+ background: var(--Base-White, #fff);
80
+ box-shadow: 0px 4px 6px -2px rgba(16, 24, 40, 0.03),
81
+ 0px 12px 16px -4px rgba(16, 24, 40, 0.08);
82
+
83
+ .ant-dropdown-menu-item {
84
+ padding: 8px 12px;
85
+ border-radius: 6px;
86
+ min-height: 40px;
87
+ display: flex;
88
+ align-items: center;
89
+
90
+ &:hover {
91
+ background: var(--Gray-50, #f9fafb);
92
+ }
93
+
94
+ &:active {
95
+ background: var(--Gray-100, #f2f4f7);
96
+ }
97
+
98
+ .profile-menu-user-info-item {
99
+ display: flex;
100
+ align-items: center;
101
+ gap: 12px;
102
+ width: 100%;
103
+ flex-wrap: nowrap;
104
+ }
105
+ }
106
+
107
+ .ant-dropdown-menu-item-divider {
108
+ margin: 8px 0;
109
+ background-color: var(--Gray-100, #f2f4f7);
110
+ }
111
+ }
112
+ }
package/lib/index.d.ts CHANGED
@@ -104,6 +104,7 @@ export { default as PisellToast } from './components/pisellToast';
104
104
  export { default as PisellWalletPassCard } from './components/pisellWalletPassCard';
105
105
  export { default as PisellScan } from './components/pisellScan';
106
106
  export { default as PisellAlert } from './components/pisellAlert';
107
+ export { default as ProfileMenu } from './components/profileMenu';
107
108
  export { default as PisellCard } from './components/pisellCard';
108
109
  export { default as CropPhoto } from './components/cropPhoto';
109
110
  export { default as PisellQrcode } from './components/pisellQrcode';
package/lib/index.js CHANGED
@@ -139,6 +139,7 @@ __export(src_exports, {
139
139
  Popconfirm: () => import_antd21.Popconfirm,
140
140
  Popover: () => import_antd22.Popover,
141
141
  ProductCard: () => import_productCard.default,
142
+ ProfileMenu: () => import_profileMenu.default,
142
143
  Progress: () => import_antd23.Progress,
143
144
  QRCode: () => import_qrcode.default,
144
145
  Radio: () => import_radio.default,
@@ -290,6 +291,7 @@ var import_pisellToast = __toESM(require("./components/pisellToast"));
290
291
  var import_pisellWalletPassCard = __toESM(require("./components/pisellWalletPassCard"));
291
292
  var import_pisellScan = __toESM(require("./components/pisellScan"));
292
293
  var import_pisellAlert = __toESM(require("./components/pisellAlert"));
294
+ var import_profileMenu = __toESM(require("./components/profileMenu"));
293
295
  var import_pisellCard = __toESM(require("./components/pisellCard"));
294
296
  var import_cropPhoto = __toESM(require("./components/cropPhoto"));
295
297
  var import_pisellQrcode = __toESM(require("./components/pisellQrcode"));
@@ -448,6 +450,7 @@ var import_pisellList01 = __toESM(require("./components/pisellList01"));
448
450
  Popconfirm,
449
451
  Popover,
450
452
  ProductCard,
453
+ ProfileMenu,
451
454
  Progress,
452
455
  QRCode,
453
456
  Radio,
@@ -0,0 +1,175 @@
1
+ import snippets from './snippets';
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: 'ProfileMenu',
6
+ title: '个人中心菜单',
7
+ category: '通用',
8
+ npm: {
9
+ package: '@pisell/materials',
10
+ version: '1.0.0',
11
+ exportName: 'ProfileMenu',
12
+ main: 'src/index.tsx',
13
+ destructuring: true,
14
+ subName: '',
15
+ },
16
+ props: [
17
+ {
18
+ title: {
19
+ label: "入口菜单设置"
20
+ },
21
+ display: "block",
22
+ type: "group",
23
+ items: [
24
+ {
25
+ name: 'showBadge',
26
+ title: { label: '显示徽标', tip: '是否在头像右上角显示徽标' },
27
+ propType: 'bool',
28
+ defaultValue: false,
29
+ setter: 'BoolSetter',
30
+ },
31
+ {
32
+ name: 'badgeCount',
33
+ title: { label: '徽标数量', tip: '徽标显示的数字' },
34
+ propType: 'number',
35
+ defaultValue: 1,
36
+ setter: 'NumberSetter',
37
+ },
38
+ {
39
+ name: 'menuIcon',
40
+ title: { label: '菜单图标', tip: '左侧菜单图标' },
41
+ propType: { type: 'oneOfType', value: ['string', 'node'] },
42
+ setter: [{
43
+ componentName: 'IconSetter',
44
+ }, {
45
+ componentName: 'SlotSetter',
46
+ }],
47
+ },
48
+ {
49
+ name: 'userName',
50
+ title: { label: '用户名', tip: '显示的用户名' },
51
+ propType: 'string',
52
+ setter: 'StringSetter',
53
+ },
54
+ {
55
+ name: 'email',
56
+ title: { label: '邮箱', tip: '显示的邮箱地址' },
57
+ propType: 'string',
58
+ setter: 'StringSetter',
59
+ },
60
+ {
61
+ name: 'isShowUserName',
62
+ title: { label: '显示用户名', tip: '是否显示用户名' },
63
+ propType: 'bool',
64
+ defaultValue: false,
65
+ setter: 'BoolSetter',
66
+ },
67
+ {
68
+ name: 'isShowEmail',
69
+ title: { label: '显示邮箱', tip: '是否显示邮箱' },
70
+ propType: 'bool',
71
+ defaultValue: false,
72
+ setter: 'BoolSetter',
73
+ },
74
+ ]
75
+ },
76
+ {
77
+ title: {
78
+ label: "菜单字段设置"
79
+ },
80
+ display: "block",
81
+ type: "group",
82
+ items: [
83
+ {
84
+ name: 'isShowUserInfo',
85
+ title: {
86
+ label: '显示用户信息展示区域',
87
+ tip: '在下拉菜单顶部显示用户信息'
88
+ },
89
+ propType: 'bool',
90
+ defaultValue: false,
91
+ setter: 'BoolSetter',
92
+ },
93
+ {
94
+ name: 'menuItems',
95
+ title: { label: '下拉菜单项', tip: '下拉菜单的配置项' },
96
+ propType: {
97
+ type: 'arrayOf',
98
+ value: {
99
+ type: 'shape',
100
+ value: {
101
+ key: 'string',
102
+ label: 'string',
103
+ icon: 'node',
104
+ danger: 'bool',
105
+ disabled: 'bool',
106
+ },
107
+ },
108
+ },
109
+ setter: {
110
+ componentName: 'ArraySetter',
111
+ props: {
112
+ itemSetter: {
113
+ componentName: 'ObjectSetter',
114
+ props: {
115
+ config: {
116
+ items: [
117
+ {
118
+ name: 'key',
119
+ title: '唯一标识',
120
+ setter: 'StringSetter',
121
+ },
122
+ {
123
+ name: 'label',
124
+ title: '菜单项文本',
125
+ setter: 'StringSetter',
126
+ },
127
+ {
128
+ name: 'icon',
129
+ title: '图标',
130
+ setter: 'IconSetter',
131
+ },
132
+ {
133
+ name: 'danger',
134
+ title: '危险项',
135
+ setter: 'BoolSetter',
136
+ },
137
+ {
138
+ name: 'disabled',
139
+ title: '禁用',
140
+ setter: 'BoolSetter',
141
+ },
142
+ ],
143
+ },
144
+ },
145
+ },
146
+ },
147
+ },
148
+ },
149
+ {
150
+ name: 'placement',
151
+ title: { label: '弹出位置', tip: '下拉菜单弹出的位置' },
152
+ propType: {
153
+ type: 'oneOf',
154
+ value: ['bottomLeft', 'bottomCenter', 'bottomRight', 'topLeft', 'topCenter', 'topRight'],
155
+ },
156
+ defaultValue: 'bottomRight',
157
+ setter: {
158
+ componentName: 'SelectSetter',
159
+ props: {
160
+ options: [
161
+ { label: '左下', value: 'bottomLeft' },
162
+ { label: '下居中', value: 'bottomCenter' },
163
+ { label: '右下', value: 'bottomRight' },
164
+ { label: '左上', value: 'topLeft' },
165
+ { label: '上居中', value: 'topCenter' },
166
+ { label: '右上', value: 'topRight' },
167
+ ],
168
+ },
169
+ },
170
+ },
171
+ ]
172
+ }
173
+ ],
174
+ configure: { supports: { style: true, className: true } },
175
+ };