mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
ci: build docs on test step (#1105)
docs(infinite-scroll): fix SSR docs(pagination): bind a boolean not a string ci: build docs on test workflow ci: install docs deps in same step
This commit is contained in:
@@ -29,10 +29,16 @@ jobs:
|
|||||||
node-version: 12
|
node-version: 12
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --frozen-lockfile
|
run: |
|
||||||
|
yarn install --frozen-lockfile
|
||||||
|
cd docs
|
||||||
|
yarn install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build
|
- name: Build Dist
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
- name: Bundlewatch
|
- name: Bundlewatch
|
||||||
run: npx bundlewatch
|
run: npx bundlewatch
|
||||||
|
|
||||||
|
- name: Build Docs
|
||||||
|
run: yarn build:docs
|
||||||
|
|||||||
@@ -19,12 +19,18 @@ import countries from '../data/countries';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "InfiniteScroll",
|
name: "InfiniteScroll",
|
||||||
data () {
|
data: () => ({
|
||||||
return {
|
observer: null,
|
||||||
observer: new IntersectionObserver(this.infiniteScroll),
|
limit: 10,
|
||||||
limit: 10,
|
search: ''
|
||||||
search: ''
|
}),
|
||||||
}
|
mounted () {
|
||||||
|
/**
|
||||||
|
* You could do this directly in data(), but since these docs
|
||||||
|
* are server side rendered, IntersectionObserver doesn't exist
|
||||||
|
* in that environment, so we need to do it in mounted() instead.
|
||||||
|
*/
|
||||||
|
this.observer = new IntersectionObserver(this.infiniteScroll);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filtered () {
|
filtered () {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-select :options="paginated" @search="query => search = query" filterable="false">
|
<v-select :options="paginated" @search="query => search = query" :filterable="false">
|
||||||
<li slot="list-footer" class="pagination">
|
<li slot="list-footer" class="pagination">
|
||||||
<button @click="offset -= 10" :disabled="!hasPrevPage">Prev</button>
|
<button @click="offset -= 10" :disabled="!hasPrevPage">Prev</button>
|
||||||
<button @click="offset += 10" :disabled="!hasNextPage">Next</button>
|
<button @click="offset += 10" :disabled="!hasNextPage">Next</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user