diff --git a/exports/deferredcontent.d.ts b/exports/deferredcontent.d.ts new file mode 100644 index 000000000..83b37206a --- /dev/null +++ b/exports/deferredcontent.d.ts @@ -0,0 +1 @@ +export * from './components/deferredcontent/DeferredContent'; \ No newline at end of file diff --git a/exports/deferredcontent.js b/exports/deferredcontent.js new file mode 100644 index 000000000..33480f734 --- /dev/null +++ b/exports/deferredcontent.js @@ -0,0 +1,3 @@ +'use strict'; +module.exports = require('./components/deferredcontent/DeferredContent.vue'); + \ No newline at end of file diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 991883529..f52eb0330 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -75,9 +75,10 @@
● Accordion ● Card - ● Panel + ● Deferred ● Fieldset ● FlexGrid + ● Panel ● TabView ● Toolbar
diff --git a/src/components/deferredcontent/DeferredContent.d.ts b/src/components/deferredcontent/DeferredContent.d.ts new file mode 100644 index 000000000..635d8d656 --- /dev/null +++ b/src/components/deferredcontent/DeferredContent.d.ts @@ -0,0 +1,8 @@ +import Vue, {VNode} from 'vue'; + +export declare class DeferredContent extends Vue { + $emit(eventName: 'load'): this; + $slots: { + '': VNode[]; + } +} \ No newline at end of file diff --git a/src/components/deferredcontent/DeferredContent.vue b/src/components/deferredcontent/DeferredContent.vue new file mode 100644 index 000000000..d04a2599d --- /dev/null +++ b/src/components/deferredcontent/DeferredContent.vue @@ -0,0 +1,66 @@ + + + + + + + componentWillUnmount() { + this.unbindScrollListener(); + } \ No newline at end of file diff --git a/src/main.js b/src/main.js index 0e43140ae..c4a8abe9f 100644 --- a/src/main.js +++ b/src/main.js @@ -14,6 +14,7 @@ import Column from './components/column/Column'; import DataTable from './components/datatable/DataTable'; import DataView from './components/dataview/DataView'; import DataViewLayoutOptions from './components/dataviewlayoutoptions/DataViewLayoutOptions'; +import DeferredContent from './components/deferredcontent/DeferredContent'; import Dialog from './components/dialog/Dialog'; import Dropdown from './components/dropdown/Dropdown'; import Editor from './components/editor/Editor'; @@ -78,6 +79,7 @@ Vue.component('Column', Column); Vue.component('DataTable', DataTable); Vue.component('DataView', DataView); Vue.component('DataViewLayoutOptions', DataViewLayoutOptions); +Vue.component('DeferredContent', DeferredContent); Vue.component('Dialog', Dialog); Vue.component('Dropdown', Dropdown); Vue.component('Editor', Editor); diff --git a/src/router.js b/src/router.js index 410db1419..c8526b23f 100644 --- a/src/router.js +++ b/src/router.js @@ -165,7 +165,12 @@ export default new Router({ path: '/dataview', name: 'dataview', component: () => import('./views/dataview/DataViewDemo.vue') - }, + }, + { + path: '/deferredcontent', + name: 'deferredcontent', + component: () => import('./views/deferredcontent/DeferredContentDemo.vue') + }, { path: '/dialog', name: 'dialog', diff --git a/src/views/deferredcontent/DeferredContentDemo.vue b/src/views/deferredcontent/DeferredContentDemo.vue new file mode 100644 index 000000000..fea3d03c0 --- /dev/null +++ b/src/views/deferredcontent/DeferredContentDemo.vue @@ -0,0 +1,62 @@ + + \ No newline at end of file diff --git a/src/views/deferredcontent/DeferredContentDoc.vue b/src/views/deferredcontent/DeferredContentDoc.vue new file mode 100644 index 000000000..1915d99a8 --- /dev/null +++ b/src/views/deferredcontent/DeferredContentDoc.vue @@ -0,0 +1,136 @@ + \ No newline at end of file