File tree Expand file tree Collapse file tree 7 files changed +56
-14
lines changed
Expand file tree Collapse file tree 7 files changed +56
-14
lines changed Original file line number Diff line number Diff line change 4747 @on-http-request =" handleHttpRequest($event)"
4848 @on-reset-click =" handleResetClick"
4949 @on-button-event =" handleButtonClick"
50+ @on-button-cancel =" handleButtonCancel"
5051 @on-checkboxCard-click =" handelCheckboxCardClick"
5152 @on-list-item-click =" handelListItemClick"
5253 />
@@ -275,6 +276,9 @@ export default {
275276 handleButtonClick ($event ) {
276277 this .$emit (' on-button-event' , $event);
277278 },
279+ handleButtonCancel ($event ) {
280+ this .$emit (' on-button-cancel' , $event);
281+ },
278282 handleIconClick () {
279283 this .$emit (' on-label-tip-click' ,{
280284 field: this .field
Original file line number Diff line number Diff line change 55 :title =" field.confirmPoptip.title"
66 :placement =" field.confirmPoptip.placement"
77 :class =" classes"
8+ :ok-text =" field.confirmPoptip.okText"
9+ :cancel-text =" field.confirmPoptip.cancelText"
810 @on-ok =" handleClick"
11+ @on-cancel =" handelCancel"
912 >
1013 <Button
1114 :type =" field.subtype || 'default'"
@@ -83,6 +86,9 @@ export default {
8386 break ;
8487 }
8588 },
89+ handelCancel () {
90+ this .$emit (' on-button-cancel' , this );
91+ }
8692 },
8793};
8894 </script >
Original file line number Diff line number Diff line change 33 <Carousel
44 :value =" currentIndex"
55 :loop =" field.loop"
6+ :arrow =" computedArrow"
67 @on-change =" handleChange"
78 >
89 <CarouselItem
@@ -63,6 +64,12 @@ export default {
6364 }
6465 return this .options .length > 0 ? this .options : fieldOptions;
6566 },
67+ computedArrow () {
68+ if (this .computedOptions .length > 1 ) {
69+ return this .field .arrow || ' hover' ;
70+ }
71+ return ' never' ;
72+ },
6673 optionsApi () {
6774 return ! Array .isArray (this .field .options ) ? this .field .options : ' ' ;
6875 },
Original file line number Diff line number Diff line change 4545 @on-submit =" handleSubmit($event)"
4646 @on-reset =" handleReset"
4747 @on-button-event =" handleButtonEvent($event)"
48+ @on-button-cancel =" handleButtonCancel"
4849 @on-checkboxCard-click =" handelCheckboxCardClick"
4950 @on-list-item-click =" handelListItemClick"
5051 @on-label-tip-click =" handelLabelTipClick"
@@ -410,6 +411,10 @@ export default {
410411 this .$emit (' on-button-event' , $event);
411412 },
412413
414+ handleButtonCancel ($event ) {
415+ this .$emit (' on-button-cancel' , $event);
416+ },
417+
413418 handelCheckboxCardClick (value ) {
414419 this .$emit (' on-checkboxCard-click' , value);
415420 },
Original file line number Diff line number Diff line change @@ -243,7 +243,9 @@ const confirm = {};
243243const confirmField = {
244244 confirmPoptip : {
245245 title : '确定删除?' ,
246- placement : 'right'
246+ placement : 'right' ,
247+ cancelText : '你好' ,
248+ okText : '不好'
247249 } ,
248250 type : 'Button' ,
249251 text : '删除' ,
@@ -272,6 +274,9 @@ export default {
272274 methods: {
273275 handleFieldChange(model, value) {
274276 console.log(model, value);
277+ },
278+ handleButtonCancel(val) {
279+ console.log(val);
275280 }
276281 }
277282};
@@ -280,7 +285,8 @@ export default {
280285 <Form :model="model">
281286 <FieldGenerator
282287 :field="field"
283- @on-field-change="handleFieldChange"
288+ @on-field-change="handleFieldChange",
289+ @on-button-cancel="handleButtonCancel"
284290 />
285291 </Form>
286292</template>
Original file line number Diff line number Diff line change 5353 <td >Object</td >
5454 <td >-</td >
5555 </tr >
56+ <tr >
57+ <td >confirmPoptip.okText</td >
58+ <td >确定按钮的文字,只在 confirm 模式下有效</td >
59+ <td >String</td >
60+ <td >确定</td >
61+ </tr >
62+ <tr >
63+ <td >confirmPoptip.cancelText</td >
64+ <td >取消按钮的文字,只在 confirm 模式下有效</td >
65+ <td >String</td >
66+ <td >取消</td >
67+ </tr >
5668 <tr >
5769 <td >confirmPoptip.placement</td >
5870 <td >确认提示弹框的的位置</td >
161173 </td >
162174 <td >-</td >
163175 </tr >
176+ <tr >
177+ <td >on-button-cancel</td >
178+ <td >
179+ 点击取消的回调,只在 confirm 模式下有效
180+ </td >
181+ <td >--</td >
182+ <td >-</td >
183+ </tr >
164184 </tbody >
165185 </table >
166186 </div >
251271 <FieldGenerator
252272 :field =" code.confirm.data.field"
253273 @on-button-event =" handleButtonEvent"
274+ @on-button-cancel =" handleButtonCancel"
254275 />
255276 </Form >
256277 </div >
@@ -286,6 +307,11 @@ export default {
286307 // eslint-disable-next-line no-console
287308 console .log ($event);
288309 this .$Message .info (` event: ${ $event .name } has been triggered` );
310+ },
311+ handleButtonCancel ($event ) {
312+ // eslint-disable-next-line no-console
313+ console .log ($event);
314+ // this.$Message.info(`event: ${$event.name} has been triggered`);
289315 }
290316 }
291317};
Original file line number Diff line number Diff line change @@ -170,14 +170,7 @@ export const data = [
170170 status : '1' ,
171171 city : [
172172 {
173- value : 'beijing' ,
174- label : '北京' ,
175173 url : 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1574076041&di=dba60f4ce2b9330e330f13546ce963a0&imgtype=jpg&er=1&src=http%3A%2F%2Fwww.ijointoo.com%2Fdata%2Fnews%2Fimages%2F1521193045383.jpg'
176- } ,
177- {
178- value : 'shanghai' ,
179- label : '上海' ,
180- url : 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1573481458804&di=5814ac5f18a6f1e9e67aa92db3557f84&imgtype=0&src=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fitbbs%2F1503%2F18%2Fc27%2F4042859_1426655007661_mthumb.jpg'
181174 }
182175 ]
183176 } ,
@@ -193,11 +186,6 @@ export const data = [
193186 value : 'beijing' ,
194187 label : '北京' ,
195188 url : 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1574076041&di=dba60f4ce2b9330e330f13546ce963a0&imgtype=jpg&er=1&src=http%3A%2F%2Fwww.ijointoo.com%2Fdata%2Fnews%2Fimages%2F1521193045383.jpg'
196- } ,
197- {
198- value : 'shanghai' ,
199- label : '上海' ,
200- url : 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1573481458804&di=5814ac5f18a6f1e9e67aa92db3557f84&imgtype=0&src=http%3A%2F%2Fimg.pconline.com.cn%2Fimages%2Fupload%2Fupc%2Ftx%2Fitbbs%2F1503%2F18%2Fc27%2F4042859_1426655007661_mthumb.jpg'
201189 }
202190 ]
203191 } ,
You can’t perform that action at this time.
0 commit comments