Authored by 李奇

引入iview

... ... @@ -6,11 +6,7 @@
"transform-runtime",
"transform-object-rest-spread",
"transform-async-to-generator",
"syntax-dynamic-import",
["import", {
"libraryName": "iview",
"libraryDirectory": "src/components"
}]
"syntax-dynamic-import"
]
}
... ...
import Vue from 'vue';
import VueRouter from 'vue-router';
import {Button} from 'iview';
import iView from 'iview';
import App from 'vue@/App.vue';
import {create, list, decor} from 'vue@/wheel-surf';
... ... @@ -8,7 +8,7 @@ import 'admin/wheel-surf.page.css';
import 'iview/dist/styles/iview.css';
Vue.use(VueRouter);
Vue.component('Button', Button);
Vue.use(iView);
const router = new VueRouter({
routes: [
... ...
<template>
<div class="list">
<button class="btn btn-primary" @click="toCreate">创建新活动</button>
<div class="activity-list">活动列表</div>
<div class="activity-list">
<Table :columns="columns1" :data="data1"></Table>
</div>
</div>
</template>
<script>
module.exports = {
data() {
return {
};
return {
columns1: [
{
title: 'Name',
key: 'name'
},
{
title: 'Age',
key: 'age'
},
{
title: 'Address',
key: 'address'
}
],
data1: [
{
name: 'John Brown',
age: 18,
address: 'New York No. 1 Lake Park',
date: '2016-10-03'
},
{
name: 'Jim Green',
age: 24,
address: 'London No. 1 Lake Park',
date: '2016-10-01'
},
{
name: 'Joe Black',
age: 30,
address: 'Sydney No. 1 Lake Park',
date: '2016-10-02'
},
{
name: 'Jon Snow',
age: 26,
address: 'Ottawa No. 2 Lake Park',
date: '2016-10-04'
}
]
}
},
methods: {
toCreate() {
... ... @@ -20,7 +62,6 @@
<style lang="scss">
.activity-list {
height: 600px;
border: 1px solid #1b6d85;
}
</style>
... ...