Update setup docs based on new build
parent
ad9e4d6be1
commit
bb49c9fcf1
|
@ -17,13 +17,13 @@
|
||||||
|
|
||||||
<pre v-code.script>
|
<pre v-code.script>
|
||||||
<code>
|
<code>
|
||||||
npm install primevue@^3.1.1 --save
|
npm install primevue@^3.2.0-rc.1 --save
|
||||||
npm install primeicons --save
|
npm install primeicons --save
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h5>Module Loader</h5>
|
<h5>Module Loader</h5>
|
||||||
<p>This is the recommended way if your application uses <a href="https://cli.vuejs.org/">vue-cli</a> or has a webpack based build with <a href="https://github.com/vuejs/vue-loader">vue-loader</a> configured.</p>
|
<p>This is the recommended way if your application uses <a href="https://cli.vuejs.org">Vue CLI</a>, <a href="https://vitejs.dev">Vite</a> or has a webpack based build with <a href="https://github.com/vuejs/vue-loader">vue-loader</a> configured.</p>
|
||||||
|
|
||||||
<p>Begin with installing PrimeVue. This command only sets up the core configuration like locale and does not register any component.</p>
|
<p>Begin with installing PrimeVue. This command only sets up the core configuration like locale and does not register any component.</p>
|
||||||
<pre v-code.script>
|
<pre v-code.script>
|
||||||
|
@ -55,31 +55,60 @@ app.component('Dialog', Dialog);
|
||||||
<code>
|
<code>
|
||||||
<Dialog></Dialog>
|
<Dialog></Dialog>
|
||||||
|
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<h5>Single File Components</h5>
|
||||||
|
<p>SFC files are available in the npm distribution and if you'd like to use SFCs directly, add <i>/sfc</i> as a suffix when referencing an import path. This will instruct your bundler to process the *.vue files
|
||||||
|
in your local build instead of using the compiled output. One use case for this approach is optimizing for SSR by removing whitespaces.</p>
|
||||||
|
|
||||||
|
<pre v-code.script>
|
||||||
|
<code>
|
||||||
|
import Dialog from 'primevue/dialog/sfc';
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h5>Script Tag</h5>
|
<h5>Script Tag</h5>
|
||||||
<p>Other alternative is utilizing the components directly within the browser with UMD packages.</p>
|
<p>Other alternative is utilizing the components directly within the browser with the <i>iife</i> build. Note that PrimeVue does not provide a <i>umd</i> build.</p>
|
||||||
<pre v-code>
|
<pre v-code>
|
||||||
<code>
|
<code>
|
||||||
<meta charset="utf-8">
|
<html>
|
||||||
<title>calendar demo</title>
|
<head>
|
||||||
<link href="https://unpkg.com/primevue/resources/themes/saga-blue/theme.css" rel="stylesheet">
|
<meta charset="utf-8">
|
||||||
<link href="https://unpkg.com/primevue/resources/primevue.min.css " rel="stylesheet">
|
<title>PrimeVue Demo</title>
|
||||||
<link href="https://unpkg.com/primeicons/primeicons.css" rel="stylesheet">
|
<link href="https://unpkg.com/primevue/resources/themes/saga-blue/theme.cs " rel="stylesheet">
|
||||||
<script src="https://unpkg.com/vue@next"></script>
|
<link href="https://unpkg.com/primevue/resources/primevue.min.css" rel="stylesheet">
|
||||||
<script src="https://unpkg.com/primevue/calendar/calendar.umd.min.js"></script>
|
<link href="https://unpkg.com/primeicons/primeicons.css" rel="stylesheet">
|
||||||
|
|
||||||
<div id="app">
|
<script src="https://unpkg.com/vue@next"></script>
|
||||||
<p-calendar></p-calendar>
|
<script src="https://unpkg.com/primevue/inputtext"></script>
|
||||||
</div>
|
</head>
|
||||||
|
|
||||||
<script>
|
<body>
|
||||||
Vue.createApp({
|
<div id="app">
|
||||||
components: {
|
<p-inputtext v-model="val"></p-inputtext>
|
||||||
'p-calendar': calendar
|
<h6>{{val}}</h6>
|
||||||
}
|
</div>
|
||||||
}).mount('#app')
|
|
||||||
</script>
|
<script>
|
||||||
|
const {createApp, ref} = Vue;
|
||||||
|
|
||||||
|
const App = {
|
||||||
|
setup() {
|
||||||
|
const val = ref(null);
|
||||||
|
|
||||||
|
return {
|
||||||
|
val
|
||||||
|
};
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
'p-inputtext': primevue.inputtext
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
createApp(App).mount("#app");
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
@ -98,7 +127,7 @@ dependencies: {
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h6>Optional</h6>
|
<h6>Optional</h6>
|
||||||
<p>Here is the list of components with 3rd party dependencies.</p>
|
<p>Here is the list of components with 3rd party dependencies. Documentation of each component has a dependencies section as well.</p>
|
||||||
<div class="doc-tablewrapper">
|
<div class="doc-tablewrapper">
|
||||||
<table class="doc-table">
|
<table class="doc-table">
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -206,11 +235,14 @@ app.use(PrimeVue, {ripple: true});
|
||||||
<h5>Locale</h5>
|
<h5>Locale</h5>
|
||||||
<p>PrimeVue provides a Locale API to support i18n and l7n, visit the <router-link to="/locale">Locale</router-link> documentation for more information.</p>
|
<p>PrimeVue provides a Locale API to support i18n and l7n, visit the <router-link to="/locale">Locale</router-link> documentation for more information.</p>
|
||||||
|
|
||||||
<h5>Quickstart</h5>
|
<h5>Quickstart with Vue CLI</h5>
|
||||||
<p>An <a href="https://github.com/primefaces/primevue-quickstart">example application</a> based on vue-cli is available at github.</p>
|
<p>An <a href="https://github.com/primefaces/primevue-quickstart">example application</a> based on Vue CLI is available at github.</p>
|
||||||
|
|
||||||
|
<h5>Quickstart with Vite</h5>
|
||||||
|
<p>A <a href="https://github.com/primefaces/primevue-quickstart-vite">start application</a> is also provided for Vite users.</p>
|
||||||
|
|
||||||
<h5>Typescript</h5>
|
<h5>Typescript</h5>
|
||||||
<p>Typescript is fully supported as type definition files are provided in the npm package of PrimeVue. A sample <a href="https://github.com/primefaces/primevue-typescript-quickstart">typescript-primevue</a> application is available as well at github.</p>
|
<p>Typescript is fully supported as type definition files are provided in the npm package of PrimeVue. A sample <a href="https://github.com/primefaces/primevue-typescript-quickstart">typescript-primevue</a> application with Vue CLI is available as at github.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
Loading…
Reference in New Issue