first commit
This commit is contained in:
1
dbui/examples/.pydio
Normal file
1
dbui/examples/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
154e13d6-d6bb-4f8a-bd25-10bc67af4e59
|
||||
20
dbui/examples/App.vue
Normal file
20
dbui/examples/App.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<div id="nav">
|
||||
<h2>App.vue</h2>
|
||||
<router-link to="/">Home</router-link> |
|
||||
<router-link to="/about">About</router-link>
|
||||
</div>
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
export default {
|
||||
name: 'App'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
@import "../src/styles/index.less";
|
||||
</style>
|
||||
1
dbui/examples/components/.pydio
Normal file
1
dbui/examples/components/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
7554f392-f21f-47ac-a4e0-eac2b183a954
|
||||
16
dbui/examples/index.html
Normal file
16
dbui/examples/index.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<title>demo案例</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
</noscript>
|
||||
<div class="app"></div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
20
dbui/examples/main.ts
Normal file
20
dbui/examples/main.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import Vue from 'vue';
|
||||
import App from './App.vue';
|
||||
import router from './router';
|
||||
|
||||
// 导入正在编写的UI框架
|
||||
import Dbui from './../src';
|
||||
|
||||
// Vue3 CompositionApi
|
||||
import VueCompositionApi from '@vue/composition-api';
|
||||
|
||||
Vue.use(Dbui);
|
||||
|
||||
Vue.use(VueCompositionApi);
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
render: h => h(App)
|
||||
}).$mount('.app')
|
||||
1
dbui/examples/page/.pydio
Normal file
1
dbui/examples/page/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
47a9a44f-42ce-4a96-9c9a-a3652874ef9e
|
||||
21
dbui/examples/page/About.vue
Normal file
21
dbui/examples/page/About.vue
Normal file
@@ -0,0 +1,21 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<h2>{{ title }}</h2>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { onMounted, toRefs, reactive, computed } from '@vue/composition-api'
|
||||
|
||||
export default {
|
||||
setup(props: any) {
|
||||
const state = reactive({
|
||||
title: '关于我'
|
||||
});
|
||||
|
||||
return {
|
||||
...toRefs(state)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
23
dbui/examples/page/Home.vue
Normal file
23
dbui/examples/page/Home.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<h2>{{ title }}</h2>
|
||||
<db-list :Demos="[1,2,3,4,5,6]"></db-list>
|
||||
<db-buttons></db-buttons>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { onMounted, toRefs, reactive, computed } from '@vue/composition-api'
|
||||
|
||||
export default {
|
||||
setup(props: any) {
|
||||
const state = reactive({
|
||||
title: '首页'
|
||||
});
|
||||
|
||||
return {
|
||||
...toRefs(state)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
1
dbui/examples/router/.pydio
Normal file
1
dbui/examples/router/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
5142dc80-d25e-496c-93a2-7fd1e5ceafca
|
||||
24
dbui/examples/router/index.ts
Normal file
24
dbui/examples/router/index.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
|
||||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
name: 'Home',
|
||||
component: () => import(/* webpackChunkName: "Home" */ '../page/Home.vue')
|
||||
},
|
||||
{
|
||||
path: '/about',
|
||||
name: 'About',
|
||||
component: () => import(/* webpackChunkName: "About" */ '../page/About.vue')
|
||||
}
|
||||
];
|
||||
|
||||
const router = new VueRouter({
|
||||
mode: 'history',
|
||||
routes
|
||||
});
|
||||
|
||||
export default router
|
||||
Reference in New Issue
Block a user