File tree 5 files changed +22
-4
lines changed
schema-generator/views/editor
5 files changed +22
-4
lines changed Original file line number Diff line number Diff line change 22
22
"packages:list" : " lerna ls -l" ,
23
23
"packages:changed" : " lerna changed" ,
24
24
"packages:build" : " lerna run --stream --sort build" ,
25
- "publish " : " yarn run lib:build && lerna publish" ,
25
+ "publish1 " : " yarn run lib:build && lerna publish" ,
26
26
"autoPublish" : " lerna publish --conventional-commits --yes" ,
27
27
"autoVersion" : " lerna version --conventional-commits --yes"
28
28
},
Original file line number Diff line number Diff line change 280
280
},
281
281
handleCancel () {},
282
282
handlePreview () {
283
- const formatStr = jsonCode => encodeURIComponent ( JSON .stringify (JSON .parse (jsonCode) ));
283
+ const formatStr = jsonCode => JSON .stringify (JSON .parse (jsonCode));
284
284
285
285
const genRoute = this .$router .resolve ({
286
286
query: {
Original file line number Diff line number Diff line change 207
207
},
208
208
handlePreview () {
209
209
const props = this .getExportCode ();
210
- componentWithDialog ({
210
+ const instance = componentWithDialog ({
211
211
VueComponent: VueJsonFrom,
212
212
dialogProps: {
213
213
title: ' 预览展示' ,
216
216
componentProps: {
217
217
value: {},
218
218
... props
219
+ },
220
+ componentListeners: {
221
+ toDemo : () => {
222
+ this .handleToDemo ();
223
+ },
224
+ ' on-cancel ' : () => {
225
+ instance .close ();
226
+ },
227
+ ' on-submit ' : (data ) => {
228
+ // eslint-disable-next-line no-alert
229
+ alert (JSON .stringify (data, null , 2 ));
230
+ }
219
231
}
220
232
});
221
233
},
Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ export default {
39
39
schemaOptions : {
40
40
type : 'object' ,
41
41
properties : {
42
+ uniqueItems : {
43
+ type : 'boolean' ,
44
+ 'ui:widget' : 'hidden' ,
45
+ default : true
46
+ } ,
42
47
items : {
43
48
type : 'object' ,
44
49
properties : {
Original file line number Diff line number Diff line change @@ -45,7 +45,8 @@ function genBaseVal(type = 'string') {
45
45
} ,
46
46
uniqueItems : {
47
47
type : 'boolean' ,
48
- title : '不允许重复项' ,
48
+ title : '不重复' ,
49
+ description : '多选框强制默认为 true,且配置无效' ,
49
50
'ui:widget' : 'el-switch' ,
50
51
default : false
51
52
}
You can’t perform that action at this time.
0 commit comments