小编gan*_*esh的帖子

增加 Bootstrap 4 表格的列宽

我需要增加列宽,我试过 width-%,PX,rem 但这不起作用。如果表格的列数较少,我可以增加列宽,但在我的场景中,如果我的列数超过 15 列,则无法更改宽度。

<div class="table-responsive">
<table class="table">
  <thead>
    <tr>

<th scope="col">#</th><th scope="col">#</th>

      <th scope="col" style="width: 500px;">Heading heading'</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>

      <th scope="col">Heading</th><th scope="col">Heading</th>
    </tr>
  </thead>
  <tbody>
    <tr>

 <th scope="row">1</th><th scope="row">1</th>

      <td style="width: 300px;">jksdfn jhs fjidsh fj id hidsfdsfd</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>
    </tr>
   <tr>

 <th scope="row">1</th><th scope="row">1</th>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td>

      <td>Cell</td><td>Cell</td> …
Run Code Online (Sandbox Code Playgroud)

html bootstrap-4

5
推荐指数
1
解决办法
6914
查看次数

NestJS/TypeORM:无法设置只有 getter 的 #&lt;Repository&gt; 的属性元数据

我尝试运行我的 Nestjstutorial 应用程序,显示以下错误。我的后端连接到 PostgreSQL 数据库。

TypeError: 无法在 DataSource.getCustomRepository (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\src\entity-manager\EntityManager.ts:1404:59) 设置仅具有 getter 的 # 属性元数据 ( D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\src\data-source\DataSource.ts:465:29) 在 InstanceWrapper.useFactory [作为元类型] (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\node_modules @nestjs\typeorm\dist\typeorm.providers.js:13:35) 在 Injector.instantiateClass (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\node_modules@nestjs\core\injector\injector.js:333:55 ) 在回调 (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\node_modules@nestjs\core\injector\injector.js:48:41) 在 processTicksAndRejections (node:internal/process/task_queues:96:5) 在注入器.resolveConstructorParams (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\node_modules@nestjs\core\injector\injector.js:122:24) 在 Injector.loadInstance (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\ node_modules@nestjs\core\injector\injector.js:52:9) 在 Injector.loadProvider (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\node_modules@nestjs\core\injector\injector.js:74:9)在 Injector.lookupComponentInImports (D:\Ganesh\MyDrive\nestjs\nestjs_tutorial\nestjsturorial\node_modules@nestjs\core\injector\injector.js:265:17)

我的代码如下所示:

应用程序模块

    import { Module } from '@nestjs/common';
    import { AppController } from './app.controller';
    import { AppService } from './app.service';
    import { UserController } from './user/user.controller';
    import { UserModule } from './user/user.module';
    import { UserService } from './user/user.services';
    import …
Run Code Online (Sandbox Code Playgroud)

javascript node.js typescript typeorm nestjs

4
推荐指数
1
解决办法
5096
查看次数

标签 统计

bootstrap-4 ×1

html ×1

javascript ×1

nestjs ×1

node.js ×1

typeorm ×1

typescript ×1