Files
OpenAuth.Net/Vue2/public/ueditor/formdesign/e-file.html
2025-06-06 12:17:02 +08:00

49 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
<el-upload class="upload-demo" action="https://jsonplaceholder.typicode.com/posts/" :on-change="handleChange"
:file-list="fileList" name="files">
<el-button size="small" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件且不超过500kb</div>
</el-upload>
</div>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
function GetQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
var r = window.location.search.substr(1).match(reg)
if (r != null) return unescape(r[2])
return null
}
new Vue({
el: '#app',
data: {
fileList: []
},
created() {
var info = GetQueryString('info')
var infoObj = JSON.parse(info)
console.log(infoObj)
if (infoObj && infoObj.orgvalue != '') {
}
},
methods: {
handleChange(file, fileList) {
this.fileList = fileList.slice(-3)
}
}
})
</script>
</body>
</html>