@lambo-design/variant-form 2.2.9-beta.0 → 2.2.9-beta.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/README.md +201 -0
- package/babel.config.js +5 -0
- package/dist/lib/VFormDesigner.common-report.html +53 -0
- package/dist/lib/VFormDesigner.common.js +123773 -0
- package/dist/lib/VFormDesigner.common.js.map +1 -0
- package/dist/lib/VFormDesigner.css +1 -0
- package/dist/lib/VFormDesigner.umd-report.html +53 -0
- package/dist/lib/VFormDesigner.umd.js +123783 -0
- package/dist/lib/VFormDesigner.umd.js.map +1 -0
- package/dist/lib/VFormDesigner.umd.min-report.html +53 -0
- package/dist/lib/VFormDesigner.umd.min.js +222 -0
- package/dist/lib/demo.html +10 -0
- package/dist/lib/img/indicator-card-header.7291bcc9.png +0 -0
- package/dist/lib/img/lan_navigator.53090c9d.png +0 -0
- package/dist/lib/img/layout-header-bg-canglan.b1d97e4e.png +0 -0
- package/dist/lib/img/layout-header-bg-cuiwei.67019b6d.png +0 -0
- package/dist/lib/img/lv_navigator.f07fb393.png +0 -0
- package/index_template/index_dev.html +19 -0
- package/index_template/index_prod.html +28 -0
- package/install-render.js +29 -0
- package/install.js +41 -0
- package/jsconfig.json +10 -0
- package/license.txt +8 -0
- package/package.json +10 -4
- package/public/favicon.ico +0 -0
- package/public/index.html +19 -0
- package/src/App.vue +45 -0
- package/src/components/form-designer/designer.js +1 -0
- package/src/components/form-designer/form-widget/field-widget/organ-select-widget.vue +254 -0
- package/src/components/form-designer/form-widget/field-widget/relation-form-widget.vue +397 -0
- package/src/components/form-designer/form-widget/field-widget/sub-form-widget.vue +660 -0
- package/src/components/form-designer/form-widget/field-widget/user-select-widget.vue +333 -0
- package/src/components/form-designer/form-widget/index.vue +1 -1
- package/src/components/form-designer/index.vue +14 -12
- package/src/components/form-designer/setting-panel/form-setting.vue +59 -60
- package/src/components/form-designer/setting-panel/index.vue +2 -0
- package/src/components/form-designer/setting-panel/property-editor/allowMultiple-editor.vue +24 -0
- package/src/components/form-designer/setting-panel/property-editor/border-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/buttonStyle-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/clearable-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/displayFields-editor.vue +91 -0
- package/src/components/form-designer/setting-panel/property-editor/displayStyle-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/field-relation-form/relation-form-defaultValue-editor.vue +18 -0
- package/src/components/form-designer/setting-panel/property-editor/filterable-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/multipleLimit-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/name-editor.vue +2 -2
- package/src/components/form-designer/setting-panel/property-editor/operList-editor.vue +64 -0
- package/src/components/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/form-designer/setting-panel/property-editor/relationForm-editor.vue +74 -0
- package/src/components/form-designer/setting-panel/property-editor/relationItems-editor.vue +91 -0
- package/src/components/form-designer/setting-panel/property-editor/relationType-editor.vue +67 -0
- package/src/components/form-designer/setting-panel/property-editor/rootOrgan-editor.vue +248 -0
- package/src/components/form-designer/setting-panel/property-editor/size-editor.vue +5 -5
- package/src/components/form-designer/setting-panel/property-editor/subFormId-editor.vue +74 -0
- package/src/components/form-designer/setting-panel/propertyRegister.js +144 -133
- package/src/components/form-designer/toolbar-panel/index.vue +11 -10
- package/src/components/form-designer/widget-panel/index.vue +11 -11
- package/src/components/form-designer/widget-panel/widgetsConfig.js +425 -297
- package/src/extension/extension-loader.js +1 -1
- package/src/icons/svg/relation-form-field.svg +1 -0
- package/src/lang/en-US.js +39 -0
- package/src/lang/zh-CN.js +42 -3
- package/src/main.js +29 -0
- package/src/utils/config.js +1 -1
- package/src/utils/util.js +35 -1
- package/vue.config.js +93 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.displayFields')">
|
|
3
|
+
<el-select v-model="optionModel.displayFields" multiple>
|
|
4
|
+
<el-option v-for="item in relationItems" :key="item.columnName" :label="item.columnLabel" :value="item.columnName">
|
|
5
|
+
</el-option>
|
|
6
|
+
</el-select>
|
|
7
|
+
</el-form-item>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import i18n from "@/utils/i18n"
|
|
12
|
+
// import axios from "axios"
|
|
13
|
+
import ajax from "@lambo-design/shared/utils/ajax";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: "displayFields-editor",
|
|
17
|
+
mixins: [i18n],
|
|
18
|
+
props: {
|
|
19
|
+
designer: Object,
|
|
20
|
+
selectedWidget: Object,
|
|
21
|
+
optionModel: Object,
|
|
22
|
+
},
|
|
23
|
+
inject: ['getDesignerConfig'],
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
relationItems: [],
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
created() {
|
|
31
|
+
this.initRelationItems(this.optionModel.subFormId);
|
|
32
|
+
},
|
|
33
|
+
mounted() {
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
initRelationItems(subFormId) {
|
|
37
|
+
let projectId = this.getDesignerConfig().projectId;
|
|
38
|
+
if(!projectId) {
|
|
39
|
+
console.log("get designer config projectId is null");
|
|
40
|
+
projectId = 'ZhaoyxTP';
|
|
41
|
+
}
|
|
42
|
+
if(projectId && subFormId) {
|
|
43
|
+
let url = "/dida-manage-server/manage/form-materialization-table-meta-info/getSpecificTypeMetaInfos?formId="+subFormId;
|
|
44
|
+
ajax.get(url)
|
|
45
|
+
.then(resp => {
|
|
46
|
+
if (resp.data && (resp.data.code == 1 || resp.data.code == 200)) {
|
|
47
|
+
this.relationItems = resp.data.data;
|
|
48
|
+
//
|
|
49
|
+
if(this.optionModel.relationItems && this.optionModel.relationItems.length>0) {
|
|
50
|
+
let isFind = false;
|
|
51
|
+
for(let n of this.relationItems) {
|
|
52
|
+
if(this.optionModel.relationItems.includes(n.columnName)) {
|
|
53
|
+
isFind = true;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if(!isFind) {
|
|
58
|
+
this.optionModel.relationItems = [];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
this.relationItems = [];
|
|
63
|
+
this.optionModel.relationItems = [];
|
|
64
|
+
// this.$Message.error('查询表单列表失败');
|
|
65
|
+
console.error(resp.data.message);
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
.catch(err => {
|
|
69
|
+
this.relationItems = [];
|
|
70
|
+
this.optionModel.relationItems = [];
|
|
71
|
+
// this.$Message.error('获取表单列表失败');
|
|
72
|
+
console.error(err);
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
this.relationItems = [];
|
|
76
|
+
this.optionModel.relationItems = [];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
watch:{
|
|
81
|
+
'optionModel.subFormId':function (newValue) {//, oldValue
|
|
82
|
+
this.initRelationItems(newValue);
|
|
83
|
+
},
|
|
84
|
+
deep:true
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<style scoped>
|
|
90
|
+
|
|
91
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-form-item :label="i18nt('designer.setting.displayStyle')">
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.displayStyle')" v-if="!optionModel.relationType || optionModel.relationType=='list'">
|
|
3
3
|
<el-radio-group v-model="optionModel.displayStyle">
|
|
4
4
|
<el-radio label="inline">{{i18nt('designer.setting.inlineLayout')}}</el-radio>
|
|
5
5
|
<el-radio label="block">{{i18nt('designer.setting.blockLayout')}}</el-radio>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: none"></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
export default {
|
|
7
|
+
name: "relation-form-defaultValue-editor",
|
|
8
|
+
props: {
|
|
9
|
+
designer: Object,
|
|
10
|
+
selectedWidget: Object,
|
|
11
|
+
optionModel: Object,
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<style scoped>
|
|
17
|
+
|
|
18
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-form-item :label="i18nt('designer.setting.filterable')">
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.filterable')" v-if="!optionModel.relationType || optionModel.relationType=='select'">
|
|
3
3
|
<el-switch v-model="optionModel.filterable"></el-switch>
|
|
4
4
|
</el-form-item>
|
|
5
5
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-form-item :label="i18nt('designer.setting.multipleLimit')">
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.multipleLimit')" v-if="!optionModel.relationType || optionModel.relationType=='select' || optionModel.relationType=='list'">
|
|
3
3
|
<el-input-number v-model="optionModel.multipleLimit" :min="0"
|
|
4
4
|
class="hide-spin-button" style="width: 100%"></el-input-number>
|
|
5
5
|
</el-form-item>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<el-form-item prop="name" :rules="nameRequiredRule">
|
|
3
3
|
<span slot="label">{{i18nt('designer.setting.uniqueName')}}
|
|
4
|
-
<el-tooltip effect="light" :content="i18nt('designer.setting.editNameHelp')"
|
|
5
|
-
<i class="el-icon-info"></i></el-tooltip
|
|
4
|
+
<!-- <el-tooltip effect="light" :content="i18nt('designer.setting.editNameHelp')">-->
|
|
5
|
+
<!-- <i class="el-icon-info"></i></el-tooltip>-->
|
|
6
6
|
</span>
|
|
7
7
|
<template v-if="(!!selectedWidget.category && (selectedWidget.type !== 'sub-form')) || noFieldList">
|
|
8
8
|
<el-input type="text" v-model="optionModel.name" :readonly="widgetNameReadonly" @change="updateWidgetNameAndRef"></el-input>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.operList')">
|
|
3
|
+
<el-checkbox-group v-model="optionModel.operList">
|
|
4
|
+
<el-checkbox v-for="action in actions" :label="action.type" :key="action.type">
|
|
5
|
+
{{action.name}}
|
|
6
|
+
<el-tooltip v-if="action.type === 'draggable'" effect="light" content="是否开启拖拽调整行顺序" placement="top">
|
|
7
|
+
<i class="el-icon-question"></i>
|
|
8
|
+
</el-tooltip>
|
|
9
|
+
</el-checkbox>
|
|
10
|
+
</el-checkbox-group>
|
|
11
|
+
</el-form-item>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import i18n from "@/utils/i18n"
|
|
16
|
+
|
|
17
|
+
export default {
|
|
18
|
+
name: "operList-editor",
|
|
19
|
+
mixins: [i18n],
|
|
20
|
+
props: {
|
|
21
|
+
designer: Object,
|
|
22
|
+
selectedWidget: Object,
|
|
23
|
+
optionModel: Object,
|
|
24
|
+
},
|
|
25
|
+
inject: ['getDesignerConfig'],
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
actions: [
|
|
29
|
+
{
|
|
30
|
+
name: this.i18nt('designer.setting.actions.insert'),
|
|
31
|
+
type: 'insert'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: this.i18nt('designer.setting.actions.edit'),
|
|
35
|
+
type: 'edit'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: this.i18nt('designer.setting.actions.delete'),
|
|
39
|
+
type: 'delete'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: this.i18nt('designer.setting.actions.copy'),
|
|
43
|
+
type: 'copy'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: this.i18nt('designer.setting.actions.draggable'),
|
|
47
|
+
type: 'draggable'
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: this.i18nt('designer.setting.actions.batchDelete'),
|
|
51
|
+
type: 'batchDelete'
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
methods: {
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<style scoped>
|
|
63
|
+
|
|
64
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<el-form-item :label="i18nt('designer.setting.placeholder')">
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.placeholder')" v-if="!optionModel.relationType || optionModel.relationType=='select' || optionModel.relationType=='help'">
|
|
3
3
|
<el-input type="text" v-model="optionModel.placeholder"></el-input>
|
|
4
4
|
</el-form-item>
|
|
5
5
|
</template>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.relationForm')">
|
|
3
|
+
<el-select v-model="optionModel.relationForm">
|
|
4
|
+
<el-option v-for="item in relationForms" :key="item.formId" :label="item.formName" :value="item.formId">
|
|
5
|
+
</el-option>
|
|
6
|
+
</el-select>
|
|
7
|
+
</el-form-item>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import i18n from "@/utils/i18n"
|
|
12
|
+
// import axios from "axios"
|
|
13
|
+
import ajax from "@lambo-design/shared/utils/ajax";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: "relationForm-editor",
|
|
17
|
+
mixins: [i18n],
|
|
18
|
+
props: {
|
|
19
|
+
designer: Object,
|
|
20
|
+
selectedWidget: Object,
|
|
21
|
+
optionModel: Object,
|
|
22
|
+
},
|
|
23
|
+
inject: ['getDesignerConfig'],
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
relationForms: [],
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
created() {
|
|
31
|
+
this.initRelationForms();
|
|
32
|
+
},
|
|
33
|
+
mounted() {
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
initRelationForms() {
|
|
37
|
+
let projectId = this.getDesignerConfig().projectId;
|
|
38
|
+
let formId = this.getDesignerConfig().formId;
|
|
39
|
+
if(!projectId || !formId) {
|
|
40
|
+
console.log("get designer config projectId & formId is null", projectId, formId);
|
|
41
|
+
projectId = 'ZhaoyxTP';
|
|
42
|
+
formId = 'ZhaoyxTF';
|
|
43
|
+
}
|
|
44
|
+
if(projectId && formId) {
|
|
45
|
+
let url = "/dida-manage-server/manage/form-materialization-table-relation/listOthers?projectId="+projectId+"&formId="+formId;
|
|
46
|
+
ajax.get(url)
|
|
47
|
+
.then(resp => {
|
|
48
|
+
if (resp.data && (resp.data.code == 1 || resp.data.code == 200)) {
|
|
49
|
+
this.relationForms = resp.data.data;
|
|
50
|
+
} else {
|
|
51
|
+
this.relationForms = [];
|
|
52
|
+
// this.$Message.error('查询表单列表失败');
|
|
53
|
+
console.error(resp.data.message);
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
.catch(err => {
|
|
57
|
+
this.relationForms = [];
|
|
58
|
+
// this.$Message.error('获取表单列表失败');
|
|
59
|
+
console.error(err);
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
this.relationForms = [];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
watch:{
|
|
67
|
+
// deep:true
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<style scoped>
|
|
73
|
+
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.relationItems')">
|
|
3
|
+
<el-select v-model="optionModel.relationItems" multiple>
|
|
4
|
+
<el-option v-for="item in relationItems" :key="item.columnName" :label="item.columnLabel" :value="item.columnName">
|
|
5
|
+
</el-option>
|
|
6
|
+
</el-select>
|
|
7
|
+
</el-form-item>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
import i18n from "@/utils/i18n"
|
|
12
|
+
// import axios from "axios"
|
|
13
|
+
import ajax from "@lambo-design/shared/utils/ajax";
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: "relationItems-editor",
|
|
17
|
+
mixins: [i18n],
|
|
18
|
+
props: {
|
|
19
|
+
designer: Object,
|
|
20
|
+
selectedWidget: Object,
|
|
21
|
+
optionModel: Object,
|
|
22
|
+
},
|
|
23
|
+
inject: ['getDesignerConfig'],
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
relationItems: [],
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
created() {
|
|
31
|
+
this.initRelationItems(this.optionModel.relationForm);
|
|
32
|
+
},
|
|
33
|
+
mounted() {
|
|
34
|
+
},
|
|
35
|
+
methods: {
|
|
36
|
+
initRelationItems(relationForm) {
|
|
37
|
+
let projectId = this.getDesignerConfig().projectId;
|
|
38
|
+
if(!projectId) {
|
|
39
|
+
console.log("get designer config projectId is null");
|
|
40
|
+
projectId = 'ZhaoyxTP';
|
|
41
|
+
}
|
|
42
|
+
if(projectId && relationForm) {
|
|
43
|
+
let url = "/dida-manage-server/manage/form-materialization-table-meta-info/getSpecificTypeMetaInfos?projectId="+projectId+"&formId="+relationForm;
|
|
44
|
+
ajax.get(url)
|
|
45
|
+
.then(resp => {
|
|
46
|
+
if (resp.data && (resp.data.code == 1 || resp.data.code == 200)) {
|
|
47
|
+
this.relationItems = resp.data.data;
|
|
48
|
+
//
|
|
49
|
+
if(this.optionModel.relationItems && this.optionModel.relationItems.length>0) {
|
|
50
|
+
let isFind = false;
|
|
51
|
+
for(let n of this.relationItems) {
|
|
52
|
+
if(this.optionModel.relationItems.includes(n.columnName)) {
|
|
53
|
+
isFind = true;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if(!isFind) {
|
|
58
|
+
this.optionModel.relationItems = [];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
this.relationItems = [];
|
|
63
|
+
this.optionModel.relationItems = [];
|
|
64
|
+
// this.$Message.error('查询表单列表失败');
|
|
65
|
+
console.error(resp.data.message);
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
.catch(err => {
|
|
69
|
+
this.relationItems = [];
|
|
70
|
+
this.optionModel.relationItems = [];
|
|
71
|
+
// this.$Message.error('获取表单列表失败');
|
|
72
|
+
console.error(err);
|
|
73
|
+
});
|
|
74
|
+
} else {
|
|
75
|
+
this.relationItems = [];
|
|
76
|
+
this.optionModel.relationItems = [];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
watch:{
|
|
81
|
+
'optionModel.relationForm':function (newValue) {//, oldValue
|
|
82
|
+
this.initRelationItems(newValue);
|
|
83
|
+
},
|
|
84
|
+
deep:true
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
</script>
|
|
88
|
+
|
|
89
|
+
<style scoped>
|
|
90
|
+
|
|
91
|
+
</style>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form-item :label="i18nt('designer.setting.relationType')">
|
|
3
|
+
<el-select v-model="optionModel.relationType">
|
|
4
|
+
<!-- @change="changeType"-->
|
|
5
|
+
<el-option v-for="item in relationTypes" :key="item.value" :label="item.label" :value="item.value">
|
|
6
|
+
</el-option>
|
|
7
|
+
</el-select>
|
|
8
|
+
</el-form-item>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script>
|
|
12
|
+
import i18n from "@/utils/i18n"
|
|
13
|
+
|
|
14
|
+
export default {
|
|
15
|
+
name: "relationType-editor",
|
|
16
|
+
mixins: [i18n],
|
|
17
|
+
props: {
|
|
18
|
+
designer: Object,
|
|
19
|
+
selectedWidget: Object,
|
|
20
|
+
optionModel: Object,
|
|
21
|
+
},
|
|
22
|
+
data() {
|
|
23
|
+
return {
|
|
24
|
+
relationTypes: [
|
|
25
|
+
{value: 'select', label: this.i18nt('designer.setting.relationSelect')},
|
|
26
|
+
{value: 'list', label: this.i18nt('designer.setting.relationList')},
|
|
27
|
+
{value: 'help', label: this.i18nt('designer.setting.relationHelp')},
|
|
28
|
+
],
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
methods: {
|
|
32
|
+
// changeType (value) {
|
|
33
|
+
// console.log(value);
|
|
34
|
+
// // console.log(this.optionModel.relationType);
|
|
35
|
+
// // if(value=='select') {
|
|
36
|
+
// // this.optionModel.optionItems = [
|
|
37
|
+
// // {label: 'select 1', value: 1},
|
|
38
|
+
// // {label: 'select 2', value: 2},
|
|
39
|
+
// // {label: 'select 3', value: 3},
|
|
40
|
+
// // ];
|
|
41
|
+
// // delete this.optionModel.displayStyle;
|
|
42
|
+
// // delete this.optionModel.buttonStyle;
|
|
43
|
+
// // } else if (value=='checkbox') {
|
|
44
|
+
// // this.optionModel.optionItems = [
|
|
45
|
+
// // {label: 'check 1', value: 1},
|
|
46
|
+
// // {label: 'check 2', value: 2},
|
|
47
|
+
// // {label: 'check 3', value: 3},
|
|
48
|
+
// // ];
|
|
49
|
+
// // delete this.optionModel.placeholder;
|
|
50
|
+
// // } else if (value=='radio') {
|
|
51
|
+
// // this.optionModel.optionItems = [
|
|
52
|
+
// // {label: 'radio 1', value: 1},
|
|
53
|
+
// // {label: 'radio 2', value: 2},
|
|
54
|
+
// // {label: 'radio 3', value: 3},
|
|
55
|
+
// // ];
|
|
56
|
+
// // delete this.optionModel.placeholder;
|
|
57
|
+
// // } else {
|
|
58
|
+
// // delete this.optionModel.optionItems;
|
|
59
|
+
// // }
|
|
60
|
+
// }
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<style scoped>
|
|
66
|
+
|
|
67
|
+
</style>
|