feat: 拖拽布局-优化问题

flex-api
lichaojun 2 weeks ago
parent dbdae70640
commit a459dfe4aa

@ -7,6 +7,7 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-start; justify-content: flex-start;
align-content: flex-start;
gap: 30px; /* 调整子项内容间距 */ gap: 30px; /* 调整子项内容间距 */
padding: 20px; padding: 20px;
width: 100%; width: 100%;

@ -2,6 +2,12 @@ var userLangConfig = {
zh_CN: { zh_CN: {
base: { base: {
success: '操作成功', success: '操作成功',
confirm_del: '确定删除吗?',
tips: '提示',
},
layer: {
confirm: '确认',
cancel: '取消',
}, },
user: { user: {
// 图片组件默认名称 // 图片组件默认名称
@ -60,8 +66,14 @@ var userLangConfig = {
clear: 'clear', clear: 'clear',
confirm: 'confirm', confirm: 'confirm',
}, },
layer: {
confirm: 'confirm',
cancel: 'cancel',
},
base: { base: {
success: 'action success', success: 'action success',
confirm_del: 'confirm delete?',
tips: 'tips',
}, },
user: { user: {
// 图片组件默认名称 // 图片组件默认名称

@ -653,7 +653,11 @@
}, },
function () { function () {
layer.msg(userLangConfig[locale].base.success); layer.msg(userLangConfig[locale].base.success);
layer.close(loadIndex); layer.close(loadIndex, function () {
setTimeout(() => {
window.location.href = 'list.html';
}, 500);
});
} }
); );
}); });
@ -776,7 +780,7 @@
var i18n = function () { var i18n = function () {
return new Promise((resolve) => { return new Promise((resolve) => {
requestFN({ url: '/getLanguage', hasPreFix: false }, function (data) { requestFN({ url: '/getLanguage', hasPreFix: false }, function (data) {
data.language = 'zh_CN'; // data.language = 'zh_CN';
locale = data.language; locale = data.language;
// 设置语言 // 设置语言
layui.i18n.set({ layui.i18n.set({

@ -65,8 +65,12 @@
$(document).on('click', '.delete-btn', function () { $(document).on('click', '.delete-btn', function () {
var id = $(this).closest('.list-item').data('id'); var id = $(this).closest('.list-item').data('id');
requestFN({ type: 'POST', url: `deleteById?id=${id}` }, function (data) { const { confirm_del, tips } = userLangConfig[locale].base;
getTemplateList(); layer.confirm(confirm_del, { icon: 3, title: tips }, function (index) {
layer.close(index);
requestFN({ type: 'POST', url: `deleteById?id=${id}` }, function (data) {
getTemplateList();
});
}); });
}); });

Loading…
Cancel
Save