diff --git a/docs/site/mobile.js b/docs/site/mobile.js
index 166e36204..b2dc843a9 100644
--- a/docs/site/mobile.js
+++ b/docs/site/mobile.js
@@ -16,6 +16,8 @@ Locale.add({
// flag for vant-weapp demos
const isWeapp = location.search.indexOf('weapp=1') !== -1;
+let demoUid = 0;
+
// helper for demo locales
Vue.mixin({
computed: {
@@ -37,6 +39,10 @@ Vue.mixin({
},
beforeCreate() {
+ if (!this.$options.name) {
+ this.$options.name = `demo-${demoUid++}`;
+ }
+
const { i18n, name } = this.$options;
if (i18n && name) {
diff --git a/src/field/demo/Autosize.vue b/src/field/demo/Autosize.vue
new file mode 100644
index 000000000..8744064f8
--- /dev/null
+++ b/src/field/demo/Autosize.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/BasicUsage.vue b/src/field/demo/BasicUsage.vue
new file mode 100644
index 000000000..5e436f949
--- /dev/null
+++ b/src/field/demo/BasicUsage.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/CustomType.vue b/src/field/demo/CustomType.vue
new file mode 100644
index 000000000..523059a60
--- /dev/null
+++ b/src/field/demo/CustomType.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/Disabled.vue b/src/field/demo/Disabled.vue
new file mode 100644
index 000000000..48e52298a
--- /dev/null
+++ b/src/field/demo/Disabled.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/ErrorInfo.vue b/src/field/demo/ErrorInfo.vue
new file mode 100644
index 000000000..169ba7fd8
--- /dev/null
+++ b/src/field/demo/ErrorInfo.vue
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/FormatValue.vue b/src/field/demo/FormatValue.vue
new file mode 100644
index 000000000..ef149f913
--- /dev/null
+++ b/src/field/demo/FormatValue.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/InputAlign.vue b/src/field/demo/InputAlign.vue
new file mode 100644
index 000000000..df0cc0191
--- /dev/null
+++ b/src/field/demo/InputAlign.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/InsertButton.vue b/src/field/demo/InsertButton.vue
new file mode 100644
index 000000000..c9f95058b
--- /dev/null
+++ b/src/field/demo/InsertButton.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ {{ $t('sendSMS') }}
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/ShowIcon.vue b/src/field/demo/ShowIcon.vue
new file mode 100644
index 000000000..ea42fa861
--- /dev/null
+++ b/src/field/demo/ShowIcon.vue
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/ShowWordLimit.vue b/src/field/demo/ShowWordLimit.vue
new file mode 100644
index 000000000..7f73fd46f
--- /dev/null
+++ b/src/field/demo/ShowWordLimit.vue
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/field/demo/index.vue b/src/field/demo/index.vue
index c89420f6d..2ba3649dd 100644
--- a/src/field/demo/index.vue
+++ b/src/field/demo/index.vue
@@ -1,261 +1,42 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ $t('sendSMS') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/src/field/test/__snapshots__/demo.spec.js.snap b/src/field/test/__snapshots__/demo.spec.js.snap
index 45f50bb82..35ee97271 100644
--- a/src/field/test/__snapshots__/demo.spec.js.snap
+++ b/src/field/test/__snapshots__/demo.spec.js.snap
@@ -108,8 +108,8 @@ exports[`renders demo correctly 1`] = `