@pisell/materials 6.3.8 → 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.
- 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 +5 -5
- package/build/lowcode/preview.js +155 -150
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +34 -35
- package/dist/umd/materials.min.css +1 -0
- package/dist/umd/materials.min.js +1 -0
- package/dist/umd/static/DotsSix.57d66266.svg +1 -0
- package/dist/umd/static/arrow-left.e542294f.svg +1 -0
- package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
- package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
- package/dist/umd/static/help-circle.31c9be40.svg +1 -0
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -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/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +158 -22
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +21 -22
- package/es/components/pisellQRScanner/index.d.ts +0 -13
- package/es/components/pisellQRScanner/index.js +0 -8
- package/es/components/pisellText/components/Editable/index.d.ts +29 -0
- package/es/components/pisellText/components/Editable/index.js +130 -0
- package/es/components/pisellText/components/Editable/index.less +40 -0
- package/es/components/pisellText/index.d.ts +1 -0
- package/es/components/pisellText/index.js +2 -0
- package/es/components/pisellWalletPassCard/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/select/index.js +4 -2
- package/es/components/select-time/index.d.ts +0 -1
- package/es/components/sortableList/index.d.ts +1 -1
- package/es/components/sortableList/index.js +2 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -1
- package/es/components/table/Actions/component/ExportImport/index.js +55 -27
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/serve.js +8 -0
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +9 -0
- package/es/components/walletCard/index.d.ts +11 -11
- package/es/components/walletCard/index.js +51 -40
- package/es/locales/en-US.d.ts +1 -1
- package/es/locales/en-US.js +2 -2
- package/es/locales/zh-CN.d.ts +1 -1
- package/es/locales/zh-CN.js +1 -1
- package/es/locales/zh-TW.d.ts +1 -1
- package/es/locales/zh-TW.js +1 -1
- package/es/typings.d.ts +7 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -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/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +182 -18
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +21 -22
- package/lib/components/pisellQRScanner/index.d.ts +0 -13
- package/lib/components/pisellText/components/Editable/index.d.ts +29 -0
- package/lib/components/pisellText/components/Editable/index.js +139 -0
- package/lib/components/pisellText/components/Editable/index.less +40 -0
- package/lib/components/pisellText/index.d.ts +1 -0
- package/lib/components/pisellText/index.js +2 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/select/index.js +7 -2
- package/lib/components/select-time/index.d.ts +0 -1
- package/lib/components/sortableList/index.d.ts +1 -1
- package/lib/components/sortableList/index.js +2 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +7 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +37 -25
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/serve.js +8 -0
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +5 -0
- package/lib/components/walletCard/index.d.ts +11 -11
- package/lib/components/walletCard/index.js +47 -29
- package/lib/locales/en-US.d.ts +1 -1
- package/lib/locales/en-US.js +2 -2
- package/lib/locales/zh-CN.d.ts +1 -1
- package/lib/locales/zh-CN.js +1 -1
- package/lib/locales/zh-TW.d.ts +1 -1
- package/lib/locales/zh-TW.js +1 -1
- package/lib/typings.d.ts +7 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/pisell-text.editable/meta.ts +115 -0
- package/lowcode/pisell-text.editable/snippets.ts +15 -0
- package/lowcode/sortable-list/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +20 -0
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
|
|
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
|
|
|
43
43
|
}) => JSX.Element;
|
|
44
44
|
export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
|
|
45
45
|
options?: any;
|
|
46
|
-
optionSourceType?: "
|
|
46
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
47
47
|
labelField: string;
|
|
48
48
|
valueField: string;
|
|
49
49
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
22
|
+
title: string | 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 | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
31
|
+
subTitle: string | number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -119,37 +119,173 @@ export var useCountries = function useCountries() {
|
|
|
119
119
|
}
|
|
120
120
|
}, [isShop]);
|
|
121
121
|
var currentData = useMemo(function () {
|
|
122
|
+
var codeList = null;
|
|
122
123
|
if (isShop) {
|
|
123
124
|
var _appHelper$utils2;
|
|
124
|
-
|
|
125
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
126
|
-
prefix: "+".concat(item.calling_code)
|
|
127
|
-
});
|
|
128
|
-
});
|
|
125
|
+
codeList = (appHelper === null || appHelper === void 0 || (_appHelper$utils2 = appHelper.utils) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.store) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.getState()) === null || _appHelper$utils2 === void 0 || (_appHelper$utils2 = _appHelper$utils2.global) === null || _appHelper$utils2 === void 0 ? void 0 : _appHelper$utils2.codeList) || shopData;
|
|
129
126
|
} else if (isPc) {
|
|
130
127
|
var _appHelper$utils3;
|
|
131
|
-
|
|
132
|
-
if (codeList) {
|
|
133
|
-
return codeList.map(function (item) {
|
|
134
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
|
135
|
-
prefix: "+".concat(item.calling_code)
|
|
136
|
-
});
|
|
137
|
-
});
|
|
138
|
-
}
|
|
128
|
+
codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils3 = appHelper.utils) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.store) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.getState()) === null || _appHelper$utils3 === void 0 || (_appHelper$utils3 = _appHelper$utils3.country) === null || _appHelper$utils3 === void 0 ? void 0 : _appHelper$utils3.country;
|
|
139
129
|
} else if (isH5) {
|
|
140
130
|
var _appHelper$utils4;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
131
|
+
codeList = appHelper === null || appHelper === void 0 || (_appHelper$utils4 = appHelper.utils) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.getStore()) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.getState()) === null || _appHelper$utils4 === void 0 || (_appHelper$utils4 = _appHelper$utils4.country) === null || _appHelper$utils4 === void 0 ? void 0 : _appHelper$utils4.country;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// 在shop、pc、h5中使用store中的数据,如果没有数据,则使用默认数据
|
|
135
|
+
if (isShop || isPc || isH5) {
|
|
136
|
+
var _codeList;
|
|
137
|
+
codeList = ((_codeList = codeList) === null || _codeList === void 0 ? void 0 : _codeList.length) > 0 ? codeList : defaultData;
|
|
138
|
+
console.log('codeList', codeList);
|
|
139
|
+
return codeList.map(function (item) {
|
|
140
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
141
|
+
prefix: "+".concat(item.calling_code)
|
|
147
142
|
});
|
|
148
|
-
}
|
|
143
|
+
});
|
|
149
144
|
}
|
|
150
145
|
return data;
|
|
151
|
-
}, [isShop, data, shopData]);
|
|
146
|
+
}, [isShop, isPc, isH5, data, shopData]);
|
|
152
147
|
return {
|
|
153
148
|
data: currentData
|
|
154
149
|
};
|
|
155
|
-
};
|
|
150
|
+
};
|
|
151
|
+
var defaultData = [{
|
|
152
|
+
name: 'Mexico',
|
|
153
|
+
code: 'MX',
|
|
154
|
+
calling_code: '52',
|
|
155
|
+
currency_code: 'MXN'
|
|
156
|
+
}, {
|
|
157
|
+
name: '美国',
|
|
158
|
+
code: 'US',
|
|
159
|
+
calling_code: '1',
|
|
160
|
+
currency_code: 'USD'
|
|
161
|
+
}, {
|
|
162
|
+
name: '加拿大',
|
|
163
|
+
code: 'CA',
|
|
164
|
+
calling_code: '1',
|
|
165
|
+
currency_code: 'CAD'
|
|
166
|
+
}, {
|
|
167
|
+
name: '澳大利亚',
|
|
168
|
+
code: 'AU',
|
|
169
|
+
calling_code: '61',
|
|
170
|
+
currency_code: 'AUD'
|
|
171
|
+
}, {
|
|
172
|
+
name: '新西兰',
|
|
173
|
+
code: 'NZ',
|
|
174
|
+
calling_code: '64',
|
|
175
|
+
currency_code: 'NZD'
|
|
176
|
+
}, {
|
|
177
|
+
name: '新加坡',
|
|
178
|
+
code: 'SG',
|
|
179
|
+
calling_code: '65',
|
|
180
|
+
currency_code: 'SGD'
|
|
181
|
+
}, {
|
|
182
|
+
name: '香港特别行政区',
|
|
183
|
+
code: 'HK',
|
|
184
|
+
calling_code: '852',
|
|
185
|
+
currency_code: 'HKD'
|
|
186
|
+
}, {
|
|
187
|
+
name: '台湾',
|
|
188
|
+
code: 'TW',
|
|
189
|
+
calling_code: '886',
|
|
190
|
+
currency_code: 'TWD'
|
|
191
|
+
}, {
|
|
192
|
+
name: '中国',
|
|
193
|
+
code: 'CN',
|
|
194
|
+
calling_code: '86',
|
|
195
|
+
currency_code: 'AUD'
|
|
196
|
+
}, {
|
|
197
|
+
name: '日本',
|
|
198
|
+
code: 'JP',
|
|
199
|
+
calling_code: '81',
|
|
200
|
+
currency_code: 'JPY'
|
|
201
|
+
}, {
|
|
202
|
+
name: '韩国',
|
|
203
|
+
code: 'KR',
|
|
204
|
+
calling_code: '82',
|
|
205
|
+
currency_code: 'KRW'
|
|
206
|
+
}, {
|
|
207
|
+
name: '马来西亚',
|
|
208
|
+
code: 'MY',
|
|
209
|
+
calling_code: '60',
|
|
210
|
+
currency_code: 'USD'
|
|
211
|
+
}, {
|
|
212
|
+
name: '英国',
|
|
213
|
+
code: 'GB',
|
|
214
|
+
calling_code: '44',
|
|
215
|
+
currency_code: 'GBP'
|
|
216
|
+
}, {
|
|
217
|
+
name: '法国',
|
|
218
|
+
code: 'FR',
|
|
219
|
+
calling_code: '33',
|
|
220
|
+
currency_code: 'EUR'
|
|
221
|
+
}, {
|
|
222
|
+
name: '意大利',
|
|
223
|
+
code: 'IT',
|
|
224
|
+
calling_code: '39',
|
|
225
|
+
currency_code: 'EUR'
|
|
226
|
+
}, {
|
|
227
|
+
name: 'Ireland',
|
|
228
|
+
code: 'IE',
|
|
229
|
+
calling_code: '353',
|
|
230
|
+
currency_code: 'EUR'
|
|
231
|
+
}, {
|
|
232
|
+
name: 'Netherlands',
|
|
233
|
+
code: 'NL',
|
|
234
|
+
calling_code: '31',
|
|
235
|
+
currency_code: 'EUR'
|
|
236
|
+
}, {
|
|
237
|
+
name: 'Germany',
|
|
238
|
+
code: 'DE',
|
|
239
|
+
calling_code: '49',
|
|
240
|
+
currency_code: 'EUR'
|
|
241
|
+
}, {
|
|
242
|
+
name: 'Spain',
|
|
243
|
+
code: 'ES',
|
|
244
|
+
calling_code: '34',
|
|
245
|
+
currency_code: 'EUR'
|
|
246
|
+
}, {
|
|
247
|
+
name: 'Finland',
|
|
248
|
+
code: 'FI',
|
|
249
|
+
calling_code: '358',
|
|
250
|
+
currency_code: 'EUR'
|
|
251
|
+
}, {
|
|
252
|
+
name: 'Hungary',
|
|
253
|
+
code: 'HU',
|
|
254
|
+
calling_code: '36',
|
|
255
|
+
currency_code: 'HUF'
|
|
256
|
+
}, {
|
|
257
|
+
name: 'Indonesia',
|
|
258
|
+
code: 'ID',
|
|
259
|
+
calling_code: '62',
|
|
260
|
+
currency_code: 'IDR'
|
|
261
|
+
}, {
|
|
262
|
+
name: 'India',
|
|
263
|
+
code: 'IND',
|
|
264
|
+
calling_code: '91',
|
|
265
|
+
currency_code: 'INR'
|
|
266
|
+
}, {
|
|
267
|
+
name: 'Nigeria',
|
|
268
|
+
code: 'NG',
|
|
269
|
+
calling_code: '234',
|
|
270
|
+
currency_code: 'NGN'
|
|
271
|
+
}, {
|
|
272
|
+
name: 'Islamic Republic of Pakistan',
|
|
273
|
+
code: 'PAK',
|
|
274
|
+
calling_code: '92',
|
|
275
|
+
currency_code: 'PRK'
|
|
276
|
+
}, {
|
|
277
|
+
name: 'Philippines',
|
|
278
|
+
code: 'PH',
|
|
279
|
+
calling_code: '63',
|
|
280
|
+
currency_code: 'PHP'
|
|
281
|
+
}, {
|
|
282
|
+
name: 'Thailand',
|
|
283
|
+
code: 'TH',
|
|
284
|
+
calling_code: '66',
|
|
285
|
+
currency_code: 'THB'
|
|
286
|
+
}, {
|
|
287
|
+
name: 'South Africa',
|
|
288
|
+
code: 'ZA',
|
|
289
|
+
calling_code: '27',
|
|
290
|
+
currency_code: 'ZAR'
|
|
291
|
+
}];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
|
|
2
2
|
options?: any;
|
|
3
|
-
optionSourceType?: "
|
|
3
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
4
4
|
labelField: string;
|
|
5
5
|
valueField: string;
|
|
6
6
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare const formFieldMap: {
|
|
3
2
|
FormItemCheckbox: import("react").FC<{}> & {
|
|
4
3
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -35,7 +34,7 @@ declare const formFieldMap: {
|
|
|
35
34
|
};
|
|
36
35
|
FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
37
36
|
options?: any;
|
|
38
|
-
optionSourceType?: "
|
|
37
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
39
38
|
labelField: string;
|
|
40
39
|
valueField: string;
|
|
41
40
|
extraParams?: Record<string, any> | undefined;
|
|
@@ -60,25 +59,7 @@ declare const formFieldMap: {
|
|
|
60
59
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
60
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
61
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<import("./Input
|
|
64
|
-
options?: any;
|
|
65
|
-
optionSourceType?: "custom" | "default" | "api" | undefined;
|
|
66
|
-
labelField: string;
|
|
67
|
-
valueField: string;
|
|
68
|
-
extraParams?: Record<string, any> | undefined;
|
|
69
|
-
} & {
|
|
70
|
-
dataSource?: any;
|
|
71
|
-
}) => JSX.Element) | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
72
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
73
|
-
} & {
|
|
74
|
-
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
75
|
-
}) | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
76
|
-
onChange: (value: string) => void;
|
|
77
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | (import("react").FC<{}> & {
|
|
78
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
79
|
-
} & {
|
|
80
|
-
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
81
|
-
}) | (import("react").FC<import("./Input/type").InputProps> & {
|
|
62
|
+
declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
|
|
82
63
|
JSON: import("react").FC<any>;
|
|
83
64
|
Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
84
65
|
TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
@@ -98,5 +79,23 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
98
79
|
name?: string | undefined;
|
|
99
80
|
fieldKey?: string | undefined;
|
|
100
81
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
|
-
})
|
|
82
|
+
}) | import("react").FC<any> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
83
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
84
|
+
} & {
|
|
85
|
+
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
86
|
+
}) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
87
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
88
|
+
} & {
|
|
89
|
+
Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
90
|
+
}) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
91
|
+
options?: any;
|
|
92
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
93
|
+
labelField: string;
|
|
94
|
+
valueField: string;
|
|
95
|
+
extraParams?: Record<string, any> | undefined;
|
|
96
|
+
} & {
|
|
97
|
+
dataSource?: any;
|
|
98
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
99
|
+
onChange: (value: string) => void;
|
|
100
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
102
101
|
export { getFieldComponent, formFieldMap };
|
|
@@ -1,18 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
|
-
import type { DetailedHTMLProps, HTMLAttributes, VideoHTMLAttributes, InputHTMLAttributes } from 'react';
|
|
4
|
-
declare type ExtendedDetailedHTMLProps<T extends HTMLAttributes<E>, E extends HTMLElement> = DetailedHTMLProps<T, E> & {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
};
|
|
7
|
-
declare global {
|
|
8
|
-
namespace JSX {
|
|
9
|
-
interface IntrinsicElements {
|
|
10
|
-
div: ExtendedDetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
11
|
-
video: DetailedHTMLProps<VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
|
|
12
|
-
input: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
3
|
export interface PisellQRScannerProps {
|
|
17
4
|
/** 是否可见 */
|
|
18
5
|
visible: boolean;
|
|
@@ -18,14 +18,6 @@ import "./index.less";
|
|
|
18
18
|
import { createPortal } from 'react-dom';
|
|
19
19
|
import { getText } from "../../locales";
|
|
20
20
|
|
|
21
|
-
// 不使用全局声明,改用本地引入React类型
|
|
22
|
-
|
|
23
|
-
// 扩展HTMLAttributes接口以包含children属性
|
|
24
|
-
|
|
25
|
-
// 扩展DetailedHTMLProps类型以使用扩展的HTMLAttributes
|
|
26
|
-
|
|
27
|
-
// 声明JSX命名空间,解决JSX.IntrinsicElements错误
|
|
28
|
-
|
|
29
21
|
// 精确定义组件属性,只接收需要的属性
|
|
30
22
|
|
|
31
23
|
/**
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type MultiLanguageValue = {
|
|
4
|
+
en: string;
|
|
5
|
+
'zh-CN': string;
|
|
6
|
+
'zh-HK': string;
|
|
7
|
+
};
|
|
8
|
+
export interface EditableConfig {
|
|
9
|
+
/** 是否禁用编辑 */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** 最大长度 */
|
|
12
|
+
maxLength?: number;
|
|
13
|
+
/** 编辑图标 */
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export interface EditableProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
17
|
+
/** 文本内容,支持字符串或多语言对象 */
|
|
18
|
+
value?: string | MultiLanguageValue;
|
|
19
|
+
/** 子节点内容,优先级高于 value */
|
|
20
|
+
children?: string;
|
|
21
|
+
/** 可编辑配置,boolean 时使用默认配置 */
|
|
22
|
+
editable?: boolean | EditableConfig;
|
|
23
|
+
/** 编辑变更回调 */
|
|
24
|
+
onChange?: (value: string | MultiLanguageValue) => void;
|
|
25
|
+
/** 输入框尺寸 */
|
|
26
|
+
size?: 'large' | 'middle' | 'small';
|
|
27
|
+
}
|
|
28
|
+
declare const Editable: React.FC<EditableProps>;
|
|
29
|
+
export default Editable;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
var _excluded = ["value", "children", "editable", "onChange", "className", "size"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
8
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
9
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
10
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
11
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
12
|
+
import React, { useState, useMemo } from 'react';
|
|
13
|
+
import { Input } from 'antd';
|
|
14
|
+
import Icon from "../../../icon";
|
|
15
|
+
import { locales } from '@pisell/utils';
|
|
16
|
+
import classNames from 'classnames';
|
|
17
|
+
import useEngineContext from "../../../../hooks/useEngineContext";
|
|
18
|
+
import Translation from "../../../translation";
|
|
19
|
+
import "./index.less";
|
|
20
|
+
var Editable = function Editable(props) {
|
|
21
|
+
var value = props.value,
|
|
22
|
+
children = props.children,
|
|
23
|
+
_props$editable = props.editable,
|
|
24
|
+
editable = _props$editable === void 0 ? false : _props$editable,
|
|
25
|
+
onChange = props.onChange,
|
|
26
|
+
className = props.className,
|
|
27
|
+
_props$size = props.size,
|
|
28
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
29
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
30
|
+
var context = useEngineContext();
|
|
31
|
+
var _useState = useState(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
isEditing = _useState2[0],
|
|
34
|
+
setIsEditing = _useState2[1];
|
|
35
|
+
// 解析编辑配置
|
|
36
|
+
var editableConfig = useMemo(function () {
|
|
37
|
+
if (typeof editable === 'boolean') {
|
|
38
|
+
return editable ? {} : null;
|
|
39
|
+
}
|
|
40
|
+
return editable || null;
|
|
41
|
+
}, [editable]);
|
|
42
|
+
var currentLocale = useMemo(function () {
|
|
43
|
+
var _context$appHelper$ut;
|
|
44
|
+
var locale = (_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut = _context$appHelper$ut.storage) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.get('umi_locale');
|
|
45
|
+
return locales.formatLocale(locale);
|
|
46
|
+
}, []);
|
|
47
|
+
var displayValue = useMemo(function () {
|
|
48
|
+
if (typeof children === 'string') return children;
|
|
49
|
+
if (typeof value === 'string') {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
if (value && _typeof(value) === 'object') {
|
|
53
|
+
return value[currentLocale] || '';
|
|
54
|
+
}
|
|
55
|
+
return '';
|
|
56
|
+
}, [value, currentLocale, children]);
|
|
57
|
+
|
|
58
|
+
// 判断是否为多语言对象
|
|
59
|
+
var isMultiLanguage = useMemo(function () {
|
|
60
|
+
return !!value && _typeof(value) === 'object';
|
|
61
|
+
}, [value]);
|
|
62
|
+
|
|
63
|
+
// 编辑功能
|
|
64
|
+
var handleEdit = function handleEdit() {
|
|
65
|
+
if (editableConfig !== null && editableConfig !== void 0 && editableConfig.disabled) return;
|
|
66
|
+
setIsEditing(true);
|
|
67
|
+
};
|
|
68
|
+
var handleInputChange = function handleInputChange(newValue) {
|
|
69
|
+
if (!onChange) return;
|
|
70
|
+
onChange(newValue);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// 编辑模式渲染
|
|
74
|
+
if (isEditing && editableConfig) {
|
|
75
|
+
// 如果是多语言对象,使用 Translation 组件
|
|
76
|
+
if (isMultiLanguage) {
|
|
77
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
78
|
+
className: classNames('pisell-text-editable-editing', className)
|
|
79
|
+
}, /*#__PURE__*/React.createElement(Translation, {
|
|
80
|
+
value: value,
|
|
81
|
+
onChange: handleInputChange,
|
|
82
|
+
onPressEnter: function onPressEnter() {
|
|
83
|
+
return setIsEditing(false);
|
|
84
|
+
}
|
|
85
|
+
// onBlur={() => setIsEditing(false)}
|
|
86
|
+
,
|
|
87
|
+
maxLength: editableConfig.maxLength,
|
|
88
|
+
size: size,
|
|
89
|
+
autoFocus: true
|
|
90
|
+
}));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// 普通字符串,使用 Input 组件
|
|
94
|
+
return /*#__PURE__*/React.createElement(Input, {
|
|
95
|
+
value: displayValue,
|
|
96
|
+
onChange: function onChange(e) {
|
|
97
|
+
return handleInputChange(e.target.value);
|
|
98
|
+
},
|
|
99
|
+
onPressEnter: function onPressEnter() {
|
|
100
|
+
return setIsEditing(false);
|
|
101
|
+
}
|
|
102
|
+
// onBlur={() => setIsEditing(false)}
|
|
103
|
+
,
|
|
104
|
+
maxLength: editableConfig.maxLength,
|
|
105
|
+
size: size,
|
|
106
|
+
autoFocus: true,
|
|
107
|
+
className: classNames('pisell-text-editable-input', className),
|
|
108
|
+
style: others.style
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// 正常显示模式
|
|
113
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
114
|
+
className: classNames('pisell-text-editable', className, {
|
|
115
|
+
'pisell-text-editable-enabled': editableConfig && !editableConfig.disabled
|
|
116
|
+
})
|
|
117
|
+
}, others), displayValue, editableConfig && !editableConfig.disabled && !isEditing && /*#__PURE__*/React.createElement("span", {
|
|
118
|
+
className: "pisell-text-editable-edit-icon",
|
|
119
|
+
onClick: function onClick(e) {
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
e.stopPropagation();
|
|
122
|
+
handleEdit();
|
|
123
|
+
},
|
|
124
|
+
title: "\u70B9\u51FB\u7F16\u8F91"
|
|
125
|
+
}, editableConfig.icon || /*#__PURE__*/React.createElement(Icon, {
|
|
126
|
+
type: "pisell2-edit-05",
|
|
127
|
+
size: 16
|
|
128
|
+
})));
|
|
129
|
+
};
|
|
130
|
+
export default Editable;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.pisell-text-editable {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
&-enabled {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&-edit-icon {
|
|
9
|
+
margin-left: 4px;
|
|
10
|
+
color: rgba(0, 0, 0, 0.45);
|
|
11
|
+
font-size: 12px;
|
|
12
|
+
opacity: 1;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
z-index: 1;
|
|
16
|
+
|
|
17
|
+
&:hover {
|
|
18
|
+
color: #1890ff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// 确保内部的图标不会阻止点击事件
|
|
22
|
+
* {
|
|
23
|
+
pointer-events: none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-input {
|
|
28
|
+
min-width: 100px;
|
|
29
|
+
|
|
30
|
+
&.ant-input {
|
|
31
|
+
border: 1px solid #1890ff;
|
|
32
|
+
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-editing {
|
|
37
|
+
display: inline-block;
|
|
38
|
+
width: 100%;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -4,5 +4,6 @@ export interface PisellTextProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
4
4
|
declare const PisellText: {
|
|
5
5
|
(props: PisellTextProps): JSX.Element;
|
|
6
6
|
Amount: (props: import("./components/Amount").AmountProps) => JSX.Element;
|
|
7
|
+
Editable: React.FC<import("./components/Editable").EditableProps>;
|
|
7
8
|
};
|
|
8
9
|
export default PisellText;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Amount from "./components/Amount";
|
|
3
|
+
import Editable from "./components/Editable";
|
|
3
4
|
var PisellText = function PisellText(props) {
|
|
4
5
|
return /*#__PURE__*/React.createElement("span", props);
|
|
5
6
|
};
|
|
6
7
|
PisellText.Amount = Amount;
|
|
8
|
+
PisellText.Editable = Editable;
|
|
7
9
|
export default PisellText;
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|