From d61ca41aa0bf59101b9ff4ce48d0c0d4a7674ea9 Mon Sep 17 00:00:00 2001
From: Aaron <427787340@qq.com>
Date: Fri, 11 Oct 2019 16:29:41 +0800
Subject: [PATCH] 新增关键词输入器组件
---
.env | 2 +-
examples/router/routes.js | 6 ++++++
examples/views/docs/component/keyword-input.md | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
examples/views/layout/component.vue | 4 ++--
lang/i18n.js | 6 ++++++
packages/index.js | 2 ++
packages/keyword-input/index.vue | 174 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 253 insertions(+), 3 deletions(-)
create mode 100644 examples/views/docs/component/keyword-input.md
create mode 100644 packages/keyword-input/index.vue
diff --git a/.env b/.env
index 4ded078..e952756 100644
--- a/.env
+++ b/.env
@@ -1,4 +1,4 @@
# 版本号
-VUE_APP_VERSION = '0.5.3'
+VUE_APP_VERSION = '0.5.4'
# 自定义变量 Cookie失效时间 1天
VUE_APP_NAME = 'Eagle Web Tookit'
\ No newline at end of file
diff --git a/examples/router/routes.js b/examples/router/routes.js
index 769d09d..f4bad39 100644
--- a/examples/router/routes.js
+++ b/examples/router/routes.js
@@ -30,6 +30,12 @@ const _components = [
meta: { title: 'Select 选择器' },
component: () => import('@/views/docs/component/select.md'),
},
+ {
+ path: 'keyword-input',
+ name: 'keyword-input',
+ meta: { title: 'KeywordInput 关键词输入器' },
+ component: () => import('@/views/docs/component/keyword-input.md'),
+ },
]
},
{
diff --git a/examples/views/docs/component/keyword-input.md b/examples/views/docs/component/keyword-input.md
new file mode 100644
index 0000000..dd62291
--- /dev/null
+++ b/examples/views/docs/component/keyword-input.md
@@ -0,0 +1,62 @@
+# KeywordInput 关键词输入器
+
+自定义输入一组数据以数组或者逗号分隔的方式记录
+
+## 基础用法
+
+::: snippet 默认返回值类型为`Array`
+
+```html
+
+
+ {{ inputValue }}
+
+
+
+
+
+```
+
+:::
+
+## 字符串类型
+
+::: snippet 返回值类型为`String`
+
+```html
+
+
+ "{{ inputValue }}"
+
+
+
+
+
+```
+
+:::
+
+## API
+
+## Attribute 属性
+
+参数|说明|类型|可选值|默认值
+-|-|-|-|-
+value / v-model | 绑定值 | String,Array | - | -
+placeholder | 占位文本 | String | - | 请输入
+unique | 唯一值,设置后不会出现相同的值 | Boolean | - | true
+deletable | 是否能通过删除键删除上一个词 | Boolean | - | false
+clearable | 是否可清空 | Boolean | - | false
+type | 返回值类型 | String | array,string | array
\ No newline at end of file
diff --git a/examples/views/layout/component.vue b/examples/views/layout/component.vue
index 6e5d9e9..1aaa66a 100644
--- a/examples/views/layout/component.vue
+++ b/examples/views/layout/component.vue
@@ -2,7 +2,7 @@
-
+