@pisell/materials 6.3.9 → 6.3.10

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 (66) 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 +5 -5
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +15 -15
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +16 -16
  11. package/es/components/dataSourceComponents/fields/index.d.ts +2 -2
  12. package/es/components/pisellQRScanner/index.d.ts +0 -13
  13. package/es/components/pisellQRScanner/index.js +0 -8
  14. package/es/components/pisellText/components/Editable/index.d.ts +29 -0
  15. package/es/components/pisellText/components/Editable/index.js +130 -0
  16. package/es/components/pisellText/components/Editable/index.less +40 -0
  17. package/es/components/pisellText/index.d.ts +1 -0
  18. package/es/components/pisellText/index.js +2 -0
  19. package/es/components/select/index.js +4 -2
  20. package/es/components/sortableList/index.d.ts +1 -1
  21. package/es/components/sortableList/index.js +2 -1
  22. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
  23. package/es/components/table/Actions/component/ExportImport/index.js +55 -27
  24. package/es/components/table/Table/utils.d.ts +1 -1
  25. package/es/components/table/serve.js +8 -0
  26. package/es/components/tabs/index.d.ts +1 -0
  27. package/es/components/tabs/index.js +9 -0
  28. package/es/components/walletCard/index.d.ts +11 -11
  29. package/es/components/walletCard/index.js +51 -40
  30. package/es/locales/en-US.d.ts +1 -1
  31. package/es/locales/en-US.js +2 -2
  32. package/es/locales/zh-CN.d.ts +1 -1
  33. package/es/locales/zh-CN.js +1 -1
  34. package/es/locales/zh-TW.d.ts +1 -1
  35. package/es/locales/zh-TW.js +1 -1
  36. package/es/typings.d.ts +7 -1
  37. package/lib/components/dataSourceComponents/fields/index.d.ts +2 -2
  38. package/lib/components/pisellQRScanner/index.d.ts +0 -13
  39. package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
  40. package/lib/components/pisellText/components/Editable/index.js +139 -0
  41. package/lib/components/pisellText/components/Editable/index.less +40 -0
  42. package/lib/components/pisellText/index.d.ts +1 -0
  43. package/lib/components/pisellText/index.js +2 -0
  44. package/lib/components/select/index.js +7 -2
  45. package/lib/components/sortableList/index.d.ts +1 -1
  46. package/lib/components/sortableList/index.js +2 -2
  47. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
  48. package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
  49. package/lib/components/table/Table/utils.d.ts +1 -1
  50. package/lib/components/table/serve.js +8 -0
  51. package/lib/components/tabs/index.d.ts +1 -0
  52. package/lib/components/tabs/index.js +5 -0
  53. package/lib/components/walletCard/index.d.ts +11 -11
  54. package/lib/components/walletCard/index.js +47 -29
  55. package/lib/locales/en-US.d.ts +1 -1
  56. package/lib/locales/en-US.js +2 -2
  57. package/lib/locales/zh-CN.d.ts +1 -1
  58. package/lib/locales/zh-CN.js +1 -1
  59. package/lib/locales/zh-TW.d.ts +1 -1
  60. package/lib/locales/zh-TW.js +1 -1
  61. package/lib/typings.d.ts +7 -1
  62. package/lowcode/pisell-text.editable/meta.ts +115 -0
  63. package/lowcode/pisell-text.editable/snippets.ts +15 -0
  64. package/lowcode/sortable-list/meta.ts +1 -1
  65. package/lowcode/wallet-card/meta.ts +20 -0
  66. package/package.json +1 -1
@@ -63,6 +63,7 @@ var ExportImport = ({ exportImport }) => {
63
63
  const [type, setType] = (0, import_react.useState)(import_status.defaultOptions.exportType);
64
64
  const [value, setValue] = (0, import_react.useState)("");
65
65
  const [errorStatus, setErrorStatus] = (0, import_react.useState)();
66
+ const [loading, setLoading] = (0, import_react.useState)(false);
66
67
  const { state } = (0, import_hooks.useSharedState)(import_model.Context);
67
68
  const { originResultDataSource, currentDataSource } = state;
68
69
  const context = (0, import_useEngineContext.default)();
@@ -142,33 +143,43 @@ var ExportImport = ({ exportImport }) => {
142
143
  });
