Commit 4444512c authored by abbycin's avatar abbycin

fix bug

parent ff8966d2
...@@ -4,7 +4,7 @@ dist/ ...@@ -4,7 +4,7 @@ dist/
npm-debug.log* npm-debug.log*
yarn-debug.log* yarn-debug.log*
yarn-error.log* yarn-error.log*
/package-lock.json package-lock.json
# Editor directories and files # Editor directories and files
.idea .idea
...@@ -19,3 +19,4 @@ yarn-error.log* ...@@ -19,3 +19,4 @@ yarn-error.log*
server.json server.json
mo/ mo/
*.zip *.zip
mo-*
This diff is collapsed.
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
</a-form> </a-form>
</a-modal> </a-modal>
</div> </div>
<div style="margin-top:20px"> <div style="margin-top:20px;">
<a-list :grid="{ gutter: 16, column: 4 }" :data-source="data"> <a-list :grid="{ gutter: 8, column: 4 }" :data-source="data">
<a-list-item slot="renderItem" slot-scope="item, index"> <a-list-item slot="renderItem" slot-scope="item, index">
<a-card :title="item.title"> <a-card :title="item.title">
<a slot="extra" @click="removeOne(index)"> <a slot="extra" @click="removeOne(index)">
...@@ -94,9 +94,7 @@ ...@@ -94,9 +94,7 @@
<a slot="extra" @click="editOne(index)"> <a slot="extra" @click="editOne(index)">
<a-icon type="edit"></a-icon> <a-icon type="edit"></a-icon>
</a> </a>
<pre> <pre>{{ JSON.stringify(item, null, ' ') }}</pre>
{{ JSON.stringify(item, null, ' ') }}
</pre>
</a-card> </a-card>
</a-list-item> </a-list-item>
</a-list> </a-list>
...@@ -104,6 +102,13 @@ ...@@ -104,6 +102,13 @@
</div> </div>
</template> </template>
<style>
.ant-list .ant-row {
display: flex;
flex-wrap: wrap
}
</style>
<script> <script>
import _ from "lodash"; import _ from "lodash";
import { request } from "@/js/req"; import { request } from "@/js/req";
...@@ -174,6 +179,7 @@ export default { ...@@ -174,6 +179,7 @@ export default {
}, },
editOne(index) { editOne(index) {
this.form.resetFields();
this.currIndex = index; this.currIndex = index;
this.form.setFieldsValue(this.data[index]); this.form.setFieldsValue(this.data[index]);
this.editorVisible = true; this.editorVisible = true;
...@@ -281,7 +287,7 @@ export default { ...@@ -281,7 +287,7 @@ export default {
resetChange() { resetChange() {
this.refresh(); this.refresh();
this.searchText = ""; this.searchText = "";
this.$message.info("所更改已回退"); this.$message.info("所更改已回退");
}, },
filterData(e) { filterData(e) {
e.preventDefault(); e.preventDefault();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment