diff --git a/README.md b/README.md
index 099ffdca5..77186f604 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@
- [Home Page](http://element.eleme.io/)
- [Docs](http://element.eleme.io/#/component)
- [FAQ](./FAQ.md)
+- [Customize Theme](http://element.eleme.io/#/en-US/component/custom-theme)
- Starter Kit
- [element-starter](https://github.com/ElementUI/element-starter)
- [element-cooking-starter](https://github.com/ElementUI/element-cooking-starter)
diff --git a/examples/docs/en-US/custom-theme.md b/examples/docs/en-US/custom-theme.md
index 19df6cf52..a5f49959d 100644
--- a/examples/docs/en-US/custom-theme.md
+++ b/examples/docs/en-US/custom-theme.md
@@ -1,10 +1,10 @@
## Custom theme
-Element uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale, e.g. change the theme color from blue to orange or green, maybe overriding them one by one is not a good idea, and this is where our theme customization tool kicks in.
+Element uses BEM-styled CSS so that you can override styles easily. But if you need to replace styles at a large scale, e.g. change the theme color from blue to orange or green, maybe overriding them one by one is not a good idea, and this is where our theme customization tool kicks in.
### Install related tool
First install the theme generator globally or locally. Local install is recommended because in this way, when others clone your project, npm will automatically install it for them.
```shell
-npm i element-theme -D
+npm i element-theme -g
```
Then install the default theme from npm or GitHub.
@@ -20,7 +20,7 @@ npm i https://github.com/ElementUI/theme-default -D
After successfully installing the above packages, a command named `et` is available in CLI (if the packages are installed locally, use `node_modules/.bin/et` instead). Run `-i` to initialize the variable file which outputs to `element-variables.css` by default. And you can specify its output directory as you will.
```shell
-node_modules/.bin/et -i [custom output directory]
+et -i [custom output directory]
> ✔ Generator variables file
```
@@ -53,7 +53,7 @@ Just edit `element-variables.css`, e.g. changing the theme color to red:
### Build theme
After saving the variable file, use `et` to build your theme. You can activate `watch` mode by adding a parameter `-w`:
```shell
-node_modules/.bin/et
+et
> ✔ build theme font
> ✔ build element theme
diff --git a/examples/docs/en-US/form.md b/examples/docs/en-US/form.md
index 8025311b3..3945f2f37 100644
--- a/examples/docs/en-US/form.md
+++ b/examples/docs/en-US/form.md
@@ -6,10 +6,10 @@
return callback(new Error('Please input the age'));
}
setTimeout(() => {
- if (!Number.isInteger(age)) {
+ if (!Number.isInteger(value)) {
callback(new Error('Please input digits'));
- } else{
- if (age < 18) {
+ } else {
+ if (value < 18) {
callback(new Error('Age must be greater than 18'));
} else {
callback();
@@ -117,7 +117,7 @@
{ validator: validaePass2, trigger: 'blur' }
],
age: [
- { validator: checkAge, trigger: 'change', trigger: 'blur' }
+ { validator: checkAge, trigger: 'blur' }
]
},
dynamicForm: {
@@ -172,6 +172,9 @@
handleReset2() {
this.$refs.ruleForm2.resetFields();
},
+ handleReset3() {
+ this.$refs.dynamicForm.resetFields();
+ },
handleValidate(prop, errorMsg) {
console.log(prop, errorMsg);
},
@@ -632,7 +635,7 @@ Form component allows you to verify your data, helping you find and correct erro
-
+
Submit
@@ -647,10 +650,10 @@ Form component allows you to verify your data, helping you find and correct erro
return callback(new Error('Please input the age'));
}
setTimeout(() => {
- if (!Number.isInteger(age)) {
+ if (!Number.isInteger(value)) {
callback(new Error('Please input digits'));
- } else{
- if (age < 18) {
+ } else {
+ if (value < 18) {
callback(new Error('Age must be greater than 18'));
} else {
callback();
@@ -691,7 +694,7 @@ Form component allows you to verify your data, helping you find and correct erro
{ validator: validaePass2, trigger: 'blur' }
],
age: [
- { validator: checkAge, trigger: 'change', trigger: 'blur' }
+ { validator: checkAge, trigger: 'blur' }
]
}
};
@@ -729,12 +732,9 @@ Form component allows you to verify your data, helping you find and correct erro
v-for="(domain, index) in dynamicForm.domains"
:label="'Domain' + index"
:key="domain.key"
- :prop="'domains:' + index"
+ :prop="'domains.' + index + '.value'"
:rules="{
- type: 'object', required: true,
- fields: {
- value: { required: true, message: 'domain can not be null', trigger: 'blur' }
- }
+ required: true, message: 'domain can not be null', trigger: 'blur'
}"
>
Delete
@@ -742,6 +742,7 @@ Form component allows you to verify your data, helping you find and correct erro
Submit
New domain
+ Reset