vue.js漂亮界面
Vue输入UI (vue-input-ui)
A beautiful input made with Vue JS.
用Vue JS进行的漂亮输入。
安装 (Installation)
使用纱 (Using yarn)
yarn add vue-input-ui
yarn add vue-input-ui
使用npm (Using npm)
npm i --save vue-input-ui
npm i --save vue-input-ui
用法 (Usage)
ES6模块/ CommonJS (ES6 Modules / CommonJS)
import VueInputUi from 'vue-input-ui';
import 'vue-input-ui/dist/vue-input-ui.css';
Vue.component('vue-input-ui', VueInputUi);
<VueInputUi v-model="yourValue" />
UMD (UMD)
<VueInputUi v-model="yourValue" />
<script src="https://unpkg.com/vue" charset="utf-8"></script>
<script src="./dist/vue-input-ui.umd.min.js" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="./dist/vue-input-ui.css">
<script type="text/javascript">
Vue.component('vue-input-ui', window.VueInputUi.default);
</script>
道具API (Props API)
Props | Type | Required | Default | Options |
---|---|---|---|---|
v-model | String/Int | true | - | - |
id | String | false | VueInputUi | - |
label | String | false | Enter Text | - |
type | String | no | text | text or number |
size | String sm or lg | no | false | |
color | String HEX | no | dogderblue | |
hint* | String | no | - | |
error** | Boolean | no | false | |
dark | Boolean | no | false | |
disabled | Boolean | no | false | |
required | Boolean | no | false | |
readonly | Boolean | no | false | |
clearable | Boolean | no | false |
道具 | 类型 | 需要 | 默认 | 选件 |
---|---|---|---|---|
模型 | 字符串/整数 | 真正 | -- | -- |
ID | 串 | 假 | VueInputUi | -- |
标签 | 串 | 假 | 输入文字 | -- |
类型 | 串 | 没有 | 文本 | 文字或数字 |
尺寸 | 字符串sm or lg | 没有 | 假 | |
颜色 | 字符串HEX | 没有 | Dogderblue | |
暗示* | 串 | 没有 | -- | |
错误** | 布尔型 | 没有 | 假 | |
黑暗 | 布尔型 | 没有 | 假 | |
残障人士 | 布尔型 | 没有 | 假 | |
需要 | 布尔型 | 没有 | 假 | |
只读 | 布尔型 | 没有 | 假 | |
可清除的 | 布尔型 | 没有 | 假 |
贡献 (Contribution)
项目设置 (Project setup)
npm install
编译和热重装以进行开发 (Compiles and hot-reloads for development)
npm run serve
整理和修复文件 (Lints and fixes files)
npm run lint
翻译自: https://vuejsexamples.com/a-beautiful-input-made-with-vue-js/
vue.js漂亮界面