|
@@ -116,28 +116,20 @@
|
|
<!-- {{ scope.$index + 1 }} -->
|
|
<!-- {{ scope.$index + 1 }} -->
|
|
<!-- {{ scope.row.sort || "" }} -->
|
|
<!-- {{ scope.row.sort || "" }} -->
|
|
</span>
|
|
</span>
|
|
|
|
+
|
|
<svg-icon
|
|
<svg-icon
|
|
v-if="!disabled && !isRead"
|
|
v-if="!disabled && !isRead"
|
|
icon-class="edit"
|
|
icon-class="edit"
|
|
@click.native="handleEditClick(scope.row, scope.$index)"
|
|
@click.native="handleEditClick(scope.row, scope.$index)"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
- <!--
|
|
|
|
- <el-input
|
|
|
|
- v-else
|
|
|
|
- v-model="scope.row.indexNum"
|
|
|
|
- type="number"
|
|
|
|
- rows="12"
|
|
|
|
- placeholder="序号"
|
|
|
|
- @blur="onNumberBlur(scope.row, scope.$index)"
|
|
|
|
- @keyup.enter.native="onNumberBlurEnter(scope.row, scope.$index)"
|
|
|
|
- /> -->
|
|
|
|
|
|
|
|
<!-- ref="numberInput" -->
|
|
<!-- ref="numberInput" -->
|
|
<!-- :ref="(el) => (inputRefs[scope.$index] = el)" -->
|
|
<!-- :ref="(el) => (inputRefs[scope.$index] = el)" -->
|
|
<el-input
|
|
<el-input
|
|
v-else
|
|
v-else
|
|
v-model="scope.row.indexNum"
|
|
v-model="scope.row.indexNum"
|
|
|
|
+ @input="handleInput"
|
|
size="mini"
|
|
size="mini"
|
|
style="width: 60px"
|
|
style="width: 60px"
|
|
type="number"
|
|
type="number"
|
|
@@ -202,7 +194,6 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- inputRefs: [], // 存储 ref 的数组
|
|
|
|
editData: {
|
|
editData: {
|
|
currentEditIndex: -1,
|
|
currentEditIndex: -1,
|
|
currentEditSort: 1,
|
|
currentEditSort: 1,
|
|
@@ -240,19 +231,15 @@ export default {
|
|
|
|
|
|
this.editData.currentEditIndex = index;
|
|
this.editData.currentEditIndex = index;
|
|
this.editData.currentEditSort = row.indexNum;
|
|
this.editData.currentEditSort = row.indexNum;
|
|
- console.log("safqwerqwr==000==" + row.indexNum + "===" + index);
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
- console.log("safqwerqwr==111==" + row.indexNum + "===" + index);
|
|
|
|
- setTimeout(() => {
|
|
|
|
- console.log("safqwerqwr==333==" + row.indexNum + "===" + index);
|
|
|
|
- this.$refs.numberInput.focus();
|
|
|
|
- // this.$refs.numberInput.select();
|
|
|
|
- }, 50);
|
|
|
|
|
|
+ this.$refs.numberInput.focus();
|
|
|
|
+ // this.$refs.numberInput.select();
|
|
});
|
|
});
|
|
|
|
+ },
|
|
|
|
|
|
- // this.$nextTick(() => {
|
|
|
|
- // this.$refs.numberInput.focus();
|
|
|
|
- // });
|
|
|
|
|
|
+ handleInput(value) {
|
|
|
|
+ this.form.list[this.editData.currentEditIndex].indexNum = value;
|
|
|
|
+ this.form.list = this.form.list.filter((i) => i);
|
|
},
|
|
},
|
|
|
|
|
|
onNumberBlurEnter(row, index) {
|
|
onNumberBlurEnter(row, index) {
|