agrass-github / agel-form Goto Github PK
View Code? Open in Web Editor NEW基于element-ui的数据驱动表单组件,极简的**,拥有绝对的灵活性,可以帮助你更快速的开发
License: MIT License
基于element-ui的数据驱动表单组件,极简的**,拥有绝对的灵活性,可以帮助你更快速的开发
License: MIT License
加上render-header扩展table头部的灵活性
hi ,
请教一个问题。
如官方文档中的表格编辑表单 ,
如果某个item上定义了一个 change 事件,
on: {
change: (v) => {
this.$message.info("给个好评吧");
},
},
如上只能传递 当前值 v ,如果我想获得当前的 rowId,该如何做?
谢谢。
fileds.js
`export default function () {
return {
data: {},
items: [
{
clearable: true,
component: 'el-autocomplete',
prop: 'supplier',
label: '商品编码',
/**
* @param {string} api
* @param {string} key
* @description getAncillaryCode 商品编码
*/
fetchSuggestions: this.$autoCompleteInputFunc(
'getAncillaryCode',
'code',
'productCode'
),
triggerOnfocus: false
}
]
}
}
`
autoCompleteInputFunc.js
`import * as autoCompleteInputApi from '@/service/api/autoCompleteInput'
/**
*
export const autoCompleteInputFunc = (api, key, field) => {
const keyName = key
return async (queryString, cb) => {
try {
let result = await autoCompleteInputApi[api]({
[keyName]: queryString
})
// console.log('result',))
result = result.data.map((v) => ({ value: v[field], id: v.id }))
console.log('cb', cb)
cb(result)
} catch (err) {
console.error(err)
}
}
}
`
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.