mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update admin.js
This commit is contained in:
parent
29a63ece70
commit
c75d167dd3
@ -634,7 +634,7 @@ $(function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
/*! 输入框失焦提交 */
|
/*! 表单元素失焦时提交 */
|
||||||
$body.on('blur', '[data-action-blur]', function () {
|
$body.on('blur', '[data-action-blur]', function () {
|
||||||
var data = {}, that = this, $this = $(this), action = $this.attr('data-action-blur');
|
var data = {}, that = this, $this = $(this), action = $this.attr('data-action-blur');
|
||||||
var time = $this.attr('data-time'), loading = $this.attr('data-loading') || false;
|
var time = $this.attr('data-time'), loading = $this.attr('data-loading') || false;
|
||||||
@ -656,6 +656,12 @@ $(function () {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/*! 表单元素失去焦点时数字 */
|
||||||
|
$body.on('blur', '[data-blur-number]', function (fiexd) {
|
||||||
|
fiexd = this.getAttribute('data-blur-number') || 0;
|
||||||
|
this.value = (parseFloat(this.value) || 0).toFixed(fiexd);
|
||||||
|
});
|
||||||
|
|
||||||
/*! 注册 data-href 事件行为 */
|
/*! 注册 data-href 事件行为 */
|
||||||
$body.on('click', '[data-href]', function (href) {
|
$body.on('click', '[data-href]', function (href) {
|
||||||
href = $(this).attr('data-href');
|
href = $(this).attr('data-href');
|
||||||
@ -665,8 +671,7 @@ $(function () {
|
|||||||
/*! 注册 data-iframe 事件行为 */
|
/*! 注册 data-iframe 事件行为 */
|
||||||
$body.on('click', '[data-iframe]', function () {
|
$body.on('click', '[data-iframe]', function () {
|
||||||
$(this).attr('data-index', $.form.iframe(
|
$(this).attr('data-index', $.form.iframe(
|
||||||
$(this).attr('data-iframe'),
|
$(this).attr('data-iframe'), $(this).attr('data-title') || '窗口',
|
||||||
$(this).attr('data-title') || '窗口',
|
|
||||||
$(this).attr('data-area') || undefined)
|
$(this).attr('data-area') || undefined)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -813,12 +818,6 @@ $(function () {
|
|||||||
})(code)
|
})(code)
|
||||||
};
|
};
|
||||||
|
|
||||||
/*! 表单元素失去焦点处理 */
|
|
||||||
$body.on('blur', '[data-blur-number]', function (fiexd) {
|
|
||||||
fiexd = this.getAttribute('data-blur-number') || 0;
|
|
||||||
this.value = (parseFloat(this.value) || 0).toFixed(fiexd);
|
|
||||||
});
|
|
||||||
|
|
||||||
/*! 图片加载异常处理 */
|
/*! 图片加载异常处理 */
|
||||||
document.addEventListener('error', function (e, elem) {
|
document.addEventListener('error', function (e, elem) {
|
||||||
elem = e.target;
|
elem = e.target;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user