mirror of
https://github.com/vxcontrol/ncform.git
synced 2026-07-20 22:05:47 -04:00
Merge pull request #11 from vipshop/fix/error-to-warning
perf(ncform): 表单重复的错误提示改成警告
This commit is contained in:
@@ -73,7 +73,7 @@ export default {
|
||||
// 在这里做一些跟DOM有关的初始化
|
||||
let vm = this;
|
||||
if(window.__$ncform.__ncFormsGlobalList[this.$data.name]){
|
||||
console.error(`表单命名重复`);
|
||||
console.warn(`表单命名重复`);
|
||||
const newName = `${this.$data.name}_${Math.random().toString(36).substring(2)})`;
|
||||
window.__$ncform.__ncFormsGlobalList[newName] = vm;
|
||||
this.$data.name = newName;
|
||||
|
||||
Reference in New Issue
Block a user