fix: 修复表单内按钮点击触发跳转问题
- 所有表单内的按钮添加 type="button" 属性 - 防止点击按钮触发表单提交导致页面跳转 - 修复:添加字段、添加子类别按钮在编辑弹框中的问题
This commit is contained in:
@@ -1539,7 +1539,7 @@
|
||||
<div class="border-t pt-4">
|
||||
<div class="flex justify-between items-center mb-3">
|
||||
<label class="text-sm font-medium text-gray-700"><i class="ri-list-settings-line mr-1"></i>参数字段管理</label>
|
||||
<button onclick="openFieldAddModal('category')" class="px-3 py-1.5 bg-indigo-600 text-white rounded-lg text-sm hover:bg-indigo-700">
|
||||
<button type="button" onclick="openFieldAddModal('category')" class="px-3 py-1.5 bg-indigo-600 text-white rounded-lg text-sm hover:bg-indigo-700">
|
||||
<i class="ri-add-line mr-1"></i>添加字段
|
||||
</button>
|
||||
</div>
|
||||
@@ -1553,7 +1553,7 @@
|
||||
<div class="border-t pt-4">
|
||||
<div class="flex justify-between items-center mb-3">
|
||||
<label class="text-sm font-medium text-gray-700"><i class="ri-folder-line mr-1"></i>子类别管理</label>
|
||||
<button onclick="openSubcategoryAddModal()" class="px-3 py-1.5 bg-green-600 text-white rounded-lg text-sm hover:bg-green-700">
|
||||
<button type="button" onclick="openSubcategoryAddModal()" class="px-3 py-1.5 bg-green-600 text-white rounded-lg text-sm hover:bg-green-700">
|
||||
<i class="ri-add-line mr-1"></i>添加子类别
|
||||
</button>
|
||||
</div>
|
||||
@@ -1595,7 +1595,7 @@
|
||||
<div class="border-t pt-4">
|
||||
<div class="flex justify-between items-center mb-3">
|
||||
<label class="text-sm font-medium text-gray-700"><i class="ri-list-settings-line mr-1"></i>参数字段管理(基础字段,所有子类别共享)</label>
|
||||
<button onclick="openFieldAddModal('category')" class="px-3 py-1.5 bg-indigo-600 text-white rounded-lg text-sm hover:bg-indigo-700">
|
||||
<button type="button" onclick="openFieldAddModal('category')" class="px-3 py-1.5 bg-indigo-600 text-white rounded-lg text-sm hover:bg-indigo-700">
|
||||
<i class="ri-add-line mr-1"></i>添加字段
|
||||
</button>
|
||||
</div>
|
||||
@@ -1609,7 +1609,7 @@
|
||||
<div class="border-t pt-4">
|
||||
<div class="flex justify-between items-center mb-3">
|
||||
<label class="text-sm font-medium text-gray-700"><i class="ri-folder-line mr-1"></i>子类别管理</label>
|
||||
<button onclick="openSubcategoryAddModal()" class="px-3 py-1.5 bg-green-600 text-white rounded-lg text-sm hover:bg-green-700">
|
||||
<button type="button" onclick="openSubcategoryAddModal()" class="px-3 py-1.5 bg-green-600 text-white rounded-lg text-sm hover:bg-green-700">
|
||||
<i class="ri-add-line mr-1"></i>添加子类别
|
||||
</button>
|
||||
</div>
|
||||
@@ -1823,7 +1823,7 @@
|
||||
<div class="border-t pt-4">
|
||||
<div class="flex justify-between items-center mb-3">
|
||||
<label class="text-sm font-medium text-gray-700"><i class="ri-list-settings-line mr-1"></i>额外参数字段(子类别特有,继承父类别字段)</label>
|
||||
<button onclick="openSubcategoryFieldAddModal()" class="px-3 py-1.5 bg-indigo-600 text-white rounded-lg text-sm hover:bg-indigo-700">
|
||||
<button type="button" onclick="openSubcategoryFieldAddModal()" class="px-3 py-1.5 bg-indigo-600 text-white rounded-lg text-sm hover:bg-indigo-700">
|
||||
<i class="ri-add-line mr-1"></i>添加字段
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user