Commit 05fe970c authored by Damon's avatar Damon
parents d8db33ca f6d49063
......@@ -465,7 +465,10 @@
},
onRefresh() {
if (this._freshing) return;
this.triggered = true;
this._freshing = true;
this.isLoadMore = false;
this.loadStatus = "loading";
this.loadNews();
},
onRestore() {
......@@ -479,12 +482,10 @@
return false;
},
getList() {
this.triggered = true;
let that = this;
this.$u.api
.getTrainingNoticeList(this.params)
.then((res) => {
// this.triggered = false;
that.stopPull();
that.timeFormat();
if (res.code == 200) {
......
......@@ -13,7 +13,7 @@
<view class="line-view"></view>
<u-tr class="u-tr" v-for="(item, index) in list" :key="index">
<u-td class="u-td" v-for="(value, key) in titles" :key="key">
<u-input v-if="key == 'useLength'" type="digit" placeholder="0" v-model="item[key]" placeholder-style="color: #999999;font-size:26rpx" input-align="center" :clearable="false"><u-icon name="edit"></u-icon></u-input>
<u-input v-if="key == 'useLength'" @blur="handleBlur(item)" @focus="handleFocus(item)" type="digit" :placeholder="null" v-model="item[key]" placeholder-style="color: #999999;font-size:26rpx" input-align="center" :clearable="false"><u-icon name="edit"></u-icon></u-input>
<text v-else :class="['tab-th-txt', {'left': key == firstKey}]">{{item[key]}}</text>
</u-td>
</u-tr>
......@@ -139,13 +139,15 @@
self.formatServiceMoreList(data)
}
});
/*
// 测试数据
// var item = {matName: '碳纤维',
// matUnit: '米',
// freeLength: 4,
// unitAmt: '2',
// useLength: 6}
// this.list = [{...item}, {...item}, {...item}, {...item}]
var item = {matName: '碳纤维',
matUnit: '米',
freeLength: 4,
unitAmt: '2',
useLength: 6}
this.list = [{...item}, {...item}, {...item}, {...item}]
*/
},
created() {
},
......@@ -172,6 +174,16 @@
}
})
},
handleBlur(item) { // 失去焦点如果没输入用原先的值
if (!item.useLength) {
item.useLength = item.temp
}
},
handleFocus(item) { // 点击清空
item.temp = item.useLength;
item.useLength = ''
},
/* 其他添加新的 */
handleAdd() {
this.other.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment