Comments (2)
在parser中对上传组件添加before-upload进行数量限制
from form-generator.
在parser中对上传组件添加before-upload进行数量限制
你好,请问我在render中注入了before-upload函数
if (this.conf.config.tag === 'el-upload') {
// 上传表单元素组件 的成功和移除事件;
dataObject.attrs['on-success'] = (response, file, fileList) => {
this.$emit('upload', response, file, fileList)
}
dataObject.attrs['on-remove'] = (file, fileList) => {
this.$emit('deleteUpload', file, fileList)
}
dataObject.attrs['on-preview'] = (file) => {
this.$emit('download', file)
}
dataObject.attrs['before-upload']=(file) =>{
this.$emit('beforeUpload',file)
}
return
}
Parser中也加入到了listener,但是没有触发是怎么回事呀
function buildListeners(scheme) {
const config = scheme.config
const methods = this.formConf.methods || {}
const listeners = {}
// 给__methods__中的方法绑定this和event
Object.keys(methods).forEach(key => {
listeners[key] = event => methods[key].call(this, event)
})
// 响应 render.js 中的 vModel $emit('input', val)
listeners.input = event => setValue.call(this, event, config, scheme)
listeners.upload = (response, file, fileList) => setUpload.call(this, config, scheme,response, file, fileList)
listeners.deleteUpload = (file, fileList) => deleteUpload.call(this, config, scheme,file, fileList)
listeners.download = (file) => download.call(this, file)
listeners.beforeUpload=(file) =>beforeUpload.call(this,file,scheme)
return listeners
}
from form-generator.
Related Issues (20)
- 流程表单上传文件后回显问题
- input输入框的后缀如何变成能够选择的单位
- 右侧修改组件类型会出现报错
- 如何生成非表单的内容
- 富文本编辑器回显的时候怎么去掉本身的样式,只是拿到内容进行回显呢?
- 使用parser解析json生成的表单中,如何在on事件中,响应式的修改表单的值 HOT 1
- 关于 Parser.vue 表单解析后数据无法绑定的问题 HOT 1
- 输入型组件切换为选择型组件后,添加选项报错 HOT 1
- vue3压根跑不起来 HOT 3
- Uncaught TypeError: h is not a function HOT 1
- 按钮不显示文字
- Home.vue是不是没有开入口给用户进行自定义
- 表单下拉框如何与数据字典、接口绑定数据值 HOT 2
- 如何实现动态布局的组件 HOT 1
- 低代码流程设计器
- Vue3 版本 HOT 1
- 能否改变拖拽时组件默认栅格
- 关于 Parser.vue一直报:please transfer a valid prop path to firm item
- 启动报错 HOT 1
- 级联选择器开启多选,模糊查询后,不能多选的bug。 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form-generator.