如何改变b表的宽度

omu*_*bek 1 vue.js bootstrap-4 vuejs2 vuetify.js bootstrap-vue

我想展开表格的行,如屏幕截图所示。如何更改表格的宽度?\n有什么方法可以将类添加到表格中吗?

\n

我想要

\n
    logTableField: [\n  { key: "LogDate", label: "Tarih",thClass: \'bg-white text-dark\' },\n  { key: "LogUser", label: "Analist" },\n  { key: "Description", label: " \xc4\xb0\xc5\x9flem A\xc3\xa7\xc4\xb1klamas\xc4\xb1" },\n  { key: "LogText", label: "Kullan\xc4\xb1c\xc4\xb1 Yorumu" },\n],\n\n           <b-tab title="Kay\xc4\xb1t Loglar\xc4\xb1" v-if="this.Logs != null">\n          <b-table\n            id="logTable"\n            striped\n            hover\n            :items="Logs"\n            :fields="logTableField"\n            per-page="10"\n            :current-page="currentPageLog"\n          >\n            <template slot="Description" slot-scope="row">\n              <div v-html="row.item.Description"></div>\n            </template>\n          </b-table>\n          <b-pagination\n            v-model="currentPageLog"\n            :total-rows="Logs.length"\n            per-page="10"\n            aria-controls="my-table"\n          ></b-pagination>\n        </b-tab>\n
Run Code Online (Sandbox Code Playgroud)\n

The*_*eMo 5

检查bootstrap-vue文档以了解表格上的详细样式。

\n

编辑:

\n
    \n
  1. 请使用小写变量。
  2. \n
  3. 阅读上面列出的文档
  4. \n
  5. 为什么你的总宽度不是 100%?
  6. \n
  7. 如果您确实想使用类,请从 Stefanos_Apk 查找答案,如果我认为有多个样式属性,那么这是完美的
  8. \n
\n

https://codesandbox.io/s/nervous-chandrasekhar-d5e2o?file=/src/components/Table.vue

\n
logTableField: [\n    {\n      key: "logDate",\n      label: "Tarih",\n      thStyle: { width: "10%" },\n    },\n    { key: "logUser", label: "Analist", thStyle: { width: "20%" } },\n    {\n      key: "description",\n      label: " \xc4\xb0\xc5\x9flem A\xc3\xa7\xc4\xb1klamas\xc4\xb1",\n      thStyle: { width: "20%" },\n    },\n    {\n      key: "logText",\n      label: "Kullan\xc4\xb1c\xc4\xb1 Yorumu",\n      thStyle: { width: "50%" },\n    },\n  ],\n
Run Code Online (Sandbox Code Playgroud)\n