@pisell/materials 3.0.61 → 3.0.63

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 (177) 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 +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +28 -60
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +22 -54
  11. package/es/components/Pagination/index.d.ts +1 -1
  12. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  13. package/es/components/TimeResourceSelector/index.js +115 -0
  14. package/es/components/TimeResourceSelector/index.less +59 -0
  15. package/es/components/cardPro/index.js +1 -4
  16. package/es/components/collapse/index.js +27 -4
  17. package/es/components/iconfont/index.js +1 -1
  18. package/es/components/pisellAnchor/index.d.ts +15 -0
  19. package/es/components/pisellAnchor/index.js +126 -0
  20. package/es/components/pisellAnchor/index.less +177 -0
  21. package/es/components/pisellAvatar/index.d.ts +19 -0
  22. package/es/components/pisellAvatar/index.js +90 -0
  23. package/es/components/pisellAvatar/index.less +26 -0
  24. package/es/components/pisellCard/index.d.ts +8 -0
  25. package/es/components/pisellCard/index.js +34 -5
  26. package/es/components/pisellCard/index.less +31 -4
  27. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  28. package/es/components/pisellCustomCheckboxGroup/index.js +72 -0
  29. package/es/components/pisellCustomCheckboxGroup/index.less +0 -0
  30. package/es/components/pisellDropdown/index.d.ts +20 -0
  31. package/es/components/pisellDropdown/index.js +51 -0
  32. package/es/components/pisellDropdown/index.less +44 -0
  33. package/es/components/pisellEmpty/index.d.ts +2 -1
  34. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  35. package/es/components/pisellHeaderProgressBar/index.js +76 -0
  36. package/es/components/pisellHeaderProgressBar/index.less +18 -0
  37. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  38. package/es/components/pisellImageCarousels/index.js +108 -0
  39. package/es/components/pisellImageCarousels/index.less +92 -0
  40. package/es/components/pisellList01/index.d.ts +17 -0
  41. package/es/components/pisellList01/index.js +105 -0
  42. package/es/components/pisellList01/index.less +53 -0
  43. package/es/components/pisellModal/components/PcModal/index.js +1 -1
  44. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  45. package/es/components/pisellSectionHeaders/index.js +35 -0
  46. package/es/components/pisellSectionHeaders/index.less +46 -0
  47. package/es/components/pisellText/components/Amount/index.js +1 -1
  48. package/es/components/pisellViewGrid/index.d.ts +16 -0
  49. package/es/components/pisellViewGrid/index.js +66 -0
  50. package/es/components/pisellViewGrid/index.less +31 -0
  51. package/es/components/productCard/components/Action/index.js +1 -1
  52. package/es/components/productCard/components/AmountFooter/index.d.ts +1 -1
  53. package/es/components/productCard/components/AmountFooter/index.js +30 -10
  54. package/es/components/productCard/components/AmountFooter/index.less +11 -0
  55. package/es/components/productCard/components/Header/index.js +24 -15
  56. package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
  57. package/es/components/productCard/components/MultiDay/index.js +79 -0
  58. package/es/components/productCard/components/MultiDay/index.less +34 -0
  59. package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
  60. package/es/components/productCard/components/MultiDay/utils.js +54 -0
  61. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +11 -5
  62. package/es/components/productCard/components/Packages/components/options/index.js +2 -2
  63. package/es/components/productCard/components/Packages/index.js +1 -2
  64. package/es/components/productCard/components/Sales/index.js +2 -2
  65. package/es/components/productCard/components/Time/index.js +15 -13
  66. package/es/components/productCard/hooks/useOpenNote.js +3 -2
  67. package/es/components/productCard/index.d.ts +1 -1
  68. package/es/components/productCard/index.js +39 -21
  69. package/es/components/productCard/index.less +6 -1
  70. package/es/components/productCard/status.d.ts +24 -1
  71. package/es/components/productCard/status.js +54 -2
  72. package/es/components/productCard/types.d.ts +62 -1
  73. package/es/components/productCard/utils.d.ts +10 -144
  74. package/es/components/productCard/utils.js +49 -670
  75. package/es/components/section-footers/index.d.ts +9 -0
  76. package/es/components/section-footers/index.js +17 -0
  77. package/es/components/section-footers/index.less +5 -0
  78. package/es/components/table/Table/utils.d.ts +1 -1
  79. package/es/index.d.ts +10 -0
  80. package/es/index.js +10 -0
  81. package/lib/components/Pagination/index.d.ts +1 -1
  82. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  83. package/lib/components/TimeResourceSelector/index.js +109 -0
  84. package/lib/components/TimeResourceSelector/index.less +59 -0
  85. package/lib/components/cardPro/index.js +0 -3
  86. package/lib/components/collapse/index.js +30 -4
  87. package/lib/components/iconfont/index.js +1 -1
  88. package/lib/components/pisellAnchor/index.d.ts +15 -0
  89. package/lib/components/pisellAnchor/index.js +120 -0
  90. package/lib/components/pisellAnchor/index.less +177 -0
  91. package/lib/components/pisellAvatar/index.d.ts +19 -0
  92. package/lib/components/pisellAvatar/index.js +108 -0
  93. package/lib/components/pisellAvatar/index.less +26 -0
  94. package/lib/components/pisellCard/index.d.ts +8 -0
  95. package/lib/components/pisellCard/index.js +30 -7
  96. package/lib/components/pisellCard/index.less +31 -4
  97. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  98. package/lib/components/pisellCustomCheckboxGroup/index.js +71 -0
  99. package/lib/components/pisellCustomCheckboxGroup/index.less +0 -0
  100. package/lib/components/pisellDropdown/index.d.ts +20 -0
  101. package/lib/components/pisellDropdown/index.js +72 -0
  102. package/lib/components/pisellDropdown/index.less +44 -0
  103. package/lib/components/pisellEmpty/index.d.ts +2 -1
  104. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  105. package/lib/components/pisellHeaderProgressBar/index.js +88 -0
  106. package/lib/components/pisellHeaderProgressBar/index.less +18 -0
  107. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  108. package/lib/components/pisellImageCarousels/index.js +108 -0
  109. package/lib/components/pisellImageCarousels/index.less +92 -0
  110. package/lib/components/pisellList01/index.d.ts +17 -0
  111. package/lib/components/pisellList01/index.js +113 -0
  112. package/lib/components/pisellList01/index.less +53 -0
  113. package/lib/components/pisellModal/components/PcModal/index.js +1 -1
  114. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  115. package/lib/components/pisellSectionHeaders/index.js +52 -0
  116. package/lib/components/pisellSectionHeaders/index.less +46 -0
  117. package/lib/components/pisellText/components/Amount/index.js +2 -2
  118. package/lib/components/pisellViewGrid/index.d.ts +16 -0
  119. package/lib/components/pisellViewGrid/index.js +98 -0
  120. package/lib/components/pisellViewGrid/index.less +31 -0
  121. package/lib/components/productCard/components/Action/index.js +1 -1
  122. package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -1
  123. package/lib/components/productCard/components/AmountFooter/index.js +33 -9
  124. package/lib/components/productCard/components/AmountFooter/index.less +11 -0
  125. package/lib/components/productCard/components/Header/index.js +18 -9
  126. package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
  127. package/lib/components/productCard/components/MultiDay/index.js +72 -0
  128. package/lib/components/productCard/components/MultiDay/index.less +34 -0
  129. package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
  130. package/lib/components/productCard/components/MultiDay/utils.js +77 -0
  131. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
  132. package/lib/components/productCard/components/Packages/components/options/index.js +2 -2
  133. package/lib/components/productCard/components/Packages/index.js +1 -1
  134. package/lib/components/productCard/components/Sales/index.js +1 -2
  135. package/lib/components/productCard/components/Time/index.js +14 -11
  136. package/lib/components/productCard/hooks/useOpenNote.js +2 -1
  137. package/lib/components/productCard/index.d.ts +1 -1
  138. package/lib/components/productCard/index.js +37 -20
  139. package/lib/components/productCard/index.less +6 -1
  140. package/lib/components/productCard/status.d.ts +24 -1
  141. package/lib/components/productCard/status.js +37 -2
  142. package/lib/components/productCard/types.d.ts +62 -1
  143. package/lib/components/productCard/utils.d.ts +10 -144
  144. package/lib/components/productCard/utils.js +40 -566
  145. package/lib/components/section-footers/index.d.ts +9 -0
  146. package/lib/components/section-footers/index.js +44 -0
  147. package/lib/components/section-footers/index.less +5 -0
  148. package/lib/components/table/Table/utils.d.ts +1 -1
  149. package/lib/index.d.ts +10 -0
  150. package/lib/index.js +30 -0
  151. package/lowcode/pisell-anchor/meta.ts +118 -0
  152. package/lowcode/pisell-anchor/snippets.ts +26 -0
  153. package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
  154. package/lowcode/pisell-avatar/meta.ts +111 -0
  155. package/lowcode/pisell-avatar/snippets.ts +14 -0
  156. package/lowcode/pisell-card/meta.ts +62 -27
  157. package/lowcode/pisell-card/snippets.ts +6 -0
  158. package/lowcode/pisell-custom-checkbox-group/__screenshots__/card-1.png +0 -0
  159. package/lowcode/pisell-custom-checkbox-group/meta.ts +204 -0
  160. package/lowcode/pisell-custom-checkbox-group/snippets.ts +56 -0
  161. package/lowcode/pisell-dropdown/__screenshots__/dropdown-1.png +0 -0
  162. package/lowcode/pisell-dropdown/meta.ts +180 -0
  163. package/lowcode/pisell-dropdown/snippets.ts +69 -0
  164. package/lowcode/pisell-header-progress-bar/meta.ts +116 -0
  165. package/lowcode/pisell-header-progress-bar/snippets.ts +24 -0
  166. package/lowcode/pisell-image-carousels/meta.ts +143 -0
  167. package/lowcode/pisell-image-carousels/snippets.ts +20 -0
  168. package/lowcode/pisell-list01/meta.ts +74 -0
  169. package/lowcode/pisell-list01/snippets.ts +35 -0
  170. package/lowcode/pisell-section-headers/meta.ts +91 -0
  171. package/lowcode/pisell-section-headers/snippets.ts +22 -0
  172. package/lowcode/pisell-view-grid/__screenshots__/card-1.png +0 -0
  173. package/lowcode/pisell-view-grid/meta.ts +167 -0
  174. package/lowcode/pisell-view-grid/snippets.ts +54 -0
  175. package/lowcode/section-footers/meta.ts +66 -0
  176. package/lowcode/section-footers/snippe.ts +21 -0
  177. package/package.json +4 -3
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "filter_setting")[];
158
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
package/lib/index.d.ts CHANGED
@@ -108,5 +108,15 @@ export { default as PisellAdjustPrice } from './components/pisellAdjustPrice';
108
108
  export { default as PisellAdjustPriceInputNumber } from './components/pisellAdjustPrice/PisellAdjustPriceInputNumber';
