diff --git a/src/assets/options.js b/src/assets/options.js
index 9f6d3c2..2713369 100644
--- a/src/assets/options.js
+++ b/src/assets/options.js
@@ -225,7 +225,7 @@
var platformIcons
if (features.platform) platformIcons = features.platform.map(x => `
`)
else platformIcons = ['
', '
', '
']
- featureList += `
+ featureList += `
 |
${features.explain}
@@ -238,15 +238,15 @@
| ${cmds} |
|
-
-
- ${tag == "默认" ? "" : ` `}
+
+
+ ${tag == "默认" ? "" : ` `}
| `
})
featureList += `
`
@@ -605,7 +605,7 @@
// 开关
$("#options").on('change', 'input[type=checkbox]', function () {
var customFts = getDB('customFts'),
- code = $(this).attr('id');
+ code = $(this).parents('tr').attr('id')
if (!utools.removeFeature(code)) {
utools.setFeature(customFts[code].features);
}
@@ -635,7 +635,7 @@
// 编辑
$("#options").on('click', '.editBtn', function () {
var readonly = false,
- code = $(this).attr('code'),
+ code = $(this).parents('tr').attr('id'),
data = utools.db.get("customFts").data[code],
cmds = data.features.cmds[0],
platform = data.features.platform;
@@ -736,7 +736,7 @@
// 导出
$("#options").on('click', '.exportBtn', function () {
- var code = $(this).attr('code'),
+ var code = $(this).parents('tr').attr('id'),
json = getDB('customFts')[code],
options = {
title: '选择保存位置',
@@ -760,7 +760,7 @@
cancelButtonText: '手抖...',
}).then((result) => {
if (result.value) {
- var code = $(this).attr('code'),
+ var code = $(this).parents('tr').attr('id'),
db = utools.db.get("customFts"),
data = db.data;
delete data[code];
@@ -774,7 +774,7 @@
})
// 选择图标
- $("#options").on('click', '#icon, #iconame', function () {
+ $("#options").on('click', '#icon', function () {
var options = {
buttonLabel: '选择',
filters: [{
@@ -907,11 +907,9 @@
redirectTag = "未分类"
}
showOptions(redirectTag);
+ location.href = '#' + code
$("#customize").empty()
- $(`#${code}`).click();
- if (!$(`#${code}`).is(':checked')) {
- $(`#${code}`).click();
- }
+ $(`#${code} .checked-switch`).is(':checked') || $(`#${code} .checked-switch`).click()
});
}
}