如何删除 React Web 应用程序中左上角的计时器计数器

Pet*_*ter 2 ruby-on-rails

我的反应应用程序左上角的时间隐藏了我的应用程序中的内容,我不知道如何删除它。

在此处输入图片说明

这是我截取的Gemfile. 与时间无关。

source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1.0'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
# Use Puma as the app server
gem 'puma', '~> 5.0'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
    
group :development do
  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
  gem 'web-console', '>= 4.1.0'
  # Display performance information such as SQL time and flame graphs for each request in your browser.
  # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
  gem 'rack-mini-profiler', '~> 2.0'
end
Run Code Online (Sandbox Code Playgroud)

Eye*_*dic 7

这是由 gem 提供的,rack-mini-profiler它实际上有很多用于调试 sql 查询的有用信息。如果您不想要它,只需删除该行或将其注释掉并bundle install再次运行。

# Comment out or remove line completely
# gem 'rack-mini-profiler'
Run Code Online (Sandbox Code Playgroud)

在控制台/终端

bundle install
Run Code Online (Sandbox Code Playgroud)

...最后不要忘记重新启动服务器。


fat*_*rog 6

我同意,它位于一个可怕的位置,谢天谢地,您可以使用初始化程序更改它的位置 config/initializers/

https://github.com/MiniProfiler/rack-mini-profiler#configuration-options

Rack::MiniProfiler.config.position = 'bottom-right'
Run Code Online (Sandbox Code Playgroud)

  • 您需要创建一个新文件: config/initializers/rack_mini_profiler.rb 并在其中放入 Rack::MiniProfiler.config.position = 'bottom-right' 行 (3认同)