docs: 增加scope

This commit is contained in:
daniel.xiao
2018-07-11 21:43:59 +08:00
parent 1ab6ed79f9
commit edc1208597
4 changed files with 14 additions and 14 deletions
+5 -5
View File
@@ -4,14 +4,14 @@
1.Install ncform-common
```
npm i ncform-common --save
npm i @ncform/ncform-common --save
```
2.Extend ValidationRule class
```
# myCustomRule.js
import ncformCommon from 'ncform-common';
import ncformCommon from '@ncform/ncform-common';
class MyCustomRule extends ncformCommon.ValidationRule {
@@ -49,7 +49,7 @@ rules: {
1.Install ncform-common
```
npm i ncform-common --save
npm i @ncform/ncform-common --save
```
2.Implement the control
@@ -75,7 +75,7 @@ npm i ncform-common --save
<script>
import ncformCommon from 'ncform-common';
import ncformCommon from '@ncform/ncform-common';
export default {
mixins: [ncformCommon.mixins.vue.controlMixin],
@@ -133,7 +133,7 @@ ui: {
<script>
import ncformCommon from 'ncform-common';
import ncformCommon from '@ncform/ncform-common';
export default {
mixins: [ncformCommon.mixins.vue.controlMixin],
+7 -7
View File
@@ -16,17 +16,17 @@ ncform,一种令人愉悦的表单开发方式,仅需配置即可生成表
1.install
```
npm i ncform ncform-common --save
npm i ncform-theme-elementui element-ui --save
npm i @ncform/ncform @ncform/ncform-common --save
npm i @ncform/ncform-theme-elementui element-ui --save
```
2.import
```
import Vue from 'vue';
import vueNcform from 'ncform';
import vueNcform from '@ncform/ncform';
import 'element-ui';
import ncformStdComps from 'ncform-theme-elementui';
import ncformStdComps from '@ncform/ncform-theme-elementui';
Vue.use(vueNcform, { extComponents: ncformStdComps });
```
@@ -74,11 +74,11 @@ Vue.use(vueNcform, { extComponents: ncformStdComps });
<script type="text/javascript" src="path/to/vue.js"></script>
<script type="text/javascript" src="path/to/ncform-common/dist/ncformCommon.min.js"></script>
<script type="text/javascript" src="path/to/ncform/dist/vueNcform.min.js"></script>
<script type="text/javascript" src="path/to/@ncform/ncform-common/dist/ncformCommon.min.js"></script>
<script type="text/javascript" src="path/to/@ncform/ncform/dist/vueNcform.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/element-ui/lib/index.js"></script>
<script type="text/javascript" src="path/to/ncform-theme-elementui/dist/ncformStdComps.min.js"></script>
<script type="text/javascript" src="path/to/@ncform/ncform-theme-elementui/dist/ncformStdComps.min.js"></script>
<script type="text/javascript">
Vue.use(vueNcform, { extComponents: ncformStdComps });
+1 -1
View File
@@ -103,7 +103,7 @@
```js
{
rows: 2, // 行数
autosize: true, // 自适应内容高度,可选值:[boolean | { minRows: 2, maxRows: 6 }]
autosize: true, // 自适应内容高度,可选值:[boolean | { minRows: 2, maxRows: 6 }]
}
```
+1 -1
View File
@@ -1,4 +1,4 @@
# ncform-common
ncform的通用工具类
ncform的通用工具类