diff --git a/examples/main.js b/examples/main.js
index c8a080c..d0e3d09 100644
--- a/examples/main.js
+++ b/examples/main.js
@@ -3,6 +3,7 @@ import App from '../src/App.vue'
//基于element组件封装,引入element组件库
import { Input } from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
Vue.use(Input);
// 导入组件库
diff --git a/packages/pedestal/src/index.vue b/packages/pedestal/src/index.vue
index bd4b892..c1c9471 100644
--- a/packages/pedestal/src/index.vue
+++ b/packages/pedestal/src/index.vue
@@ -1,77 +1,75 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ toUpperCase: {
+ type: Boolean,
+ default: true,
+ },
+ },
+ computed: {
+ // 所有父级事件
+ inputListeners() {
+ return Object.assign(
+ {},
+ // 我们从父级添加所有的监听器
+ this.$listeners,
+ // 然后我们添加自定义监听器,
+ // 或覆写一些监听器的行为
+ {
+ // 这里确保组件配合 `v-model` 的工作
+ input: (value) => {
+ this.$emit("input", this.toUpperCase ? value.toUpperCase() : value);
+ },
+ blur: (e) => {
+ let value = e.target.value
+ .trim()
+ .replace(/\s/g, (match) =>
+ match.charCodeAt(0) === 12288 ? String.fromCharCode(32) : match
+ );
+
+ // 失去焦点自动首位去空格
+ this.$emit("input", value);
+ },
+ }
+ );
+ },
+ },
+ mounted() {},
+};
+
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index e166b4f..7a4c3e7 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,6 +1,6 @@