網站首頁 編程語言 正文
<td v-for="(item, i) in list" :key="'漢堡' + item" class="td-num">
<el-input
v-model="form['remark' + (12 + i)]"
@input="onInput($event, form, i, 1)"
placeholder="請輸入"
class="noneBorderInput"
/>
</td>
<td v-for="(item, i) in list" :key="'薯條' + item" class="td-num">
<el-input
v-model="form['remark' + (20 + i)]"
@input="onInput($event, form, i, 2)"
placeholder="請輸入"
class="noneBorderInput"
/>
</td>
onInput(value, form, index, row) {
// 獲取粘貼內容
// const value = e.target.value;
if (!value) {
return;
}
// 粘貼內容分隔成數組
const values = value.split(" ");
values.forEach((line, num) => {
const lines = line
.replace(/\t/g, " ")
.trim()
.split(/\s+/);
// 將數組每項賦給對應的remark
if (values.length > 1) {
// 多行
lines.forEach((v, i) => {
if (this.list.length + 1 >= i) {
form["remark" + ((num === 0 ? 12 : 20) + index + i)] = v;
}
});
} else {
// 單行
lines.forEach((v, i) => {
if (this.list.length + 1 >= i) {
form["remark" + ((row === 1 ? 12 : 20) + index + i)] = v;
}
});
}
});
}
原文鏈接:https://blog.csdn.net/Ybittersweet/article/details/129851561
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2022-05-20 springboot心跳機制,定時任務
- 2022-05-26 Flutter?GridView顯示隨機單詞效果_Android
- 2022-08-16 React?中的?setState?是同步還是異步_React
- 2022-12-07 一文帶你搞懂C語言動態內存管理_C 語言
- 2022-09-30 react?redux的原理以及基礎使用講解_React
- 2021-12-15 Redis可視化工具Redis?Desktop?Manager的具體使用_Redis
- 2023-03-18 pandas預處理部分地區數據案例_python
- 2022-08-10 Pandas?sample隨機抽樣的實現_python
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支