143
144
  const onOk = async () => {
144
145
  const { apiUrl, otherParams } = exportImport;
145
- if (value === import_status.defaultOptions.exportValue) {
146
- const _params = {
147
- type,
148
- originDataSource: originResultDataSource,
149
- currentDataSource
150
- };
151
- const result = await (0, import_function.batchExport)(_params, exportImport);
152
- if (result) {
153
- onCancel();
154
- }
155
- } else if (value === import_status.defaultOptions.importValue) {
156
- const formData = new FormData();
157
- formData.append("file", file);
158
- const formId = otherParams == null ? void 0 : otherParams.form_id;
159
- const formCode = otherParams == null ? void 0 : otherParams.code;
160
- if (formId) {
161
- formData.append("form_id", formId);
162
- }
163
- if (formCode) {
164
- formData.append("code", formCode);
165
- }
166
- formData.append("url", (apiUrl == null ? void 0 : apiUrl.export) || "");
167
- if (formData) {
168
- import_antd.message.loading({ content: "Loading...", key: value });
169
- _batchImport.run(formData);
146
+ setLoading(true);
147
+ try {
148
+ if (value === import_status.defaultOptions.exportValue) {
149
+ const _params = {
150
+ type,
151
+ originDataSource: originResultDataSource,
152
+ currentDataSource
153
+ };
154
+ const result = await (0, import_function.batchExport)(_params, exportImport);
155
+ if (result) {
156
+ onCancel();
157
+ }
158
+ } else if (value === import_status.defaultOptions.importValue) {
159
+ const formData = new FormData();
160
+ formData.append("file", file);
161
+ const formId = otherParams == null ? void 0 : otherParams.form_id;
162
+ const formCode = otherParams == null ? void 0 : otherParams.code;
163
+ if (formId) {
164
+ formData.append("form_id", formId);
165
+ }
166
+ if (formCode) {
167
+ formData.append("code", formCode);
168
+ }
169
+ formData.append("url", (apiUrl == null ? void 0 : apiUrl.import) || "");
170
+ if (otherParams.import) {
171
+ Object.entries(otherParams.import).forEach(([key, value2]) => {
172
+ formData.append(key, value2);
173
+ });
174
+ }
175
+ if (formData) {
176
+ import_antd.message.loading({ content: "Loading...", key: value });
177
+ await _batchImport.run(formData);
178
+ }
170
179
  }
180
+ } catch (error) {
171
181
  }
182
+ setLoading(false);
172
183
  };
173
184
  return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
174
185
  import_antd.Dropdown,
@@ -196,6 +207,7 @@ var ExportImport = ({ exportImport }) => {
196
207
  onOk,
197
208
  cancelText: (0, import_locales.getText)("table-action-export-import-cancel"),
198
209
  okButtonProps: {
210
+ loading,
199
211
  disabled: value === import_status.defaultOptions.importValue && (!file || !!errorStatus)
200
212
  }
201
213
  },
@@ -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
- }) => ("filters" | "view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
158
+ }) => ("view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting" | "filters")[];
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 {};
@@ -35,6 +35,14 @@ var defaultUrl = {
35
35
  template: "/shop/form/data/download-template"
36
36
  };
