bug: 修改eslint检查的代码缺陷
This commit is contained in:
parent
c6d06aa24e
commit
ba95bae7ef
@ -151,9 +151,9 @@
|
||||
|
||||
// 选中时在末尾新增一行
|
||||
// value: number, option: { label: string, value: number }
|
||||
const insertEvent = (value: string) => {
|
||||
const insertEvent = (value: string | number) => {
|
||||
// 根据value找到对应的物料信息
|
||||
const m = materialList.value.find((item) => item.id === (value ? parseInt(value) : -1))
|
||||
const m = materialList.value.find((item) => item.id === value)
|
||||
if (m) {
|
||||
const row: RowVO = {
|
||||
id: m.id ? m.id : -1,
|
||||
@ -174,12 +174,12 @@
|
||||
}
|
||||
|
||||
// 取消选中时,删除table中的行
|
||||
const removeEvent = (value: string) => {
|
||||
const removeEvent = (value: string | number) => {
|
||||
const $table = tableRef.value
|
||||
// 根据value找到对应的行
|
||||
if ($table) {
|
||||
$table.getTableData().fullData.forEach((item) => {
|
||||
if (item.id === (value ? parseInt(value) : -1)) {
|
||||
if (item.id === value) {
|
||||
$table.remove(item)
|
||||
}
|
||||
})
|
||||
|
@ -60,7 +60,7 @@ export default defineConfig(({ mode }) => {
|
||||
proxy: {
|
||||
'/api': {
|
||||
// target: 'https://iot.riemann.tech/api/',
|
||||
target: 'http://127.0.0.1:7777',
|
||||
target: 'http://127.0.0.1:8888',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user