Commit 05fe970c authored by Damon's avatar Damon
parents d8db33ca f6d49063
...@@ -465,7 +465,10 @@ ...@@ -465,7 +465,10 @@
}, },
onRefresh() { onRefresh() {
if (this._freshing) return; if (this._freshing) return;
this.triggered = true;
this._freshing = true; this._freshing = true;
this.isLoadMore = false;
this.loadStatus = "loading";
this.loadNews(); this.loadNews();
}, },
onRestore() { onRestore() {
...@@ -479,12 +482,10 @@ ...@@ -479,12 +482,10 @@
return false; return false;
}, },
getList() { getList() {
this.triggered = true;
let that = this; let that = this;
this.$u.api this.$u.api
.getTrainingNoticeList(this.params) .getTrainingNoticeList(this.params)
.then((res) => { .then((res) => {
// this.triggered = false;
that.stopPull(); that.stopPull();
that.timeFormat(); that.timeFormat();
if (res.code == 200) { if (res.code == 200) {
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<view class="line-view"></view> <view class="line-view"></view>
<u-tr class="u-tr" v-for="(item, index) in list" :key="index"> <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-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> <text v-else :class="['tab-th-txt', {'left': key == firstKey}]">{{item[key]}}</text>
</u-td> </u-td>
</u-tr> </u-tr>
...@@ -139,13 +139,15 @@ ...@@ -139,13 +139,15 @@
self.formatServiceMoreList(data) self.formatServiceMoreList(data)
} }
}); });
/*
// 测试数据 // 测试数据
// var item = {matName: '碳纤维', var item = {matName: '碳纤维',
// matUnit: '米', matUnit: '米',
// freeLength: 4, freeLength: 4,
// unitAmt: '2', unitAmt: '2',
// useLength: 6} useLength: 6}
// this.list = [{...item}, {...item}, {...item}, {...item}] this.list = [{...item}, {...item}, {...item}, {...item}]
*/
}, },
created() { created() {
}, },
...@@ -172,6 +174,16 @@ ...@@ -172,6 +174,16 @@
} }
}) })
}, },
handleBlur(item) { // 失去焦点如果没输入用原先的值
if (!item.useLength) {
item.useLength = item.temp
}
},
handleFocus(item) { // 点击清空
item.temp = item.useLength;
item.useLength = ''
},
/* 其他添加新的 */ /* 其他添加新的 */
handleAdd() { handleAdd() {
this.other.push({ 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