提交 2ff433cc authored 作者: Yroc's avatar Yroc

'购物车功能完善'

上级 ed9820d2
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
computed: {}, computed: {},
created() { created() {
this.original_data = { ...this.module_data }; this.original_data = { ...this.module_data };
console.log(this.original_data); // console.log(this.original_data);
}, },
mounted() {}, mounted() {},
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
: head_data.search_placeholder : head_data.search_placeholder
" "
@change="searchChange" @change="searchChange"
@keydown.enter="search"
></el-input> ></el-input>
<el-button type="warning" size="small" @click="search" <el-button type="warning" size="small" @click="search"
>搜索</el-button >搜索</el-button
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: AnthonyD * @Author: AnthonyD
* @Date: 2023-04-10 18:06:52 * @Date: 2023-04-10 18:06:52
* @Last Modified by: AnthonyD * @Last Modified by: AnthonyD
* @Last Modified time: 2023-04-15 15:59:31 * @Last Modified time: 2023-04-18 11:45:11
*/ */
</script> </script>
<template> <template>
...@@ -21,12 +21,17 @@ ...@@ -21,12 +21,17 @@
<el-table <el-table
ref="multipleTable" ref="multipleTable"
v-loading="is_loading" v-loading="is_loading"
row-key="id"
:data="tableData" :data="tableData"
style="width: 100%; margin-bottom: 20px" style="width: 100%; margin-bottom: 20px"
height="650" height="650"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" width="50"></el-table-column> <el-table-column
type="selection"
:reserve-selection="true"
width="50"
></el-table-column>
<!-- <el-table-column prop="id" label="编号" width="50"> <!-- <el-table-column prop="id" label="编号" width="50">
<template slot="header"> <template slot="header">
<el-checkbox <el-checkbox
...@@ -744,7 +749,6 @@ export default { ...@@ -744,7 +749,6 @@ export default {
//表格多选监听 //表格多选监听
handleSelectionChange(val) { handleSelectionChange(val) {
if (!this.is_change) return; if (!this.is_change) return;
console.log('ssss');
this.select_ids = this.head_data.select_data.map((e) => { this.select_ids = this.head_data.select_data.map((e) => {
return e.id; return e.id;
}); });
...@@ -785,7 +789,9 @@ export default { ...@@ -785,7 +789,9 @@ export default {
this.head_data.select_data.splice(index, 1); this.head_data.select_data.splice(index, 1);
for (let i of this.tableData) { for (let i of this.tableData) {
if (i.id == id) { if (i.id == id) {
i.is_select = false; // i.is_select = false;
this.$refs.multipleTable.toggleRowSelection(i);
// this.$refs.multipleTable.clearSelection();
} }
} }
// this.update_data_select(); // this.update_data_select();
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论