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