代码
提交代码
function delHistory() { let that = this showModal({//弹出确认对话框 title: '', content: '您确定要清空搜索历史吗', showCancel: true, cancelText: '取消', cancelColor: '#000000', confirmText: '确定', confirmColor: '#3CC51F', success: result => { if (result.confirm) { window.localStorage.removeItem("historyList")//情况历史队列 } } }) },
运行结果