@cloudbase/weda-ui 3.6.1 → 3.6.3
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/dist/configs/components/scrollVeiw.json +7 -0
- package/dist/configs/components/wd-select-multiple.d.ts +2 -2
- package/dist/configs/components/wd-select-multiple.js +28 -2
- package/dist/configs/index.d.ts +16 -6
- package/dist/web/components/jsx/index.js +3 -1
- package/dist/web/components/scrollView/index.js +2 -1
- package/dist/web/components/wd-card/wd-card.js +1 -1
- package/package.json +1 -1
|
@@ -235,30 +235,37 @@
|
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
237
|
"name": "dragstart",
|
|
238
|
+
"x-platforms": ["MP"],
|
|
238
239
|
"title": "滑动开始事件(同时开启 enhanced 属性后生效)"
|
|
239
240
|
},
|
|
240
241
|
{
|
|
241
242
|
"name": "dragging",
|
|
243
|
+
"x-platforms": ["MP"],
|
|
242
244
|
"title": "滑动事件(同时开启 enhanced 属性后生效)"
|
|
243
245
|
},
|
|
244
246
|
{
|
|
245
247
|
"name": "dragend",
|
|
248
|
+
"x-platforms": ["MP"],
|
|
246
249
|
"title": "滑动结束事件(同时开启 enhanced 属性后生效)"
|
|
247
250
|
},
|
|
248
251
|
{
|
|
249
252
|
"name": "refresherpulling",
|
|
253
|
+
"x-platforms": ["MP"],
|
|
250
254
|
"title": "自定义下拉刷新控件被下拉"
|
|
251
255
|
},
|
|
252
256
|
{
|
|
253
257
|
"name": "refresherrefresh",
|
|
258
|
+
"x-platforms": ["MP"],
|
|
254
259
|
"title": "自定义下拉刷新被触发"
|
|
255
260
|
},
|
|
256
261
|
{
|
|
257
262
|
"name": "refresherrestore",
|
|
263
|
+
"x-platforms": ["MP"],
|
|
258
264
|
"title": "自定义下拉刷新被复位"
|
|
259
265
|
},
|
|
260
266
|
{
|
|
261
267
|
"name": "refresherabort",
|
|
268
|
+
"x-platforms": ["MP"],
|
|
262
269
|
"title": "自定义下拉刷新被中止"
|
|
263
270
|
}
|
|
264
271
|
],
|
|
@@ -2,7 +2,7 @@ import { Static } from '../type-utils';
|
|
|
2
2
|
import type { Simplify } from 'type-fest';
|
|
3
3
|
declare const data: import("@sinclair/typebox").TObject<{
|
|
4
4
|
suffixType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
5
|
-
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<
|
|
5
|
+
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"many-many" | "one-many">>;
|
|
6
6
|
viewId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
7
|
enumName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
8
|
primaryField: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -47,7 +47,7 @@ declare const config: {
|
|
|
47
47
|
readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
|
|
48
48
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
49
49
|
suffixType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
50
|
-
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<
|
|
50
|
+
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"many-many" | "one-many">>;
|
|
51
51
|
viewId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
52
|
enumName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
53
53
|
primaryField: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineConfig, Type } from '../type-utils';
|
|
1
|
+
import { defineConfig, Type, Tuple } from '../type-utils';
|
|
2
2
|
import { FORM_ITEM_DATA, FORM_ITEM_EVENTS, FORM_ITEM_METHODS, FORM_ITEM_META, ItemData, pickWithXCategory, X_CATEGORY, getFormItemDataTitle, } from '../type-utils/type-form';
|
|
3
3
|
import { getClasses } from '../type-utils/classes';
|
|
4
4
|
import { templateInitNameWithId } from './common/init-name-with-id';
|
|
@@ -33,7 +33,33 @@ const data = Type.Partial(Type.Object({
|
|
|
33
33
|
// 选择框
|
|
34
34
|
...SELECT,
|
|
35
35
|
suffixType: FORM_ITEM_DATA._suffixTypeInSelect,
|
|
36
|
-
format:
|
|
36
|
+
format: Type.StringEnum({
|
|
37
|
+
type: 'string',
|
|
38
|
+
title: '字段类型',
|
|
39
|
+
default: '',
|
|
40
|
+
enum: Tuple([
|
|
41
|
+
{ label: 'one-many', value: 'one-many' },
|
|
42
|
+
{ label: 'many-many', value: 'many-many' },
|
|
43
|
+
]),
|
|
44
|
+
'x-linkages': [
|
|
45
|
+
{
|
|
46
|
+
type: 'value:visible',
|
|
47
|
+
target: 'range',
|
|
48
|
+
condition: "{{$self.value!='many-many'&&$self.value!='one-many'}}",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: 'value:visible',
|
|
52
|
+
target: 'tipBlock',
|
|
53
|
+
condition: "{{$self.value=='many-many'||$self.value=='one-many'}}",
|
|
54
|
+
},
|
|
55
|
+
// {
|
|
56
|
+
// type: 'value:visible',
|
|
57
|
+
// target: 'where',
|
|
58
|
+
// condition: "{{$self.value=='many-many'||$self.value=='one-many'}}",
|
|
59
|
+
// },
|
|
60
|
+
],
|
|
61
|
+
'x-platforms': [''],
|
|
62
|
+
}),
|
|
37
63
|
viewId: FORM_ITEM_DATA.viewId,
|
|
38
64
|
enumName: FORM_ITEM_DATA.enumName,
|
|
39
65
|
primaryField: FORM_ITEM_DATA.primaryField,
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -5383,10 +5383,15 @@ export declare const components: {
|
|
|
5383
5383
|
};
|
|
5384
5384
|
};
|
|
5385
5385
|
};
|
|
5386
|
-
events: {
|
|
5386
|
+
events: ({
|
|
5387
5387
|
name: string;
|
|
5388
5388
|
title: string;
|
|
5389
|
-
|
|
5389
|
+
"x-platforms"?: undefined;
|
|
5390
|
+
} | {
|
|
5391
|
+
name: string;
|
|
5392
|
+
"x-platforms": string[];
|
|
5393
|
+
title: string;
|
|
5394
|
+
})[];
|
|
5390
5395
|
meta: {
|
|
5391
5396
|
title: string;
|
|
5392
5397
|
description: string;
|
|
@@ -14180,7 +14185,7 @@ export declare const components: {
|
|
|
14180
14185
|
readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
|
|
14181
14186
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
14182
14187
|
suffixType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
14183
|
-
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<
|
|
14188
|
+
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"many-many" | "one-many">>;
|
|
14184
14189
|
viewId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
14185
14190
|
enumName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
14186
14191
|
primaryField: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -24654,10 +24659,15 @@ declare const _default: {
|
|
|
24654
24659
|
};
|
|
24655
24660
|
};
|
|
24656
24661
|
};
|
|
24657
|
-
events: {
|
|
24662
|
+
events: ({
|
|
24658
24663
|
name: string;
|
|
24659
24664
|
title: string;
|
|
24660
|
-
|
|
24665
|
+
"x-platforms"?: undefined;
|
|
24666
|
+
} | {
|
|
24667
|
+
name: string;
|
|
24668
|
+
"x-platforms": string[];
|
|
24669
|
+
title: string;
|
|
24670
|
+
})[];
|
|
24661
24671
|
meta: {
|
|
24662
24672
|
title: string;
|
|
24663
24673
|
description: string;
|
|
@@ -33451,7 +33461,7 @@ declare const _default: {
|
|
|
33451
33461
|
readonly $schema: "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json";
|
|
33452
33462
|
readonly data: import("@sinclair/typebox").TObject<{
|
|
33453
33463
|
suffixType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
|
|
33454
|
-
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<
|
|
33464
|
+
format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<"many-many" | "one-many">>;
|
|
33455
33465
|
viewId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
33456
33466
|
enumName: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
33457
33467
|
primaryField: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
@@ -16,7 +16,9 @@ export default function JSX(props) {
|
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
18
18
|
}
|
|
19
|
-
const MyComponent = React.useMemo(() => new Function(
|
|
19
|
+
const MyComponent = React.useMemo(() => new Function(window['__POWERED_BY_QIANKUN__']
|
|
20
|
+
? `with(window.proxy || window){${jsCode}}`
|
|
21
|
+
: jsCode)(), [jsCode]);
|
|
20
22
|
return (_jsx("div", { className: props.className, style: props.style, children: _jsx(MyComponent, { ...props, "$w": window === null || window === void 0 ? void 0 : window.$w }) }));
|
|
21
23
|
}
|
|
22
24
|
JSX.propTypes = {
|
|
@@ -14,6 +14,8 @@ export default function ScrollView({ id, scrollX = false, scrollY = true, style,
|
|
|
14
14
|
scrollTop: e.target.scrollTop,
|
|
15
15
|
scrollHeight: e.target.scrollHeight,
|
|
16
16
|
scrollWidth: e.target.scrollWidth,
|
|
17
|
+
clientHeight: e.target.clientHeight,
|
|
18
|
+
clientWidth: e.target.clientWidth,
|
|
17
19
|
};
|
|
18
20
|
const deltaY = scrollY ? e.target.scrollTop - scrollTopPos : 0;
|
|
19
21
|
const deltaX = scrollX ? e.target.scrollLeft - scrollLeftPos : 0;
|
|
@@ -55,7 +57,6 @@ export default function ScrollView({ id, scrollX = false, scrollY = true, style,
|
|
|
55
57
|
setToLower(false);
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
|
-
// console.log("delta", deltaY, deltaX
|
|
59
60
|
events.scroll(detail, { originEvent: e });
|
|
60
61
|
};
|
|
61
62
|
React.useEffect(() => {
|
|
@@ -41,5 +41,5 @@ export const WdCard = forwardRef(function WdCard({ showHeader = true, showConten
|
|
|
41
41
|
contentState,
|
|
42
42
|
dealContentState,
|
|
43
43
|
]);
|
|
44
|
-
return (_jsxs("div", { className: `${isH5 ? `${classPrefix}-h5-card-root` : `${classPrefix}-pc-card-root`} ${classPrefix}-card-root ${showDivider ? classPrefix + '-card--bordered' : ''} ${contentState !== 'show' ? classPrefix + '-card--collapse-active' : ''} ${className}`, "data-testid": "wd-card-test", onClick: (e) => events.tap({}, { originEvent: e }), style: style, children: [showHeader ? (_jsx("div", { className: `${classPrefix}-card__header`, "data-testid": "wd-card-header-test", children: headerSlot })) : null,
|
|
44
|
+
return (_jsxs("div", { className: `${isH5 ? `${classPrefix}-h5-card-root` : `${classPrefix}-pc-card-root`} ${classPrefix}-card-root ${showDivider ? classPrefix + '-card--bordered' : ''} ${contentState !== 'show' ? classPrefix + '-card--collapse-active' : ''} ${className}`, "data-testid": "wd-card-test", onClick: (e) => events.tap({}, { originEvent: e }), style: style, children: [showHeader ? (_jsx("div", { className: `${classPrefix}-card__header`, "data-testid": "wd-card-header-test", children: headerSlot })) : null, _jsx("div", { className: `${classPrefix}-card__body ${!showFooter ? 'is-footer' : ''} ${contentState !== 'show' ? 'hide' : ''}`, "data-testid": "wd-card-body-test", children: contentSlot }), showFooter ? (_jsx("div", { className: `${classPrefix}-card__footer`, "data-testid": "wd-card-footer-test", children: footerSlot })) : null] }));
|
|
45
45
|
});
|