diff --git a/docs/src/components/DemoFrame/index.vue b/docs/src/components/DemoFrame/index.vue
new file mode 100644
index 000000000..6778c9d45
--- /dev/null
+++ b/docs/src/components/DemoFrame/index.vue
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
diff --git a/docs/src/main.js b/docs/src/main.js
index 00cace32a..3ab2838da 100644
--- a/docs/src/main.js
+++ b/docs/src/main.js
@@ -5,6 +5,7 @@ import 'prismjs/components/prism-scss.js'
import PortalVue from 'portal-vue'
import iframeResize from 'iframe-resizer/js/iframeResizer'
import App from '~/layouts/App'
+import DemoFrame from '~/components/DemoFrame'
Prism.manual = true
@@ -33,5 +34,6 @@ export default function (Vue, { head }) {
Vue.component('Layout', App)
Vue.component('Demo', () => import(/* webpackChunkName: "demo" */ '~/components/Demo'))
+ Vue.component('DemoFrame', DemoFrame)
Vue.component('LiveDemo', () => import(/* webpackChunkName: "live-demo" */ '~/components/LiveDemo'))
}
diff --git a/docs/src/pages/index.vue b/docs/src/pages/index.vue
index f6f4d6dab..210409887 100644
--- a/docs/src/pages/index.vue
+++ b/docs/src/pages/index.vue
@@ -13,15 +13,7 @@
-
-
+
diff --git a/docs/src/templates/DemoPage/index.vue b/docs/src/templates/DemoPage/index.vue
index 19bbd7ba7..32a760bbb 100644
--- a/docs/src/templates/DemoPage/index.vue
+++ b/docs/src/templates/DemoPage/index.vue
@@ -1,6 +1,6 @@
-
+
@@ -17,6 +17,36 @@ export default {
],
}
},
+
+ methods: {
+ fromString(value) {
+ if (typeof value !== 'string') {
+ return value
+ }
+
+ if (value.match(/^\d*(\.\d+)?$/)) {
+ return Number(value)
+ }
+
+ if (value === 'true') {
+ return true
+ }
+
+ if (value === 'false') {
+ return false
+ }
+
+ return value
+ },
+ },
+
+ computed: {
+ props() {
+ return Object.fromEntries(Object
+ .entries(this.$route.query)
+ .map(([key, value]) => [key, this.fromString(value)]))
+ },
+ },
}