| | |
| | | } |
| | | if (typeof I18n !== 'undefined') { |
| | | I18n.updatePage($('.layui-table-tool')); |
| | | setTimeout(function() { |
| | | I18n.updateLayuiPagination(); |
| | | }, 50); |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | |
| | | done: function (res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | if (typeof I18n !== 'undefined') { |
| | | I18n.updatePage($('.layui-table-tool')); |
| | | setTimeout(function() { |
| | | I18n.updateLayuiPagination(); |
| | | }, 50); |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | |
| | | }); |
| | | |
| | | |
| | | // 监听i18n更新事件,重新渲染表格 |
| | | $(document).on('i18n:updated', function() { |
| | | table.reload('locDetl', { |
| | | cols: [getCol()] |
| | | // 监听语言切换事件 |
| | | $(document).on('i18n:languageChanged', function() { |
| | | tableIns.reload({ |
| | | cols: [getCol()], |
| | | text: { |
| | | none: I18n.t('no_data') |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (typeof I18n !== 'undefined') { |
| | | I18n.updatePage($('.layui-table-tool')); |
| | | setTimeout(function() { |
| | | I18n.updateLayuiPagination(); |
| | | }, 50); |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | if (typeof I18n !== 'undefined') { |
| | | I18n.updatePage($('.layui-table-tool')); |
| | | setTimeout(function() { |
| | | I18n.updateLayuiPagination(); |
| | | }, 50); |
| | | } |
| | | pageCurr=curr; |
| | | if (res.data.length === 0 && count !== 0) { |
| | | tableIns.reload({ |