docs: improve docs and update api
This commit is contained in:
@@ -1,34 +1,36 @@
|
||||
<template>
|
||||
<article>
|
||||
<section>
|
||||
<div>loading:<veui-switch v-model="loading"/></div>
|
||||
<veui-table
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
key-field="id"
|
||||
>
|
||||
<veui-table-column
|
||||
field="id"
|
||||
title="ID"
|
||||
sortable
|
||||
/>
|
||||
<veui-table-column
|
||||
field="name"
|
||||
title="Name"
|
||||
/>
|
||||
<veui-table-column
|
||||
field="bid"
|
||||
title="Bid"
|
||||
width="160"
|
||||
align="right"
|
||||
sortable
|
||||
>
|
||||
<template slot-scope="{ bid }">
|
||||
{{ bid | currency }}
|
||||
</template>
|
||||
</veui-table-column>
|
||||
</veui-table>
|
||||
<veui-switch v-model="loading">
|
||||
Loading
|
||||
</veui-switch>
|
||||
</section>
|
||||
<veui-table
|
||||
:data="data"
|
||||
:loading="loading"
|
||||
key-field="id"
|
||||
>
|
||||
<veui-table-column
|
||||
field="id"
|
||||
title="ID"
|
||||
sortable
|
||||
/>
|
||||
<veui-table-column
|
||||
field="name"
|
||||
title="Name"
|
||||
/>
|
||||
<veui-table-column
|
||||
field="bid"
|
||||
title="Bid"
|
||||
width="160"
|
||||
align="right"
|
||||
sortable
|
||||
>
|
||||
<template slot-scope="{ bid }">
|
||||
{{ bid | currency }}
|
||||
</template>
|
||||
</veui-table-column>
|
||||
</veui-table>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
|
||||
64
one/docs/demo/table/tooltip.vue
Normal file
64
one/docs/demo/table/tooltip.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<article>
|
||||
<veui-table
|
||||
:data="data"
|
||||
key-field="id"
|
||||
>
|
||||
<veui-table-column
|
||||
field="id"
|
||||
title="ID"
|
||||
/>
|
||||
<veui-table-column
|
||||
field="name"
|
||||
title="Name"
|
||||
/>
|
||||
<veui-table-column
|
||||
field="desc"
|
||||
title="Description"
|
||||
tooltip
|
||||
/>
|
||||
</veui-table>
|
||||
</article>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Table, Column } from 'veui'
|
||||
|
||||
const long = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos, quibusdam! Pariatur, laboriosam? Voluptatibus, sunt.'
|
||||
const short = 'Lorem ipsum.'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'veui-table': Table,
|
||||
'veui-table-column': Column
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
density: 'normal',
|
||||
size: 'm',
|
||||
data: [
|
||||
{
|
||||
id: '3154',
|
||||
name: 'Steve Rogers',
|
||||
desc: long
|
||||
},
|
||||
{
|
||||
id: '3155',
|
||||
name: 'Thor Odinson',
|
||||
desc: short
|
||||
},
|
||||
{
|
||||
id: '3156',
|
||||
name: 'Tony Stark',
|
||||
desc: short
|
||||
},
|
||||
{
|
||||
id: '3157',
|
||||
name: 'Stephen Strange',
|
||||
desc: long
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user