mirror of https://gitee.com/karson/fastadmin.git
表单增加slider控件
parent
f011bf6da2
commit
f9b43bdbe4
|
|
@ -11,7 +11,7 @@
|
|||
"font-awesome": "^4.6.1",
|
||||
"bootstrap-table": "~1.11.0",
|
||||
"jstree": "~3.3.2",
|
||||
"moment": "~2.15.2",
|
||||
"moment": "^2.20.1",
|
||||
"plupload": "~2.2.0",
|
||||
"toastr": "~2.1.3",
|
||||
"jcrop": "~2.0.4",
|
||||
|
|
@ -32,6 +32,7 @@
|
|||
"fastadmin-dragsort": "~1.0.0",
|
||||
"fastadmin-addtabs": "~1.0.3",
|
||||
"fastadmin-selectpage": "~1.0.0",
|
||||
"fastadmin-layer": "~3.1.2"
|
||||
"fastadmin-layer": "~3.1.2",
|
||||
"bootstrap-slider": "*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
@import url("../libs/nice-validator/dist/jquery.validator.css");
|
||||
@import url("../libs/bootstrap-select/dist/css/bootstrap-select.min.css");
|
||||
@import url("../libs/fastadmin-selectpage/selectpage.css");
|
||||
@import url("../libs/bootstrap-slider/slider.css");
|
||||
html,
|
||||
body {
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ require.config({
|
|||
'bootstrap-table-export': '../libs/bootstrap-table/dist/extensions/export/bootstrap-table-export.min',
|
||||
'bootstrap-table-mobile': '../libs/bootstrap-table/dist/extensions/mobile/bootstrap-table-mobile',
|
||||
'bootstrap-table-lang': '../libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN',
|
||||
'bootstrap-slider': '../libs/bootstrap-slider/bootstrap-slider',
|
||||
'tableexport': '../libs/tableExport.jquery.plugin/tableExport.min',
|
||||
'dragsort': '../libs/fastadmin-dragsort/jquery.dragsort',
|
||||
'sortable': '../libs/Sortable/Sortable.min',
|
||||
|
|
|
|||
|
|
@ -368,6 +368,20 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
|||
},
|
||||
bindevent: function (form) {
|
||||
|
||||
},
|
||||
slider: function (form) {
|
||||
if ($(".slider", form).size() > 0) {
|
||||
require(['bootstrap-slider'], function () {
|
||||
$('.slider').removeClass('hidden').css('width', function (index, value) {
|
||||
return $(this).parents('.form-control').width();
|
||||
}).slider().on('slide', function (ev) {
|
||||
var data = $(this).data();
|
||||
if (typeof data.unit !== 'undefined') {
|
||||
$(this).parents('.form-control').siblings('.value').text(ev.value + data.unit);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
api: {
|
||||
|
|
@ -467,6 +481,8 @@ define(['jquery', 'bootstrap', 'upload', 'validator'], function ($, undefined, U
|
|||
|
||||
events.fieldlist(form);
|
||||
|
||||
events.slider(form);
|
||||
|
||||
events.switcher(form);
|
||||
},
|
||||
custom: {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue