|
@@ -25,6 +25,27 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- 列表 -->
|
|
|
|
+ <t-table>
|
|
|
|
+ <t-tr>
|
|
|
|
+ <t-th>序号</t-th>
|
|
|
|
+ <t-th>姓名</t-th>
|
|
|
|
+ <t-th>年龄</t-th>
|
|
|
|
+ <t-th>爱好</t-th>
|
|
|
|
+ <t-th>操作</t-th>
|
|
|
|
+ </t-tr>
|
|
|
|
+ <t-tr v-for="item in tableList" :key="item.id">
|
|
|
|
+ <t-td>{{ item.id + 1 }}</t-td>
|
|
|
|
+ <t-td>{{ item.name }}</t-td>
|
|
|
|
+ <t-td>{{ item.age }}</t-td>
|
|
|
|
+ <t-td>{{ item.hobby }}</t-td>
|
|
|
|
+ <t-td align="left"> <u-button @click="edit(item)" size="small" type="primary" :plain="true" text="编辑"></u-button></t-td>
|
|
|
|
+
|
|
|
|
+ </t-tr>
|
|
|
|
+ </t-table>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
<u-picker :show="showtype" :columns="columnstype" keyName="label" @confirm="confirmtype" @cancel='canceltype'>
|
|
<u-picker :show="showtype" :columns="columnstype" keyName="label" @confirm="confirmtype" @cancel='canceltype'>
|
|
@@ -40,16 +61,49 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
// import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
|
|
// import MxDatePicker from "@/components/mx-datepicker/mx-datepicker.vue";
|
|
-
|
|
|
|
|
|
+ import tTable from '@/components/t-table/t-table.vue';
|
|
|
|
+ import tTh from '@/components/t-table/t-th.vue';
|
|
|
|
+ import tTr from '@/components/t-table/t-tr.vue';
|
|
|
|
+ import tTd from '@/components/t-table/t-td.vue';
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
// MxDatePicker
|
|
// MxDatePicker
|
|
|
|
+ tTable,
|
|
|
|
+ tTh,
|
|
|
|
+ tTr,
|
|
|
|
+ tTd
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
const currentDate = this.getDate({
|
|
const currentDate = this.getDate({
|
|
format: 'yyyy-mm'
|
|
format: 'yyyy-mm'
|
|
})
|
|
})
|
|
return {
|
|
return {
|
|
|
|
+ tableList: [{
|
|
|
|
+ id: 0,
|
|
|
|
+ name: '张三',
|
|
|
|
+ age: '19',
|
|
|
|
+ hobby: '游泳'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 1,
|
|
|
|
+ name: '李四',
|
|
|
|
+ age: '21',
|
|
|
|
+ hobby: '绘画'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 2,
|
|
|
|
+ name: '王二',
|
|
|
|
+ age: '29',
|
|
|
|
+ hobby: '滑板'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ id: 3,
|
|
|
|
+ name: '码字',
|
|
|
|
+ age: '20',
|
|
|
|
+ hobby: '蹦极'
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+
|
|
showtype: false,
|
|
showtype: false,
|
|
showdct: false,
|
|
showdct: false,
|
|
mytitle: '',
|
|
mytitle: '',
|
|
@@ -77,7 +131,7 @@
|
|
]
|
|
]
|
|
],
|
|
],
|
|
|
|
|
|
- // dayrange: ['2019/01/01','2019/01/06'],
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -103,13 +157,17 @@
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
+
|
|
|
|
+ edit(item) {
|
|
|
|
+ console.log('111111111111111111', item)
|
|
|
|
+ },
|
|
canceltype() {
|
|
canceltype() {
|
|
this.showtype = false;
|
|
this.showtype = false;
|
|
},
|
|
},
|
|
confirmtype(e) {
|
|
confirmtype(e) {
|
|
- // console.log('111111111111111111',e.value[0])
|
|
|
|
- this.showtype = false;
|
|
|
|
- this.mytype=e.value[0].label
|
|
|
|
|
|
+ // console.log('111111111111111111',e.value[0])
|
|
|
|
+ this.showtype = false;
|
|
|
|
+ this.mytype = e.value[0].label
|
|
},
|
|
},
|
|
typechange() {
|
|
typechange() {
|
|
this.showtype = true;
|
|
this.showtype = true;
|