109
109
  export { default as PisellStatisticList } from './components/pisellStatisticList';
110
110
  export { default as PisellFloatingPanel } from './components/pisellFloatingPanel';
111
+ export { default as PisellAvatar } from './components/pisellAvatar';
112
+ export { default as PisellViewGrid } from './components/pisellViewGrid';
113
+ export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
114
+ export { default as PisellDropdown } from './components/pisellDropdown';
115
+ export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
116
+ export { default as PisellImageCarousels } from './components/pisellImageCarousels';
117
+ export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
118
+ export { default as PisellList01 } from './components/pisellList01';
119
+ export { default as PisellAnchor } from './components/pisellAnchor';
120
+ export { default as SectionFooters } from './components/section-footers';
111
121
  export { default as ProductCard } from './components/productCard';
112
122
  export { default as Collapse } from './components/collapse';
package/lib/index.js CHANGED
@@ -77,6 +77,8 @@ __export(src_exports, {
77
77
  PisellAdjustPrice: () => import_pisellAdjustPrice.default,
78
78
  PisellAdjustPriceInputNumber: () => import_PisellAdjustPriceInputNumber.default,
79
79
  PisellAlert: () => import_pisellAlert.default,
80
+ PisellAnchor: () => import_pisellAnchor.default,
81
+ PisellAvatar: () => import_pisellAvatar.default,
80
82
  PisellCard: () => import_pisellCard.default,
81
83
  PisellCardList: () => import_pisellCardList.default,
82
84
  PisellCheckboxGroup: () => import_pisellCheckboxGroup.default,
@@ -84,21 +86,28 @@ __export(src_exports, {
84
86
  PisellContainer: () => import_pisellContainer.default,
85
87
  PisellContext: () => import_context.default,
86
88
  PisellCountdown: () => import_pisellCountdown.default,
89
+ PisellCustomCheckboxGroup: () => import_pisellCustomCheckboxGroup.default,
87
90
  PisellDatePicker: () => import_pisellDatePicker.default,
91
+ PisellDropdown: () => import_pisellDropdown.default,
88
92
  PisellEmpty: () => import_pisellEmpty.default,
89
93
  PisellFloatingPanel: () => import_pisellFloatingPanel.default,
94
+ PisellHeaderProgressBar: () => import_pisellHeaderProgressBar.default,
95
+ PisellImageCarousels: () => import_pisellImageCarousels.default,
90
96
  PisellInformationEntry: () => import_pisellInformationEntry.default,
91
97
  PisellInput: () => import_pisellInput.default,
98
+ PisellList01: () => import_pisellList01.default,
92
99
  PisellLoading: () => import_pisellLoading.default,
93
100
  PisellModal: () => import_pisellModal.default,
94
101
  PisellNumberKeyboard: () => import_Number.default,
95
102
  PisellPriceKeyboard: () => import_Amount.default,
96
103
  PisellRow: () => import_pisellRow.default,
97
104
  PisellScan: () => import_pisellScan.default,
105
+ PisellSectionHeaders: () => import_pisellSectionHeaders.default,
98
106
  PisellStatisticList: () => import_pisellStatisticList.default,
99
107
  PisellText: () => import_pisellText.default,
100
108
  PisellToast: () => import_pisellToast.default,
101
109
  PisellTooltip: () => import_pisellTooltip.default,
110
+ PisellViewGrid: () => import_pisellViewGrid.default,
102
111
  PisellWalletPassCard: () => import_pisellWalletPassCard.default,
103
112
  Popconfirm: () => import_antd22.Popconfirm,
104
113
  Popover: () => import_antd23.Popover,
@@ -110,6 +119,7 @@ __export(src_exports, {
110
119
  RecordView: () => import_record_view.default,
111
120
  Result: () => import_antd26.Result,
112
121
  Row: () => import_antd27.Row,
122
+ SectionFooters: () => import_section_footers.default,
113
123
  Segmented: () => import_segmented.default,
114
124
  Select: () => import_select.default,
115
125
  SelectTime: () => import_select_time.default,
@@ -254,6 +264,16 @@ var import_pisellAdjustPrice = __toESM(require("./components/pisellAdjustPrice")
254
264
  var import_PisellAdjustPriceInputNumber = __toESM(require("./components/pisellAdjustPrice/PisellAdjustPriceInputNumber"));
255
265
  var import_pisellStatisticList = __toESM(require("./components/pisellStatisticList"));
256
266
  var import_pisellFloatingPanel = __toESM(require("./components/pisellFloatingPanel"));
267
+ var import_pisellAvatar = __toESM(require("./components/pisellAvatar"));
268
+ var import_pisellViewGrid = __toESM(require("./components/pisellViewGrid"));
269
+ var import_pisellCustomCheckboxGroup = __toESM(require("./components/pisellCustomCheckboxGroup"));
270
+ var import_pisellDropdown = __toESM(require("./components/pisellDropdown"));
271
+ var import_pisellSectionHeaders = __toESM(require("./components/pisellSectionHeaders"));
272
+ var import_pisellImageCarousels = __toESM(require("./components/pisellImageCarousels"));
273
+ var import_pisellHeaderProgressBar = __toESM(require("./components/pisellHeaderProgressBar"));
274
+ var import_pisellList01 = __toESM(require("./components/pisellList01"));
275
+ var import_pisellAnchor = __toESM(require("./components/pisellAnchor"));
276
+ var import_section_footers = __toESM(require("./components/section-footers"));
257
277
  var import_productCard = __toESM(require("./components/productCard"));
258
278
  var import_collapse = __toESM(require("./components/collapse"));
259
279
  // Annotate the CommonJS export names for ESM import in node:
@@ -306,6 +326,8 @@ var import_collapse = __toESM(require("./components/collapse"));
306
326
  PisellAdjustPrice,
307
327
  PisellAdjustPriceInputNumber,
308
328
  PisellAlert,
329
+ PisellAnchor,
330
+ PisellAvatar,
309
331
  PisellCard,
310
332
  PisellCardList,
311
333
  PisellCheckboxGroup,
@@ -313,21 +335,28 @@ var import_collapse = __toESM(require("./components/collapse"));
313
335
  PisellContainer,
314
336
  PisellContext,
315
337
  PisellCountdown,
338
+ PisellCustomCheckboxGroup,
316
339
  PisellDatePicker,
340
+ PisellDropdown,
317
341
  PisellEmpty,
318
342
  PisellFloatingPanel,
343
+ PisellHeaderProgressBar,
344
+ PisellImageCarousels,
319
345
  PisellInformationEntry,
320
346
  PisellInput,
347
+ PisellList01,
321
348
  PisellLoading,
322
349
  PisellModal,
323
350
  PisellNumberKeyboard,
324
351
  PisellPriceKeyboard,
325
352
  PisellRow,
326
353
  PisellScan,
354
+ PisellSectionHeaders,
327
355
  PisellStatisticList,
328
356
  PisellText,
329
357
  PisellToast,
330
358
  PisellTooltip,
359
+ PisellViewGrid,
331
360
  PisellWalletPassCard,
332
361
  Popconfirm,
333
362
  Popover,
@@ -339,6 +368,7 @@ var import_collapse = __toESM(require("./components/collapse"));
339
368
  RecordView,
340
369
  Result,
341
370
  Row,
371
+ SectionFooters,
342
372
  Segmented,
343
373
  Select,
344
374
  SelectTime,
@@ -0,0 +1,118 @@
1
+ import { IPublicTypeComponentMetadata } from '@alilc/lowcode-types';
2
+ import { uuid } from '../_utils/utils';
3
+
4
+ import snippets from "./snippets";
5
+
6
+ const AnchorMeta: IPublicTypeComponentMetadata = {
7
+ componentName: "PisellAnchor",
8
+ title: "锚点导航",
9
+ category: "导航",
10
+ docUrl: "",
11
+ screenshot: "",
12
+ devMode: "proCode",
13
+ npm: {
14
+ package: "@pisell/materials",
15
+ version: "1.0.1",
16
+ exportName: "PisellAnchor",
17
+ main: "src/index.tsx",
18
+ destructuring: true,
19
+ subName: "",
20
+ },
21
+ props: [
22
+ {
23
+ name: 'options',
24
+ title: { label: '选项列表', tip: '导航选项列表' },
25
+ propType: {
26
+ type: 'arrayOf',
27
+ value: {
28
+ type: 'shape',
29
+ value: [
30
+ {
31
+ name: 'id',
32
+ propType: 'string',
33
+ description: '选项ID',
34
+ defaultValue: '',
35
+ },
36
+ {
37
+ name: 'name',
38
+ propType: 'node',
39
+ description: '选项名称',
40
+ defaultValue: '',
41
+ }
42
+ ],
43
+ },
44
+ },
45
+ setter: {
46
+ componentName: 'ArraySetter',
47
+ props: {
48
+ itemSetter: {
49
+ componentName: 'ObjectSetter',
50
+ props: {
51
+ config: {
52
+ items: [
53
+ {
54
+ name: 'id',
55
+ title: '选项ID',
56
+ setter: 'StringSetter',
57
+ isRequired: true
58
+ },
59
+ {
60
+ name: 'name',
61
+ title: '选项名称',
62
+ setter: ['StringSetter', 'ExpressionSetter'],
63
+ isRequired: true
64
+ }
65
+ ],
66
+ },
67
+ },
68
+ initialValue: () => {
69
+ const id = uuid();
70
+ return {
71
+ id,
72
+ name: `选项${id}`,
73
+ };
74
+ },
75
+ },
76
+ },
77
+ },
78
+ },
79
+ {
80
+ name: 'tab',
81
+ title: { label: '当前选中项', tip: '当前选中的选项ID' },
82
+ propType: 'string',
83
+ },
84
+ {
85
+ name: 'className',
86
+ title: { label: '自定义类名', tip: '自定义类名' },
87
+ propType: 'string',
88
+ },
89
+ {
90
+ name: 'style',
91
+ title: { label: '自定义样式', tip: '自定义样式' },
92
+ propType: 'object',
93
+ }
94
+ ],
95
+ configure: {
96
+ supports: {
97
+ style: true,
98
+ events: [
99
+ {
100
+ name: "onChange",
101
+ template:
102
+ "onChange(key){\n// 选项切换时的回调\nconsole.log('onChange', key);}",
103
+ }
104
+ ],
105
+ },
106
+ component: {
107
+ isContainer: false,
108
+ nestingRule: {
109
+ childWhitelist: []
110
+ },
111
+ },
112
+ },
113
+ };
114
+
115
+ export default {
116
+ ...AnchorMeta,
117
+ snippets,
118
+ };
@@ -0,0 +1,26 @@
1
+ export default [
2
+ {
3
+ title: '锚点导航',
4
+ screenshot: '',
5
+ schema: {
6
+ componentName: 'PisellAnchor',
7
+ props: {
8
+ options: [
9
+ {
10
+ id: '1',
11
+ name: '选项1'
12
+ },
13
+ {
14
+ id: '2',
15
+ name: '选项2'
16
+ },
17
+ {
18
+ id: '3',
19
+ name: '选项3'
20
+ }
21
+ ],
22
+ tab: '1'
23
+ }
24
+ }
25
+ }
26
+ ];
@@ -0,0 +1,111 @@
1
+ import snippets from "./snippets";
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: "PisellAvatar",
6
+ title: "头像",
7
+ category: "数据展示",
8
+ devMode: "proCode",
9
+ npm: {
10
+ package: "@pisell/materials",
11
+ version: "1.0.1",
12
+ exportName: "PisellAvatar",
13
+ main: "src/index.tsx",
14
+ destructuring: true,
15
+ subName: "",
16
+ },
17
+ props: [
18
+ {
19
+ name: "icon",
20
+ title: { label: "头像图标", tip: "icon | 设置头像的自定义图标" },
21
+ propType: "node",
22
+ },
23
+ {
24
+ name: "shape",
25
+ title: { label: "头像形状", tip: "shape | 指定头像的形状" },
26
+ propType: { type: "oneOf", value: ["circle", "square"] },
27
+ defaultValue: "circle",
28
+ },
29
+ {
30
+ name: "borderRadius",
31
+ title: { label: "圆角度数", tip: "borderRadius | 方形头像的圆角大小" },
32
+ propType: "number",
33
+ defaultValue: 4,
34
+ condition: {
35
+ type: "JSFunction",
36
+ value: "target => target.getProps().getPropValue('shape') === 'square'",
37
+ },
38
+ },
39
+ {
40
+ name: "size",
41
+ title: { label: "尺寸", tip: "size | 设置头像的大小" },
42
+ propType: {
43
+ type: "oneOf",
44
+ value: ["xs", "sm", "md", "lg", "xl", "xxl"],
45
+ },
46
+ defaultValue: "xs",
47
+ },
48
+ {
49
+ name: "useTextAvatar",
50
+ title: { label: "使用文本头像", tip: "useTextAvatar | 是否使用文本作为头像" },
51
+ propType: "bool",
52
+ defaultValue: false,
53
+ },
54
+ {
55
+ name: "children",
56
+ title: { label: "文本内容", tip: "children | 文本头像的内容" },
57
+ propType: "string",
58
+ condition: {
59
+ type: "JSFunction",
60
+ value: "target => target.getProps().getPropValue('useTextAvatar')",
61
+ },
62
+ },
63
+ {
64
+ name: "src",
65
+ title: { label: "图片地址", tip: "src | 图片类头像的资源地址" },
66
+ propType: "string",
67
+ },
68
+ {
69
+ name: "alt",
70
+ title: {
71
+ label: "替代文本",
72
+ tip: "alt | 图像无法显示时的替代文本",
73
+ },
74
+ propType: "string",
75
+ setter: "PisellI18nSetter",
76
+ },
77
+ {
78
+ name: "onError",
79
+ title: {
80
+ label: "图片加载失败的事件",
81
+ tip: "图片加载失败的事件,返回 false 会关闭组件默认的 fallback 行为",
82
+ },
83
+ propType: "func",
84
+ },
85
+ {
86
+ name: "gap",
87
+ title: {
88
+ label: "文字边距",
89
+ tip: "gap | 字符类型距离左右两侧边界单位像素",
90
+ },
91
+ propType: "number",
92
+ },
93
+ ],
94
+ configure: {
95
+ supports: {
96
+ style: true,
97
+ events: [
98
+ {
99
+ name: "onError",
100
+ template:
101
+ "onError(${extParams}){\n// 图片加载失败的事件\nconsole.log('onError');}",
102
+ },
103
+ {
104
+ name: "onClick",
105
+ template:
106
+ "onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
107
+ }
108
+ ],
109
+ },
110
+ },
111
+ };
@@ -0,0 +1,14 @@
1
+ export default [
2
+ {
3
+ title: '头像',
4
+ screenshot: 'https://alifd.alicdn.com/fusion-cool/icons/icon-antd/avatar-1.jpg',
5
+ schema: {
6
+ componentName: 'PisellAvatar',
7
+ props: {
8
+ src: 'https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png',
9
+ borderRadius: 4,
10
+ size: 'xs'
11
+ },
12
+ },
13
+ },
14
+ ];
@@ -18,12 +18,12 @@ export default {
18
18
  },
19
19
  experimental: { hideSelectTools: true },
20
20
  props: [
21
- {
22
- name: "title",
23
- title: { label: "卡片标题", tip: "卡片标题" },
24
- propType: { type: "oneOfType", value: ["string", "node"] },
25
- setter: ['PisellI18nSetter', 'SlotSetter']
26
- },
21
+ // {
22
+ // name: "title",
23
+ // title: { label: "卡片标题", tip: "卡片标题" },
24
+ // propType: { type: "oneOfType", value: ["string", "node"] },
25
+ // setter: ['PisellI18nSetter', 'SlotSetter']
26
+ // },
27
27
  // {
28
28
  // name: 'actions',
29
29
  // title: { label: '卡片操作组', tip: '卡片操作组,位置在卡片底部' },
@@ -46,22 +46,28 @@ export default {
46
46
  defaultValue: true,
47
47
  },
48
48
  {
49
- name: "cover",
50
- title: { label: "卡片封面", tip: "卡片封面" },
51
- propType: "node",
52
- },
53
- {
54
- name: "extra",
55
- title: { label: "额外元素", tip: "卡片右上角的操作区域" },
56
- propType: { type: "oneOfType", value: ["string", "node"] },
57
- setter: ['PisellI18nSetter', 'SlotSetter']
58
- },
59
- {
60
- name: "hoverable",
61
- title: { label: "可浮起", tip: "鼠标移过时可浮起" },
49
+ name: "selected",
50
+ title: { label: "是否选中", tip: "是否选中" },
62
51
  propType: "bool",
63
52
  defaultValue: false,
64
53
  },
54
+ // {
55
+ // name: "cover",
56
+ // title: { label: "卡片封面", tip: "卡片封面" },
57
+ // propType: "node",
58
+ // },
59
+ // {
60
+ // name: "extra",
61
+ // title: { label: "额外元素", tip: "卡片右上角的操作区域" },
62
+ // propType: { type: "oneOfType", value: ["string", "node"] },
63
+ // setter: ['PisellI18nSetter', 'SlotSetter']
64
+ // },
65
+ // {
66
+ // name: "hoverable",
67
+ // title: { label: "可浮起", tip: "鼠标移过时可浮起" },
68
+ // propType: "bool",
69
+ // defaultValue: false,
70
+ // },
65
71
  {
66
72
  name: "loading",
67
73
  title: {
@@ -72,17 +78,46 @@ export default {
72
78
  defaultValue: false,
73
79
  },
74
80
  {
75
- name: "size",
76
- title: { label: "尺寸", tip: "card 的尺寸" },
77
- propType: { type: "oneOf", value: ["default", "small"] },
78
- defaultValue: "default",
81
+ name: "disabled",
82
+ title: {
83
+ label: "是否禁用",
84
+ tip: "是否禁用该卡片",
85
+ },
86
+ propType: "bool",
87
+ defaultValue: false,
79
88
  },
80
89
  {
81
- name: "type",
82
- title: { label: "卡片类型", tip: "卡片类型" },
83
- propType: { type: "oneOf", value: ["default", "inner"] },
84
- defaultValue: "default",
90
+ name: "padding",
91
+ title: {
92
+ label: "内边距",
93
+ tip: "控制内边距大小 数值",
94
+ },
95
+ propType: "number",
96
+ setter: "NumberSetter",
97
+ defaultValue: 16
85
98
  },
99
+ {
100
+ name: "borderRadius",
101
+ title: {
102
+ label: "边框圆角",
103
+ tip: "控制四个圆角大小 数值",
104
+ },
105
+ propType: "number",
106
+ setter: "NumberSetter",
107
+ defaultValue: 12
108
+ }
109
+ // {
110
+ // name: "size",
111
+ // title: { label: "尺寸", tip: "card 的尺寸" },
112
+ // propType: { type: "oneOf", value: ["default", "small"] },
113
+ // defaultValue: "default",
114
+ // },
115
+ // {
116
+ // name: "type",
117
+ // title: { label: "卡片类型", tip: "卡片类型" },
118
+ // propType: { type: "oneOf", value: ["default", "inner"] },
119
+ // defaultValue: "default",
120
+ // },
86
121
  ],
87
122
  configure: {
88
123
  component: { isContainer: true },
@@ -4,6 +4,12 @@ export default [
4
4
  schema: {
5
5
  componentName: 'PisellCard',
6
6
  props: {
7
+ bordered: true,
8
+ selected: false,
9
+ loading: false,
10
+ padding: 16,
11
+ disabled: false,
12
+ borderRadius: 12
7
13
  },
8
14
  },
9
15
  },