mirror of
https://github.com/liriliri/eruda.git
synced 2026-04-01 10:18:35 +08:00
Dev: Small bugs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import NavBar from './NavBar.es6'
|
||||
import util from '../lib/util'
|
||||
import Tool from './Tool.es6'
|
||||
import config from '../lib/config.es6'
|
||||
|
||||
require('./DevTools.scss');
|
||||
@@ -47,6 +48,8 @@ export default class DevTools
|
||||
}
|
||||
add(tool)
|
||||
{
|
||||
util.defaults(tool, new Tool());
|
||||
|
||||
var name = tool.name;
|
||||
|
||||
this._$tools.append('<div class="eruda-' + name + ' eruda-tool"></div>');
|
||||
|
||||
@@ -61,8 +61,6 @@ export default class Elements extends Tool
|
||||
|
||||
var $bottomBar = this._$el.find('.eruda-bottom-bar');
|
||||
|
||||
var self = this;
|
||||
|
||||
$bottomBar.on('click', '.back', () => this._back())
|
||||
.on('click', '.refresh', () => this._render())
|
||||
.on('click', '.highlight', function ()
|
||||
|
||||
@@ -9,6 +9,7 @@ import Info from './Info/Info.es6'
|
||||
import Features from './Features/Features.es6'
|
||||
import Settings from './Settings/Settings.es6'
|
||||
import util from './lib/util'
|
||||
import config from './lib/config.es6'
|
||||
|
||||
require('./style.scss');
|
||||
require('./icon.css');
|
||||
@@ -63,7 +64,7 @@ function appendContainer()
|
||||
module.exports = {
|
||||
get(name)
|
||||
{
|
||||
return devTools.get(name);
|
||||
return util.isUndef(name) ? devTools : devTools.get(name);
|
||||
},
|
||||
add(tool)
|
||||
{
|
||||
@@ -79,7 +80,7 @@ module.exports = {
|
||||
},
|
||||
show(name)
|
||||
{
|
||||
devTools.showTool(name);
|
||||
util.isUndef(name) ? devTools.show() : devTools.showTool(name);
|
||||
|
||||
return this;
|
||||
},
|
||||
@@ -89,6 +90,7 @@ module.exports = {
|
||||
$container.remove();
|
||||
window.eruda = undefined;
|
||||
},
|
||||
config,
|
||||
util
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user