Comments (4)
Got it, i will test the case as soon as possible
from ncform.
I tested the production mode of the project created by vue-cli (webpack v4.28.4) is OK.
But the production mode of vue-element-admin(webpack 4.16.5) is problematic.
I guess it is a problem with webpack or some loaders, finally i found the root cause.
The following is the source code fragment of the ncform-common package.
widget:
t.widget ||
(function(e) {
var t = 'input';
switch (e) {
case 'boolean':
t = 'radio';
break;
case 'object':
t = 'object';
break;
case 'array':
t = 'array';
break;
default:
t = 'input';
}
return t;
})(r),
It is compiled into the following code in the vue-element-admin production mode.
widget: t.widget || "input",
This is the root cause.
So the solution is to explicitly declare the widget as shown below
{
type: "object",
properties: {
name: {
type: "string"
},
gender: {
type: "boolean",
ui: {
widget: "radio"
}
}
},
ui: {
widget: "object",
widgetConfig: {
layout: "h"
}
}
}
from ncform.
The safest solution is to upgrade webpack and related loaders, but I had no luck to do it successfully for vue-element-admin.
from ncform.
great!
from ncform.
Related Issues (20)
- Disable specific select option HOT 1
- dx 表达式,不支持string类型 HOT 1
- Development documentation HOT 6
- How can i get all attributes of ncform schema? HOT 1
- is-dirty never changes it value HOT 2
- DX Custom Rule HOT 3
- Small issue with serialization HOT 2
- Event "change" does not fire if type is "array" and tag removing
- How link fields works? HOT 2
- 提示信息tooltip当中的超链接为什么固定为#? HOT 1
- 自定义子组件$emit一个自定义事件时,期望可以在ncform层接收到 HOT 2
- Property key with $ sometimes does not work HOT 1
- ncForm 提供一个updateModelByKeys方法 方便从ncForm顶层手动更新model
- It is planned for support vue 3? HOT 2
- 关于联动级联加载的问题 HOT 11
- 如何通过ncform外的逻辑改变value值,并在ncform上生效呢? HOT 1
- Removing padding and margin
- @ncform/ncform/node_modules/@ncform/ncform-common not found HOT 1
- Input lag as number of fields / nested fields increase HOT 1
- How to get constants value from nested array HOT 1
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 ncform.