修改全部删除按钮的逻辑

This commit is contained in:
fofolee 2020-04-10 12:45:38 +08:00
parent c6c8caca34
commit 98fc4e5750

View File

@ -67,7 +67,8 @@ window.saveFile(options, JSON.stringify(json));
clearAll = () => { clearAll = () => {
window.messageBox({ type: 'question', icon: window.logo, message: "将会清空所有命令,请确认!", buttons: ['手抖...', '确定!'] }, index => { window.messageBox({ type: 'question', icon: window.logo, message: "将会清空所有命令,请确认!", buttons: ['手抖...', '确定!'] }, index => {
if (index) { if (index) {
utools.db.remove('customFts') utools.db.remove('customFts');
clearAllFeatures();
showOptions(); showOptions();
} }
}) })
@ -304,6 +305,12 @@ typeCheck = () => {
} }
} }
clearAllFeatures = () => {
for (var fts of utools.getFeatures()) {
utools.removeFeature(fts.code)
}
}
// 开关 // 开关
$("#options").on('change', 'input[type=checkbox]', function () { $("#options").on('change', 'input[type=checkbox]', function () {
var customFts = getCustomFts(), var customFts = getCustomFts(),