@cicctencent/formily 0.0.0-stage → 0.0.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.
- package/.eslintrc.js +40 -0
- package/.prettierrc.js +28 -0
- package/.vscode/launch.json +23 -0
- package/CHANGELOG.md +8 -0
- package/README.md +22 -2
- package/babel.config.js +3 -0
- package/build/build.js +96 -0
- package/build/rollup.config.bundle.js +63 -0
- package/build/update.version.js +35 -0
- package/dist/index.css +2516 -0
- package/dist/index.js +8377 -0
- package/dist/schema-field/index.css +2466 -0
- package/dist/schema-field/index.js +8213 -0
- package/dist/transform/index.js +551 -0
- package/dist/validate/index.js +1104 -0
- package/dist/vue-form/index.css +2516 -0
- package/dist/vue-form/index.js +8359 -0
- package/docs/.vuepress/client.ts +15 -0
- package/docs/.vuepress/components/code-preview.vue +203 -0
- package/docs/.vuepress/components/highlight.ts +53 -0
- package/docs/.vuepress/config.ts +39 -0
- package/docs/.vuepress/util.ts +7 -0
- package/docs/README.md +30 -0
- package/docs/components/anyOf.md +26 -0
- package/docs/components/array-cards.md +12 -0
- package/docs/components/array-collapse.md +12 -0
- package/docs/components/array-items.md +12 -0
- package/docs/components/array-table.md +12 -0
- package/docs/components/array-tabs.md +16 -0
- package/docs/components/cascader.md +12 -0
- package/docs/components/checkbox.md +12 -0
- package/docs/components/event.md +27 -0
- package/docs/components/hotArea.md +25 -0
- package/docs/components/index.md +4 -0
- package/docs/components/input.md +30 -0
- package/docs/components/layout-group.md +19 -0
- package/docs/components/link.md +22 -0
- package/docs/components/oneOf.md +8 -0
- package/docs/components/radio.md +12 -0
- package/docs/components/rich-editor.md +21 -0
- package/docs/components/select.md +34 -0
- package/docs/components/space.md +11 -0
- package/docs/components/switch.md +20 -0
- package/docs/components/text.md +21 -0
- package/docs/components/time-picker.md +11 -0
- package/docs/components/transfer.md +14 -0
- package/docs/components/upload-button.md +28 -0
- package/docs/demos/any-of/index.vue +66 -0
- package/docs/demos/array-cards/index.vue +105 -0
- package/docs/demos/array-collapse/index.vue +155 -0
- package/docs/demos/array-items/index.vue +171 -0
- package/docs/demos/array-table/index.vue +115 -0
- package/docs/demos/array-tabs/index.vue +56 -0
- package/docs/demos/cascader/index.vue +297 -0
- package/docs/demos/checkbox/index.vue +39 -0
- package/docs/demos/event/index.vue +436 -0
- package/docs/demos/hotArea/index.vue +240 -0
- package/docs/demos/index.vue +36 -0
- package/docs/demos/input/index.vue +46 -0
- package/docs/demos/layout-group/index.vue +51 -0
- package/docs/demos/link/index.vue +32 -0
- package/docs/demos/radio/index.vue +36 -0
- package/docs/demos/rich-editor/index.vue +22 -0
- package/docs/demos/select/index.vue +76 -0
- package/docs/demos/space/index.vue +93 -0
- package/docs/demos/switch/index.vue +31 -0
- package/docs/demos/text/index.vue +38 -0
- package/docs/demos/time-picker/index.vue +39 -0
- package/docs/demos/transfer/index.vue +26 -0
- package/docs/demos/upload-button/index.vue +27 -0
- package/docs/demos/x-data/add-button-title.vue +101 -0
- package/docs/demos/x-data/send-message.vue +33 -0
- package/docs/demos/x-reactions/any-of.vue +40 -0
- package/docs/demos/x-reactions/x-reactions.vue +39 -0
- package/docs/guide/component-extend.md +23 -0
- package/docs/guide/extra-bury-report.md +64 -0
- package/docs/guide/schema.md +22 -0
- package/docs/guide/x-data.md +41 -0
- package/docs/guide/x-reactions.md +20 -0
- package/example/.browserslistrc +4 -0
- package/example/.eslintrc.js +20 -0
- package/example/README.md +24 -0
- package/example/index.html +15 -0
- package/example/jest.config.js +26 -0
- package/example/package.json +50 -0
- package/example/public/favicon.ico +0 -0
- package/example/public/index.html +17 -0
- package/example/src/App.vue +25 -0
- package/example/src/assets/logo.png +0 -0
- package/example/src/components/HelloWorld.vue +148 -0
- package/example/src/components/group/index.vue +16 -0
- package/example/src/components/uploadBtn/index.vue +44 -0
- package/example/src/components/uploadBtn/upload-icon.svg +6 -0
- package/example/src/layout/component/Aside.vue +39 -0
- package/example/src/layout/component/Main.vue +9 -0
- package/example/src/layout/index.vue +15 -0
- package/example/src/main.ts +17 -0
- package/example/src/router/index.ts +99 -0
- package/example/src/shims-vue.d.ts +6 -0
- package/example/src/store/index.ts +9 -0
- package/example/src/views/demo/any-of/data.ts +38 -0
- package/example/src/views/demo/any-of/index.vue +35 -0
- package/example/src/views/demo/array-cards/data.ts +65 -0
- package/example/src/views/demo/array-cards/index.vue +33 -0
- package/example/src/views/demo/array-items/data.ts +29 -0
- package/example/src/views/demo/array-items/index.vue +33 -0
- package/example/src/views/demo/cloud-button/data.ts +14 -0
- package/example/src/views/demo/cloud-button/index.vue +22 -0
- package/example/src/views/demo/color-group/data.ts +15 -0
- package/example/src/views/demo/color-group/index.vue +22 -0
- package/example/src/views/demo/color-picker/data.ts +21 -0
- package/example/src/views/demo/color-picker/index.vue +33 -0
- package/example/src/views/demo/datatime/data.ts +62 -0
- package/example/src/views/demo/datatime/index.vue +22 -0
- package/example/src/views/demo/event/data.ts +184 -0
- package/example/src/views/demo/event/index.vue +33 -0
- package/example/src/views/demo/hot-area/data.ts +196 -0
- package/example/src/views/demo/hot-area/index.vue +33 -0
- package/example/src/views/demo/input/data.ts +39 -0
- package/example/src/views/demo/input/index.vue +33 -0
- package/example/src/views/demo/link/data.ts +23 -0
- package/example/src/views/demo/link/index.vue +22 -0
- package/example/src/views/demo/one-of/data.ts +139 -0
- package/example/src/views/demo/one-of/index.vue +33 -0
- package/example/src/views/demo/rich-editor/data.ts +12 -0
- package/example/src/views/demo/rich-editor/index.vue +24 -0
- package/example/src/views/demo/select/data.ts +38 -0
- package/example/src/views/demo/select/index.vue +33 -0
- package/example/src/views/demo/upload-button/data1.ts +11 -0
- package/example/src/views/demo/upload-button/data2.ts +12 -0
- package/example/src/views/demo/upload-button/index.vue +42 -0
- package/example/tsconfig.json +32 -0
- package/example/vite.config.ts +12 -0
- package/jest.config.js +4 -0
- package/package.json +92 -4
- package/src/components/__builtins__/configs/index.ts +1 -0
- package/src/components/__builtins__/index.ts +2 -0
- package/src/components/__builtins__/shared/create-context.ts +54 -0
- package/src/components/__builtins__/shared/index.ts +7 -0
- package/src/components/__builtins__/shared/loading.ts +20 -0
- package/src/components/__builtins__/shared/portal.ts +43 -0
- package/src/components/__builtins__/shared/resolve-component.ts +22 -0
- package/src/components/__builtins__/shared/transform-component.ts +33 -0
- package/src/components/__builtins__/shared/types.ts +8 -0
- package/src/components/__builtins__/shared/utils.ts +35 -0
- package/src/components/__builtins__/styles/common.scss +22 -0
- package/src/components/__builtins__/styles/element-plus.scss +1094 -0
- package/src/components/any-of/index.ts +20 -0
- package/src/components/array-base/index.ts +413 -0
- package/src/components/array-base/style.scss +53 -0
- package/src/components/array-base/style.ts +2 -0
- package/src/components/array-cards/index.ts +253 -0
- package/src/components/array-cards/style.scss +33 -0
- package/src/components/array-cards/style.ts +7 -0
- package/src/components/array-collapse/index.ts +381 -0
- package/src/components/array-collapse/style.scss +38 -0
- package/src/components/array-collapse/style.ts +10 -0
- package/src/components/array-items/index.ts +213 -0
- package/src/components/array-items/style.scss +82 -0
- package/src/components/array-items/style.ts +4 -0
- package/src/components/array-table/index.ts +567 -0
- package/src/components/array-table/style.scss +84 -0
- package/src/components/array-table/style.ts +11 -0
- package/src/components/array-tabs/index.ts +141 -0
- package/src/components/array-tabs/style.scss +16 -0
- package/src/components/array-tabs/style.ts +5 -0
- package/src/components/base/AnyOf/index.ts +155 -0
- package/src/components/base/AnyOf/index.vue +111 -0
- package/src/components/base/CloudButton/index.ts +46 -0
- package/src/components/base/CloudButton/index.vue +128 -0
- package/src/components/base/ColorGroup/index.ts +57 -0
- package/src/components/base/ColorGroup/index.vue +30 -0
- package/src/components/base/ColorPicker/index.ts +45 -0
- package/src/components/base/ColorPicker/index.vue +50 -0
- package/src/components/base/Container/index.vue +39 -0
- package/src/components/base/HotArea/index.ts +698 -0
- package/src/components/base/HotArea/index.vue +565 -0
- package/src/components/base/HotArea/type.ts +18 -0
- package/src/components/base/Input/index.vue +150 -0
- package/src/components/base/LayoutGroup/index.vue +40 -0
- package/src/components/base/Link/index.vue +43 -0
- package/src/components/base/Middleware/index.ts +235 -0
- package/src/components/base/Middleware/index.vue +169 -0
- package/src/components/base/OneOf/index.ts +105 -0
- package/src/components/base/OneOf/index.vue +85 -0
- package/src/components/base/RichEditor/index.ts +13 -0
- package/src/components/base/RichEditor/index.vue +120 -0
- package/src/components/base/RichEditor/options.ts +24 -0
- package/src/components/base/Select/index.ts +106 -0
- package/src/components/base/Select/index.vue +161 -0
- package/src/components/base/Switch/index.vue +42 -0
- package/src/components/base/Text/index.vue +47 -0
- package/src/components/base/event/index.ts +226 -0
- package/src/components/base/event/index.vue +356 -0
- package/src/components/cascader/index.ts +48 -0
- package/src/components/cascader/style.ts +5 -0
- package/src/components/checkbox/index.ts +166 -0
- package/src/components/checkbox/style.ts +5 -0
- package/src/components/cloud-button/index.ts +21 -0
- package/src/components/color-group/index.ts +18 -0
- package/src/components/color-picker/index.ts +18 -0
- package/src/components/container/index.ts +18 -0
- package/src/components/data-time/index.ts +24 -0
- package/src/components/date-picker/index.ts +51 -0
- package/src/components/date-picker/style.ts +4 -0
- package/src/components/editable/index.ts +261 -0
- package/src/components/editable/style.scss +55 -0
- package/src/components/editable/style.ts +5 -0
- package/src/components/el-form-item/index.ts +21 -0
- package/src/components/el-form-item/style.ts +3 -0
- package/src/components/event/index.ts +16 -0
- package/src/components/form/index.ts +94 -0
- package/src/components/form/style.scss +0 -0
- package/src/components/form/style.ts +3 -0
- package/src/components/form-button-group/index.ts +74 -0
- package/src/components/form-button-group/style.scss +0 -0
- package/src/components/form-button-group/style.ts +4 -0
- package/src/components/form-collapse/index.ts +215 -0
- package/src/components/form-collapse/style.scss +6 -0
- package/src/components/form-collapse/style.ts +4 -0
- package/src/components/form-dialog/index.ts +433 -0
- package/src/components/form-dialog/style.ts +4 -0
- package/src/components/form-drawer/index.ts +424 -0
- package/src/components/form-drawer/style.scss +21 -0
- package/src/components/form-drawer/style.ts +4 -0
- package/src/components/form-grid/index.ts +181 -0
- package/src/components/form-grid/style.scss +5 -0
- package/src/components/form-grid/style.ts +1 -0
- package/src/components/form-item/animation.scss +72 -0
- package/src/components/form-item/grid.scss +171 -0
- package/src/components/form-item/index.ts +642 -0
- package/src/components/form-item/style.scss +521 -0
- package/src/components/form-item/style.ts +2 -0
- package/src/components/form-item/var.scss +17 -0
- package/src/components/form-layout/index.ts +161 -0
- package/src/components/form-layout/style.scss +6 -0
- package/src/components/form-layout/style.ts +1 -0
- package/src/components/form-layout/useResponsiveFormLayout.ts +118 -0
- package/src/components/form-step/index.ts +210 -0
- package/src/components/form-step/style.ts +2 -0
- package/src/components/form-tab/index.ts +172 -0
- package/src/components/form-tab/style.scss +6 -0
- package/src/components/form-tab/style.ts +4 -0
- package/src/components/hot-area/index.ts +20 -0
- package/src/components/index.ts +49 -0
- package/src/components/input/index.ts +35 -0
- package/src/components/input/style.ts +4 -0
- package/src/components/input-number/index.ts +36 -0
- package/src/components/input-number/style.ts +3 -0
- package/src/components/layout-group/index.ts +18 -0
- package/src/components/link/index.ts +18 -0
- package/src/components/middleware/index.ts +21 -0
- package/src/components/one-of/index.ts +20 -0
- package/src/components/placeholder-input/index.ts +21 -0
- package/src/components/placeholder-input/index.vue +87 -0
- package/src/components/preview-text/index.ts +303 -0
- package/src/components/preview-text/style.ts +9 -0
- package/src/components/radio/index.ts +109 -0
- package/src/components/radio/style.ts +3 -0
- package/src/components/reset/index.ts +52 -0
- package/src/components/reset/style.ts +1 -0
- package/src/components/rich-editor/index.ts +18 -0
- package/src/components/row/index.ts +20 -0
- package/src/components/row/index.vue +53 -0
- package/src/components/select/index.ts +19 -0
- package/src/components/select/style.ts +5 -0
- package/src/components/space/index.ts +98 -0
- package/src/components/space/style.scss +24 -0
- package/src/components/space/style.ts +1 -0
- package/src/components/submit/index.ts +59 -0
- package/src/components/submit/style.ts +1 -0
- package/src/components/switch/index.ts +9 -0
- package/src/components/switch/style.ts +1 -0
- package/src/components/text/index.ts +21 -0
- package/src/components/time-picker/index.ts +21 -0
- package/src/components/time-picker/style.ts +4 -0
- package/src/components/transfer/index.ts +12 -0
- package/src/components/transfer/style.ts +1 -0
- package/src/components/upload/index.ts +136 -0
- package/src/components/upload/style.ts +2 -0
- package/src/components/upload-button/index.ts +21 -0
- package/src/components/upload-button/index.vue +199 -0
- package/src/createScemaField.ts +14 -0
- package/src/index.ts +41 -0
- package/src/schema-field/index.ts +11 -0
- package/src/scope.ts +29 -0
- package/src/transform/core.ts +404 -0
- package/src/transform/index.ts +11 -0
- package/src/transform/transform.ts +59 -0
- package/src/transform/utils/constant.ts +79 -0
- package/src/transform/utils/func.ts +145 -0
- package/src/typings/common.ts +37 -0
- package/src/typings/vue-shim.d.ts +7 -0
- package/src/typings/vue-test-utils.d.ts +11 -0
- package/src/utils/anyof_utils.ts +95 -0
- package/src/utils/common.ts +15 -0
- package/src/validate/index.ts +648 -0
- package/src/validate/utils/constant.ts +2 -0
- package/src/vue-form/index.ts +18 -0
- package/src/vue-form/index.vue +106 -0
- package/src/vue-form/useForm.ts +112 -0
- package/tests/data/anyof.ts +40 -0
- package/tests/data/image.ts +472 -0
- package/tests/fixtures/validate.ts +63 -0
- package/tests/unit/transform.spec.ts +253 -0
- package/tests/unit/utils.spec.ts +10 -0
- package/tests/unit/validate.spec.ts +256 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
type: 'object',
|
|
3
|
+
properties: {
|
|
4
|
+
datetime: {
|
|
5
|
+
title: 'datetime',
|
|
6
|
+
type: 'string',
|
|
7
|
+
'x-component': 'DatePicker',
|
|
8
|
+
'x-component-props': {
|
|
9
|
+
type: 'datetime',
|
|
10
|
+
format: 'YYYY/MM/DD HH:mm:ss',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
year: {
|
|
14
|
+
title: 'year',
|
|
15
|
+
type: 'string',
|
|
16
|
+
'x-component': 'DatePicker',
|
|
17
|
+
'x-component-props': {
|
|
18
|
+
type: 'year',
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
month: {
|
|
22
|
+
title: 'month',
|
|
23
|
+
type: 'string',
|
|
24
|
+
'x-component': 'DatePicker',
|
|
25
|
+
'x-component-props': {
|
|
26
|
+
type: 'month',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
date: {
|
|
30
|
+
title: 'date',
|
|
31
|
+
type: 'string',
|
|
32
|
+
'x-component': 'DatePicker',
|
|
33
|
+
'x-component-props': {
|
|
34
|
+
type: 'date',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
week: {
|
|
38
|
+
title: 'week',
|
|
39
|
+
type: 'string',
|
|
40
|
+
'x-component': 'DatePicker',
|
|
41
|
+
'x-component-props': {
|
|
42
|
+
type: 'week',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
datetimerange: {
|
|
46
|
+
title: 'datetimerange',
|
|
47
|
+
type: 'string',
|
|
48
|
+
'x-component': 'DatePicker',
|
|
49
|
+
'x-component-props': {
|
|
50
|
+
type: 'datetimerange',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
daterange: {
|
|
54
|
+
title: 'daterange',
|
|
55
|
+
type: 'string',
|
|
56
|
+
'x-component': 'DatePicker',
|
|
57
|
+
'x-component-props': {
|
|
58
|
+
type: 'daterange',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="demo-wrap">
|
|
3
|
+
<VueForm
|
|
4
|
+
@on-change="onChange"
|
|
5
|
+
:schema="schema"
|
|
6
|
+
:modelValue="values"
|
|
7
|
+
></VueForm>
|
|
8
|
+
value:{{ values }}
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { VueForm } from '@jt/formily/src/vue-form';
|
|
14
|
+
import { ref, reactive } from 'vue';
|
|
15
|
+
import schema from './data';
|
|
16
|
+
const values = ref({});
|
|
17
|
+
|
|
18
|
+
function onChange(val) {
|
|
19
|
+
console.log('onChange', val);
|
|
20
|
+
values.value = val;
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
type: 'object',
|
|
3
|
+
properties: {
|
|
4
|
+
event: {
|
|
5
|
+
type: 'object',
|
|
6
|
+
'x-component': 'Event',
|
|
7
|
+
'x-component-props': {
|
|
8
|
+
schema: {
|
|
9
|
+
list: {
|
|
10
|
+
type: 'array',
|
|
11
|
+
'ui:hidden': false,
|
|
12
|
+
items: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
required: ['type'],
|
|
15
|
+
properties: {
|
|
16
|
+
type: {
|
|
17
|
+
title: '事件类型',
|
|
18
|
+
enum: ['click'],
|
|
19
|
+
enumNames: ['单击时触发'],
|
|
20
|
+
},
|
|
21
|
+
middlewares: {
|
|
22
|
+
title: '前置执行程序',
|
|
23
|
+
type: 'array',
|
|
24
|
+
items: {
|
|
25
|
+
type: 'object',
|
|
26
|
+
oneOf: [
|
|
27
|
+
{
|
|
28
|
+
title: '检查用户是否风测',
|
|
29
|
+
properties: {
|
|
30
|
+
name: {
|
|
31
|
+
'ui:hidden': true,
|
|
32
|
+
const: 'goTovRiskEvaluate',
|
|
33
|
+
default:
|
|
34
|
+
'goTovRiskEvaluate',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title: '理财通授权-联系顾问',
|
|
40
|
+
properties: {
|
|
41
|
+
name: {
|
|
42
|
+
'ui:hidden': true,
|
|
43
|
+
const: 'goWithConsultDetail',
|
|
44
|
+
default:
|
|
45
|
+
'goWithConsultDetail',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
handler: {
|
|
53
|
+
title: '事件名称',
|
|
54
|
+
type: 'object',
|
|
55
|
+
oneOf: [
|
|
56
|
+
{
|
|
57
|
+
title: '进入专区',
|
|
58
|
+
properties: {
|
|
59
|
+
name: {
|
|
60
|
+
type: 'string',
|
|
61
|
+
'ui:hidden': true,
|
|
62
|
+
const: 'goToHome',
|
|
63
|
+
default: 'goToHome',
|
|
64
|
+
},
|
|
65
|
+
options: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
required: [
|
|
68
|
+
'buryReportName',
|
|
69
|
+
],
|
|
70
|
+
properties: {
|
|
71
|
+
buryReportName: {
|
|
72
|
+
default: '',
|
|
73
|
+
title: '埋点名',
|
|
74
|
+
description:
|
|
75
|
+
'埋点中文名',
|
|
76
|
+
type: 'string',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
title: '跳转小程序',
|
|
84
|
+
properties: {
|
|
85
|
+
name: {
|
|
86
|
+
type: 'string',
|
|
87
|
+
'ui:hidden': true,
|
|
88
|
+
const: 'goToMiniProgram',
|
|
89
|
+
default: 'goToMiniProgram',
|
|
90
|
+
},
|
|
91
|
+
options: {
|
|
92
|
+
type: 'object',
|
|
93
|
+
required: [
|
|
94
|
+
'buryReportName',
|
|
95
|
+
],
|
|
96
|
+
properties: {
|
|
97
|
+
buryReportName: {
|
|
98
|
+
default: '',
|
|
99
|
+
title: '埋点名',
|
|
100
|
+
description:
|
|
101
|
+
'埋点中文名',
|
|
102
|
+
type: 'string',
|
|
103
|
+
},
|
|
104
|
+
url: {
|
|
105
|
+
title: '跳转路径(只在内嵌小程序场景生效!)',
|
|
106
|
+
type: 'string',
|
|
107
|
+
'err:required':
|
|
108
|
+
'必须输入跳转路径🔗',
|
|
109
|
+
default: '',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
title: '页面跳转',
|
|
117
|
+
properties: {
|
|
118
|
+
name: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
'ui:hidden': true,
|
|
121
|
+
const: 'goToPage',
|
|
122
|
+
default: 'goToPage',
|
|
123
|
+
},
|
|
124
|
+
options: {
|
|
125
|
+
type: 'object',
|
|
126
|
+
required: [
|
|
127
|
+
'buryReportName',
|
|
128
|
+
],
|
|
129
|
+
properties: {
|
|
130
|
+
buryReportName: {
|
|
131
|
+
default: '',
|
|
132
|
+
title: '埋点名',
|
|
133
|
+
description:
|
|
134
|
+
'埋点中文名',
|
|
135
|
+
type: 'string',
|
|
136
|
+
},
|
|
137
|
+
url: {
|
|
138
|
+
title: '跳转链接',
|
|
139
|
+
type: 'string',
|
|
140
|
+
'err:required':
|
|
141
|
+
'必须输入跳转链接🔗',
|
|
142
|
+
default: '',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
title: '联系投顾弹框',
|
|
150
|
+
properties: {
|
|
151
|
+
name: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
'ui:hidden': true,
|
|
154
|
+
const: 'showCconsultPanel',
|
|
155
|
+
default:
|
|
156
|
+
'showCconsultPanel',
|
|
157
|
+
},
|
|
158
|
+
options: {
|
|
159
|
+
type: 'object',
|
|
160
|
+
required: [
|
|
161
|
+
'buryReportName',
|
|
162
|
+
],
|
|
163
|
+
properties: {
|
|
164
|
+
buryReportName: {
|
|
165
|
+
default: '',
|
|
166
|
+
title: '埋点名',
|
|
167
|
+
description:
|
|
168
|
+
'埋点中文名',
|
|
169
|
+
type: 'string',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="demo-wrap">
|
|
3
|
+
<VueForm
|
|
4
|
+
@on-change="onChange"
|
|
5
|
+
:schema="schema"
|
|
6
|
+
:modelValue="values"
|
|
7
|
+
@fileUpload="onFileUpload"
|
|
8
|
+
></VueForm>
|
|
9
|
+
|
|
10
|
+
<div>[value]: {{ values }}</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { VueForm } from '@jt/formily/src/vue-form';
|
|
16
|
+
import { ref } from 'vue';
|
|
17
|
+
import schema from './data';
|
|
18
|
+
|
|
19
|
+
const values = ref({});
|
|
20
|
+
/**
|
|
21
|
+
* file 上传的文件
|
|
22
|
+
* done 上传成功回调方法
|
|
23
|
+
*/
|
|
24
|
+
function onFileUpload(file: any, done: any) {
|
|
25
|
+
done(
|
|
26
|
+
'https://jt-test-1301270551.cos.ap-guangzhou.myqcloud.com/create-server/test/c3c3bc/6661658229463019.jpg'
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function onChange(val: any) {
|
|
30
|
+
console.log('onChange', val);
|
|
31
|
+
values.value = val;
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
type: 'object',
|
|
3
|
+
properties: {
|
|
4
|
+
imgUrl: {
|
|
5
|
+
title: '图片地址',
|
|
6
|
+
type: 'string',
|
|
7
|
+
'x-component': 'UploadButton',
|
|
8
|
+
'x-decorator': 'FormItem',
|
|
9
|
+
},
|
|
10
|
+
hotArea: {
|
|
11
|
+
title: '',
|
|
12
|
+
type: 'array',
|
|
13
|
+
'x-component': 'HotArea',
|
|
14
|
+
'x-decorator': 'FormItem',
|
|
15
|
+
'x-component-props': {
|
|
16
|
+
event: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
list: {
|
|
20
|
+
type: 'array',
|
|
21
|
+
'ui:hidden': false,
|
|
22
|
+
items: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
required: ['type'],
|
|
25
|
+
properties: {
|
|
26
|
+
type: {
|
|
27
|
+
title: '事件类型',
|
|
28
|
+
enum: ['click'],
|
|
29
|
+
enumNames: ['单击时触发'],
|
|
30
|
+
},
|
|
31
|
+
middlewares: {
|
|
32
|
+
title: '前置执行程序',
|
|
33
|
+
type: 'array',
|
|
34
|
+
items: {
|
|
35
|
+
type: 'object',
|
|
36
|
+
oneOf: [
|
|
37
|
+
{
|
|
38
|
+
title: '检查用户是否风测',
|
|
39
|
+
properties: {
|
|
40
|
+
name: {
|
|
41
|
+
'ui:hidden': true,
|
|
42
|
+
const: 'goTovRiskEvaluate',
|
|
43
|
+
default:
|
|
44
|
+
'goTovRiskEvaluate',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
title: '理财通授权-联系顾问',
|
|
50
|
+
properties: {
|
|
51
|
+
name: {
|
|
52
|
+
'ui:hidden': true,
|
|
53
|
+
const: 'goWithConsultDetail',
|
|
54
|
+
default:
|
|
55
|
+
'goWithConsultDetail',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
handler: {
|
|
63
|
+
title: '事件名称',
|
|
64
|
+
type: 'object',
|
|
65
|
+
oneOf: [
|
|
66
|
+
{
|
|
67
|
+
title: '进入专区',
|
|
68
|
+
properties: {
|
|
69
|
+
name: {
|
|
70
|
+
type: 'string',
|
|
71
|
+
'ui:hidden': true,
|
|
72
|
+
const: 'goToHome',
|
|
73
|
+
default: 'goToHome',
|
|
74
|
+
},
|
|
75
|
+
options: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
required: [
|
|
78
|
+
'buryReportName',
|
|
79
|
+
],
|
|
80
|
+
properties: {
|
|
81
|
+
buryReportName: {
|
|
82
|
+
default: '',
|
|
83
|
+
title: '埋点名',
|
|
84
|
+
description:
|
|
85
|
+
'埋点中文名',
|
|
86
|
+
type: 'string',
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
title: '跳转小程序',
|
|
94
|
+
properties: {
|
|
95
|
+
name: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
'ui:hidden': true,
|
|
98
|
+
const: 'goToMiniProgram',
|
|
99
|
+
default:
|
|
100
|
+
'goToMiniProgram',
|
|
101
|
+
},
|
|
102
|
+
options: {
|
|
103
|
+
type: 'object',
|
|
104
|
+
required: [
|
|
105
|
+
'buryReportName',
|
|
106
|
+
],
|
|
107
|
+
properties: {
|
|
108
|
+
buryReportName: {
|
|
109
|
+
default: '',
|
|
110
|
+
title: '埋点名',
|
|
111
|
+
description:
|
|
112
|
+
'埋点中文名',
|
|
113
|
+
type: 'string',
|
|
114
|
+
},
|
|
115
|
+
url: {
|
|
116
|
+
title: '跳转路径(只在内嵌小程序场景生效!)',
|
|
117
|
+
type: 'string',
|
|
118
|
+
'err:required':
|
|
119
|
+
'必须输入跳转路径🔗',
|
|
120
|
+
default: '',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
title: '页面跳转',
|
|
128
|
+
properties: {
|
|
129
|
+
name: {
|
|
130
|
+
type: 'string',
|
|
131
|
+
'ui:hidden': true,
|
|
132
|
+
const: 'goToPage',
|
|
133
|
+
default: 'goToPage',
|
|
134
|
+
},
|
|
135
|
+
options: {
|
|
136
|
+
type: 'object',
|
|
137
|
+
required: [
|
|
138
|
+
'buryReportName',
|
|
139
|
+
],
|
|
140
|
+
properties: {
|
|
141
|
+
buryReportName: {
|
|
142
|
+
default: '',
|
|
143
|
+
title: '埋点名',
|
|
144
|
+
description:
|
|
145
|
+
'埋点中文名',
|
|
146
|
+
type: 'string',
|
|
147
|
+
},
|
|
148
|
+
url: {
|
|
149
|
+
title: '跳转链接',
|
|
150
|
+
type: 'string',
|
|
151
|
+
'err:required':
|
|
152
|
+
'必须输入跳转链接🔗',
|
|
153
|
+
default: '',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
title: '联系投顾弹框',
|
|
161
|
+
properties: {
|
|
162
|
+
name: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
'ui:hidden': true,
|
|
165
|
+
const: 'showCconsultPanel',
|
|
166
|
+
default:
|
|
167
|
+
'showCconsultPanel',
|
|
168
|
+
},
|
|
169
|
+
options: {
|
|
170
|
+
type: 'object',
|
|
171
|
+
required: [
|
|
172
|
+
'buryReportName',
|
|
173
|
+
],
|
|
174
|
+
properties: {
|
|
175
|
+
buryReportName: {
|
|
176
|
+
default: '',
|
|
177
|
+
title: '埋点名',
|
|
178
|
+
description:
|
|
179
|
+
'埋点中文名',
|
|
180
|
+
type: 'string',
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="demo-wrap">
|
|
3
|
+
<VueForm
|
|
4
|
+
@on-change="onChange"
|
|
5
|
+
:schema="schema"
|
|
6
|
+
:modelValue="values"
|
|
7
|
+
@fileUpload="onFileUpload"
|
|
8
|
+
></VueForm>
|
|
9
|
+
|
|
10
|
+
<div>[value]: {{ values }}</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { VueForm } from '@jt/formily/src/vue-form';
|
|
16
|
+
import { ref } from 'vue';
|
|
17
|
+
import schema from './data';
|
|
18
|
+
|
|
19
|
+
const values = ref({});
|
|
20
|
+
/**
|
|
21
|
+
* file 上传的文件
|
|
22
|
+
* done 上传成功回调方法
|
|
23
|
+
*/
|
|
24
|
+
function onFileUpload(file: any, done: any) {
|
|
25
|
+
done(
|
|
26
|
+
'https://jt-test-1301270551.cos.ap-guangzhou.myqcloud.com/create-server/test/c3c3bc/6661658229463019.jpg'
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function onChange(val: any) {
|
|
30
|
+
console.log('onChange', val);
|
|
31
|
+
values.value = val;
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
type: 'object',
|
|
3
|
+
properties: {
|
|
4
|
+
input: {
|
|
5
|
+
title: '普通输入框',
|
|
6
|
+
type: 'string',
|
|
7
|
+
'x-decorator': 'FormItem',
|
|
8
|
+
'x-component-props': {
|
|
9
|
+
description:
|
|
10
|
+
'哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈',
|
|
11
|
+
},
|
|
12
|
+
description: '埋点名',
|
|
13
|
+
},
|
|
14
|
+
cInput: {
|
|
15
|
+
title: '颜色输入框',
|
|
16
|
+
type: 'string',
|
|
17
|
+
'x-decorator': 'FormItem',
|
|
18
|
+
'x-component-props': {
|
|
19
|
+
inputType: 'color',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
input2: {
|
|
23
|
+
title: '限制长度(4)',
|
|
24
|
+
type: 'string',
|
|
25
|
+
'x-component-props': {
|
|
26
|
+
maxlength: 4,
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
toolTipInput: {
|
|
30
|
+
title: '带提示说明描述',
|
|
31
|
+
type: 'string',
|
|
32
|
+
'x-decorator': 'FormItem',
|
|
33
|
+
description: '带说明描述',
|
|
34
|
+
'x-component-props': {
|
|
35
|
+
inputType: 'toolTip',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="demo-wrap">
|
|
3
|
+
<VueForm
|
|
4
|
+
@on-change="onChange"
|
|
5
|
+
:schema="schema"
|
|
6
|
+
:modelValue="values"
|
|
7
|
+
@fileUpload="onFileUpload"
|
|
8
|
+
></VueForm>
|
|
9
|
+
|
|
10
|
+
<div>[value]: {{ values }}</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { VueForm } from '@jt/formily/src/vue-form';
|
|
16
|
+
import { ref } from 'vue';
|
|
17
|
+
import schema from './data';
|
|
18
|
+
|
|
19
|
+
const values = ref({});
|
|
20
|
+
/**
|
|
21
|
+
* file 上传的文件
|
|
22
|
+
* done 上传成功回调方法
|
|
23
|
+
*/
|
|
24
|
+
function onFileUpload(file: any, done: any) {
|
|
25
|
+
done(
|
|
26
|
+
'https://jt-test-1301270551.cos.ap-guangzhou.myqcloud.com/create-server/test/c3c3bc/6661658229463019.jpg'
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
function onChange(val: any) {
|
|
30
|
+
console.log('onChange', val);
|
|
31
|
+
values.value = val;
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
type: 'object',
|
|
3
|
+
properties: {
|
|
4
|
+
link: {
|
|
5
|
+
type: 'void',
|
|
6
|
+
'x-component': 'Link',
|
|
7
|
+
'x-component-props': {
|
|
8
|
+
links: [
|
|
9
|
+
{
|
|
10
|
+
href: 'http://testoa.ciccjinteng.cn/low-code/cos',
|
|
11
|
+
label: '金腾创作系统(测试环境)',
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
href: 'http://devops.ciccjinteng.com/console/',
|
|
15
|
+
label: '蓝盾dev',
|
|
16
|
+
},
|
|
17
|
+
{ href: 'http://npm.jintencent.com/', label: 'npm' },
|
|
18
|
+
{ href: 'http://git.jintencent.com/', label: 'github' },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="demo-wrap">
|
|
3
|
+
<VueForm
|
|
4
|
+
@on-change="onChange"
|
|
5
|
+
:schema="schema"
|
|
6
|
+
:modelValue="values"
|
|
7
|
+
@fileUpload="onFileUpload"
|
|
8
|
+
></VueForm>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
import { VueForm } from '@jt/formily/src/vue-form';
|
|
14
|
+
import { ref } from 'vue';
|
|
15
|
+
import schema from './data';
|
|
16
|
+
|
|
17
|
+
const values = ref();
|
|
18
|
+
function onChange(val: any) {
|
|
19
|
+
console.log('onChange', val);
|
|
20
|
+
values.value = val;
|
|
21
|
+
}
|
|
22
|
+
</script>
|