Skip to content

Commit 6fd8ad3

Browse files
committed
Merge branch 'develop' of https://github.com/betterdancing/tiny-engine into feat/ai-completions
2 parents c50a081 + 898ab86 commit 6fd8ad3

31 files changed

Lines changed: 1642 additions & 31 deletions

File tree

designer-demo/public/mock/bundle.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4433,18 +4433,19 @@
44334433
"bindState": true,
44344434
"label": {
44354435
"text": {
4436-
"zh_CN": "资源"
4436+
"zh_CN": "资源选择"
44374437
}
44384438
},
44394439
"cols": 12,
44404440
"rules": [],
44414441
"widget": {
4442-
"component": "InputConfigurator",
4442+
"component": "SourceSelectConfigurator",
44434443
"props": {}
44444444
},
44454445
"description": {
44464446
"zh_CN": "src路径"
4447-
}
4447+
},
4448+
"labelPosition": "top"
44484449
},
44494450
{
44504451
"property": "attributes3",

packages/build/vite-config/src/vite-plugins/devAliasPlugin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const getDevAlias = (useSourceAlias) => {
2929
'@opentiny/tiny-engine-plugin-bridge': path.resolve(basePath, 'packages/plugins/bridge/index.ts'),
3030
'@opentiny/tiny-engine-plugin-tutorial': path.resolve(basePath, 'packages/plugins/tutorial/index.ts'),
3131
'@opentiny/tiny-engine-plugin-robot': path.resolve(basePath, 'packages/plugins/robot/index.ts'),
32+
'@opentiny/tiny-engine-plugin-resource': path.resolve(basePath, 'packages/plugins/resource/index.ts'),
3233
'@opentiny/tiny-engine-plugin-model-manager': path.resolve(basePath, 'packages/plugins/model-manager/index.ts'),
3334
'@opentiny/tiny-engine-settings-panel': path.resolve(basePath, 'packages/settings/panel/index.ts'),
3435
'@opentiny/tiny-engine-setting-events': path.resolve(basePath, 'packages/settings/events/index.ts'),

packages/canvas/render/src/builtin/CanvasCollection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ return new Promise((resolve, reject) => {
183183
this.dataSourceMap.${sourceName}.load().then((res) => {
184184
// 如果按照数据源面板的建议格式编写dataHandler
185185
// 那么dataSourceMap的res格式应该是:{ code: string, msg: string, data: {items: any[], total: number} }
186-
resolve({ result: res.data.items, page: { total: res.data.total } });
186+
resolve({ result: res?.data?.items || res?.data?.data || res?.data, page: { total: res?.data?.total || res?.data?.data?.length || res?.data?.length } });
187187
});
188188
});
189189
}`

packages/canvas/render/src/builtin/builtin.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,15 +479,16 @@
479479
"bindState": true,
480480
"label": {
481481
"text": {
482-
"zh_CN": "src路径"
482+
"zh_CN": "资源选择"
483483
}
484484
},
485485
"cols": 12,
486486
"rules": [],
487487
"widget": {
488-
"component": "InputConfigurator",
488+
"component": "SourceSelectConfigurator",
489489
"props": {}
490-
}
490+
},
491+
"labelPosition": "top"
491492
}
492493
]
493494
}

packages/configurator/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import ModelApiConfigurator from './model-api-configurator/ModelApiConfigurator.
3535
import OperatorGroupConfigurator from './operator-group-configurator/OperatorGroupConfigurator.vue'
3636
import BasicTagConfigurator from './basic-tag-configurator/BasicTagConfigurator.vue'
3737
import ClassConfigurator from './class-configurator/ClassConfigurator.vue'
38+
import SourceSelectConfigurator from './source-select-configurator/SourceSelectConfigurator.vue'
3839

3940
import { I18nInput, MetaCodeEditor } from '@opentiny/tiny-engine-common'
4041
import './styles/vars.less'
@@ -77,6 +78,7 @@ export {
7778
OperatorGroupConfigurator,
7879
BasicTagConfigurator,
7980
ClassConfigurator,
81+
SourceSelectConfigurator,
8082
MetaCodeEditor,
8183
I18nInput as I18nConfigurator,
8284
MetaCodeEditor as CodeConfigurator,

packages/configurator/src/model-common/constants.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ export const typeComponentsMap = {
66
options: [
77
{
88
label: '是',
9-
value: true,
9+
value: true
1010
},
1111
{
1212
label: '否',
13-
value: false,
14-
},
13+
value: false
14+
}
1515
]
16-
},
16+
}
1717
},
18-
Date: { component: 'TinyDatePicker', props: { format: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd' }},
18+
Date: { component: 'TinyDatePicker', props: { format: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd' } },
1919
Number: { component: 'TinyNumeric' },
2020
Enum: {
2121
component: 'TinySelect'
22-
},
23-
};
22+
}
23+
}

0 commit comments

Comments
 (0)