|
@@ -117,6 +117,7 @@
|
|
|
<!-- {{ scope.row.sort || "" }} -->
|
|
|
</span>
|
|
|
<svg-icon
|
|
|
+ v-if="!disabled && !isRead"
|
|
|
icon-class="edit"
|
|
|
@click.native="handleEditClick(scope.row, scope.$index)"
|
|
|
/>
|
|
@@ -132,6 +133,8 @@
|
|
|
@keyup.enter.native="onNumberBlurEnter(scope.row, scope.$index)"
|
|
|
/> -->
|
|
|
|
|
|
+ <!-- ref="numberInput" -->
|
|
|
+ <!-- :ref="(el) => (inputRefs[scope.$index] = el)" -->
|
|
|
<el-input
|
|
|
v-else
|
|
|
v-model="scope.row.indexNum"
|
|
@@ -199,6 +202,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ inputRefs: [], // 存储 ref 的数组
|
|
|
editData: {
|
|
|
currentEditIndex: -1,
|
|
|
currentEditSort: 1,
|
|
@@ -230,11 +234,25 @@ export default {
|
|
|
methods: {
|
|
|
// 点击编辑图标显示输入框
|
|
|
handleEditClick(row, index) {
|
|
|
+ if (this.disabled || this.isRead) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
this.editData.currentEditIndex = index;
|
|
|
this.editData.currentEditSort = row.indexNum;
|
|
|
+ console.log("safqwerqwr==000==" + row.indexNum + "===" + index);
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.numberInput.focus();
|
|
|
+ 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.$nextTick(() => {
|
|
|
+ // this.$refs.numberInput.focus();
|
|
|
+ // });
|
|
|
},
|
|
|
|
|
|
onNumberBlurEnter(row, index) {
|
|
@@ -301,7 +319,6 @@ export default {
|
|
|
// });
|
|
|
},
|
|
|
|
|
|
-
|
|
|
// 频道详情
|
|
|
getDetail() {
|
|
|
channelDetail({
|