Files
2024-02-20 13:20:50 +08:00

96 lines
2.7 KiB
Plaintext

<div id="app">
{{ message }}
@* <a-calendar v-model="value" />
select: {{value}} *@
<a-divider dashed />
<a-space >
<a-button type="primary">Primary</a-button>
<a-button>Secondary</a-button>
<a-button type="dashed">Dashed</a-button>
<a-button type="outline">Outline</a-button>
<a-button type="text">Text</a-button>
<a-button type="primary">Item1</a-button>
<a-button type="primary">Item2</a-button>
</a-space>
<a-table :columns="columns" :data="data" :row-selection="rowSelection" />
</div>
<script>
const { createApp, ref, reactive } = Vue
const { Button, Calendar, Divider, Space, Table } = ArcoVue
createApp({
setup() {
const message = ref('Hello vue!')
const value = ref(new Date('2023-01-01'));
const rowSelection = {
type: 'radio'
};
const columns = [
{
title: 'Name',
dataIndex: 'name',
},
{
title: 'Salary',
dataIndex: 'salary',
},
{
title: 'Address',
dataIndex: 'address',
},
{
title: 'Email',
dataIndex: 'email',
},
]
const data = reactive([{
key: '1',
name: 'Jane Doe',
salary: 23000,
address: '32 Park Road, London',
email: 'jane.doe@example.com'
}, {
key: '2',
name: 'Alisa Ross',
salary: 25000,
address: '35 Park Road, London',
email: 'alisa.ross@example.com'
}, {
key: '3',
name: 'Kevin Sandra',
salary: 22000,
address: '31 Park Road, London',
email: 'kevin.sandra@example.com'
}, {
key: '4',
name: 'Ed Hellen',
salary: 17000,
address: '42 Park Road, London',
email: 'ed.hellen@example.com'
}, {
key: '5',
name: 'William Smith',
salary: 27000,
address: '62 Park Road, London',
email: 'william.smith@example.com'
}]);
return {
message,
value,
rowSelection,
columns,
data
}
}
})
.use(Calendar)
.use(Button)
.use(Divider)
.use(Space)
.use(Table)
.mount('#app')
</script>