提交 45ad879d authored 作者: 王鹏飞's avatar 王鹏飞

init

上级 b4dfc6db
......@@ -3,13 +3,11 @@ module.exports = {
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard'
],
extends: ['plugin:vue/essential', '@vue/standard'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'space-before-function-paren': 'off'
},
parserOptions: {
parser: 'babel-eslint'
......
.DS_Store
node_modules
/dist
# local env files
.env.local
......
.github
.DS_Store
.browserslistrc
.babelrc
.editorconfig
.eslintrc.js
.eslintignore
.prettierrc
.gitignore
examples/
public/
src/
node_modules
babel.config.js
vue.config.js
npm-debug.log
package-lock.json
yarn.json
\ No newline at end of file
{
"semi": false,
"singleQuote": true
}
# Changelog
### 0.1.2(2019-12-24)
- 初始化
# vue-form
## Project setup
## 安装
```
yarn install
npm install @ezijing/vue-form --save
```
### Compiles and hot-reloads for development
```
yarn serve
yarn add @ezijing/vue-form --save
```
### Compiles and minifies for production
## 使用
### 全局使用
```
yarn build
import VueForm from 'vue-form'
Vue.use(VueForm)
```
### Lints and fixes files
### 组件中使用
```
yarn lint
<template>
<vue-form :model="formModel" :items="formItems" />
</template>
<script>
import VueForm from 'vue-form'
export default {
components: { VueForm },
data() {
return {
formModel: {
name: ''
},
formItems: [
{
type: 'input',
model: 'name',
placeholder: '请输入昵称'
}
]
}
}
}
</script>
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
## 属性
### From 属性
| 属性 | 类型 | 说明 |
| --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options` | `Object` | el-form 属性配置参考:[https://element.eleme.cn/#/zh-CN/component/form#form-attributes](https://element.eleme.cn/#/zh-CN/component/form#form-attributes) |
| `model` | `Object` | 数据模型 |
| `items` | `Array` | 表单项 |
### Form-Item 属性
参考:[https://element.eleme.cn/#/zh-CN/component/form#form-item-attributes](https://element.eleme.cn/#/zh-CN/component/form#form-item-attributes)
## 方法
参考:[https://element.eleme.cn/#/zh-CN/component/form#form-methods](https://element.eleme.cn/#/zh-CN/component/form#form-methods)
## 事件
| 事件名 | 返回值 | 说明 |
| -------- | ------------------------------ | ---- |
| `submit` | 类型:`Object`; 说明:数据模型 | 提交 |
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
'@vue/cli-plugin-babel/preset',
['@babel/preset-env', { modules: false }]
],
plugins: [
[
'component',
{
libraryName: 'element-ui',
styleLibraryName: 'theme-chalk'
}
]
]
}
<meta charset="utf-8">
<title>vue-form demo</title>
<script src="./vue-form.umd.js"></script>
<link rel="stylesheet" href="./vue-form.css">
<script>
console.log(vue-form)
</script>
This source diff could not be displayed because it is too large. You can view the blob instead.
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论