viewweiwu / iview-form Goto Github PK
View Code? Open in Web Editor NEW让 iview 的 form 使用起来更加简单。
Home Page: https://viewweiwu.github.io/iview-form/examples/dist/
让 iview 的 form 使用起来更加简单。
Home Page: https://viewweiwu.github.io/iview-form/examples/dist/
clothList:[], insertForm: [ { type:'select', title: '品类', key: 'clothname', options:this.clothList },
这样为啥表单就不渲染了,动态数据如何渲染?
希望能支持所有的表单组件
需求:
表单的行与行之间会有联动的时候
A 行的显示依赖于 B 行
希望可以增加这个功能,在线等,急
hi~在表单中的部分元素是否可以和前面的元素关联,实现是否显示?
无法在ie浏览器使用 lib.js文件存在es6语法
iview的button按钮点击做的模态对话框调用formList貌似渲染不出来
import iViewForm from 'iview-form'
export default {
name: 'devlist',
components: {
Tables,
iViewForm
},
on: {
click: () => {
this.$Modal.confirm({
render: (h) => {
return h('div',[
h('i-switch',{
props:{
value:true
}}),
h('iview-form',{ //这里替替换成iViewForm也试了,没渲染出来呢
props: {
formList: [
{
title: '输入框',
type: 'input'
}
]
}
}),
])
需求是在input后跟一个图标,需要捕获点击图标的事件,API里看好像只支持onInput,未找到如何绑定on-click等事件的说明。谢谢!
render: (h) => {
return h('div',[
h('iViewForm',{
props:{
formList:'formList1'
}}),
这是片断代码
页面上有新增编辑功能,新增后点击编辑,Select无法获取新增时设置的值,即无法设置默认值,按照iview文档动态设置了label,点击编辑时给label赋值,但是没有效果,关键代码如下:
editForm:[
{
title: '客户名',
key: 'id',
renderContent:(h,item,form) => {
let $select = h(
"Select",
{
props:{
label:this.idName,
filterable:true,
remote:true,
'remote-method':(query) => {
if (query !== '') {
this.gradeList = []
this.loading1 = true
this.getCustomer({name:query}).then(res => {
let data = res
data.map(item => {
item.text = item.name +' '+ item.username
this.gradeList.push({value:item.id,text:item.text})
})
this.loading1 = false
})
} else {
this.gradeList = [];
}
},
},
on: {
'on-change': (val) => {
form['id'] = val
}
}
},
this.gradeList.map((val, index) => {
return h("Option", {
props: {
label: val.text,
value: val.value
}
});
})
);
return h("div", [$select]);
}
},
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.