diff --git a/src/AppCodeHighlight.js b/src/AppCodeHighlight.js index 84230a53a..e62edf5fe 100644 --- a/src/AppCodeHighlight.js +++ b/src/AppCodeHighlight.js @@ -2,9 +2,12 @@ import Prism from 'prismjs'; const CodeHighlight = { beforeMount(el, binding) { - if (binding.modifiers.script) + const modifiers = binding.modifiers; + const value = binding.value; + + if (modifiers.script || value === 'script') el.className = 'language-javascript'; - else if (binding.modifiers.css) + else if (modifiers.css || value === 'css') el.className = 'language-css'; else el.className = 'language-markup'; @@ -13,4 +16,4 @@ const CodeHighlight = { } }; -export default CodeHighlight; \ No newline at end of file +export default CodeHighlight; diff --git a/src/AppDocumentation.vue b/src/AppDocumentation.vue new file mode 100644 index 000000000..b4acd6b59 --- /dev/null +++ b/src/AppDocumentation.vue @@ -0,0 +1,88 @@ + diff --git a/src/components/tabview/TabView.vue b/src/components/tabview/TabView.vue index 7b99cec9d..98996de51 100755 --- a/src/components/tabview/TabView.vue +++ b/src/components/tabview/TabView.vue @@ -138,4 +138,4 @@ export default { .p-tabview-title { line-height: 1; } - \ No newline at end of file + diff --git a/src/main.js b/src/main.js index b666f189a..626a60cb1 100644 --- a/src/main.js +++ b/src/main.js @@ -95,6 +95,7 @@ import TriStateCheckbox from './components/tristatecheckbox/TriStateCheckbox'; import Galleria from './components/galleria/Galleria'; import AppInputStyleSwitch from './AppInputStyleSwitch'; +import AppDocumentation from './AppDocumentation'; import CodeHighlight from './AppCodeHighlight'; import './assets/styles/primevue.css'; @@ -110,7 +111,7 @@ router.beforeEach(function (to, from, next) { const app = createApp(App); -app.config.globalProperties.$appState = reactive({inputStyle: 'outlined', darkTheme: false, codeSandbox: true}); +app.config.globalProperties.$appState = reactive({inputStyle: 'outlined', darkTheme: false, codeSandbox: true, sourceType: 'options-api'}); app.use(PrimeVue, {ripple: true}); app.use(ToastService); @@ -208,6 +209,7 @@ app.component('TriStateCheckbox', TriStateCheckbox); app.component('Galleria', Galleria); app.component('AppInputStyleSwitch', AppInputStyleSwitch); +app.component('AppDoc', AppDocumentation); app.directive('code', CodeHighlight); -app.mount('#app'); \ No newline at end of file +app.mount('#app'); diff --git a/src/views/datatable/DataTableBasicDemo.vue b/src/views/datatable/DataTableBasicDemo.vue index 1774715d8..e4c0486b5 100755 --- a/src/views/datatable/DataTableBasicDemo.vue +++ b/src/views/datatable/DataTableBasicDemo.vue @@ -18,72 +18,14 @@ -
- - -
- -
-

-
- -

-import ProductService from '../../service/ProductService';
-
-export default {
-    data() {
-        return {
-            products: null
-        }
-    },
-    productService: null,
-    created() {
-        this.productService = new ProductService();
-    },
-    mounted() {
-        this.productService.getProductsSmall().then(data => this.products = data);
-    }
-}
-
-
-
-
-
+ \ No newline at end of file + diff --git a/src/views/datatable/DataTableBasicDoc.vue b/src/views/datatable/DataTableBasicDoc.vue new file mode 100644 index 000000000..dbffe131d --- /dev/null +++ b/src/views/datatable/DataTableBasicDoc.vue @@ -0,0 +1,50 @@ + + + diff --git a/src/views/liveeditor/LiveEditor.vue b/src/views/liveeditor/LiveEditor.vue index 566bb00cb..b8eed9660 100644 --- a/src/views/liveeditor/LiveEditor.vue +++ b/src/views/liveeditor/LiveEditor.vue @@ -1,7 +1,7 @@