表 (prot-table)
A customizable table component in vue. Intended to be used as a web-component or as a component in vue projects.
vue中的可定制表组件。 旨在用作Web组件或vue项目中的组件。
安装 (Installation)
从NPM安装 (Install from NPM)
Run:
跑:
npm install prot-table
从源构建 (Build from Source)
Install dependencies:
安装依赖项:
npm install
npm install
Build as Web-Component:
作为Web组件构建:
vue-cli-service build --mode production --dest dist/web-component --target wc --name prot-table && cp public/demo.html dist/index.html && cp public/data.json dist/data.json
用法 (Usage)
用作Web组件(暂时无法使用) (Use as Web-Component (Not working right now))
Include Vue and the Component:
包括Vue和组件:
import Vue from 'vue';
import protTable from 'prot-table';
OR
要么
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="prot-table"></script>
用作Vue组件 (Use as a Vue Component)
Import it from prot-table
and it gets registered as a Vue component for further use.
从prot-table
导入它,并将其注册为Vue组件以供进一步使用。
import ProtTable from 'prot-table'
Use the <prot-table></prot-table>
tag with appropriate attributes:
将<prot-table></prot-table>
标记与适当的属性一起使用: