Repository: kinglisky/egrid
Branch: master
Commit: 00c30bc50284
Files: 20
Total size: 26.2 KB
Directory structure:
gitextract_dudo1v5z/
├── .babelrc
├── .gitignore
├── LICENSE
├── README.md
├── dev/
│ ├── App.vue
│ ├── cell-btn.vue
│ ├── cell-editor.vue
│ ├── data.js
│ └── main.js
├── docs/
│ ├── .nojekyll
│ ├── README.md
│ └── index.html
├── index.html
├── package.json
├── rollup.config.js
├── src/
│ ├── index.js
│ ├── main.vue
│ ├── methods.js
│ └── text.js
└── webpack.config.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .babelrc
================================================
{
"presets": [
["env", { "modules": false }]
]
}
================================================
FILE: .gitignore
================================================
.DS_Store
node_modules/
dist/
lib/
npm-debug.log
yarn-error.log
# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2017 青鲤锦时
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Egrid
### 基于 `Element-UI` `Table` 组件封装的高阶表格组件,可无缝支持 element 的 table 组件。
element 升级到了 2.0 了, 不用担心可以无缝升级的~
文档 [http://kinglisky.github.io/egrid](http://kinglisky.github.io/egrid)
### 开发
> `npm run dev`
> `npm run build`
> `npm run doc`
### 使用
安装 Element:
> `npm i element-ui -S`
安装 egrid:
> `npm i egrid -S`
`egrid` 只依赖 `Element` 中的 `Table` 与 `TableColumn` 组件不会将整个 `Element` 导入。
但不包含样式,`Table` 的样式需要用户手动引入。
使用:
```javascript
import Vue from 'vue'
import Egrid from 'egrid'
// table 的样式需要手动引入
import 'element-ui/lib/theme-default/icon.css'
import 'element-ui/lib/theme-default/table.css'
import 'element-ui/lib/theme-default/table-column.css'
Vue.use(Egrid)
```
为什么要在 element table 组价之上再封装一层呢?
平时我们使用的 element table 时候往往是这样写的:
```html
{{ scope.row.date }}