@pisell/materials 6.5.5 → 6.5.7
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 +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +41 -26
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +45 -30
- package/es/components/batch-editor/index.d.ts +0 -1
- package/es/components/cardPro/index.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +22 -11
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +199 -19
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
- package/es/components/dataSourceComponents/fields/Upload/CameraPopover.js +66 -0
- package/es/components/dataSourceComponents/fields/Upload/index.less +35 -3
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -12
- package/es/components/filter/index.d.ts +0 -1
- package/es/components/iconfont/index.js +1 -1
- package/es/components/list/index.d.ts +0 -1
- package/es/components/pisellCamera/index.d.ts +4 -0
- package/es/components/pisellCamera/index.js +228 -0
- package/es/components/pisellCamera/index.less +131 -0
- package/es/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/es/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/es/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/es/components/pisellInput/index.d.ts +1 -0
- package/es/components/pisellTooltip/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/es/components/table/Actions/component/Group/index.d.ts +0 -1
- package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/es/components/table/Actions/index.d.ts +0 -1
- package/es/components/table/BasicTable/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/es/components/table/Table/SelectField/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -3
- package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +0 -1
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +0 -1
- package/es/components/walletCard/index.d.ts +4 -0
- package/es/components/walletCard/index.js +29 -3
- package/es/components/walletCard/index.less +27 -0
- package/es/locales/en-US.js +94 -66
- package/es/locales/zh-CN.js +95 -67
- package/es/locales/zh-TW.js +95 -67
- package/lib/components/batch-editor/index.d.ts +0 -1
- package/lib/components/cardPro/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/filter/utils.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +9 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +168 -5
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +6 -0
- package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.js +95 -0
- package/lib/components/dataSourceComponents/fields/Upload/index.less +35 -3
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -12
- package/lib/components/filter/index.d.ts +0 -1
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/list/index.d.ts +0 -1
- package/lib/components/pisellCamera/index.d.ts +4 -0
- package/lib/components/pisellCamera/index.js +222 -0
- package/lib/components/pisellCamera/index.less +131 -0
- package/lib/components/pisellDatePicker/datePickerCpt.d.ts +1 -0
- package/lib/components/pisellInput/components/BankCard/index.d.ts +1 -0
- package/lib/components/pisellInput/components/Copy/index.d.ts +1 -0
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +1 -0
- package/lib/components/pisellInput/index.d.ts +1 -0
- package/lib/components/pisellTooltip/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +0 -1
- package/lib/components/table/Actions/component/Group/index.d.ts +0 -1
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
- package/lib/components/table/Actions/index.d.ts +0 -1
- package/lib/components/table/BasicTable/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
- package/lib/components/table/Table/SelectField/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -3
- package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +0 -1
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +0 -1
- package/lib/components/walletCard/index.d.ts +4 -0
- package/lib/components/walletCard/index.js +27 -3
- package/lib/components/walletCard/index.less +27 -0
- package/lib/locales/en-US.js +25 -1
- package/lib/locales/zh-CN.js +25 -1
- package/lib/locales/zh-TW.js +25 -1
- package/lowcode/auto-resize-text/meta.ts +35 -9419
- package/lowcode/data-source-table/meta.ts +119 -66
- package/lowcode/form-item-upload/meta.ts +20 -5
- package/lowcode/pisell-upload/meta.ts +8 -0
- package/lowcode/wallet-card/meta.ts +81 -63
- package/package.json +3 -2
- package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/es/components/auto-resize-text/index.d.ts +0 -6
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/keyboard/index.d.ts +0 -22
- package/es/components/pisell-config-provider/context.d.ts +0 -22
- package/es/components/pisell-config-provider/index.d.ts +0 -13
- package/es/components/pisellAdjustPrice/index.d.ts +0 -4
- package/es/components/pisellAdjustPrice/status.d.ts +0 -32
- package/es/components/pisellAdjustPrice/type.d.ts +0 -22
- package/es/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/es/components/pisellQRScanner/index.d.ts +0 -24
- package/es/components/pisellText/components/Amount/index.d.ts +0 -20
- package/es/components/pisellToast/index.d.ts +0 -17
- package/es/components/pisellToast/squareToast/index.d.ts +0 -15
- package/es/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/es/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/es/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/es/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/es/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/es/components/productCard/components/Action/index.d.ts +0 -3
- package/es/components/productCard/components/Header/index.d.ts +0 -3
- package/es/components/productCard/components/Sales/index.d.ts +0 -3
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/es/components/productCard/locales.d.ts +0 -84
- package/es/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/es/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/es/components/virtual-keyboard/index.d.ts +0 -25
- package/es/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/es/components/virtualInput/index.d.ts +0 -24
- package/es/locales/en-US.d.ts +0 -286
- package/es/locales/zh-CN.d.ts +0 -281
- package/es/locales/zh-TW.d.ts +0 -281
- package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +0 -20
- package/lib/components/auto-resize-text/index.d.ts +0 -6
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/keyboard/index.d.ts +0 -22
- package/lib/components/pisell-config-provider/context.d.ts +0 -22
- package/lib/components/pisell-config-provider/index.d.ts +0 -13
- package/lib/components/pisellAdjustPrice/index.d.ts +0 -4
- package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
- package/lib/components/pisellAdjustPrice/type.d.ts +0 -22
- package/lib/components/pisellCheckboxGroup/index.d.ts +0 -40
- package/lib/components/pisellQRScanner/index.d.ts +0 -24
- package/lib/components/pisellText/components/Amount/index.d.ts +0 -20
- package/lib/components/pisellToast/index.d.ts +0 -17
- package/lib/components/pisellToast/squareToast/index.d.ts +0 -15
- package/lib/components/pisellToast/squareToast/methods.d.ts +0 -13
- package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +0 -29
- package/lib/components/pisellToast/squareToast/toast.d.ts +0 -25
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +0 -27
- package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +0 -2
- package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +0 -20
- package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -12
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -3
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +0 -46
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
- package/lib/components/productCard/cartSkuCard/index.d.ts +0 -10
- package/lib/components/productCard/cartSkuCard/locales.d.ts +0 -96
- package/lib/components/productCard/components/Action/index.d.ts +0 -3
- package/lib/components/productCard/components/Header/index.d.ts +0 -3
- package/lib/components/productCard/components/Sales/index.d.ts +0 -3
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -13
- package/lib/components/productCard/locales.d.ts +0 -84
- package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -15
- package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +0 -25
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -5
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
- package/lib/components/virtual-keyboard/Number/types.d.ts +0 -26
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
- package/lib/components/virtual-keyboard/index.d.ts +0 -25
- package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +0 -40
- package/lib/components/virtualInput/index.d.ts +0 -24
- package/lib/locales/en-US.d.ts +0 -286
- package/lib/locales/zh-CN.d.ts +0 -281
- package/lib/locales/zh-TW.d.ts +0 -281
package/es/locales/zh-TW.js
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
'table-filter-search': '搜索',
|
|
3
|
+
'table-filter-clear': '清除',
|
|
4
|
+
'table-filter-filter': '篩選',
|
|
5
|
+
'table-filter-min': '最小',
|
|
6
|
+
'table-filter-max': '最大',
|
|
7
|
+
'table-pagination-previous': '上一頁',
|
|
8
|
+
'table-pagination-next': '下一頁',
|
|
9
|
+
'table-pagination-total': function tablePaginationTotal(current, total) {
|
|
10
10
|
return "\u7B2C".concat(current, "\u9801 \u5171").concat(total, "\u9801");
|
|
11
11
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
'select-dropdown-render-select-all': '全選',
|
|
13
|
+
'select-dropdown-render-search': '搜索',
|
|
14
|
+
'sort-button-text': '排序',
|
|
15
|
+
'sort-oldest-to-newest': '從舊到新',
|
|
16
|
+
'sort-newest-to-oldest': '從新到舊',
|
|
17
|
+
'sort-a-z': 'A 到 Z',
|
|
18
|
+
'sort-z-a': 'Z 到 A',
|
|
19
|
+
'sort-from-morning-to-night': '從早到晚',
|
|
20
|
+
'sort-from-evening-to-morning': '從晚到早',
|
|
21
|
+
'sort-0-9': '0 ~ 9',
|
|
22
|
+
'sort-9-0': '9 ~ 0',
|
|
23
|
+
'table-action-filter-button': '篩選',
|
|
24
|
+
'table-action-filter-quick-filter': '快速篩選',
|
|
25
|
+
'table-action-filter-quick-filter-tip': function tableActionFilterQuickFilterTip(count) {
|
|
26
26
|
return "\u5728\u9801\u9762\u4E0A\u76F4\u63A5\u555F\u7528\u5FEB\u901F\u7BE9\u9078\uFF0C\u4EE5\u4FBF\u9032\u884C\u65B9\u4FBF\u7684\u7BE9\u9078\u64CD\u4F5C\uFF0C\u6700\u591A\u5141\u8A31\u4F7F\u7528".concat(count, "\u500B\u7BE9\u9078\u5668\u3002");
|
|
27
27
|
},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return
|
|
28
|
+
'table-action-filter-other-filter': '篩選',
|
|
29
|
+
'table-action-filter-other-filter-tip': function tableActionFilterOtherFilterTip() {
|
|
30
|
+
return '在清單中選擇篩選條件進行篩選操作,並顯示對應的結果。';
|
|
31
31
|
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
'table-action-group-by-title': '分組條件',
|
|
33
|
+
'table-action-group-by-title-tip': '請從下拉式選單中選擇要分組的字段,以便更好地組織和瀏覽數據。',
|
|
34
|
+
'table-action-column-title': '表頭設置',
|
|
35
|
+
'table-column-group-records': '條記錄',
|
|
36
|
+
'table-column-group-lock-tip': '固定列不可移動順序',
|
|
37
|
+
'table-column-drag-sort-disabled-tip': '已開啟自動排序,無法手動拖曳',
|
|
38
|
+
'table-action-filter-no-filter': '沒有可用的篩選器。',
|
|
39
|
+
'table-action-range-picker-presets-today': '今天',
|
|
40
|
+
'table-action-range-picker-presets-yesterday': '昨天',
|
|
41
|
+
'table-action-range-picker-presets-last-3-day': '過去3天',
|
|
42
|
+
'table-action-range-picker-presets-last-7-day': '過去7天',
|
|
43
|
+
'table-action-range-picker-presets-last-14-day': '過去14天',
|
|
44
|
+
'table-action-range-picker-presets-last-30-day': '過去30天',
|
|
45
|
+
'table-action-range-picker-presets-last-90-day': '過去90天',
|
|
46
|
+
'virtual-keyboard-time-now': '此刻',
|
|
47
|
+
'virtual-keyboard-time-ok': '確定',
|
|
48
48
|
'batch-editor-batch-edit': '批量編輯',
|
|
49
49
|
'batch-editor-actions': '操作',
|
|
50
50
|
'batch-editor-remove': '移除',
|
|
@@ -53,7 +53,7 @@ export default {
|
|
|
53
53
|
'batch-editor-search': '搜索',
|
|
54
54
|
'batch-editor-confirm': '確認',
|
|
55
55
|
'batch-editor-batch-remove': '批量移除',
|
|
56
|
-
'batch-editor-what-price':
|
|
56
|
+
'batch-editor-what-price': '什麼價格',
|
|
57
57
|
'batch-editor-quick-edit': '快速編輯',
|
|
58
58
|
'batch-editor-quick-edit-title': function batchEditorQuickEditTitle(product, num) {
|
|
59
59
|
return "\u60A8\u5DF2\u9078\u64C7 ".concat(product, " \u7B49").concat(num, "\u4EF6\u7522\u54C1");
|
|
@@ -131,7 +131,7 @@ export default {
|
|
|
131
131
|
'date-picker-first_day_of_next_month': '下個月的第一天',
|
|
132
132
|
'date-picker-last_day_of_last_month': '上個月的最後一天',
|
|
133
133
|
'date-picker-invalid-date': '無效日期',
|
|
134
|
-
|
|
134
|
+
'date-picker-apply': '确定',
|
|
135
135
|
'date-picker-shortcut-custom': '自定義',
|
|
136
136
|
'pisell-input-copy-success': '復製成功',
|
|
137
137
|
'pisell-input-copy': '復製',
|
|
@@ -155,12 +155,12 @@ export default {
|
|
|
155
155
|
'pisell-wallet-pass-card-required': '此欄位為必填',
|
|
156
156
|
'pisell-wallet-pass-card-expireDate': '長期',
|
|
157
157
|
// 金额修改组件
|
|
158
|
-
'pisell-adjust-price-price-override':
|
|
159
|
-
'pisell-adjust-price-discount':
|
|
160
|
-
'pisell-adjust-price-discount-amount':
|
|
161
|
-
'pisell-adjust-price-discount-percentage':
|
|
162
|
-
'pisell-adjust-price-total-after-discount':
|
|
163
|
-
'pisell-adjust-price-discount-can-be-maximum':
|
|
158
|
+
'pisell-adjust-price-price-override': '一口價',
|
|
159
|
+
'pisell-adjust-price-discount': '折扣',
|
|
160
|
+
'pisell-adjust-price-discount-amount': '金額',
|
|
161
|
+
'pisell-adjust-price-discount-percentage': '百分比',
|
|
162
|
+
'pisell-adjust-price-total-after-discount': '打折后總價',
|
|
163
|
+
'pisell-adjust-price-discount-can-be-maximum': '折扣最高可達',
|
|
164
164
|
'pisell-discount-card-title': '折扣',
|
|
165
165
|
'pisell-discount-card-unit': '折扣',
|
|
166
166
|
'pisell-discount-card-fixed-amount-prefix': '立減',
|
|
@@ -198,6 +198,7 @@ export default {
|
|
|
198
198
|
'walletCard-done': '完成',
|
|
199
199
|
'walletCard-qrcode': '二維碼',
|
|
200
200
|
'walletCard-barcode': '條形碼',
|
|
201
|
+
'walletCard-viewPin': '查看PIN',
|
|
201
202
|
// 上传组件
|
|
202
203
|
'pisell-upload-button': '上傳',
|
|
203
204
|
'pisell-upload-setting-size-error': function pisellUploadSettingSizeError(maxSize) {
|
|
@@ -273,7 +274,7 @@ export default {
|
|
|
273
274
|
'pisell-lowcode-app-version-control-new-version': '新版本',
|
|
274
275
|
'pisell-lowcode-app-version-control-promote-to-live': '發布正式版',
|
|
275
276
|
'pisell-lowcode-app-version-control-promote-version': function pisellLowcodeAppVersionControlPromoteVersion(version) {
|
|
276
|
-
return "\u767C\u5E03\u7248\u672C ".concat(version ||
|
|
277
|
+
return "\u767C\u5E03\u7248\u672C ".concat(version || '', "?");
|
|
277
278
|
},
|
|
278
279
|
'pisell-lowcode-app-version-control-promote-version-describe': '您確定要發佈此版本嗎?',
|
|
279
280
|
'pisell-lowcode-app-version-control-promote-version-ok': '發布',
|
|
@@ -285,27 +286,27 @@ export default {
|
|
|
285
286
|
'pisell-lowcode-navigation-menu-add-sub-menu': '添加子菜單',
|
|
286
287
|
'pisell-lowcode-navigation-menu-add-page': '添加頁面',
|
|
287
288
|
'pisell-lowcode-navigation-menu-add-page-tip': '沒有找到導航, 請添加子菜單或頁面。',
|
|
288
|
-
'pisell-lowcode-navigation-menu-tag-base':
|
|
289
|
-
'pisell-lowcode-navigation-menu-tag-proCode':
|
|
290
|
-
'pisell-lowcode-navigation-menu-tag-pisell1':
|
|
291
|
-
'pisell-lowcode-navigation-menu-tag-group':
|
|
292
|
-
'pisell-lowcode-navigation-menu-tag-sub-menu':
|
|
293
|
-
'pisell-lowcode-navigation-menu-tag-custom':
|
|
289
|
+
'pisell-lowcode-navigation-menu-tag-base': '基础',
|
|
290
|
+
'pisell-lowcode-navigation-menu-tag-proCode': 'Pro code',
|
|
291
|
+
'pisell-lowcode-navigation-menu-tag-pisell1': 'Pisell 1.0',
|
|
292
|
+
'pisell-lowcode-navigation-menu-tag-group': '分組',
|
|
293
|
+
'pisell-lowcode-navigation-menu-tag-sub-menu': '子菜單',
|
|
294
|
+
'pisell-lowcode-navigation-menu-tag-custom': '自定義',
|
|
294
295
|
// 应用标识符
|
|
295
296
|
'pisell-data-source-form-app-identifier-pattern': '只能包含小寫字母、數字、連字符、點和下劃線',
|
|
296
297
|
'pisell-data-source-form-app-identifier-start-with-letter': '必須以字母開頭',
|
|
297
298
|
'pisell-data-source-form-app-identifier-special-ends': '不能以連字符、點或下劃線結尾',
|
|
298
299
|
'pisell-data-source-form-app-identifier-consecutive-special': '不能包含連續的連字符、點或下劃線',
|
|
299
300
|
// QR Scanner 相關文案
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
301
|
+
'qrscanner-loading': '正在識別二維碼...',
|
|
302
|
+
'qrscanner-success': '識別成功: ',
|
|
303
|
+
'qrscanner-success-qrcode': '二維碼識別成功: ',
|
|
304
|
+
'qrscanner-success-barcode': '條形碼識別成功: ',
|
|
305
|
+
'qrscanner-error-upload-image': '請上傳圖片文件',
|
|
306
|
+
'qrscanner-error-load-failed': '讀取文件失敗',
|
|
307
|
+
'qrscanner-error-no-code': '未檢測到二維碼或條形碼',
|
|
308
|
+
'qrscanner-error-camera-init': '無法啟動攝像頭,請確保已授權',
|
|
309
|
+
'qrscanner-error-process-image': '處理圖像時出錯',
|
|
309
310
|
// 登录注册组件
|
|
310
311
|
'pisell-login-and-register-title': '登入到您的帳戶',
|
|
311
312
|
'pisell-login-and-register-subtitle': '歡迎回來!請輸入您的詳細信息。',
|
|
@@ -320,7 +321,7 @@ export default {
|
|
|
320
321
|
'pisell-login-and-register-google': '繼續使用Google',
|
|
321
322
|
'pisell-login-and-register-facebook': '繼續使用Facebook',
|
|
322
323
|
'pisell-login-and-register-apple': '繼續使用Apple',
|
|
323
|
-
'pisell-login-and-register-sign-up':
|
|
324
|
+
'pisell-login-and-register-sign-up': '沒有帳戶?註冊',
|
|
324
325
|
'pisell-login-and-register-login-tab': '登入',
|
|
325
326
|
'pisell-login-and-register-register-tab': '註冊',
|
|
326
327
|
'pisell-login-and-register-register-email-placeholder': '輸入您的電子郵件',
|
|
@@ -339,5 +340,32 @@ export default {
|
|
|
339
340
|
'pisell-wallet-pass-card-status-conflict': '衝突',
|
|
340
341
|
'pisell-wallet-pass-card-status-lastPayment': '上次結算',
|
|
341
342
|
'pisell-wallet-pass-card-reset': '清空',
|
|
342
|
-
'pisell-wallet-pass-card-done': '保存'
|
|
343
|
+
'pisell-wallet-pass-card-done': '保存',
|
|
344
|
+
// 相机组件
|
|
345
|
+
'pisell-camera-no-camera-accessible': '沒有找到攝像頭',
|
|
346
|
+
'pisell-camera-permission-denied': '沒有權限使用攝像頭',
|
|
347
|
+
'pisell-camera-switch-camera': '切換攝像頭',
|
|
348
|
+
'pisell-camera-canvas': 'canvas不支持',
|
|
349
|
+
'pisell-camera-checking': '正在檢測攝像頭...',
|
|
350
|
+
'pisell-camera-no-camera-desc': '請檢查設備是否連接攝像頭或授權瀏覽器訪問攝像頭',
|
|
351
|
+
// 拍照组件
|
|
352
|
+
'pisell-upload-camera-local-files': '本地文件',
|
|
353
|
+
'pisell-upload-camera-capture': '拍攝/拍照',
|
|
354
|
+
'pisell-upload-camera-retake': '重拍',
|
|
355
|
+
'pisell-upload-camera-use': '使用照片',
|
|
356
|
+
// 列表組件
|
|
357
|
+
'pisell-list-tab-group-default': '字段',
|
|
358
|
+
'pisell-list-empty-text-default': '暫無數據',
|
|
359
|
+
'pisell-list-load-more': '查看更多',
|
|
360
|
+
'pisell-list-view-less': '查看更少',
|
|
361
|
+
'pisell-list-pagination-total': function pisellListPaginationTotal(start, end, total) {
|
|
362
|
+
return "\u986F\u793A\u7B2C ".concat(start, "-").concat(end, " \u689D\uFF0C\u5171 ").concat(total, " \u689D");
|
|
363
|
+
},
|
|
364
|
+
'pisell-list-scroll-down': '向下滾動',
|
|
365
|
+
'pisell-list-scroll-right': '向右滾動',
|
|
366
|
+
'pisell-list-pagination-page-of': function pisellListPaginationPageOf(current, total) {
|
|
367
|
+
return "\u7B2C ".concat(current, " \u9801 \u5171 ").concat(total, " \u9801");
|
|
368
|
+
},
|
|
369
|
+
'pisell-list-pagination-previous': '上一頁',
|
|
370
|
+
'pisell-list-pagination-next': '下一頁'
|
|
343
371
|
};
|
|
@@ -51,13 +51,14 @@ var CardPro = (props) => {
|
|
|
51
51
|
isShowHead,
|
|
52
52
|
className,
|
|
53
53
|
coverHeight,
|
|
54
|
-
badge
|
|
54
|
+
badge,
|
|
55
|
+
style
|
|
55
56
|
} = props;
|
|
56
57
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
57
58
|
import_antd.Card,
|
|
58
59
|
{
|
|
59
60
|
title: null,
|
|
60
|
-
style: { padding: 0 },
|
|
61
|
+
style: { padding: 0, ...style },
|
|
61
62
|
className: (0, import_classnames.default)(
|
|
62
63
|
"pisell-cardPro-wrap",
|
|
63
64
|
className,
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: any;
|
|
34
34
|
onRow: (record: any) => any;
|
|
@@ -51,7 +51,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
51
51
|
width: number;
|
|
52
52
|
align: "center" | "left" | "right";
|
|
53
53
|
fixed: false | "left" | "right";
|
|
54
|
-
type: "
|
|
54
|
+
type: "button" | "link";
|
|
55
55
|
items: OperationItem[];
|
|
56
56
|
} | undefined;
|
|
57
57
|
operationContent?: {
|
|
@@ -69,7 +69,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
69
69
|
useCustomAction: boolean;
|
|
70
70
|
actionType: string;
|
|
71
71
|
openMode: "modal" | "drawer";
|
|
72
|
-
openContentSize: "
|
|
72
|
+
openContentSize: "large" | "small" | "middle";
|
|
73
73
|
openTitle: string;
|
|
74
74
|
key: string;
|
|
75
75
|
} | undefined;
|
|
@@ -117,13 +117,15 @@ var useTableProps = (props) => {
|
|
|
117
117
|
openDrawer(item);
|
|
118
118
|
});
|
|
119
119
|
const handleDelete = (0, import_ahooks.useMemoizedFn)(
|
|
120
|
-
async (record, softDelete) => {
|
|
120
|
+
async (record, softDelete, customDeleteAction) => {
|
|
121
121
|
try {
|
|
122
122
|
registerValueVariable == null ? void 0 : registerValueVariable(componentId, {
|
|
123
123
|
currentRecord: { ...record }
|
|
124
124
|
});
|
|
125
125
|
setTimeout(async () => {
|
|
126
|
-
if (
|
|
126
|
+
if (customDeleteAction) {
|
|
127
|
+
await customDeleteAction(record);
|
|
128
|
+
} else if (softDelete) {
|
|
127
129
|
const deleteTime = (0, import_dayjs.default)().format("YYYY-MM-DD HH:mm:ss");
|
|
128
130
|
await (update == null ? void 0 : update.runAsync({
|
|
129
131
|
...record,
|
|
@@ -170,7 +172,11 @@ var useTableProps = (props) => {
|
|
|
170
172
|
okText: (0, import_locales.getText)("pisell-delete-confirm-ok"),
|
|
171
173
|
cancelText: (0, import_locales.getText)("pisell-delete-confirm-cancel"),
|
|
172
174
|
onOk: () => {
|
|
173
|
-
handleDelete(
|
|
175
|
+
handleDelete(
|
|
176
|
+
record,
|
|
177
|
+
item == null ? void 0 : item.softDelete,
|
|
178
|
+
item == null ? void 0 : item.customDeleteAction
|
|
179
|
+
);
|
|
174
180
|
}
|
|
175
181
|
});
|
|
176
182
|
return;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
declare const Subdomain: React.FC<import("antd").InputProps & {
|
|
3
3
|
onChange: (value: string) => void;
|
|
4
4
|
onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
|
|
5
|
-
rootDomain: "custom" | "
|
|
5
|
+
rootDomain: "custom" | "xzero" | "saas";
|
|
6
6
|
customDomain?: string | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
8
8
|
tenantId: string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
3
2
|
options?: any;
|
|
4
3
|
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
@@ -46,6 +46,7 @@ var import_locales = require("../../../../locales");
|
|
|
46
46
|
var import_constants = require("./constants");
|
|
47
47
|
var import_usePlatform = require("../../hooks/usePlatform");
|
|
48
48
|
var import_utils2 = require("./utils");
|
|
49
|
+
var import_CameraPopover = __toESM(require("./CameraPopover"));
|
|
49
50
|
var import_shopUploadServe = require("./shopUploadServe");
|
|
50
51
|
var import_fallback = __toESM(require("./fallback.png"));
|
|
51
52
|
var import_index = require("./index.less");
|
|
@@ -67,6 +68,7 @@ var BaseUpload = (props) => {
|
|
|
67
68
|
onChange,
|
|
68
69
|
mediaUploadUrl: propsMediaUploadUrl,
|
|
69
70
|
getHeaders: propsGetHeaders,
|
|
71
|
+
allowCamera,
|
|
70
72
|
...restProps
|
|
71
73
|
} = props;
|
|
72
74
|
const isShop = (0, import_usePlatform.useIsShop)();
|
|
@@ -76,6 +78,8 @@ var BaseUpload = (props) => {
|
|
|
76
78
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
77
79
|
const [editMultilingualFile, setEditMultilingualFile] = (0, import_react.useState)(null);
|
|
78
80
|
const fileListRef = (0, import_react.useRef)([]);
|
|
81
|
+
const uploadButtonRef = (0, import_react.useRef)(null);
|
|
82
|
+
const uploadRef = (0, import_react.useRef)(null);
|
|
79
83
|
(0, import_react.useEffect)(() => {
|
|
80
84
|
fileListRef.current = fileList;
|
|
81
85
|
}, [fileList]);
|
|
@@ -140,9 +144,7 @@ var BaseUpload = (props) => {
|
|
|
140
144
|
multilingualFileList: item.multilingualFileList || (0, import_utils2.createMultilingualFileList)(
|
|
141
145
|
((_b = (_a = item.response) == null ? void 0 : _a.data) == null ? void 0 : _b.url) || item.url || ""
|
|
142
146
|
),
|
|
143
|
-
multilingual: item.multilingual || (0, import_utils2.createMultilingualData)(
|
|
144
|
-
((_d = (_c = item.response) == null ? void 0 : _c.data) == null ? void 0 : _d.url) || item.url || ""
|
|
145
|
-
)
|
|
147
|
+
multilingual: item.multilingual || (0, import_utils2.createMultilingualData)(((_d = (_c = item.response) == null ? void 0 : _c.data) == null ? void 0 : _d.url) || item.url || "")
|
|
146
148
|
};
|
|
147
149
|
});
|
|
148
150
|
});
|
|
@@ -319,6 +321,7 @@ var BaseUpload = (props) => {
|
|
|
319
321
|
}, []);
|
|
320
322
|
const beforeUpload = (0, import_react.useCallback)(
|
|
321
323
|
async (file, newFileList) => {
|
|
324
|
+
console.log("beforeUpload000", file, newFileList);
|
|
322
325
|
let currentFileCount = 1;
|
|
323
326
|
newFileList.forEach((item, index) => {
|
|
324
327
|
if (item.uid === file.uid) {
|
|
@@ -365,7 +368,8 @@ var BaseUpload = (props) => {
|
|
|
365
368
|
{
|
|
366
369
|
className: "pisell-upload-button",
|
|
367
370
|
type: "button",
|
|
368
|
-
disabled: restProps.disabled
|
|
371
|
+
disabled: restProps.disabled,
|
|
372
|
+
ref: uploadButtonRef
|
|
369
373
|
},
|
|
370
374
|
/* @__PURE__ */ import_react.default.createElement(import_icons.PlusOutlined, null),
|
|
371
375
|
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-upload-text" }, (0, import_locales.getText)("pisell-upload-button")),
|
|
@@ -460,7 +464,166 @@ var BaseUpload = (props) => {
|
|
|
460
464
|
className: "pisell-data-source-upload",
|
|
461
465
|
...customRequest
|
|
462
466
|
};
|
|
463
|
-
|
|
467
|
+
const onCameraChange = (file) => {
|
|
468
|
+
console.log("onCameraChange", file);
|
|
469
|
+
if (fileList.length >= calcMaxCount) {
|
|
470
|
+
countError.run((0, import_locales.getText)("pisell-upload-max-count-error")(calcMaxCount));
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
const fileType = (0, import_utils2.getFileType)(file.name);
|
|
474
|
+
const typeMaxSize = typeMaxSizeMap == null ? void 0 : typeMaxSizeMap[fileType];
|
|
475
|
+
const _maxSize = typeMaxSize || maxSize || 10;
|
|
476
|
+
if (file.size > _maxSize * 1024 * 1024) {
|
|
477
|
+
sizeError.run((0, import_locales.getText)("pisell-upload-setting-size-error")(_maxSize));
|
|
478
|
+
return import_antd.Upload.LIST_IGNORE;
|
|
479
|
+
}
|
|
480
|
+
const pointSuffix = (0, import_utils2.getPointSuffix)(file.name);
|
|
481
|
+
if (accept !== "" && !accept.includes(pointSuffix)) {
|
|
482
|
+
typeError.run((0, import_locales.getText)("pisell-upload-setting-type-error")(pointSuffix));
|
|
483
|
+
return import_antd.Upload.LIST_IGNORE;
|
|
484
|
+
}
|
|
485
|
+
const uploadFileObj = {
|
|
486
|
+
uid: file.uid || `camera-${Date.now()}`,
|
|
487
|
+
name: file.name || `camera-${Date.now()}.jpg`,
|
|
488
|
+
status: "uploading",
|
|
489
|
+
url: file.url || file.thumbUrl,
|
|
490
|
+
thumbUrl: file.thumbUrl || file.url,
|
|
491
|
+
originFileObj: file.originFileObj || file,
|
|
492
|
+
lastModified: file.lastModified || Date.now(),
|
|
493
|
+
lastModifiedDate: file.lastModifiedDate || /* @__PURE__ */ new Date(),
|
|
494
|
+
type: file.type || "image/jpeg",
|
|
495
|
+
size: file.size,
|
|
496
|
+
// 如果是多语言模式,初始化多语言数据结构
|
|
497
|
+
...enableMultilingual && {
|
|
498
|
+
multilingualFileList: (0, import_utils2.createMultilingualFileList)(""),
|
|
499
|
+
multilingual: (0, import_utils2.createMultilingualData)("")
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
setFileList((prev) => {
|
|
503
|
+
const newFileList = [...prev, uploadFileObj];
|
|
504
|
+
if (!multiple && newFileList.length > 1) {
|
|
505
|
+
return [uploadFileObj];
|
|
506
|
+
}
|
|
507
|
+
return newFileList;
|
|
508
|
+
});
|
|
509
|
+
const fileObj = uploadFileObj.originFileObj;
|
|
510
|
+
if (fileObj) {
|
|
511
|
+
if (isShop) {
|
|
512
|
+
(0, import_shopUploadServe.uploadFile)(fileObj).then((result) => {
|
|
513
|
+
setFileList(
|
|
514
|
+
(prev) => prev.map(
|
|
515
|
+
(item) => {
|
|
516
|
+
var _a, _b, _c, _d;
|
|
517
|
+
return item.uid === uploadFileObj.uid ? {
|
|
518
|
+
...item,
|
|
519
|
+
status: "done",
|
|
520
|
+
response: result,
|
|
521
|
+
url: ((_a = result.data) == null ? void 0 : _a.url) || item.url,
|
|
522
|
+
thumbUrl: ((_b = result.data) == null ? void 0 : _b.url) || item.thumbUrl,
|
|
523
|
+
// 更新多语言数据
|
|
524
|
+
...enableMultilingual && {
|
|
525
|
+
multilingual: (0, import_utils2.createMultilingualData)(
|
|
526
|
+
((_c = result.data) == null ? void 0 : _c.url) || ""
|
|
527
|
+
),
|
|
528
|
+
multilingualFileList: (0, import_utils2.createMultilingualFileList)(
|
|
529
|
+
((_d = result.data) == null ? void 0 : _d.url) || ""
|
|
530
|
+
)
|
|
531
|
+
}
|
|
532
|
+
} : item;
|
|
533
|
+
}
|
|
534
|
+
)
|
|
535
|
+
);
|
|
536
|
+
handleChange({
|
|
537
|
+
file: { ...uploadFileObj, status: "done", response: result },
|
|
538
|
+
fileList: [
|
|
539
|
+
...fileList,
|
|
540
|
+
{ ...uploadFileObj, status: "done", response: result }
|
|
541
|
+
]
|
|
542
|
+
});
|
|
543
|
+
}).catch((error) => {
|
|
544
|
+
console.error("Camera upload error:", error);
|
|
545
|
+
setFileList(
|
|
546
|
+
(prev) => prev.map(
|
|
547
|
+
(item) => item.uid === uploadFileObj.uid ? { ...item, status: "error" } : item
|
|
548
|
+
)
|
|
549
|
+
);
|
|
550
|
+
(0, import_pisellToast.default)({
|
|
551
|
+
content: (0, import_locales.getText)("pisell-upload-error")(uploadFileObj.name)
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
} else {
|
|
555
|
+
const formData = new FormData();
|
|
556
|
+
formData.append(uploadProps.name || "file", fileObj);
|
|
557
|
+
const extraData = (() => {
|
|
558
|
+
if (typeof uploadProps.data === "function") {
|
|
559
|
+
const result = uploadProps.data(fileObj);
|
|
560
|
+
return result instanceof Promise ? {} : result;
|
|
561
|
+
}
|
|
562
|
+
return uploadProps.data || {};
|
|
563
|
+
})();
|
|
564
|
+
Object.keys(extraData).forEach((key) => {
|
|
565
|
+
formData.append(key, String(extraData[key]));
|
|
566
|
+
});
|
|
567
|
+
fetch(uploadProps.action, {
|
|
568
|
+
method: uploadProps.method || "post",
|
|
569
|
+
body: formData,
|
|
570
|
+
headers: uploadProps.headers || {}
|
|
571
|
+
}).then((response) => response.json()).then((result) => {
|
|
572
|
+
console.log("Camera upload success:", result);
|
|
573
|
+
setFileList(
|
|
574
|
+
(prev) => prev.map(
|
|
575
|
+
(item) => {
|
|
576
|
+
var _a, _b, _c, _d;
|
|
577
|
+
return item.uid === uploadFileObj.uid ? {
|
|
578
|
+
...item,
|
|
579
|
+
status: "done",
|
|
580
|
+
response: result,
|
|
581
|
+
url: ((_a = result.data) == null ? void 0 : _a.url) || item.url,
|
|
582
|
+
thumbUrl: ((_b = result.data) == null ? void 0 : _b.url) || item.thumbUrl,
|
|
583
|
+
// 更新多语言数据
|
|
584
|
+
...enableMultilingual && {
|
|
585
|
+
multilingual: (0, import_utils2.createMultilingualData)(
|
|
586
|
+
((_c = result.data) == null ? void 0 : _c.url) || ""
|
|
587
|
+
),
|
|
588
|
+
multilingualFileList: (0, import_utils2.createMultilingualFileList)(
|
|
589
|
+
((_d = result.data) == null ? void 0 : _d.url) || ""
|
|
590
|
+
)
|
|
591
|
+
}
|
|
592
|
+
} : item;
|
|
593
|
+
}
|
|
594
|
+
)
|
|
595
|
+
);
|
|
596
|
+
handleChange({
|
|
597
|
+
file: { ...uploadFileObj, status: "done", response: result },
|
|
598
|
+
fileList: [
|
|
599
|
+
...fileList,
|
|
600
|
+
{ ...uploadFileObj, status: "done", response: result }
|
|
601
|
+
]
|
|
602
|
+
});
|
|
603
|
+
}).catch((error) => {
|
|
604
|
+
console.error("Camera upload error:", error);
|
|
605
|
+
setFileList(
|
|
606
|
+
(prev) => prev.map(
|
|
607
|
+
(item) => item.uid === uploadFileObj.uid ? { ...item, status: "error" } : item
|
|
608
|
+
)
|
|
609
|
+
);
|
|
610
|
+
(0, import_pisellToast.default)({
|
|
611
|
+
content: (0, import_locales.getText)("pisell-upload-error")(uploadFileObj.name)
|
|
612
|
+
});
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Upload, { ref: uploadRef, ...uploadProps, fileList }, fileList.length >= calcMaxCount ? null : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, allowCamera && !(0, import_utils.isMobile)() && /* @__PURE__ */ import_react.default.createElement(
|
|
618
|
+
import_CameraPopover.default,
|
|
619
|
+
{
|
|
620
|
+
onLocalFileClick: () => {
|
|
621
|
+
var _a;
|
|
622
|
+
return (_a = uploadButtonRef.current) == null ? void 0 : _a.click();
|
|
623
|
+
},
|
|
624
|
+
onCameraChange
|
|
625
|
+
}
|
|
626
|
+
), renderUploadButton(!!enableMultilingual))), /* @__PURE__ */ import_react.default.createElement(
|
|
464
627
|
import_pisellModal.default,
|
|
465
628
|
{
|
|
466
629
|
title: (0, import_locales.getText)("pisell-upload-multilingual-title"),
|