components 相关问题

统一建模语言中的一个组件“代表系统的模块化部分,它封装了其内容,其表现形式可在其环境中替换。组件根据提供的和所需的接口定义其行为”。组件的最佳示例可以在ActionScript-Flash,Flex sdks中找到。你有UI组件,如按钮,标签,DataGrids,可重复使用的图表,可分发等。

React js - 三元添加 html 块到组件 - classNames 打破块

我的目标是构建在切换单击按钮上出现和消失的评论部分。 我有以下结构: 设置按钮状态: 常量 [showButton, toggleShowButton] = useState(false)

回答 0 投票 0

在 reactjs 中显示从 rest api 获取的图像

我想显示特定产品的图像。我正在获取产品的图像,图像路径在控制台中正确打印,但图像未显示在页面中。 是...

回答 1 投票 0

在导航下拉菜单中正确放置状态

我的网站上有一个 Nav 组件,其中有一堆状态管理用户悬停在列表项上。如果列表项或下拉列表悬停,则下拉列表显示相关的con ...

回答 0 投票 0

Vue 3 + Vuetify 3 + vue/test-utils 的组合,导致“找不到注入的 Vuetify 布局”错误

有谁知道如何在@vue/test-utils v2 库中进行组件测试,同时使用 Vuetify 3 Beta 版本?我还使用 Vue3 组合 API 来定义我的组件。我

回答 3 投票 0

电子表格角度材料

我搜索像 Excel 这样的免费电子表格,将其集成到项目中。你知道任何基于 Angular Material 的免费电子表格组件/库吗?谢谢。

回答 0 投票 0

React - 组织路线 - 问题定向到新页面

