0.1.1 • Published 3 years ago
f-input-text v0.1.1
Fasa Input Text
Installation
npm i f-input-text@latest
Usage
You should have Quasar
framework insalled in order to use this package.
Your main.js
file should be something like this.
import { createApp } from "vue";
import App from "./App.vue";
import { Quasar } from "quasar";
import quasarUserOptions from "./quasar-user-options";
import FInputText from "f-input-text";
const app = createApp(App).use(Quasar, quasarUserOptions);
app.component('f-input-text', FInputText);
app.mount('#app');
Now the package is available to all your project, let's take a look on how to use it in your components.
Using the package in your component
<f-input-text
label="First Name"
v-model.trim="v$.form.firstName.$model"
:errors="v$.form.firstName.$errors"
></f-input-text>
Builds
There are three builds available.
dist/v-switch.cjs,js
: for SSR in node.js (usingrequire
)dist/v-switch.esm-bundler.js
: for bundlers like Webpack and Rollup- also works as an ES module in the browser using
<script type="module">
- also works as an ES module in the browser using
dist/v-switch.browser.js
: global build (iife)
Type definitions are also included.
Generally your build tool will be able to figure out which bundle to use, but you can be explicit if you need to.
Other
I recorded some content for my YouTube channel relating to this component:
- Building the component: https://youtu.be/KPV6-H6-IxM
- Building for production and publishing it on npm: https://youtu.be/KwoO2afF5cg
License
MIT