eoss-mobiles 0.2.50 → 0.2.52

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/lib/form.js CHANGED
@@ -199,7 +199,7 @@ function normalizeComponent(
199
199
  // ESM COMPAT FLAG
200
200
  __webpack_require__.r(__webpack_exports__);
201
201
 
202
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=0c43eb06&
202
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=template&id=273ca6fc&
203
203
  var render = function () {
204
204
  var _vm = this
205
205
  var _h = _vm.$createElement
@@ -217,358 +217,363 @@ var render = function () {
217
217
  false
218
218
  ),
219
219
  [
220
- _vm._l(_vm.newContent, function (item, index) {
221
- return _c(
222
- "div",
223
- { key: index },
224
- [
225
- item.type === "text" ||
226
- item.type === "textarea" ||
227
- item.type == "number" ||
228
- item.type == "digit" ||
229
- item.type == "password" ||
230
- item.type == "tel"
231
- ? _c(
232
- "em-input",
233
- _vm._b(
234
- {
235
- ref: "input",
236
- refInFor: true,
237
- staticClass: "em-table-input",
238
- attrs: {
239
- "label-position":
240
- item.labelPosition || _vm.labelPosition,
241
- disabled: item.disabled || _vm.disabled,
242
- readonly: item.readonly || _vm.readonly,
243
- label: item.label.text || item.label,
244
- },
245
- on: {
246
- input: function ($event) {
247
- _vm.handleChange(item.name, _vm.model[item.name])
220
+ _c(
221
+ "div",
222
+ { staticClass: "em-form-content" },
223
+ _vm._l(_vm.newContent, function (item, index) {
224
+ return _c(
225
+ "div",
226
+ { key: index },
227
+ [
228
+ item.type === "text" ||
229
+ item.type === "textarea" ||
230
+ item.type == "number" ||
231
+ item.type == "digit" ||
232
+ item.type == "password" ||
233
+ item.type == "tel"
234
+ ? _c(
235
+ "em-input",
236
+ _vm._b(
237
+ {
238
+ ref: "input",
239
+ refInFor: true,
240
+ staticClass: "em-table-input",
241
+ attrs: {
242
+ "label-position":
243
+ item.labelPosition || _vm.labelPosition,
244
+ disabled: item.disabled || _vm.disabled,
245
+ readonly: item.readonly || _vm.readonly,
246
+ label: item.label.text || item.label,
248
247
  },
249
- },
250
- model: {
251
- value: _vm.model[item.name],
252
- callback: function ($$v) {
253
- _vm.$set(_vm.model, item.name, $$v)
248
+ on: {
249
+ input: function ($event) {
250
+ _vm.handleChange(item.name, _vm.model[item.name])
251
+ },
252
+ },
253
+ model: {
254
+ value: _vm.model[item.name],
255
+ callback: function ($$v) {
256
+ _vm.$set(_vm.model, item.name, $$v)
257
+ },
258
+ expression: "model[item.name]",
254
259
  },
255
- expression: "model[item.name]",
256
260
  },
257
- },
258
- "em-input",
259
- Object.assign({}, _vm.$attrs, item),
260
- false
261
+ "em-input",
262
+ Object.assign({}, _vm.$attrs, item),
263
+ false
264
+ )
261
265
  )
262
- )
263
- : _vm._e(),
264
- item.type === "select"
265
- ? _c(
266
- "em-picker",
267
- _vm._b(
268
- {
269
- ref: "select",
270
- refInFor: true,
271
- attrs: {
272
- "label-position":
273
- item.labelPosition || _vm.labelPosition,
274
- disabled: item.disabled || _vm.disabled,
275
- readonly: item.readonly || _vm.readonly,
276
- columns: item.data || [],
277
- },
278
- on: {
279
- confirm: function (value) {
280
- _vm.handleChange(item.name, value)
266
+ : _vm._e(),
267
+ item.type === "select"
268
+ ? _c(
269
+ "em-picker",
270
+ _vm._b(
271
+ {
272
+ ref: "select",
273
+ refInFor: true,
274
+ attrs: {
275
+ "label-position":
276
+ item.labelPosition || _vm.labelPosition,
277
+ disabled: item.disabled || _vm.disabled,
278
+ readonly: item.readonly || _vm.readonly,
279
+ columns: item.data || [],
281
280
  },
282
- },
283
- model: {
284
- value: _vm.model[item.name],
285
- callback: function ($$v) {
286
- _vm.$set(_vm.model, item.name, $$v)
281
+ on: {
282
+ confirm: function (value) {
283
+ _vm.handleChange(item.name, value)
284
+ },
285
+ },
286
+ model: {
287
+ value: _vm.model[item.name],
288
+ callback: function ($$v) {
289
+ _vm.$set(_vm.model, item.name, $$v)
290
+ },
291
+ expression: "model[item.name]",
287
292
  },
288
- expression: "model[item.name]",
289
293
  },
290
- },
291
- "em-picker",
292
- Object.assign({}, _vm.$attrs, item),
293
- false
294
+ "em-picker",
295
+ Object.assign({}, _vm.$attrs, item),
296
+ false
297
+ )
294
298
  )
295
- )
296
- : item.date ||
297
- item.type == "date" ||
298
- item.type == "year" ||
299
- item.type == "year-month" ||
300
- item.type == "month-day" ||
301
- item.type == "time" ||
302
- item.type == "datetimeSecond" ||
303
- item.type == "datetime" ||
304
- item.type == "datehour"
305
- ? _c(
306
- "em-date",
307
- _vm._b(
308
- {
309
- ref: "date",
310
- refInFor: true,
311
- attrs: {
312
- "label-position":
313
- item.labelPosition || _vm.labelPosition,
314
- disabled: item.disabled || _vm.disabled,
315
- readonly: item.readonly || _vm.readonly,
316
- joinStr: item.joinStr || "",
317
- },
318
- on: {
319
- confirm: function (value) {
320
- _vm.handleChange(item.name, value)
299
+ : item.date ||
300
+ item.type == "date" ||
301
+ item.type == "year" ||
302
+ item.type == "year-month" ||
303
+ item.type == "month-day" ||
304
+ item.type == "time" ||
305
+ item.type == "datetimeSecond" ||
306
+ item.type == "datetime" ||
307
+ item.type == "datehour"
308
+ ? _c(
309
+ "em-date",
310
+ _vm._b(
311
+ {
312
+ ref: "date",
313
+ refInFor: true,
314
+ attrs: {
315
+ "label-position":
316
+ item.labelPosition || _vm.labelPosition,
317
+ disabled: item.disabled || _vm.disabled,
318
+ readonly: item.readonly || _vm.readonly,
319
+ joinStr: item.joinStr || "",
321
320
  },
322
- },
323
- model: {
324
- value: _vm.model[item.name],
325
- callback: function ($$v) {
326
- _vm.$set(_vm.model, item.name, $$v)
321
+ on: {
322
+ confirm: function (value, timePeriod) {
323
+ _vm.handleChange(item.name, value, timePeriod)
324
+ },
325
+ },
326
+ model: {
327
+ value: _vm.model[item.name],
328
+ callback: function ($$v) {
329
+ _vm.$set(_vm.model, item.name, $$v)
330
+ },
331
+ expression: "model[item.name]",
327
332
  },
328
- expression: "model[item.name]",
329
333
  },
330
- },
331
- "em-date",
332
- Object.assign({}, _vm.$attrs, item),
333
- false
334
+ "em-date",
335
+ Object.assign({}, _vm.$attrs, item),
336
+ false
337
+ )
334
338
  )
335
- )
336
- : item.type === "radio"
337
- ? _c(
338
- "em-input",
339
- _vm._b(
340
- {
341
- ref: "radio",
342
- refInFor: true,
343
- attrs: {
344
- "label-position":
345
- item.labelPosition || _vm.labelPosition,
346
- },
347
- },
339
+ : item.type === "radio"
340
+ ? _c(
348
341
  "em-input",
349
- Object.assign({}, _vm.$attrs, item),
350
- false
351
- ),
352
- [
353
- _c(
354
- "template",
355
- { slot: "input" },
356
- [
357
- _c(
358
- "em-radio-group",
359
- _vm._b(
360
- {
361
- attrs: {
362
- disabled:
363
- item.disabled ||
364
- _vm.disabled ||
365
- item.readonly ||
366
- _vm.readonly,
367
- data: item.data,
368
- },
369
- on: {
370
- change: function (value) {
371
- _vm.handleChange(item.name, value)
342
+ _vm._b(
343
+ {
344
+ ref: "radio",
345
+ refInFor: true,
346
+ attrs: {
347
+ "label-position":
348
+ item.labelPosition || _vm.labelPosition,
349
+ },
350
+ },
351
+ "em-input",
352
+ Object.assign({}, _vm.$attrs, item),
353
+ false
354
+ ),
355
+ [
356
+ _c(
357
+ "template",
358
+ { slot: "input" },
359
+ [
360
+ _c(
361
+ "em-radio-group",
362
+ _vm._b(
363
+ {
364
+ attrs: {
365
+ disabled:
366
+ item.disabled ||
367
+ _vm.disabled ||
368
+ item.readonly ||
369
+ _vm.readonly,
370
+ data: item.data,
372
371
  },
373
- },
374
- model: {
375
- value: _vm.model[item.name],
376
- callback: function ($$v) {
377
- _vm.$set(_vm.model, item.name, $$v)
372
+ on: {
373
+ change: function (value) {
374
+ _vm.handleChange(item.name, value)
375
+ },
376
+ },
377
+ model: {
378
+ value: _vm.model[item.name],
379
+ callback: function ($$v) {
380
+ _vm.$set(_vm.model, item.name, $$v)
381
+ },
382
+ expression: "model[item.name]",
378
383
  },
379
- expression: "model[item.name]",
380
384
  },
381
- },
382
- "em-radio-group",
383
- Object.assign({}, _vm.$attrs, item),
384
- false
385
- )
386
- ),
387
- ],
388
- 1
389
- ),
390
- ],
391
- 2
392
- )
393
- : item.type === "checkbox"
394
- ? _c(
395
- "em-input",
396
- _vm._b(
397
- {
398
- ref: "checkbox",
399
- refInFor: true,
400
- attrs: {
401
- "label-position":
402
- item.labelPosition || _vm.labelPosition,
403
- },
404
- },
385
+ "em-radio-group",
386
+ Object.assign({}, _vm.$attrs, item),
387
+ false
388
+ )
389
+ ),
390
+ ],
391
+ 1
392
+ ),
393
+ ],
394
+ 2
395
+ )
396
+ : item.type === "checkbox"
397
+ ? _c(
405
398
  "em-input",
406
- Object.assign({}, _vm.$attrs, item),
407
- false
408
- ),
409
- [
410
- _c(
411
- "template",
412
- { slot: "input" },
413
- [
414
- _c(
415
- "em-checkbox-group",
416
- _vm._b(
417
- {
418
- attrs: {
419
- disabled:
420
- item.disabled ||
421
- _vm.disabled ||
422
- item.readonly ||
423
- _vm.readonly,
424
- },
425
- on: {
426
- change: function (value) {
427
- _vm.handleChange(item.name, value)
399
+ _vm._b(
400
+ {
401
+ ref: "checkbox",
402
+ refInFor: true,
403
+ attrs: {
404
+ "label-position":
405
+ item.labelPosition || _vm.labelPosition,
406
+ },
407
+ },
408
+ "em-input",
409
+ Object.assign({}, _vm.$attrs, item),
410
+ false
411
+ ),
412
+ [
413
+ _c(
414
+ "template",
415
+ { slot: "input" },
416
+ [
417
+ _c(
418
+ "em-checkbox-group",
419
+ _vm._b(
420
+ {
421
+ attrs: {
422
+ disabled:
423
+ item.disabled ||
424
+ _vm.disabled ||
425
+ item.readonly ||
426
+ _vm.readonly,
428
427
  },
429
- },
430
- model: {
431
- value: _vm.model[item.name],
432
- callback: function ($$v) {
433
- _vm.$set(_vm.model, item.name, $$v)
428
+ on: {
429
+ change: function (value) {
430
+ _vm.handleChange(item.name, value)
431
+ },
432
+ },
433
+ model: {
434
+ value: _vm.model[item.name],
435
+ callback: function ($$v) {
436
+ _vm.$set(_vm.model, item.name, $$v)
437
+ },
438
+ expression: "model[item.name]",
434
439
  },
435
- expression: "model[item.name]",
436
440
  },
437
- },
438
- "em-checkbox-group",
439
- Object.assign({}, _vm.$attrs, item),
440
- false
441
- )
442
- ),
443
- ],
444
- 1
445
- ),
446
- ],
447
- 2
448
- )
449
- : item.type === "switch"
450
- ? _c(
451
- "em-input",
452
- _vm._b(
453
- {
454
- ref: "switch",
455
- refInFor: true,
456
- attrs: {
457
- "label-position":
458
- item.labelPosition || _vm.labelPosition,
459
- },
460
- },
441
+ "em-checkbox-group",
442
+ Object.assign({}, _vm.$attrs, item),
443
+ false
444
+ )
445
+ ),
446
+ ],
447
+ 1
448
+ ),
449
+ ],
450
+ 2
451
+ )
452
+ : item.type === "switch"
453
+ ? _c(
461
454
  "em-input",
462
- Object.assign({}, _vm.$attrs, item),
463
- false
464
- ),
465
- [
466
- _c(
467
- "template",
468
- { slot: "input" },
469
- [
470
- _c(
471
- "em-switch",
472
- _vm._b(
473
- {
474
- attrs: {
475
- disabled:
476
- item.disabled ||
477
- _vm.disabled ||
478
- item.readonly ||
479
- _vm.readonly,
480
- },
481
- on: {
482
- change: function (value) {
483
- _vm.handleChange(item.name, value)
455
+ _vm._b(
456
+ {
457
+ ref: "switch",
458
+ refInFor: true,
459
+ attrs: {
460
+ "label-position":
461
+ item.labelPosition || _vm.labelPosition,
462
+ },
463
+ },
464
+ "em-input",
465
+ Object.assign({}, _vm.$attrs, item),
466
+ false
467
+ ),
468
+ [
469
+ _c(
470
+ "template",
471
+ { slot: "input" },
472
+ [
473
+ _c(
474
+ "em-switch",
475
+ _vm._b(
476
+ {
477
+ attrs: {
478
+ disabled:
479
+ item.disabled ||
480
+ _vm.disabled ||
481
+ item.readonly ||
482
+ _vm.readonly,
484
483
  },
485
- },
486
- model: {
487
- value: _vm.model[item.name],
488
- callback: function ($$v) {
489
- _vm.$set(_vm.model, item.name, $$v)
484
+ on: {
485
+ change: function (value) {
486
+ _vm.handleChange(item.name, value)
487
+ },
488
+ },
489
+ model: {
490
+ value: _vm.model[item.name],
491
+ callback: function ($$v) {
492
+ _vm.$set(_vm.model, item.name, $$v)
493
+ },
494
+ expression: "model[item.name]",
490
495
  },
491
- expression: "model[item.name]",
492
496
  },
493
- },
494
- "em-switch",
495
- Object.assign({}, _vm.$attrs, item),
496
- false
497
- )
498
- ),
499
- ],
500
- 1
501
- ),
502
- ],
503
- 2
504
- )
505
- : item.type == "selector"
506
- ? _c(
507
- "em-selector",
508
- _vm._b(
509
- {
510
- ref: "selector",
511
- refInFor: true,
512
- attrs: {
513
- label: item.label,
514
- "label-position":
515
- item.labelPosition || _vm.labelPosition,
516
- disabled:
517
- item.disabled ||
518
- _vm.disabled ||
519
- item.readonly ||
520
- _vm.readonly,
521
- },
522
- on: {
523
- change: function (value) {
524
- _vm.handleChange(item.name, value)
497
+ "em-switch",
498
+ Object.assign({}, _vm.$attrs, item),
499
+ false
500
+ )
501
+ ),
502
+ ],
503
+ 1
504
+ ),
505
+ ],
506
+ 2
507
+ )
508
+ : item.type == "selector"
509
+ ? _c(
510
+ "em-selector",
511
+ _vm._b(
512
+ {
513
+ ref: "selector",
514
+ refInFor: true,
515
+ attrs: {
516
+ label: item.label,
517
+ "label-position":
518
+ item.labelPosition || _vm.labelPosition,
519
+ disabled:
520
+ item.disabled ||
521
+ _vm.disabled ||
522
+ item.readonly ||
523
+ _vm.readonly,
525
524
  },
526
- },
527
- model: {
528
- value: _vm.model[item.name],
529
- callback: function ($$v) {
530
- _vm.$set(_vm.model, item.name, $$v)
525
+ on: {
526
+ change: function (value) {
527
+ _vm.handleChange(item.name, value)
528
+ },
529
+ },
530
+ model: {
531
+ value: _vm.model[item.name],
532
+ callback: function ($$v) {
533
+ _vm.$set(_vm.model, item.name, $$v)
534
+ },
535
+ expression: "model[item.name]",
531
536
  },
532
- expression: "model[item.name]",
533
537
  },
534
- },
535
- "em-selector",
536
- Object.assign({}, _vm.$attrs, item),
537
- false
538
+ "em-selector",
539
+ Object.assign({}, _vm.$attrs, item),
540
+ false
541
+ )
538
542
  )
539
- )
540
- : item.type == "table"
541
- ? _c(
542
- "em-table",
543
- _vm._b(
544
- {
545
- ref: "emFormTable",
546
- refInFor: true,
547
- staticClass: "em-form-table",
548
- style: "margin:" + (item.margin || 10) + "px 0px",
549
- attrs: {
550
- data: _vm.model[item.name],
551
- thead: item.tHead,
552
- isForm: "",
553
- form:
554
- !item.disabled &&
555
- !_vm.disabled &&
556
- !item.readonly &&
557
- !_vm.readonly &&
558
- item.form,
559
- },
560
- on: { "btn-click": _vm.handleBtnClick },
561
- },
543
+ : item.type == "table"
544
+ ? _c(
562
545
  "em-table",
563
- Object.assign({}, _vm.$attrs, item),
564
- false
546
+ _vm._b(
547
+ {
548
+ ref: "emFormTable",
549
+ refInFor: true,
550
+ staticClass: "em-form-table",
551
+ style: "margin:" + (item.margin || 10) + "px 0px",
552
+ attrs: {
553
+ data: _vm.model[item.name],
554
+ thead: item.tHead,
555
+ isForm: "",
556
+ form:
557
+ !item.disabled &&
558
+ !_vm.disabled &&
559
+ !item.readonly &&
560
+ !_vm.readonly &&
561
+ item.form,
562
+ },
563
+ on: { "btn-click": _vm.handleBtnClick },
564
+ },
565
+ "em-table",
566
+ Object.assign({}, _vm.$attrs, item),
567
+ false
568
+ )
565
569
  )
566
- )
567
- : _vm._e(),
568
- ],
569
- 1
570
- )
571
- }),
570
+ : _vm._e(),
571
+ ],
572
+ 1
573
+ )
574
+ }),
575
+ 0
576
+ ),
572
577
  _vm.showBtn && !_vm.disabled && !_vm.readonly
573
578
  ? _c(
574
579
  "div",
@@ -615,15 +620,14 @@ var render = function () {
615
620
  2
616
621
  )
617
622
  : _vm._e(),
618
- ],
619
- 2
623
+ ]
620
624
  )
621
625
  }
622
626
  var staticRenderFns = []
623
627
  render._withStripped = true
624
628
 
625
629
 
626
- // CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=0c43eb06&
630
+ // CONCATENATED MODULE: ./packages/form/src/main.vue?vue&type=template&id=273ca6fc&
627
631
 
628
632
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/form/src/main.vue?vue&type=script&lang=js&
629
633
  //
@@ -813,6 +817,9 @@ render._withStripped = true
813
817
  //
814
818
  //
815
819
  //
820
+ //
821
+ //
822
+ //
816
823
 
817
824
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
818
825
  name: 'EmForm',
@@ -904,14 +911,14 @@ render._withStripped = true
904
911
  this.$emit('submit', this.model);
905
912
  }
906
913
  },
907
- handleChange: function handleChange(key, value) {
908
- this.$emit('change', key, value);
914
+ handleChange: function handleChange(key, value, timePeriod) {
915
+ this.$emit('change', key, value, timePeriod);
909
916
  },
910
917
  handleBtnClick: function handleBtnClick(val) {
911
918
  this.$emit('table-btn-click', val);
912
919
  },
913
920
  validate: function validate(name) {
914
- this.$refs.emForm.validate(name);
921
+ return this.$refs.emForm.validate(name);
915
922
  },
916
923
  submit: function submit() {
917
924
  this.$refs.emForm.submit();