updates
This commit is contained in:
+14
-13
@@ -1,10 +1,11 @@
|
|||||||
import './css/app-ui.css';
|
import './css/app-ui.css';
|
||||||
|
|
||||||
import { Ut } from '../utils/Ut';
|
import { Ut } from '../utils/Ut';
|
||||||
import { El, EvtOptions } from '../utils/dom';
|
import { El } from '../utils/dom';
|
||||||
import { Boot } from './Boot';
|
import { Boot } from './Boot';
|
||||||
import { Cancelable } from '../widgets/cancelable/Cancelable';
|
import { Cancelable } from '../widgets/cancelable/Cancelable';
|
||||||
import { DatePicker } from '../widgets/date-picker/DatePicker';
|
import { DatePicker } from '../widgets/date-picker/DatePicker';
|
||||||
|
import { TwoDatePicker } from '../widgets/two-datepicker/TwoDatepicker';
|
||||||
import { IntervalPicker } from '../widgets/interval-picker/IntervalPicker';
|
import { IntervalPicker } from '../widgets/interval-picker/IntervalPicker';
|
||||||
import { Uploader } from '../widgets/uploader/Uploader';
|
import { Uploader } from '../widgets/uploader/Uploader';
|
||||||
|
|
||||||
@@ -609,7 +610,7 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makeInputElement(field, parent) {
|
static makeInputElement(field, parent) {
|
||||||
|
|
||||||
let input = El('input', { type: field.type, className: 'sp-form-control' });
|
const input = El('input', { type: field.type, className: 'sp-form-control' });
|
||||||
|
|
||||||
if (field.value) {
|
if (field.value) {
|
||||||
input.value = field.value;
|
input.value = field.value;
|
||||||
@@ -700,7 +701,7 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makeDatePickerElement(field, parent) {
|
static makeDatePickerElement(field, parent) {
|
||||||
|
|
||||||
let input = Render.makeInputElement({... field, ... { type: 'text' }}, parent);
|
const input = Render.makeInputElement({... field, ... { type: 'text' }}, parent);
|
||||||
|
|
||||||
new DatePicker(input, {
|
new DatePicker(input, {
|
||||||
style: field.style || 'normal',
|
style: field.style || 'normal',
|
||||||
@@ -722,9 +723,9 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makeTwoDatePickerElement(field, parent) {
|
static makeTwoDatePickerElement(field, parent) {
|
||||||
|
|
||||||
let input = Render.makeInputElement({... field, ... { type: 'text' }}, parent);
|
const input = Render.makeInputElement({... field, ... { type: 'text' }}, parent);
|
||||||
|
|
||||||
input.TwoDatePicker({
|
new TwoDatePicker(input, {
|
||||||
style: field.style || 'normal',
|
style: field.style || 'normal',
|
||||||
disabled: field.disabled || false,
|
disabled: field.disabled || false,
|
||||||
multiple: field.multiple || false,
|
multiple: field.multiple || false,
|
||||||
@@ -744,7 +745,7 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makeIntervalPickerElement(field, parent) {
|
static makeIntervalPickerElement(field, parent) {
|
||||||
|
|
||||||
let input = Render.makeInputElement({... field, ... { type: 'text' }}, parent);
|
const input = Render.makeInputElement({... field, ... { type: 'text' }}, parent);
|
||||||
|
|
||||||
new IntervalPicker(input, {
|
new IntervalPicker(input, {
|
||||||
style : field.style || 'normal',
|
style : field.style || 'normal',
|
||||||
@@ -790,7 +791,7 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makeInputColorElement(field, parent) {
|
static makeInputColorElement(field, parent) {
|
||||||
|
|
||||||
let input = El('input', { type: 'color' });
|
const input = El('input', { type: 'color' });
|
||||||
|
|
||||||
let elem = El('div', { className: 'input-color-wrapper' }, input);
|
let elem = El('div', { className: 'input-color-wrapper' }, input);
|
||||||
|
|
||||||
@@ -806,7 +807,7 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makeInputFileElement(field, parent, opts) {
|
static makeInputFileElement(field, parent, opts) {
|
||||||
|
|
||||||
let input = El('input', { type: 'file' });
|
const input = El('input', { type: 'file' });
|
||||||
|
|
||||||
Render.setInputAttr(input, field);
|
Render.setInputAttr(input, field);
|
||||||
|
|
||||||
@@ -863,7 +864,7 @@ export class Render {
|
|||||||
|
|
||||||
Ut.each (field.option, (text, val) => {
|
Ut.each (field.option, (text, val) => {
|
||||||
|
|
||||||
let input = El('input', { type: field.type });
|
const input = El('input', { type: field.type });
|
||||||
|
|
||||||
Render.setInputAttr(input, field);
|
Render.setInputAttr(input, field);
|
||||||
|
|
||||||
@@ -924,7 +925,7 @@ export class Render {
|
|||||||
label.className += ' ' + field.xcls;
|
label.className += ' ' + field.xcls;
|
||||||
}
|
}
|
||||||
|
|
||||||
let input = El('input', { type: 'radio' });
|
const input = El('input', { type: 'radio' });
|
||||||
|
|
||||||
Render.setInputAttr(input, field);
|
Render.setInputAttr(input, field);
|
||||||
|
|
||||||
@@ -956,7 +957,7 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makeNumPickerElement(field, parent) {
|
static makeNumPickerElement(field, parent) {
|
||||||
|
|
||||||
let input = El('input', { name: field.name, type: 'hidden' });
|
const input = El('input', { name: field.name, type: 'hidden' });
|
||||||
|
|
||||||
if (field.id) {
|
if (field.id) {
|
||||||
input.id = field.id;
|
input.id = field.id;
|
||||||
@@ -981,7 +982,7 @@ export class Render {
|
|||||||
*/
|
*/
|
||||||
static makePinBoxElement(field, parent) {
|
static makePinBoxElement(field, parent) {
|
||||||
|
|
||||||
let input = El('input', {
|
const input = El('input', {
|
||||||
type: 'hidden',
|
type: 'hidden',
|
||||||
name: field.name
|
name: field.name
|
||||||
});
|
});
|
||||||
@@ -1002,7 +1003,7 @@ export class Render {
|
|||||||
return Render.makeInputElement(field, parent);
|
return Render.makeInputElement(field, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
let input = parent.appendChild(El('input', { type: 'hidden' }));
|
const input = parent.appendChild(El('input', { type: 'hidden' }));
|
||||||
|
|
||||||
if (field.name) {
|
if (field.name) {
|
||||||
input.name = field.name;
|
input.name = field.name;
|
||||||
|
|||||||
Reference in New Issue
Block a user