vue-element3-search-table
Version:
```bash npm i vue-element3-search-table@latest --save ```
19 lines (15 loc) • 580 B
JavaScript
import SearchTable from './src/SearchTable.vue';
// import { provide } from 'vue';
// const SearchTableSymbol = Symbol(); // 用Symbol创建一个唯一标识,多个插件之间不会冲突
SearchTable.install = (app, option = {}) => {
if (!app.prototype) {
app.component('SearchTable', SearchTable);
app.config.globalProperties.$SearchTable = option;
app.provide('SearchTable', option);
} else {
app.component(SearchTable.name, SearchTable);
app.prototype.$SearchTable = option;
}
window.$SearchTable = option;
};
export default SearchTable;