我希望我的 SignIn 组件在不渲染任何其他组件的情况下自行呈现。 我怎么能做到这一点。 下面是我的 app.js 功能应用程序(){ 返回 ( <> 我希望我的 SignIn 组件在不渲染任何其他组件的情况下自行呈现。 我怎么能做到这一点。 下面是我的app.js function App() { return ( <> <div className="App"> <BrowserRouter> <Navbar /> <Stack direction="row" spacing={1} justifyContent="flex-start" style={{ backgroundColor: "#f0f4f8" }} sx={{ borderTopColor: '#d9e2ec', borderTopStyle: 'solid', borderTopWidth: '0.1em' }}> <Sidebar /> <div className='pages'> <Routes> <Route path="/api/jobs/:id" element={<JobSelectOne />} /> <Route path="/" element={<Home />} /> <Route path="/create" element={<AddJob />} /> <Route path="/profile" element={<Profile />} /> <Route path="/signin" element={<SignIn />} /> </Routes> </div> </Stack> </BrowserRouter> </div> </>

回答 0 投票 0

Symfony 6:如何定义第三方包 twig ux 组件

我需要在我自己的供应商包中制作一个 symfony UX 组件。 有组件,在应用程序级别按需要工作: 我需要在我自己的供应商包中制作一个 symfony UX 组件。 有组件,在应用程序级别按需要工作: <?php namespace App\Components; use Knp\Component\Pager\PaginatorInterface; use Mysterty\CoreBundle\Repository\PostRepository; use Symfony\UX\TwigComponent\Attribute\AsTwigComponent; #[AsTwigComponent('latest_posts', template: '@MystertyCore/Core/_latest_posts.html.twig')] class LatestPostComponent { private PostRepository $postRepository; private PaginatorInterface $paginator; public function __construct(PostRepository $postRepository, PaginatorInterface $paginator) { $this->postRepository = $postRepository; $this->paginator = $paginator; } public function getPaginatedPosts() { $query = $this->postRepository->getOrdered(); $pagination = $this->paginator->paginate($query, 1, 3); return $pagination; } } 如果我按如下方式在My/Bundle/src/Components中移动它,它会崩溃,除非我设置服务并将我的组件定义为AbstractController: #My/CoreBundle/config/services.yaml services: My\CoreBundle\Components\LatestPostComponent: public: true autowire: true autoconfigure: true tags: - "controller.service_arguments" - "container.service_subscriber" <?php namespace Mysterty\CoreBundle\Components; // […] #[AsTwigComponent('mty_latest_posts', template: '@MystertyCore/Core/_latest_posts.html.twig')] class LatestPostComponent extends AbstractController { // […] } 但是,它看起来很乱。这真的是正确的做法吗?

回答 0 投票 0

当点击新建笔记按钮时,它不会弹出表单。无法弄清楚缺少什么

我附上了我的表单组件和笔记组件的代码。尝试单击“新建”按钮但不会弹出表单或 console.log anythingimport React from “react”; 函数 NoteForm(...

回答 1 投票 0

Angular:无法将输出从一个子组件传递到另一个

我是 Angular 的新手(昨天为了一个带回家的工作面试项目开始学习它)所以如果我问的是一些琐碎的事情,我提前道歉。 我决定做一个基本项目来......

回答 2 投票 0

如何从外部访问 useEffect 块内部的数据?

基本上,我有一个 DateView 组件,我从中检索 ChooseCalendar 组件中的日期。但是我有从 DateView 中的 useEffect 块中检索此数据的代码,因为我是

回答 1 投票 0

组件无法使用 Blazor 组件中的 signInManager.PasswordSignInAsync 登录

我创建了以下 LoginDialog,它在单击按钮时会在屏幕上弹出,但是当我尝试登录时,我收到错误消息:“标头是只读的,响应已经开始”

回答 0 投票 0

如何统一为布料添加力和方向?

我要做一个扔布包的游戏。 在我找到它的过程中,我弄清楚了布料的成分。 但我不知道如何向某个方向施加力。 我可以在布袋上加弯曲吗?...

回答 0 投票 0

ReactJS 对话框组件

我有一个对话内容组件来自 https://mui.com/material-ui/react-dialog/ 我希望它在输入字段中有下拉选项。我有使用硬编码值的下拉选项...

回答 0 投票 0

在 React 和 Angular 上使用一个组件

我们目前正在维护多个具有相同导航栏实现的项目。这些项目在它们构建的 JS 库上有所不同(即 React、Angular 和 Angular J...

回答 1 投票 0

ReactJS,从子组件改变状态

我有一个应用程序,可以从 API 获取一些数据。然后我将这些数据放入名为“数据”的数组中。然后这个“数据”数组被转换为名为“元素”的组件数组(

回答 2 投票 0

在Vue3的文档中,有一句话不是很懂,也没有具体的例子来解释

https://vuejs.org/guide/components/events.html#declaring-emitted-events 如果在 emits 选项中定义了本机事件(例如,点击),监听器现在将只监听组件发出的点击

回答 1 投票 0

单个页面上的 Angular 多组件通信

我在一页上并排放置了两张材料卡: 错误.component.html 我在一页中并排放置了两张材料卡: error.component.html <mat-card-content><app-errortitle></app-errortitle></mat-card-content> <mat-card-content><app-errorcount></app-errorcount></mat-card-content> 我正在尝试学习如何让 errorcount 识别用户何时从 errortitle 中选择一个项目来刷新 errorcount——没有我奇妙的“刷新按钮”解决方案。 errortitle.component.hmtl <div *ngFor="let errorlist of errorList"> <mat-card style="cursor:pointer;" (click)="toggleErrorCount(errorlist.id)"> <mat-card-title>{{errorlist.title}}</mat-card-title> <mat-card-content>{{errorlist.description}}</mat-card-content> </mat-card><br /> </div> errortitlecomponent.ts import { Component, OnInit } from '@angular/core'; import { ErrorcountComponent } from '../errorcount/errorcount.component' export interface ErrorList { id: number, title: string, description: string }; @Component({ providers: [ErrorcountComponent], selector: 'app-errortitle', templateUrl: './errortitle.component.html', styleUrls: ['./errortitle.component.css'] }) export class ErrortitleComponent implements OnInit { errorList: ErrorList[] = [ { id: 1, title: 'Application Error', description:'Problems caused by malfunction in code.' }, { id: 2, title: 'Unexpected Server Error', description: 'Interruptions caused by equipment.' }, { id: 3, title: 'Service Error', description: 'Exceptions caused by malfunctions in APIs.' }, { id: 4, title: 'Angular Error', description: 'Psycotic depresion that needs to call things 3x to make sure it works?' } ]; constructor(private errcountcomponent: ErrorcountComponent) { } ngOnInit(): void { } toggleErrorCount(id: number) { /*Ilogical Operation*/ this.errcountcomponent.error_id = id; /*this.errcountcomponent.fileterErrorCounter();*/ } } errorcount.component.html <table width="100%"> <thead> <tr> <th>Date</th> <th>Count</th> </tr> </thead> <tr *ngFor="let errorcounter of fileterErrorCounter()"> <td>{{errorcounter.date}}</td> <td style="text-align:right;">{{errorcounter.count}}</td> </tr> </table> errorcount.component.ts import { Component, Input, OnInit } from '@angular/core'; export interface ErrorCounter { id: number, error_id: number, date: string, count: number }; @Component({ selector: 'app-errorcount', templateUrl: './errorcount.component.html', styleUrls: ['./errorcount.component.css'] }) export class ErrorcountComponent implements OnInit { @Input() error_id: number = 0; errorCounter: ErrorCounter[] = [ { id: 1, error_id: 1, date: '20230101', count:201 }, { id: 2, error_id: 2, date: '20230102', count:321 }, { id: 3, error_id: 3, date: '20230103', count:431 }, { id: 4, error_id: 1, date: '20230104', count:541 }, { id: 5, error_id: 2, date: '20230105', count:651 }, { id: 6, error_id: 3, date: '20230106', count:561 }, { id: 7, error_id: 1, date: '20230107', count:471 }, { id: 8, error_id: 2, date: '20230108', count:381 }, { id: 9, error_id: 3, date: '20230109', count: 282 }, { id: 10, error_id: 1, date: '20230110', count: 184 }, ]; constructor() { } ngOnInit(): void { } fileterErrorCounter(): ErrorCounter[] { alert(this.error_id); if (this.error_id > 0) return this.errorCounter.filter(f => f.error_id == this.error_id) else return this.errorCounter; } } 在我看来:errortitle.component.hmtl 有一个 (click)="toggleErrorCount(errorlist.id)" 它应该使用它的 import { ErrorcountComponent } 中的内容来更改 @Input() error_id 的值:errorcount.component 中的数字.ts 并最终调用它的 fileterErrorCounter()——唯一的问题是调试在 countercomponent 处停了三次——第一次有值但其余的都清零了——我认为刷新永远不会发生。 我不确定这是否是在 Angular 上处理这个问题的方法,或者我是否需要某个地方的可观察对象,或者 @ViewChild,或者将其中任何一个放在哪里。我卡住了。 请在从 errortitle.component 中选择一个项目后帮助归档 errorcounter.component 的内容,而无需进行令人讨厌的刷新。 谢谢

回答 0 投票 0

导航栏组件未显示在网页上

我的 Navbar 组件没有出现在我的 React 网页上……这是代码: 这是我的反应代码:

回答 0 投票 0

react-virtualized 表列中的下拉渲染溢出

我正在开发一个 React 应用程序,我正在渲染一个表格,其中 2 个列字段而不是包含文本包含一个下拉菜单,我在这些下拉菜单中有不同的选项,dropd ...

回答 1 投票 0

如何从位于后端的文件中向不同的组件添加不同的字体?

我正在使用 NextJS (13) 和 Sanity 创建带有类型测试器(测试字体)的网页。 我有多种字体,每种字体都有一个组件。在这个组件中,我使用了一个 contentedibl ...

回答 0 投票 0

最新问题
© www.soinside.com 2019 - 2024. All rights reserved.