Commit b8f5bba6 by jianshuqin

优化:组件功能

parent 45d7bb46
......@@ -123,10 +123,8 @@
<el-upload ref="upload" class="el-upload"
v-else-if="item.type == 'file'"
v-bind:action="item.action"
v-bind:data="item.data"
v-bind:auto-upload="false"
v-bind:show-file-list="false"
v-bind:multiple="item.multiple"
v-bind:accept="item.accept"
v-bind:on-change="onFileChange"
v-bind:on-success="onSuccess"
......
......@@ -5,7 +5,6 @@
v-on:search="onSearch"
v-on:reset="onReset"
v-on:export="onExport"
v-on:import="onImport"
v-on:click="onClick"></el-form-filter>
</el-header>
<el-main v-loading="$root.loading">
......
......@@ -228,7 +228,6 @@
listFile.splice(0, 1)
}
that.$set(that, "item_value", file)
that.$emit("change", file)
} else {
listFile.splice(listFile.length - 1, 1)
that.$message.error('上传文件只能是' + that.item.accept + '格式!')
......@@ -241,6 +240,9 @@
if (response.code = 200) {
listFile.splice(listFile.length - 1, 1)
that.$emit("import", true, file)
that.$nextTick(function () {
that.$set(that, "item_value", {})
})
} else {
file.status = "ready"
that.loading = false
......
......@@ -121,7 +121,6 @@
onImport: function (result, file, message) {
if (result) {
this.$message("导入成功!")
this.$refs.file.clearFiles();
} else {
this.$message.error(message)
}
......
......@@ -181,10 +181,6 @@
}
}
},
//导入
onImport: function (file) {
debugger;
},
//单击事件
onClick: function (fn) {
var that = this;
......
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