@pisell/materials 6.0.18 → 6.0.20
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 +7 -7
- package/build/lowcode/preview.js +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +51 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +51 -20
- package/es/components/badge/index.d.ts +7 -0
- package/es/components/badge/index.js +44 -0
- package/es/components/badge/index.less +2 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupEdit/index.js +408 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/buttonGroupPreview/index.js +74 -0
- package/es/components/cardMetricItem/index.d.ts +12 -0
- package/es/components/cardMetricItem/index.js +39 -0
- package/es/components/cardMetricItem/index.less +39 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/cardPro/index.js +66 -0
- package/es/components/cardPro/index.less +55 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/cropPhoto/index.js +72 -0
- package/es/components/cropPhoto/index.less +15 -0
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +13 -3
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/es/components/dataSourceComponents/fields/Input/WithMode.js +24 -1
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +31 -3
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +31 -3
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +102 -141
- package/es/components/dataSourceComponents/fields/Upload/WithMode.js +6 -3
- package/es/components/dataSourceComponents/fields/Upload/serve.js +13 -3
- package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.js +396 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.js +17 -2
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/es/components/dataSourceComponents/hooks/usePlatform.js +12 -0
- package/es/components/login-and-register/index.js +23 -21
- package/es/components/login-and-register/index.less +7 -7
- package/es/components/page/index.js +23 -57
- package/es/components/pisellAnchor/index.d.ts +23 -0
- package/es/components/pisellAnchor/index.js +303 -0
- package/es/components/pisellAnchor/index.less +197 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +18 -2
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellQrcode/index.js +70 -0
- package/es/components/pisellQrcode/index.less +41 -0
- package/es/components/pisellStatisticList/index.d.ts +3 -0
- package/es/components/pisellStatisticList/index.js +17 -5
- package/es/components/pisellStatisticList/index.less +1 -1
- package/es/components/pisellText/components/Amount/index.d.ts +2 -0
- package/es/components/pisellText/components/Amount/index.js +3 -2
- package/es/components/pisellWalletPassCard/index.d.ts +4 -4
- package/es/components/pisellWalletPassCard/index.js +28 -12
- package/es/components/pisellWalletPassCard/index.less +26 -4
- package/es/components/record-view/index.d.ts +13 -5
- package/es/components/record-view/index.js +81 -30
- package/es/components/record-view/index.less +37 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +25 -7
- package/es/components/tabs/index.less +5 -5
- package/es/components/walletCard/Guest/index.d.ts +3 -0
- package/es/components/walletCard/Guest/index.js +83 -0
- package/es/components/walletCard/Guest/index.less +71 -0
- package/es/components/walletCard/index.d.ts +65 -0
- package/es/components/walletCard/index.js +402 -0
- package/es/components/walletCard/index.less +267 -0
- package/es/index.d.ts +10 -1
- package/es/index.js +10 -1
- package/es/locales/en-US.d.ts +38 -2
- package/es/locales/en-US.js +55 -10
- package/es/locales/index.js +4 -2
- package/es/locales/zh-CN.d.ts +36 -0
- package/es/locales/zh-CN.js +41 -1
- package/es/locales/zh-TW.d.ts +36 -0
- package/es/locales/zh-TW.js +41 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +3 -0
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/badge/index.d.ts +7 -0
- package/lib/components/badge/index.js +70 -0
- package/lib/components/badge/index.less +2 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupEdit/index.js +317 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/buttonGroupPreview/index.js +79 -0
- package/lib/components/cardMetricItem/index.d.ts +12 -0
- package/lib/components/cardMetricItem/index.js +75 -0
- package/lib/components/cardMetricItem/index.less +39 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/cardPro/index.js +98 -0
- package/lib/components/cardPro/index.less +55 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/cropPhoto/index.js +70 -0
- package/lib/components/cropPhoto/index.less +15 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +12 -3
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/lib/components/dataSourceComponents/fields/Input/WithMode.js +21 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +37 -3
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +37 -3
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +47 -72
- package/lib/components/dataSourceComponents/fields/Upload/WithMode.js +11 -9
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +11 -2
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.js +247 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +17 -2
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/lib/components/dataSourceComponents/hooks/usePlatform.js +51 -0
- package/lib/components/login-and-register/index.js +23 -21
- package/lib/components/login-and-register/index.less +7 -7
- package/lib/components/page/index.js +37 -65
- package/lib/components/pisellAnchor/index.d.ts +23 -0
- package/lib/components/pisellAnchor/index.js +251 -0
- package/lib/components/pisellAnchor/index.less +197 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +24 -3
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellQrcode/index.js +82 -0
- package/lib/components/pisellQrcode/index.less +41 -0
- package/lib/components/pisellStatisticList/index.d.ts +3 -0
- package/lib/components/pisellStatisticList/index.js +35 -15
- package/lib/components/pisellStatisticList/index.less +1 -1
- package/lib/components/pisellText/components/Amount/index.d.ts +2 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +4 -4
- package/lib/components/pisellWalletPassCard/index.js +17 -9
- package/lib/components/pisellWalletPassCard/index.less +26 -4
- package/lib/components/record-view/index.d.ts +13 -5
- package/lib/components/record-view/index.js +63 -11
- package/lib/components/record-view/index.less +37 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +12 -1
- package/lib/components/tabs/index.less +5 -5
- package/lib/components/walletCard/Guest/index.d.ts +3 -0
- package/lib/components/walletCard/Guest/index.js +138 -0
- package/lib/components/walletCard/Guest/index.less +71 -0
- package/lib/components/walletCard/index.d.ts +65 -0
- package/lib/components/walletCard/index.js +374 -0
- package/lib/components/walletCard/index.less +267 -0
- package/lib/index.d.ts +10 -1
- package/lib/index.js +26 -1
- package/lib/locales/en-US.d.ts +38 -2
- package/lib/locales/en-US.js +41 -3
- package/lib/locales/index.js +4 -2
- package/lib/locales/zh-CN.d.ts +36 -0
- package/lib/locales/zh-CN.js +41 -1
- package/lib/locales/zh-TW.d.ts +36 -0
- package/lib/locales/zh-TW.js +41 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +6 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/badge/meta.ts +20 -11
- package/lowcode/badge/snippets.ts +2 -0
- package/lowcode/button/meta.ts +2 -6
- package/lowcode/button-group/meta.ts +198 -0
- package/lowcode/button-group/snippets.ts +68 -0
- package/lowcode/button-group-edit/meta.ts +32 -0
- package/lowcode/button-group-edit/snippets.ts +98 -0
- package/lowcode/button-group-preview/meta.ts +55 -0
- package/lowcode/button-group-preview/snippets.ts +57 -0
- package/lowcode/card/snippets.ts +55 -55
- package/lowcode/card-metric-item/meta.ts +83 -0
- package/lowcode/card-metric-item/snippets.ts +13 -0
- package/lowcode/card-pro/meta.ts +338 -0
- package/lowcode/card-pro/snippe.ts +39 -0
- package/lowcode/crop-photo/meta.ts +77 -0
- package/lowcode/crop-photo/snippe.ts +12 -0
- package/lowcode/form-item-input/snippets.ts +1 -1
- package/lowcode/form-item-upload/meta.ts +11 -0
- package/lowcode/pisell-anchor/meta.ts +118 -0
- package/lowcode/pisell-anchor/snippets.ts +26 -0
- package/lowcode/pisell-card/meta.ts +63 -27
- package/lowcode/pisell-card/snippets.ts +6 -0
- package/lowcode/pisell-modal.information/meta.ts +8 -0
- package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-qrcode/meta.ts +46 -0
- package/lowcode/pisell-qrcode/snippets.ts +13 -0
- package/lowcode/pisell-tooltip/meta.ts +1 -1
- package/lowcode/record-view/meta.ts +20 -0
- package/lowcode/section-footers/meta.ts +66 -0
- package/lowcode/section-footers/snippe.ts +21 -0
- package/lowcode/spin/meta.ts +9 -0
- package/lowcode/tag/meta.ts +6 -0
- package/lowcode/timeline/meta.ts +32 -9
- package/lowcode/timeline/snippets.ts +12 -2
- package/lowcode/timeline.item/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +283 -0
- package/lowcode/wallet-card/snippets.ts +44 -0
- package/package.json +5 -1
package/lib/locales/zh-TW.js
CHANGED
|
@@ -145,12 +145,14 @@ var zh_TW_default = {
|
|
|
145
145
|
"pisell-empty-description-no-data": "暫無數據",
|
|
146
146
|
// 信息录入组件
|
|
147
147
|
"pisell-information-entry-input-search": "搜索",
|
|
148
|
+
"pisell-information-entry-input-confirm": "确认",
|
|
148
149
|
"pisell-information-entry-scan-exit": "退出",
|
|
149
150
|
// 钱包卡片组件
|
|
150
151
|
"pisell-wallet-pass-card-detail": "詳情",
|
|
151
152
|
"pisell-wallet-pass-card-redeem": "兌換",
|
|
152
153
|
"pisell-wallet-pass-card-balance": "餘額",
|
|
153
154
|
"pisell-wallet-pass-card-valid-to": "有效期至",
|
|
155
|
+
"pisell-wallet-pass-card-expireDate": "長期",
|
|
154
156
|
// 金额修改组件
|
|
155
157
|
"pisell-adjust-price-price-override": "一口價",
|
|
156
158
|
"pisell-adjust-price-discount": "折扣",
|
|
@@ -165,6 +167,9 @@ var zh_TW_default = {
|
|
|
165
167
|
"pisell-data-source-table-edit": "編輯",
|
|
166
168
|
"pisell-data-source-table-detail": "詳情",
|
|
167
169
|
"pisell-data-source-table-delete": "刪除",
|
|
170
|
+
// recordView组件
|
|
171
|
+
"pisell-record-view-available": "可用",
|
|
172
|
+
"pisell-record-view-unavailable": "不可用",
|
|
168
173
|
"pisell-data-source-form-required-message": "該字段為必填項",
|
|
169
174
|
"pisell-data-source-form-email-message": "請輸入有效的電子郵件地址",
|
|
170
175
|
"pisell-data-source-form-domain-message": "請輸入有效的域名",
|
|
@@ -179,6 +184,10 @@ var zh_TW_default = {
|
|
|
179
184
|
"pisell-number-format-thousand": "千",
|
|
180
185
|
"pisell-number-format-million": "百萬",
|
|
181
186
|
"pisell-number-format-billion": "十億",
|
|
187
|
+
//walletCard 组件
|
|
188
|
+
"walletCard-done": "完成",
|
|
189
|
+
"walletCard-qrcode": "二維碼",
|
|
190
|
+
"walletCard-barcode": "條形碼",
|
|
182
191
|
// 上传组件
|
|
183
192
|
"pisell-upload-button": "上傳",
|
|
184
193
|
"pisell-upload-setting-size-error": (maxSize) => `每個文件的大小不超過${maxSize}MB`,
|
|
@@ -196,6 +205,13 @@ var zh_TW_default = {
|
|
|
196
205
|
"pisell-action-get-data": "請先獲取數據",
|
|
197
206
|
"pisell-action-delete-success": "刪除成功",
|
|
198
207
|
"pisell-action-delete-failed": "刪除失敗,請重試",
|
|
208
|
+
"walletCard-piont": "積分",
|
|
209
|
+
"walletCard-rechargeable": "餘額",
|
|
210
|
+
"walletCard-voucher": "代金券",
|
|
211
|
+
"walletCard-discount": "折扣卡",
|
|
212
|
+
//PisellQrcode组件
|
|
213
|
+
"pisellQrcode-done": "完成",
|
|
214
|
+
"pisellQrcode-qrcode": "二維碼",
|
|
199
215
|
"pisell-delete-confirm-title": "確認刪除",
|
|
200
216
|
"pisell-delete-confirm-content": "確定要刪除該條記錄嗎? 此操作無法撤銷。",
|
|
201
217
|
"pisell-delete-confirm-ok": "刪除",
|
|
@@ -249,6 +265,8 @@ var zh_TW_default = {
|
|
|
249
265
|
"pisell-lowcode-navigation-menu-add-sub-menu": "添加子菜單",
|
|
250
266
|
"pisell-lowcode-navigation-menu-add-page": "添加頁面",
|
|
251
267
|
"pisell-lowcode-navigation-menu-add-page-tip": "沒有找到導航, 請添加子菜單或頁面。",
|
|
268
|
+
"pisell-lowcode-navigation-menu-tag-base": "基础",
|
|
269
|
+
"pisell-lowcode-navigation-menu-tag-pisell1": "Pisell 1.0",
|
|
252
270
|
// 应用标识符
|
|
253
271
|
"pisell-data-source-form-app-identifier-pattern": "只能包含小寫字母、數字、連字符、點和下劃線",
|
|
254
272
|
"pisell-data-source-form-app-identifier-start-with-letter": "必須以字母開頭",
|
|
@@ -263,5 +281,27 @@ var zh_TW_default = {
|
|
|
263
281
|
"qrscanner-error-load-failed": "讀取文件失敗",
|
|
264
282
|
"qrscanner-error-no-code": "未檢測到二維碼或條形碼",
|
|
265
283
|
"qrscanner-error-camera-init": "無法啟動攝像頭,請確保已授權",
|
|
266
|
-
"qrscanner-error-process-image": "處理圖像時出錯"
|
|
284
|
+
"qrscanner-error-process-image": "處理圖像時出錯",
|
|
285
|
+
// 登录注册组件
|
|
286
|
+
"pisell-login-and-register-title": "登入到您的帳戶",
|
|
287
|
+
"pisell-login-and-register-subtitle": "歡迎回來!請輸入您的詳細信息。",
|
|
288
|
+
"pisell-login-and-register-email-label": "電子郵件",
|
|
289
|
+
"pisell-login-and-register-email-placeholder": "輸入您的電子郵件",
|
|
290
|
+
"pisell-login-and-register-password-label": "密碼",
|
|
291
|
+
"pisell-login-and-register-password-placeholder": "輸入您的密碼",
|
|
292
|
+
"pisell-login-and-register-email-error": "請輸入您的電子郵件!",
|
|
293
|
+
"pisell-login-and-register-email-error-valid": "請輸入有效的電子郵件!",
|
|
294
|
+
"pisell-login-and-register-password-error": "請輸入正確的密碼",
|
|
295
|
+
"pisell-login-and-register-login": "登入",
|
|
296
|
+
"pisell-login-and-register-google": "繼續使用Google",
|
|
297
|
+
"pisell-login-and-register-facebook": "繼續使用Facebook",
|
|
298
|
+
"pisell-login-and-register-apple": "繼續使用Apple",
|
|
299
|
+
"pisell-login-and-register-sign-up": "沒有帳戶?註冊",
|
|
300
|
+
"pisell-login-and-register-login-tab": "登入",
|
|
301
|
+
"pisell-login-and-register-register-tab": "註冊",
|
|
302
|
+
"pisell-login-and-register-register-email-placeholder": "輸入您的電子郵件",
|
|
303
|
+
"pisell-login-and-register-register-password-placeholder": "創建密碼",
|
|
304
|
+
"pisell-login-and-register-register-button-text": "創建帳戶",
|
|
305
|
+
"pisell-login-and-register-remember-me": "記住我",
|
|
306
|
+
"pisell-login-and-register-forgot-password": "忘記密碼?"
|
|
267
307
|
};
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/index.js
CHANGED
|
@@ -21,7 +21,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var utils_exports = {};
|
|
22
22
|
__export(utils_exports, {
|
|
23
23
|
getCssNumber: () => getCssNumber,
|
|
24
|
-
isBrowser: () => isBrowser
|
|
24
|
+
isBrowser: () => isBrowser,
|
|
25
|
+
uuid: () => uuid
|
|
25
26
|
});
|
|
26
27
|
module.exports = __toCommonJS(utils_exports);
|
|
27
28
|
var import_utils = require("@pisell/utils");
|
|
@@ -40,9 +41,13 @@ var getCssNumber = (val) => {
|
|
|
40
41
|
return val;
|
|
41
42
|
}
|
|
42
43
|
};
|
|
44
|
+
function uuid() {
|
|
45
|
+
return (Math.random() * 1e6 >> 0).toString(36);
|
|
46
|
+
}
|
|
43
47
|
// Annotate the CommonJS export names for ESM import in node:
|
|
44
48
|
0 && (module.exports = {
|
|
45
49
|
getCssNumber,
|
|
46
50
|
isBrowser,
|
|
51
|
+
uuid,
|
|
47
52
|
...require("./mergeWith")
|
|
48
53
|
});
|
package/lib/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => boolean;
|
package/lowcode/badge/meta.ts
CHANGED
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
snippets,
|
|
5
5
|
componentName: 'Badge',
|
|
6
6
|
title: '徽标数',
|
|
7
|
-
category: '
|
|
7
|
+
category: '通用',
|
|
8
8
|
docUrl: "",
|
|
9
9
|
screenshot: "",
|
|
10
10
|
devMode: "proCode",
|
|
@@ -17,19 +17,27 @@ export default {
|
|
|
17
17
|
subName: "",
|
|
18
18
|
},
|
|
19
19
|
props: [
|
|
20
|
+
{
|
|
21
|
+
name: 'styleType',
|
|
22
|
+
title: { label: '样式选择', tip: '选择自定义的样式' },
|
|
23
|
+
propType: {
|
|
24
|
+
type: 'oneOf',
|
|
25
|
+
value: ['default', 'warning'],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
20
28
|
{
|
|
21
29
|
name: 'color',
|
|
22
30
|
title: { label: '圆点颜色', tip: '自定义小圆点的颜色' },
|
|
23
31
|
propType: 'string',
|
|
24
32
|
},
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
+
// {
|
|
34
|
+
// name: 'count',
|
|
35
|
+
// title: {
|
|
36
|
+
// label: '展示数字',
|
|
37
|
+
// tip: '展示的数字,大于 overflowCount 时显示为 `${overflowCount}+`,为 0 时隐藏',
|
|
38
|
+
// },
|
|
39
|
+
// propType: 'node',
|
|
40
|
+
// },
|
|
33
41
|
{
|
|
34
42
|
name: 'dot',
|
|
35
43
|
title: {
|
|
@@ -87,9 +95,10 @@ export default {
|
|
|
87
95
|
tip: '设置鼠标放在状态点上时显示的文字',
|
|
88
96
|
},
|
|
89
97
|
propType: 'string',
|
|
90
|
-
setter: '
|
|
98
|
+
setter: 'StringSetter',
|
|
91
99
|
},
|
|
92
100
|
],
|
|
93
101
|
configure: {
|
|
94
|
-
supports: { style: true }
|
|
102
|
+
supports: { style: true }
|
|
103
|
+
},
|
|
95
104
|
};
|
package/lowcode/button/meta.ts
CHANGED
|
@@ -39,11 +39,8 @@ const ButtonMeta = {
|
|
|
39
39
|
},
|
|
40
40
|
tip: "children",
|
|
41
41
|
},
|
|
42
|
-
propType:
|
|
43
|
-
|
|
44
|
-
value: ["node", "string"],
|
|
45
|
-
},
|
|
46
|
-
setter: ["SlotSetter", "PisellI18nSetter", "VariableSetter"],
|
|
42
|
+
propType: 'string',
|
|
43
|
+
setter: 'PisellI18nSetter',
|
|
47
44
|
},
|
|
48
45
|
{
|
|
49
46
|
name: "htmlType",
|
|
@@ -400,7 +397,6 @@ const ButtonMeta = {
|
|
|
400
397
|
},
|
|
401
398
|
],
|
|
402
399
|
},
|
|
403
|
-
|
|
404
400
|
{
|
|
405
401
|
title: {
|
|
406
402
|
type: "i18n",
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
|
|
2
|
+
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
3
|
+
import snippets from './snippets';
|
|
4
|
+
import { uuid } from '../_utils/utils';
|
|
5
|
+
|
|
6
|
+
const ButtonGroupMeta: IPublicTypeComponentMetadata = {
|
|
7
|
+
"componentName": "ButtonGroup",
|
|
8
|
+
"title": "ButtonGroup",
|
|
9
|
+
category: "通用",
|
|
10
|
+
"docUrl": "",
|
|
11
|
+
"screenshot": "",
|
|
12
|
+
"devMode": "proCode",
|
|
13
|
+
"npm": {
|
|
14
|
+
package: "@pisell/materials",
|
|
15
|
+
"version": "0.1.0",
|
|
16
|
+
"exportName": "ButtonGroup",
|
|
17
|
+
"main": "src/index.tsx",
|
|
18
|
+
"destructuring": true,
|
|
19
|
+
"subName": ""
|
|
20
|
+
},
|
|
21
|
+
"configure": {
|
|
22
|
+
"props": [
|
|
23
|
+
{
|
|
24
|
+
name: "options",
|
|
25
|
+
title: { label: "按钮列表", tip: "按钮列表" },
|
|
26
|
+
setter: {
|
|
27
|
+
componentName: "ArraySetter",
|
|
28
|
+
props: {
|
|
29
|
+
itemSetter: {
|
|
30
|
+
componentName: "ObjectSetter",
|
|
31
|
+
props: {
|
|
32
|
+
config: {
|
|
33
|
+
items: [
|
|
34
|
+
{
|
|
35
|
+
name: "buttonText",
|
|
36
|
+
title: "按钮名称",
|
|
37
|
+
isRequired:true,
|
|
38
|
+
setter: "StringSetter",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "buttonType",
|
|
42
|
+
title: "按钮类型",
|
|
43
|
+
isRequired:true,
|
|
44
|
+
propType: {
|
|
45
|
+
type: "oneOf",
|
|
46
|
+
value: ["primary", "default", "ghost", "dashed", "danger", "link", "text"],
|
|
47
|
+
},
|
|
48
|
+
setter: [
|
|
49
|
+
{
|
|
50
|
+
componentName: "SelectSetter",
|
|
51
|
+
props: {
|
|
52
|
+
options: [
|
|
53
|
+
{
|
|
54
|
+
title: "primary",
|
|
55
|
+
value: "primary",
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
title: "default",
|
|
59
|
+
value: "default",
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: "dashed",
|
|
63
|
+
value: "dashed",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: "danger",
|
|
67
|
+
value: "danger",
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
title: "link",
|
|
71
|
+
value: "link",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
title: "text",
|
|
75
|
+
value: "text",
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
"VariableSetter",
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "onClick",
|
|
85
|
+
title: { label: "点击事件", tip: "点击事件" },
|
|
86
|
+
propType: "func",
|
|
87
|
+
isRequired:true,
|
|
88
|
+
setter: "FunctionSetter",
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
initialValue: () => {
|
|
94
|
+
return {
|
|
95
|
+
buttonText: "按钮名称",
|
|
96
|
+
buttonType: "default",
|
|
97
|
+
onClick: () => {},
|
|
98
|
+
};
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: 'isShowMore',
|
|
106
|
+
title: {
|
|
107
|
+
label: {
|
|
108
|
+
type: "i18n",
|
|
109
|
+
"en-US": "Right icon",
|
|
110
|
+
"zh-CN": "菜单按钮",
|
|
111
|
+
},
|
|
112
|
+
tip: "icon | Set the icon component of the button",
|
|
113
|
+
},
|
|
114
|
+
propType: { type: "oneOfType", value: ["node"] },
|
|
115
|
+
setter: [{
|
|
116
|
+
componentName: "SlotSetter",
|
|
117
|
+
initialValue: {
|
|
118
|
+
type: "JSSlot",
|
|
119
|
+
value: [
|
|
120
|
+
{
|
|
121
|
+
componentName: "Dropdown",
|
|
122
|
+
props: {
|
|
123
|
+
items: [{
|
|
124
|
+
label: '菜单名称',
|
|
125
|
+
key: uuid(),
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
defaultValue: null
|
|
133
|
+
}],
|
|
134
|
+
|
|
135
|
+
// defaultValue: false,
|
|
136
|
+
// supportVariable: true,
|
|
137
|
+
}, {
|
|
138
|
+
name: 'moreMenus',
|
|
139
|
+
"title": { label: '下拉按钮', tip: '下拉按钮配置项' },
|
|
140
|
+
"setter": {
|
|
141
|
+
"componentName": "ArraySetter",
|
|
142
|
+
"props": {
|
|
143
|
+
"itemSetter": {
|
|
144
|
+
"componentName": "ObjectSetter",
|
|
145
|
+
"props": {
|
|
146
|
+
"config": {
|
|
147
|
+
"items": [{
|
|
148
|
+
"name": "key",
|
|
149
|
+
title: { label: '菜单ID', tip: '菜单唯一标识' },
|
|
150
|
+
isRequired: true,
|
|
151
|
+
"setter": "StringSetter"
|
|
152
|
+
}, {
|
|
153
|
+
"name": "label",
|
|
154
|
+
title: { label: '菜单名称', tip: '菜单名称' },
|
|
155
|
+
isRequired: true,
|
|
156
|
+
"setter": "StringSetter"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"name": "callback",
|
|
160
|
+
title: { label: '回调函数', tip: '点击按钮绑定回调函数' },
|
|
161
|
+
isRequired: true,
|
|
162
|
+
"description": "callback",
|
|
163
|
+
"setter": {
|
|
164
|
+
"componentName": "FunctionSetter"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"initialValue": {
|
|
171
|
+
"label": "按钮名称",
|
|
172
|
+
"key": uuid(),
|
|
173
|
+
"callback": null
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
},],
|
|
180
|
+
"supports": {
|
|
181
|
+
"style": true
|
|
182
|
+
},
|
|
183
|
+
"component": {}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
export default {
|
|
196
|
+
...ButtonGroupMeta,
|
|
197
|
+
snippets
|
|
198
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
{
|
|
5
|
+
"title": "按钮组合",
|
|
6
|
+
"screenshot": "",
|
|
7
|
+
"schema": {
|
|
8
|
+
"componentName": "ButtonGroup",
|
|
9
|
+
"props": {
|
|
10
|
+
options: [{
|
|
11
|
+
buttonText: '保存',
|
|
12
|
+
buttonType: 'primary',
|
|
13
|
+
}, {
|
|
14
|
+
buttonText: '删除',
|
|
15
|
+
buttonType: 'danger',
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
rows: [
|
|
19
|
+
{
|
|
20
|
+
rowIndex: 0,
|
|
21
|
+
buttonArray: [{
|
|
22
|
+
buttonType: 'primary',
|
|
23
|
+
buttonText: '主要按钮',
|
|
24
|
+
}, {
|
|
25
|
+
buttonType: 'default',
|
|
26
|
+
buttonText: '次要按钮',
|
|
27
|
+
}]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
|
|
31
|
+
items: {
|
|
32
|
+
type: "JSSlot",
|
|
33
|
+
values: [{
|
|
34
|
+
componentName: "Button",
|
|
35
|
+
props: {
|
|
36
|
+
type: "primary",
|
|
37
|
+
children: "1111111"
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
componentName: "Button",
|
|
41
|
+
props: {
|
|
42
|
+
type: "default",
|
|
43
|
+
children: "222222222"
|
|
44
|
+
}
|
|
45
|
+
}]
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
isShowMore: true, // 是否显示更多按钮
|
|
50
|
+
moreMenus: [{
|
|
51
|
+
key: '1',
|
|
52
|
+
label: '保存'
|
|
53
|
+
}, {
|
|
54
|
+
key: '2',
|
|
55
|
+
label: '删除'
|
|
56
|
+
}]
|
|
57
|
+
},
|
|
58
|
+
children: [
|
|
59
|
+
{
|
|
60
|
+
componentName: 'Button',
|
|
61
|
+
props: {
|
|
62
|
+
children: 'Affix Top',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
+
import snippets from './snippets';
|
|
3
|
+
|
|
4
|
+
const ButtonGroupPreviewMeta: IPublicTypeComponentMetadata = {
|
|
5
|
+
"componentName": "ButtonGroupEdit",
|
|
6
|
+
"title": "ButtonGroupEdit",
|
|
7
|
+
category: "通用",
|
|
8
|
+
"docUrl": "",
|
|
9
|
+
"screenshot": "",
|
|
10
|
+
"devMode": "proCode",
|
|
11
|
+
"npm": {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
"version": "0.1.0",
|
|
14
|
+
"exportName": "ButtonGroupEdit",
|
|
15
|
+
"main": "src/index.tsx",
|
|
16
|
+
"destructuring": true,
|
|
17
|
+
"subName": ""
|
|
18
|
+
},
|
|
19
|
+
"configure": {
|
|
20
|
+
props: []
|
|
21
|
+
},
|
|
22
|
+
"supports": {
|
|
23
|
+
"style": true,
|
|
24
|
+
"events": [{
|
|
25
|
+
"name": "onChange"
|
|
26
|
+
}]
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
export default {
|
|
30
|
+
...ButtonGroupPreviewMeta,
|
|
31
|
+
snippets
|
|
32
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { uuid } from '../_utils/utils';
|
|
2
|
+
|
|
3
|
+
export default [
|
|
4
|
+
{
|
|
5
|
+
"title": "按钮组-编辑",
|
|
6
|
+
"screenshot": "",
|
|
7
|
+
"schema": {
|
|
8
|
+
"componentName": "ButtonGroupEdit",
|
|
9
|
+
"props": {
|
|
10
|
+
buttonList: [{
|
|
11
|
+
children: `按钮${uuid()}`,
|
|
12
|
+
id: uuid(),
|
|
13
|
+
buttonProps:{
|
|
14
|
+
type:'default'
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
children: `按钮${uuid()}`,
|
|
18
|
+
id: uuid(),
|
|
19
|
+
buttonProps:{
|
|
20
|
+
type:'default'
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
children: `按钮${uuid()}`,
|
|
24
|
+
id: uuid(),
|
|
25
|
+
buttonProps:{
|
|
26
|
+
type:'default'
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
children: `按钮${uuid()}`,
|
|
30
|
+
id: uuid(),
|
|
31
|
+
buttonProps:{
|
|
32
|
+
type:'default'
|
|
33
|
+
}
|
|
34
|
+
}, {
|
|
35
|
+
children: `按钮${uuid()}`,
|
|
36
|
+
id: uuid(),
|
|
37
|
+
buttonProps:{
|
|
38
|
+
type:'default'
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
children: `按钮${uuid()}`,
|
|
42
|
+
id: uuid(),
|
|
43
|
+
buttonProps:{
|
|
44
|
+
type:'default'
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
children: `按钮${uuid()}`,
|
|
48
|
+
id: uuid(),
|
|
49
|
+
buttonProps:{
|
|
50
|
+
type:'default'
|
|
51
|
+
}
|
|
52
|
+
},],
|
|
53
|
+
buttonGroupList: [
|
|
54
|
+
[{
|
|
55
|
+
id: uuid(),
|
|
56
|
+
children: `测试按钮${uuid()}`,
|
|
57
|
+
buttonProps:{
|
|
58
|
+
type:'default'
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
id: uuid(),
|
|
62
|
+
children: `测试按钮${uuid()}`,
|
|
63
|
+
buttonProps:{
|
|
64
|
+
type:'default'
|
|
65
|
+
}
|
|
66
|
+
}, {
|
|
67
|
+
id: uuid(),
|
|
68
|
+
children: `测试按钮${uuid()}`,
|
|
69
|
+
buttonProps:{
|
|
70
|
+
type:'default'
|
|
71
|
+
}
|
|
72
|
+
}], [
|
|
73
|
+
{
|
|
74
|
+
id: uuid(),
|
|
75
|
+
children: `测试按钮${uuid()}`,
|
|
76
|
+
buttonProps:{
|
|
77
|
+
type:'default'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
], [
|
|
81
|
+
{
|
|
82
|
+
id: uuid(),
|
|
83
|
+
children: `测试按钮${uuid()}`,
|
|
84
|
+
buttonProps:{
|
|
85
|
+
type:'default'
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
id: uuid(),
|
|
89
|
+
children: `测试按钮${uuid()}`,
|
|
90
|
+
buttonProps:{
|
|
91
|
+
type:'default'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';
|
|
2
|
+
import snippets from './snippets';
|
|
3
|
+
|
|
4
|
+
const ButtonGroupPreviewMeta: IPublicTypeComponentMetadata = {
|
|
5
|
+
"componentName": "ButtonGroupPreview",
|
|
6
|
+
"title": "ButtonGroupPreview",
|
|
7
|
+
category: "通用",
|
|
8
|
+
"docUrl": "",
|
|
9
|
+
"screenshot": "",
|
|
10
|
+
"devMode": "proCode",
|
|
11
|
+
"npm": {
|
|
12
|
+
package: "@pisell/materials",
|
|
13
|
+
"version": "0.1.0",
|
|
14
|
+
"exportName": "ButtonGroupPreview",
|
|
15
|
+
"main": "src/index.tsx",
|
|
16
|
+
"destructuring": true,
|
|
17
|
+
"subName": ""
|
|
18
|
+
},
|
|
19
|
+
"configure": {
|
|
20
|
+
props: [
|
|
21
|
+
{
|
|
22
|
+
"title": {
|
|
23
|
+
"label": {
|
|
24
|
+
"type": "i18n",
|
|
25
|
+
"en-US": "buttonGroupList",
|
|
26
|
+
"zh-CN": "按钮数据"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"name": "buttonGroupList",
|
|
30
|
+
"setter": ["JsonSetter", "VariableSetter"],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": {
|
|
34
|
+
"label": {
|
|
35
|
+
"type": "i18n",
|
|
36
|
+
"en-US": "buttonConfig",
|
|
37
|
+
"zh-CN": "修改按钮数据"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"name": "buttonConfig",
|
|
41
|
+
"setter": ["JsonSetter", "VariableSetter"],
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"supports": {
|
|
46
|
+
"style": true,
|
|
47
|
+
"events": [{
|
|
48
|
+
"name": "onChange"
|
|
49
|
+
}]
|
|
50
|
+
},
|
|
51
|
+
}
|
|
52
|
+
export default {
|
|
53
|
+
...ButtonGroupPreviewMeta,
|
|
54
|
+
snippets
|
|
55
|
+
}
|