@cloudbase/weda-ui 3.20.6 → 3.21.1

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.
@@ -0,0 +1,62 @@
1
+ import { Simplify, Static } from '../type-utils';
2
+ declare const data: import("@sinclair/typebox").TObject<{
3
+ interval: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
4
+ vertical: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
5
+ autoplay: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
6
+ loop: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
7
+ indicatorActiveColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
8
+ indicatorColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
9
+ duration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
10
+ current: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
11
+ circular: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
12
+ indicatorDots: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
13
+ layoutType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
14
+ transformType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
15
+ previousMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
16
+ nextMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
17
+ easingFunction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
18
+ }>;
19
+ declare const config: {
20
+ readonly $schema: "https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json";
21
+ readonly data: import("@sinclair/typebox").TObject<{
22
+ interval: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
23
+ vertical: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
24
+ autoplay: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
25
+ loop: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
26
+ indicatorActiveColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
+ indicatorColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
28
+ duration: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
29
+ current: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
30
+ circular: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
31
+ indicatorDots: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
32
+ layoutType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<string>>;
33
+ transformType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
34
+ previousMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
35
+ nextMargin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
36
+ easingFunction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
37
+ }>;
38
+ readonly events: readonly [{
39
+ readonly name: "change";
40
+ readonly title: "切换";
41
+ readonly description: "通过事件可以获取到当前选中的轮播项,在该事件的处理方法中可以通过 event.detail.current 来获取当前轮播项所在的index";
42
+ readonly detail: import("@sinclair/typebox").TObject<{
43
+ current: import("@sinclair/typebox").TString;
44
+ }>;
45
+ }];
46
+ readonly meta: {
47
+ readonly name: "swiper";
48
+ readonly title: "轮播容器";
49
+ readonly description: "用于快速在页面搭建轮播图展示效果,并支持轮播图的跳转、播放配置。";
50
+ readonly category: "布局";
51
+ readonly categoryOrder: 200;
52
+ readonly componentOrder: 90;
53
+ readonly figureIcon: "../figureIcons/Swiper.svg";
54
+ readonly icon: "../icons/Swiper.svg";
55
+ readonly propertyPanelTips: "轮播容器组件在小程序侧使用时,建议给组件设置一个高度,否则按照小程序swiper组件默认高度渲染";
56
+ readonly docsUrl: "https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/Swiper";
57
+ };
58
+ readonly isContainer: true;
59
+ readonly mpOrigin: "swiper";
60
+ };
61
+ export default config;
62
+ export type DataType = Simplify<Static<typeof data>>;
@@ -0,0 +1,182 @@
1
+ import { defineConfig, Type } from '../type-utils';
2
+ const data = Type.Object({
3
+ interval: Type.Optional(Type.Number({
4
+ title: '自动切换时间间隔(毫秒)',
5
+ default: 5000,
6
+ 'x-index': 10,
7
+ 'x-category': '基础属性',
8
+ description: '配置轮播图滚动的时间间隔,时间单位为ms',
9
+ })),
10
+ vertical: Type.Optional(Type.Boolean({
11
+ title: '纵向轮播',
12
+ default: false,
13
+ 'x-index': 20,
14
+ 'x-category': '基础属性',
15
+ description: '开启后,轮播的滚动方式将会由横向滚动变更为纵向滚动',
16
+ })),
17
+ autoplay: Type.Optional(Type.Boolean({
18
+ title: '自动播放',
19
+ default: true,
20
+ 'x-index': 25,
21
+ 'x-category': '基础属性',
22
+ description: '开启后,轮播图将会自动根据配置的时间间隔进行自动滚动,关闭后则轮播图仅支持通过点击锚点的方式进行切换',
23
+ })),
24
+ loop: Type.Optional(Type.Boolean({
25
+ title: '循环切换',
26
+ default: true,
27
+ 'x-index': 30,
28
+ 'x-category': '基础属性',
29
+ description: '开启之后,轮播图支持循环切换。',
30
+ 'x-helper-text': '开启之后,轮播图支持循环切换,仅web端生效。',
31
+ 'x-platforms': ['WEB'],
32
+ })),
33
+ indicatorActiveColor: Type.Optional(Type.String({
34
+ title: '锚点激活色',
35
+ default: 'rgba(0, 0, 0, 0.9)',
36
+ 'x-index': 40,
37
+ 'x-category': '高级属性',
38
+ description: '更改锚点选中时的颜色',
39
+ 'x-component': 'color',
40
+ })),
41
+ indicatorColor: Type.Optional(Type.String({
42
+ title: '锚点颜色',
43
+ 'x-component': 'color',
44
+ default: 'rgba(200, 200, 200, 0.9)',
45
+ 'x-index': 50,
46
+ 'x-category': '高级属性',
47
+ description: '更改锚点普通状态下的颜色',
48
+ })),
49
+ duration: Type.Optional(Type.Number({
50
+ title: '滑动动画时长',
51
+ default: 500,
52
+ 'x-index': 60,
53
+ 'x-category': '高级属性',
54
+ description: '更改轮播图切换时的滑动动画时长',
55
+ })),
56
+ current: Type.Optional(Type.Number({
57
+ title: '当前所在滑块的 index',
58
+ default: 0,
59
+ 'x-index': 70,
60
+ 'x-category': '高级属性',
61
+ description: '更改轮播图的默认展示位置,0为默认展示第一张轮播图,以此类推',
62
+ })),
63
+ circular: Type.Optional(Type.Boolean({
64
+ title: '衔接滑动',
65
+ default: true,
66
+ 'x-index': 80,
67
+ 'x-category': '高级属性',
68
+ description: '是否采用衔接滑动',
69
+ 'x-helper-text': '关闭后,将无法循环滑动,仅小程序端生效。',
70
+ 'x-platforms': ['MP'],
71
+ })),
72
+ indicatorDots: Type.Optional(Type.Boolean({
73
+ title: '导航锚点',
74
+ default: true,
75
+ 'x-index': 100,
76
+ 'x-category': '高级属性',
77
+ description: '开启/关闭轮播图锚点',
78
+ })),
79
+ layoutType: Type.Optional(Type.StringEnum({
80
+ title: '渲染模式',
81
+ default: 'normal',
82
+ 'x-index': 110,
83
+ 'x-category': '高级属性',
84
+ description: '渲染模式,小程序 Skyline 特有属性',
85
+ enum: [
86
+ { value: 'normal', label: '默认方式' },
87
+ { value: 'stackLeft', label: '左向堆叠' },
88
+ { value: 'stackRight', label: '右向堆叠' },
89
+ { value: 'tinder', label: '滑动卡片' },
90
+ { value: 'transformer', label: '过渡动画' },
91
+ ],
92
+ 'x-linkages': [
93
+ {
94
+ type: 'value:visible',
95
+ target: 'transformType',
96
+ condition: "{{$self.value=='transformer'}}",
97
+ },
98
+ ],
99
+ 'x-platforms': ['MP'],
100
+ })),
101
+ transformType: Type.Optional(Type.String({
102
+ title: '指定动画类型',
103
+ default: 'scaleAndFade',
104
+ 'x-index': 120,
105
+ 'x-category': '高级属性',
106
+ description: 'layout-type 为 transformer 时指定动画类型,小程序 Skyline 特有属性',
107
+ enum: [
108
+ { value: 'scaleAndFade', label: 'scaleAndFade' },
109
+ { value: 'accordion', label: 'accordion' },
110
+ { value: 'threeD', label: 'threeD' },
111
+ { value: 'zoomIn', label: 'zoomIn' },
112
+ { value: 'zoomOut', label: 'zoomOut' },
113
+ { value: 'deepthPage', label: 'deepthPage' },
114
+ ],
115
+ 'x-platforms': ['MP'],
116
+ })),
117
+ previousMargin: Type.Optional(Type.String({
118
+ title: '前边距',
119
+ type: 'string',
120
+ default: '0px',
121
+ 'x-index': 130,
122
+ 'x-category': '高级属性',
123
+ description: '前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值',
124
+ 'x-platforms': ['MP'],
125
+ })),
126
+ nextMargin: Type.Optional(Type.String({
127
+ title: '后边距',
128
+ type: 'string',
129
+ default: '0px',
130
+ 'x-index': 140,
131
+ 'x-category': '高级属性',
132
+ description: '后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值',
133
+ 'x-platforms': ['MP'],
134
+ })),
135
+ easingFunction: Type.Optional(Type.String({
136
+ title: '缓动动画类型',
137
+ type: 'string',
138
+ default: 'default',
139
+ 'x-index': 150,
140
+ 'x-category': '高级属性',
141
+ description: '指定 swiper 切换缓动动画类型',
142
+ 'x-platforms': ['MP'],
143
+ enum: [
144
+ { value: 'default', label: '默认缓动函数' },
145
+ { value: 'linear', label: '线性动画' },
146
+ { value: 'easeInCubic', label: '缓入动画' },
147
+ { value: 'easeOutCubic', label: '缓出动画' },
148
+ { value: 'easeInOutCubic', label: '缓入缓出动画' },
149
+ ],
150
+ })),
151
+ });
152
+ const config = defineConfig({
153
+ $schema: 'https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json',
154
+ data,
155
+ events: [
156
+ {
157
+ name: 'change',
158
+ title: '切换',
159
+ description: '通过事件可以获取到当前选中的轮播项,在该事件的处理方法中可以通过 event.detail.current 来获取当前轮播项所在的index',
160
+ detail: Type.Object({
161
+ current: Type.String({
162
+ title: '当前轮播项所在的index',
163
+ }),
164
+ }),
165
+ },
166
+ ],
167
+ meta: {
168
+ name: 'swiper',
169
+ title: '轮播容器',
170
+ description: '用于快速在页面搭建轮播图展示效果,并支持轮播图的跳转、播放配置。',
171
+ category: '布局',
172
+ categoryOrder: 200,
173
+ componentOrder: 90,
174
+ figureIcon: '../figureIcons/Swiper.svg',
175
+ icon: '../icons/Swiper.svg',
176
+ propertyPanelTips: '轮播容器组件在小程序侧使用时,建议给组件设置一个高度,否则按照小程序swiper组件默认高度渲染',
177
+ docsUrl: 'https://docs.cloudbase.net/lowcode/components/wedaUI/src/docs/compsdocs/grid/Swiper',
178
+ },
179
+ isContainer: true,
180
+ mpOrigin: 'swiper',
181
+ });
182
+ export default config;
@@ -111,6 +111,13 @@ declare const config: {
111
111
  description: string;
112
112
  }[];
