Vue 3 is supported only for subscribers on the premium version
While the migrated package has been tested, this is still an alpha version. Please let me know of any issue via xscode chat and I will fix it ASAP
Install the vue3
branch:
> npm install [email protected]+https://<access-token>@git.xscode.com/matfish2/vue-tables-2.git#vue3
Require scripts:
import {ServerTable, ClientTable, EventBus} from 'v-tables-3';
Initialize app:
import { createApp } from 'vue'const app = createApp(App)
Register component(s):
app.use(ClientTable, [options = {}], [theme = 'bootstrap3'], [swappables = {}])// AND / ORapp.use(ServerTable, [options = {}], [theme = 'bootstrap3'], [swappables = {}])
The above code is only for the purpose of documentation. The actual code would look something like this:
app.use(ServerTable, {}, 'bootstrap4')
Note that the useVuex
option was removed
There are almost no breaking changes, so in case you are migrating for v2, you can continue using your old code base with the following in mind:
The event bus now uses the mitt
package: a. to avoid naming collisions the import is now EventBus
. instead of Event
. b. Instead of Event.$on
, use EventBus.on
c. instead of Event.$emit
use EventBus.emit
Vuex
option was removed. See above.
When using a custom template refer to the templates
folder of the premium package, as there are some minor changes
During development Vue will issue some warnings, which you can safely ignore. They will not be displayed on the production build.
Expect to see the following warning in the console while developing:
Vue 3 expects you to define emitted events in advance. This is not possible for dynamic event names, such as filter::[columnName].
For example:
Component emitted event "filter::id" but it is neither declared in the emits option nor as an "onFilter::id" prop.