diff --git a/packages/password-input/index.js b/packages/password-input/index.js
new file mode 100644
index 000000000..4057fd906
--- /dev/null
+++ b/packages/password-input/index.js
@@ -0,0 +1,51 @@
+import { use } from '../utils';
+
+const [sfc, bem] = use('password-input');
+
+export default sfc({
+ props: {
+ info: String,
+ errorInfo: String,
+ value: {
+ type: String,
+ default: ''
+ },
+ length: {
+ type: Number,
+ default: 6
+ }
+ },
+
+ computed: {
+ points() {
+ const arr = [];
+ for (let i = 0; i < this.length; i++) {
+ arr[i] = this.value[i] ? 'visible' : 'hidden';
+ }
+ return arr;
+ }
+ },
+
+ render(h) {
+ const info = this.errorInfo || this.info;
+
+ return (
+
+
{
+ event.stopPropagation();
+ this.$emit('focus');
+ }}
+ >
+ {this.points.map(visibility => (
+ -
+
+
+ ))}
+
+ {info &&
{info}
}
+
+ );
+ }
+});
diff --git a/packages/password-input/index.vue b/packages/password-input/index.vue
deleted file mode 100644
index 84792db06..000000000
--- a/packages/password-input/index.vue
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
-
-
diff --git a/packages/password-input/test/__snapshots__/demo.spec.js.snap b/packages/password-input/test/__snapshots__/demo.spec.js.snap
index 3c74c89da..ad21d4e77 100644
--- a/packages/password-input/test/__snapshots__/demo.spec.js.snap
+++ b/packages/password-input/test/__snapshots__/demo.spec.js.snap
@@ -4,7 +4,7 @@ exports[`renders demo correctly 1`] = `