113
113
  readonly methods: readonly [{
114
+ readonly name: "setValue";
115
+ readonly label: "设置值";
116
+ readonly params: import("@sinclair/typebox").TObject<{
117
+ value: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
118
+ }>;
119
+ readonly description: "通过 $w.cascader1.setValue(['bj','cy']) 设置组件值";
120
+ }, {
114
121
  name: string;
115
122
  label: string;
116
123
  params: {
@@ -158,13 +165,6 @@ declare const config: {
158
165
  name: string;
159
166
  label: string;
160
167
  description: string;
161
- }, {
162
- readonly name: "setValue";
163
- readonly label: "设置值";
164
- readonly params: import("@sinclair/typebox").TObject<{
165
- value: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
166
- }>;
167
- readonly description: "通过 $w.cascader1.setValue(['bj','cy']) 设置组件值";
168
168
  }];
169
169
  readonly events: readonly [{
170
170
  name: string;
@@ -139,13 +139,6 @@ const config = defineConfig({
139
139
  properties,
140
140
  classes,
141
141
  methods: [
142
- // FORM_ITEM_METHODS.setValue,
143
- FORM_ITEM_METHODS.setVisible,
144
- FORM_ITEM_METHODS.setDisabled,
145
- FORM_ITEM_METHODS.clearValue,
146
- FORM_ITEM_METHODS.setReadOnly,
147
- FORM_ITEM_METHODS.handleValidate,
148
- FORM_ITEM_METHODS.clearValidate,
149
142
  {
150
143
  name: 'setValue',
151
144
  label: '设置值',
@@ -157,6 +150,12 @@ const config = defineConfig({
157
150
  }),
158
151
  description: "通过 $w.cascader1.setValue(['bj','cy']) 设置组件值",
159
152
  },
153
+ FORM_ITEM_METHODS.setVisible,
154
+ FORM_ITEM_METHODS.setDisabled,
155
+ FORM_ITEM_METHODS.clearValue,
156
+ FORM_ITEM_METHODS.setReadOnly,
157
+ FORM_ITEM_METHODS.handleValidate,
158
+ FORM_ITEM_METHODS.clearValidate,
160
159
  ],
161
160
  events: [
162
161
  FORM_ITEM_EVENTS.change,
@@ -143,6 +143,13 @@ declare const _default: {
143
143
  readonly description: "可以为小程序端的表单编写样式";
144
144
  }];
145
145
  readonly methods: readonly [{
146
+ readonly name: "setValue";
147
+ readonly label: "设置值";
148
+ readonly params: import("@sinclair/typebox").TObject<{
149
+ value: import("@sinclair/typebox").TObject<{}>;
150
+ }>;
151
+ readonly description: "通过 $w.form1.setValue({a:'111'}) 设置组件值";
152
+ }, {
146
153
  readonly name: "submit";
147
154
  readonly label: "提交";
148
155
  readonly description: "通过 $w.<id>.submit() 触发表单提交";
@@ -570,12 +570,6 @@ const properties = Type.Composite([
570
570
  }),
571
571
  }),
572
572
  ]);
573
- // const templateExpr = `
574
- // {{#if (helper_utils '===' $self.attributes.datasourceType 'expression')}}
575
- // [attributes]
576
- // ':value': "{}"
577
- // {{/if}}
578
- // `;
579
573
  export default defineConfig({
580
574
  $schema: 'https://comp-public-replace-1303824488-cos.weda.tencent.com/schema/lcds_component.json',
581
575
  data,
@@ -610,6 +604,18 @@ export default defineConfig({
610
604
  },
611
605
  ],
612
606
  methods: [
607
+ {
608
+ name: 'setValue',
609
+ label: '设置值',
610
+ params: Type.Object({
611
+ value: Type.Object({}, {
612
+ title: '值',
613
+ description: '表单的值',
614
+ default: {},
615
+ }),
616
+ }),
617
+ description: "通过 $w.form1.setValue({a:'111'}) 设置组件值",
618
+ },
613
619
  {
614
620
  name: 'submit',
615
621
  label: '提交',
@@ -86,6 +86,8 @@ declare const data: import("@sinclair/typebox").TObject<{
86
86
  emptyText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
87
87
  rowColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
88
88
  isSuspendHeader: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
89
+ enableBottomTipSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
90
+ row: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
89
91
  enablePagination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
90
92
  enableGlobalButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
91
93
  enableRefreshBtn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -184,6 +186,8 @@ declare const config: {
184
186
  emptyText: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
185
187
  rowColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
186
188
  isSuspendHeader: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
189
+ enableBottomTipSlot: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
190
+ row: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<import("react").ReactNode>>;
187
191
  enablePagination: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
188
192
  enableGlobalButton: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
189
193
  enableRefreshBtn: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
@@ -1376,12 +1376,31 @@ const data = Type.Object({
1376
1376
  })),
1377
1377
  isSuspendHeader: Type.Optional(Type.Boolean({
1378
1378
  title: '表头在页面顶部悬停',
1379
- 'x-index': 173,
1379
+ 'x-index': 171,
1380
1380
  'x-group': '表格行',
1381
1381
  'x-runtime-default': true,
1382
1382
  'x-helper-text': '仅PC端有效;且可能因为父级组件的样式干扰,导致该属性失效',
1383
1383
  description: '如无法生效,请确保祖先元素没有设置overflow属性为hidden、scroll或auto。这些属性会导致position: sticky失效。另外,如果页面已经有fixed的元素,那么悬停有可能会看不到,需要通过样式手动调整下悬停的位置',
1384
1384
  })),
1385
+ enableBottomTipSlot: Type.Optional(Type.Boolean({
1386
+ title: '开启表格底部内容插槽',
1387
+ type: 'boolean',
1388
+ 'x-index': 172,
1389
+ 'x-runtime-default': false,
1390
+ 'x-group': '表格行',
1391
+ description: '开启后,可支持表格底部内容插槽',
1392
+ })),
1393
+ row: Type.Optional(Type.Slot({
1394
+ title: '表格底部内容插槽',
1395
+ type: 'slot',
1396
+ 'x-group': '表格行',
1397
+ 'x-index': 173,
1398
+ 'x-slot-auto': {
1399
+ iterable: "{{ $form.values.enableBottomTipSlot ?[{key:'_bottom__slot',title:'表格底部内容插槽'}]:[] }}",
1400
+ generator: '{{ {key:$item.key, title: ($item.title) } }}',
1401
+ reservedSlots: "{{$form.values.columnSets.filter(item => item.genre === 'slot'&& (item.slotKey||item.key)).map(item => ('cell_'+item.slotKey||item.key)).concat('cell__custom__option','globalButton','__innerSlot') }}",
1402
+ },
1403
+ })),
1385
1404
  enablePagination: Type.Optional(Type.Boolean({
1386
1405
  title: '显示分页器',
1387
1406
  type: 'boolean',
@@ -1432,6 +1451,7 @@ const data = Type.Object({
1432
1451
  'x-slot-auto': {
1433
1452
  iterable: "{{ $form.values.columnSets.filter(item => item.genre === 'slot'&& (item.slotKey||item.key)) }}",
1434
1453
  generator: "{{ {key:$item.slotKey||$item.key, title: ('自定义列: '+$item.header) } }}",
1454
+ reservedSlots: ['globalButton', 'cell__custom__option', 'row__bottom__slot'],
1435
1455
  },
1436
1456
  'x-slot-scope': {
1437
1457
  record: {