首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何删除react web应用程序中的左上角计时器

如何删除react web应用程序中的左上角计时器
EN

Stack Overflow用户
提问于 2021-01-06 10:01:16
回答 3查看 1.6K关注 0票数 3

在我的react应用程序中,左上角的定时是隐藏应用程序中的内容,而我不知道如何删除它。

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

代码语言:javascript
复制
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
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2021-01-06 17:55:34

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

代码语言:javascript
复制
# Comment out or remove line completely
# gem 'rack-mini-profiler'

在控制台/终端中

代码语言:javascript
复制
bundle install

...and终于不忘重启服务器了。

票数 7
EN

Stack Overflow用户

发布于 2021-02-16 02:22:37

我同意,它在一个可怕的位置,谢天谢地,你可以用config/initializers/中的初始化器来改变它的位置

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

代码语言:javascript
复制
Rack::MiniProfiler.config.position = 'bottom-right'
票数 9
EN

Stack Overflow用户

发布于 2021-07-15 11:55:42

详述胖蛙的答案:你可以把它移到另一个角落。你的选项是“右上”、“左上”、“右下”或“左下”。在您的项目中,在config/initializers中创建一个名为mini-profiler.rb的文件,并添加以下内容:

代码语言:javascript
复制
Rack::MiniProfiler.config.position = 'bottom-left'

重新启动服务器并请求一个页面。

有关更多信息,请参阅此链接https://stackify.com/rack-mini-profiler-a-complete-guide-on-rails-performance/

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65589200

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档