相关疑难解决方法(0)

如何将表中的整行作为链接点击?

我正在使用Bootstrap,以下不起作用:

<tbody>
    <a href="#">
        <tr>
            <td>Blah Blah</td>
            <td>1234567</td>
            <td>£158,000</td>
        </tr>
    </a>
</tbody>
Run Code Online (Sandbox Code Playgroud)

html html-table bootstrap-4

402
推荐指数
15
解决办法
54万
查看次数

我们可以在<ul>中使用<li>中的任何其他TAG吗?

我们可以使用任何其他标记在<ul>伴随着<li>

喜欢

<ul>
Some text here or <p>Some text here<p> etc
<li>item 1</li>
Some text here or <p>Some text here<p> etc
<li>item 1</li>
</ul>
Run Code Online (Sandbox Code Playgroud)

css xhtml w3c accessibility

44
推荐指数
4
解决办法
6万
查看次数

Vue - 使用v-two两次渲染表行和单元格?

我想使用Vue渲染一个包含行的表,但是将单元格作为一个组件.

我已经做了一个我希望看到的最终结果的例子,并且有一些代码与我认为我可以解决这个问题有关:

HTML

<div id="app">
  <table>
    <thead>
      <tr>
        <th>Row</th>
        <th>ID</th>
        <th>Name</th>
        <th>Age</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="(row, rindex) in people">
        <td>{{ rindex }}</td>
        <cell v-for="(value, vindex, rindex) in row" :value="value" :vindex="vindex" :rindex="rindex"></cell>
      </tr>
    </tbody>
  </table>
  <template id="template-cell">
    <td>{{ value }}</td>
  </template>
</div>
Run Code Online (Sandbox Code Playgroud)

JS

// Register component
Vue.component('cell', {
  template: '#template-cell',
  name: 'row-value',
  props: ['value', 'vindex', 'rindex']
  // In here I would like to access value, vindex and rindex
});
// Start application
new Vue({
  el: '#app', …
Run Code Online (Sandbox Code Playgroud)

javascript vue.js

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

accessibility ×1

bootstrap-4 ×1

css ×1

html ×1

html-table ×1

javascript ×1

vue.js ×1

w3c ×1

xhtml ×1