37
37
  var formatApiParams = (params, type) => {
38
+ if (params instanceof FormData) {
39
+ let url = params.get("url");
40
+ params.delete("url");
41
+ return {
42
+ url: url || (defaultUrl == null ? void 0 : defaultUrl[type]),
43
+ params
44
+ };
45
+ }
38
46
  const _url = (params == null ? void 0 : params.url) || (defaultUrl == null ? void 0 : defaultUrl[type]);
39
47
  let _params = { ...params };
40
48
  delete _params.url;
@@ -6,6 +6,7 @@ declare class Tabs extends Component<any> {
6
6
  activeKey: any;
7
7
  };
8
8
  componentDidMount(): void;
9
+ componentDidUpdate(prevProps: Readonly<any>): void;
9
10
  private _handleChange;
10
11
  setActiveKey: (key: string) => void;
11
12
  getActiveKey: () => any;
@@ -46,6 +46,11 @@ var Tabs = class extends import_react.Component {
46
46
  componentDidMount() {
47
47
  document.body.id = "body";
48
48
  }
49
+ componentDidUpdate(prevProps) {
50
+ if (prevProps.activeKey !== this.props.activeKey) {
51
+ this.setState({ activeKey: this.props.activeKey });
52
+ }
53
+ }
49
54
  _handleChange = (key) => {
50
55
  this.setActiveKey(key);
51
56
  };
@@ -1,19 +1,19 @@
1
1
  import React from 'react';
2
2
  import './index.less';
3
- declare global {
4
- namespace JSX {
5
- interface IntrinsicElements {
6
- [elemName: string]: any;
7
- }
8
- }
9
- }
10
3
  export interface WalletCardItem {
11
- key: string;
12
- label?: string;
13
- hidden?: boolean;
4
+ type: string;
5
+ custom_title?: string | {
6
+ original: string;
7
+ en: string;
8
+ 'zh-CN': string;
9
+ 'zh-HK': string;
10
+ };
11
+ display?: 0 | 1;
14
12
  value?: number;
15
13
  }
16
14
  export interface WalletCardProps {
15
+ /** 钱包ID */
16
+ id?: string;
17
17
  /** 二维码弹窗适配平台 */
18
18
  platform?: 'pc' | 'h5' | 'ipad';
19
19
  /** 卡片主题 */
@@ -21,7 +21,7 @@ export interface WalletCardProps {
21
21
  /** 默认还是完整显示code */
22
22
  cardStyle?: 'normal' | 'full';
23
23
  /** 条形码还是二维码 */
24
- codeType?: 'barCode' | 'orCode';
24
+ codeType?: 'barCode' | 'qrCode';
25
25
  /** 二维码方向 */
26
26
  codeDirection?: 'bottom' | 'top';
27
27
  /** 自定义背景图 */
@@ -53,7 +53,7 @@ var DEFAULT_PROPS = {
53
53
  showWalletName: true,
54
54
  shopName: "Store name",
55
55
  showShopName: true,
56
- cardNo: "Wallet number",
56
+ cardNo: "WL0000000001",
57
57
  cardStyle: "normal",
58
58
  codeType: "barCode",
59
59
  platform: "pc",
@@ -64,24 +64,44 @@ var DEFAULT_PROPS = {
64
64
  isLogin: true,
65
65
  items: [
66
66
  {
67
- key: "rechargeable",
68
- label: "rechargeable",
69
- value: 0
67
+ type: "rechargeable",
68
+ display: 1,
69
+ custom_title: {
70
+ original: "Balance",
71
+ "zh-CN": "充值卡",
72
+ "zh-HK": "充值卡",
73
+ en: "Balance"
74
+ }
70
75
  },
71
76
  {
72
- key: "piont",
73
- label: "piont",
74
- value: 10
77
+ type: "point",
78
+ display: 1,
79
+ custom_title: {
80
+ original: "Points",
81
+ "zh-CN": "积分卡",
82
+ "zh-HK": "積分卡",
83
+ en: "Points"
84
+ }
75
85
  },
76
86
  {
77
- key: "voucher",
78
- label: "Discount cardvoucher",
79
- value: 0
87
+ type: "voucher",
88
+ display: 1,
89
+ custom_title: {
90
+ original: "Voucher",
91
+ "zh-CN": "代金券",
92
+ "zh-HK": "代金券",
93
+ en: "Voucher"
94
+ }
80
95
  },
81
96
  {
82
- key: "discount",
83
- label: "discount",
84
- value: 0
97
+ type: "discount",
98
+ display: 1,
99
+ custom_title: {
100
+ original: "Discount",
101
+ "zh-CN": "折扣卡",
102
+ "zh-HK": "折扣卡",
103
+ en: "Discount"
104
+ }
85
105
  }
86
106
  ]
87
107
  };
@@ -101,7 +121,7 @@ var useCodeModal = (cardNo, onCodeClick, codeType) => {
101
121
  e.stopPropagation();
102
122
  if ((_b = (_a2 = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _a2.isAppEnv) == null ? void 0 : _b.call(_a2)) {
103
123
  const typeMap = {
104
- orCode: "qrCode",
124
+ qrCode: "qrCode",
105
125
  barCode: "barCode"
106
126
  };
107
127
  (_d = (_c = interaction == null ? void 0 : interaction.utils) == null ? void 0 : _c.postMessageToApp) == null ? void 0 : _d.call(_c, {
@@ -188,8 +208,12 @@ var CardHeader = ({
188
208
  )));
189
209
  };
190
210
  var CardItem = ({ item, symbol }) => {
191
- const { key, label, value } = item;
192
- return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-label" }, (0, import_locales.getText)(`walletCard-${label}`) || ""), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-value" }, key === "rechargeable" ? /* @__PURE__ */ import_react.default.createElement(
211
+ var _a;
212
+ const { type, custom_title, value } = item;
213
+ const context = (0, import_useEngineContext.default)();
214
+ const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
215
+ const translationOriginal = (utils == null ? void 0 : utils.translationOriginal) || (utils == null ? void 0 : utils.translation);
216
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-label" }, translationOriginal(custom_title || "") || ""), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-wallet-card-item-value" }, type === "rechargeable" ? /* @__PURE__ */ import_react.default.createElement(
193
217
  import_Amount.default,
194
218
  {
195
219
  className: "pisell-card-amount-item-value",
@@ -199,27 +223,19 @@ var CardItem = ({ item, symbol }) => {
199
223
  showCurrencySymbol: true,
200
224
  value
201
225
  }
202
- ) : value));
226
+ ) : value || "0"));
203
227
  };
204
228
  var CardContent = ({ items, symbol }) => {
205
- const expectedOrder = ["piont", "balance", "discount", "voucher"];
206
- const sortedItems = (0, import_react.useMemo)(() => {
207
- if (!(items == null ? void 0 : items.length)) return [];
208
- return [...items].sort((a, b) => {
209
- const indexA = expectedOrder.indexOf(a.key);
210
- const indexB = expectedOrder.indexOf(b.key);
211
- return indexA - indexB;
212
- });
213
- }, [items]);
229
+ const filteredItems = (items || []).filter((item) => item.display !== 0);
214
230
  return /* @__PURE__ */ import_react.default.createElement(
215
231
  "div",
216
232
  {
217
233
  className: "pisell-wallet-card-list",
218
234
  style: {
219
- justifyContent: (sortedItems || []).length > 1 ? "space-between" : "flex-start"
235
+ justifyContent: filteredItems.length > 1 ? "space-between" : "flex-start"
220
236
  }
221
237
  },
222
- (sortedItems || []).map((item, index) => /* @__PURE__ */ import_react.default.createElement(CardItem, { key: index, item, symbol }))
238
+ filteredItems.map((item, index) => /* @__PURE__ */ import_react.default.createElement(CardItem, { key: index, item, symbol }))
223
239
  );
224
240
  };
225
241
  var CodeDisplay = ({ codeType, cardNo }) => {
@@ -336,7 +352,9 @@ var WalletCard = (props) => {
336
352
  }
337
353
  utils == null ? void 0 : utils.action({
338
354
  type: "pisell1.goWallet",
339
- data: {},
355
+ data: {
356
+ id: props.id
357
+ },
340
358
  callback: () => {
341
359
  }
342
360
  });
@@ -175,7 +175,7 @@ declare const _default: {
175
175
  'pisell-action-get-data': string;
176
176
  'pisell-action-delete-success': string;
177
177
  'pisell-action-delete-failed': string;
178
- 'walletCard-piont': string;
178
+ 'walletCard-point': string;
179
179
  'walletCard-rechargeable': string;
180
180
  'walletCard-voucher': string;
181
181
  'walletCard-discount': string;
@@ -168,7 +168,7 @@ var en_US_default = {
168
168
  "pisell-adjust-price-total-after-discount": "Total after discount: ",
169
169
  "pisell-adjust-price-discount-can-be-maximum": "Discount can be maximum",
170
170
  "pisell-discount-card-title": "Discount",
171
- "pisell-discount-card-unit": "off",
171
+ "pisell-discount-card-unit": "OFF",
172
172
  "pisell-discount-card-fixed-amount-prefix": "Save",
173
173
  // 数据源表格
174
174
  "pisell-data-source-table-add": "Add",
@@ -215,7 +215,7 @@ var en_US_default = {
215
215
  "pisell-action-get-data": "Please get data first",
216
216
  "pisell-action-delete-success": "Deleted successfully",
217
217
  "pisell-action-delete-failed": "Delete failed, please try again",
218
- "walletCard-piont": "Points",
218
+ "walletCard-point": "Points",
219
219
  "walletCard-rechargeable": "Balance",
220
220
  "walletCard-voucher": "Voucher",
221
221
  "walletCard-discount": "Discount",
@@ -175,7 +175,7 @@ declare const _default: {
175
175
  'pisell-action-get-data': string;
176
176
  'pisell-action-delete-success': string;
177
177
  'pisell-action-delete-failed': string;
178
- 'walletCard-piont': string;
178
+ 'walletCard-point': string;
179
179
  'walletCard-rechargeable': string;
180
180
  'walletCard-voucher': string;
181
181
  'walletCard-discount': string;
@@ -214,7 +214,7 @@ var zh_CN_default = {
214
214
  "pisell-action-get-data": "请先获取数据",
215
215
  "pisell-action-delete-success": "删除成功",
216
216
  "pisell-action-delete-failed": "删除失败,请重试",
217
- "walletCard-piont": "积分",
217
+ "walletCard-point": "积分",
218
218
  "walletCard-rechargeable": "余额",
219
219
  "walletCard-voucher": "代金券",
220
220
  "walletCard-discount": "折扣卡",
@@ -174,7 +174,7 @@ declare const _default: {
174
174
  'pisell-action-get-data': string;
175
175
  'pisell-action-delete-success': string;
176
176
  'pisell-action-delete-failed': string;
177
- 'walletCard-piont': string;
177
+ 'walletCard-point': string;
178
178
  'walletCard-rechargeable': string;
179
179
  'walletCard-voucher': string;
180
180
  'walletCard-discount': string;
@@ -214,7 +214,7 @@ var zh_TW_default = {
214
214
  "pisell-action-get-data": "請先獲取數據",
215
215
  "pisell-action-delete-success": "刪除成功",
216
216
  "pisell-action-delete-failed": "刪除失敗,請重試",
217
- "walletCard-piont": "積分",
217
+ "walletCard-point": "積分",
218
218
  "walletCard-rechargeable": "餘額",
219
219
  "walletCard-voucher": "代金券",
220
220
  "walletCard-discount": "折扣卡",
package/lib/typings.d.ts CHANGED
@@ -1,4 +1,10 @@
1
1
  declare module '*.png' {
2
2
  const content: string;
3
3
  export default content;
4
- }
4
+ }
5
+
6
+ namespace JSX {
7
+ interface IntrinsicElements {
8
+ [elemName: string]: any;
9
+ }
10
+ }
@@ -0,0 +1,115 @@
1
+ import snippets from './snippets';
2
+
3
+ export default {
4
+ snippets,
5
+ componentName: 'PisellText.Editable',
6
+ title: '可编辑文本',
7
+ category: '数据输入',
8
+ docUrl: '',
9
+ screenshot: '',
10
+ devMode: 'proCode',
11
+ npm: {
12
+ package: '@pisell/materials',
13
+ version: '1.0.1',
14
+ exportName: 'PisellText',
15
+ main: 'src/index.tsx',
16
+ destructuring: true,
17
+ subName: 'Editable',
18
+ },
19
+ props: [
20
+ {
21
+ name: 'value',
22
+ title: {
23
+ label: '文本内容',
24
+ tip: '文本内容,支持字符串或多语言对象'
25
+ },
26
+ propType: {
27
+ type: 'oneOfType',
28
+ value: ['string', 'object']
29
+ },
30
+ setter: {
31
+ componentName: 'MixedSetter',
32
+ props: {
33
+ setters: [
34
+ 'StringSetter',
35
+ 'JsonSetter'
36
+ ]
37
+ }
38
+ },
39
+ },
40
+ {
41
+ name: 'editable',
42
+ title: {
43
+ label: '启用编辑',
44
+ tip: '启用编辑功能,支持布尔值或详细配置对象',
45
+ },
46
+ propType: {
47
+ type: 'oneOfType',
48
+ value: ['bool', 'object']
49
+ },
50
+ setter: {
51
+ componentName: 'MixedSetter',
52
+ props: {
53
+ setters: [
54
+ 'BoolSetter',
55
+ {
56
+ componentName: 'ObjectSetter',
57
+ props: {
58
+ config: {
59
+ items: [
60
+ {
61
+ name: 'disabled',
62
+ title: { label: '禁用编辑', tip: '是否禁用编辑功能' },
63
+ propType: 'bool',
64
+ setter: 'BoolSetter',
65
+ defaultValue: false,
66
+ },
67
+ {
68
+ name: 'maxLength',
69
+ title: { label: '最大长度', tip: '编辑时的最大字符长度' },
70
+ propType: 'number',
71
+ setter: 'NumberSetter',
72
+ }
73
+ ]
74
+ }
75
+ }
76
+ }
77
+ ]
78
+ }
79
+ },
80
+ defaultValue: false,
81
+ },
82
+ {
83
+ name: 'size',
84
+ title: { label: '尺寸', tip: '输入框尺寸' },
85
+ propType: { type: 'oneOf', value: ['large', 'middle', 'small'] },
86
+ setter: [
87
+ {
88
+ componentName: 'RadioGroupSetter',
89
+ props: {
90
+ options: [
91
+ { title: 'Large', value: 'large' },
92
+ { title: 'Middle', value: 'middle' },
93
+ { title: 'Small', value: 'small' },
94
+ ]
95
+ }
96
+ },
97
+ 'VariableSetter'
98
+ ],
99
+ defaultValue: 'middle',
100
+ },
101
+ {
102
+ name: 'className',
103
+ title: { label: '类名', tip: '自定义CSS类名' },
104
+ propType: 'string',
105
+ setter: 'StringSetter',
106
+ },
107
+ ],
108
+ configure: {
109
+ supports: {
110
+ style: true,
111
+ className: true,
112
+ events: ['onChange'],
113
+ }
114
+ },
115
+ };
@@ -0,0 +1,15 @@
1
+ export default [
2
+ {
3
+ title: '可编辑文本',
4
+ schema: {
5
+ componentName: 'PisellText.Editable',
6
+ props: {
7
+ value: '可编辑的文本内容',
8
+ editable: {
9
+ maxLength: 50,
10
+ disabled: false,
11
+ },
12
+ },
13
+ },
14
+ },
15
+ ];
@@ -70,7 +70,7 @@ export default {
70
70
  title: '渲染函数插槽',
71
71
  initialValue: {
72
72
  type: 'JSSlot',
73
- params: ['item'],
73
+ params: ['item', 'index'],
74
74
  value: [
75
75
  {
76
76
  componentName: 'Button',
@@ -241,6 +241,26 @@ export default {
241
241
  setter: 'BoolSetter',
242
242
  defaultValue: false,
243
243
  },
244
+ {
245
+ name: 'codeType',
246
+ title: {
247
+ label: {
248
+ type: 'i18n',
249
+ 'en-US': 'Code Type',
250
+ 'zh-CN': '条码类型',
251
+ },
252
+ },
253
+ setter: {
254
+ componentName: 'RadioGroupSetter',
255
+ props: {
256
+ options: [
257
+ { title: '条形码', value: 'barCode' },
258
+ { title: '二维码', value: 'qrCode' },
259
+ ],
260
+ },
261
+ },
262
+ defaultValue: 'qrCode',
263
+ },
244
264
  ],
245
265
  },
246
266
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "6.3.9",
3
+ "version": "6.3.10",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",