Skip to content

Commit

Permalink
remove core UI css; fix demo api
Browse files Browse the repository at this point in the history
  • Loading branch information
wxs77577 committed Nov 28, 2018
1 parent 8594757 commit fcaf243
Showing 17 changed files with 679 additions and 184 deletions.
29 changes: 24 additions & 5 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -26,15 +26,15 @@ app.use((req, res, next) => {

// for basic site config
router.get('/site', (req, res) => res.send({
name: 'REST-ADMIN', //site name
name: 'DASHBOARD', //site name
locale: 'en-US',
logo: 'http://rest-admin.genyii.com/logo.png',
locale_switcher: true,
url: 'https://github.com/wxs77577/rest-admin',
footer: `
<span><a href="/wxs77577/rest-admin">REST-ADMIN</a> &copy; 2018</span>
grid_style: 1,
footer1: `
<span class="ml-auto">
GitHub <a href="/wxs77577/rest-admin">REST-ADMIN</a>
GitHub <a href="/wxs77577/rest-admin">https://github.com/wxs77577/rest-admin</a>
</span>
<script>
//Baidu Statistic
@@ -88,11 +88,21 @@ router.get('/site', (req, res) => res.send({
"icon": "icon-settings",
// a custom page.
},
{
divider: true
},
{
name: 'Logout',
url: '/login',
icon: 'icon-lock',
},

{
name: 'Github',
external: true,
url: 'https://github.com/wxs77577/rest-admin',
icon: 'fa fa-github',
},
]
}))

@@ -169,9 +179,18 @@ const settingForm = {
fields: {
name: { label: "Site Name", input_cols: 4 },
logo: { label: "Site Logo", type: "image", input_cols: 4 },
menu: {
type: 'array', is_table: true, fields: {
name: {},
_actions: {}
}
},
},
model: {
value: {
name: 'REST ADMIN',
menu: [

]
}
}

2 changes: 1 addition & 1 deletion api/resources.js
Original file line number Diff line number Diff line change
@@ -92,7 +92,7 @@ const products = {
cols: 3, label: 'Categories', multiple: true, ref: 'categories.name',
type: 'tree', options: findChildren(categories.data), sortable: true,
},
slug: { cols: 3, searchable: true },
// slug: { cols: 3, searchable: true },
name: { cols: 6, searchable: true, description: 'Give me an awesome title.' },
views: { type: 'number', cols: 3, listable: false },
sort: { type: 'number', cols: 3, sortable: true },
58 changes: 52 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@riophae/vue-treeselect": "^0.0.28",
"@riophae/vue-treeselect": "^0.0.37",
"axios": "^0.18.0",
"bootstrap": "^4.1.0",
"bootstrap-vue": "^2.0.0-rc.11",
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@
<title>RESTFul Admin Dashboard</title>
<link rel="stylesheet" id="css-skin">
</head>
<body class="app footer-fixed sidebar-fixed aside-menu-fixed aside-menu-hidden">
<body class="app sidebar-fixed ">

<div id="css-custom"></div>

2 changes: 1 addition & 1 deletion src/components/DataTable.vue
Original file line number Diff line number Diff line change
@@ -130,7 +130,7 @@
</div>
</div>
<b-table
class="data-table"
class="data-table bg-white"
:sort-by.sync="sortBy"
:sort-desc.sync="sortDesc"
:no-local-sorting="true"
24 changes: 19 additions & 5 deletions src/components/Footer.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
<template>
<footer class="app-footer" v-html="site.footer" v-if="site.footer"></footer>
<footer class="app-footer" v-else>
<span><a href="https://github.com/wxs77577/rest-admin">REST-ADMIN</a> &copy; 2018</span>
<span class="ml-auto">
GitHub <a href="https://github.com/wxs77577/rest-admin">REST-ADMIN</a>
<span class="ml-auto">GitHub
<a href="https://github.com/wxs77577/rest-admin">REST-ADMIN</a>
</span>
</footer>
</template>
<script>
import {mapState} from 'vuex'
import { mapState } from "vuex";
export default {
computed: {
...mapState(['site'])
...mapState(["site"])
}
};
</script>
<style>
.app-footer {
position: fixed;
bottom: 0;
right: 0;
width: 100%;
z-index: 9;
padding-left: 215px;
letter-spacing: 1px;
text-align: right;
padding: 0.5em;
background: #fff;
color: #666;
}
</style>
2 changes: 1 addition & 1 deletion src/components/FormBuilder.vue
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@
<b-tab v-for="(subFields, tabName) in groupedFields" :title="_.get(layout, `tabs.${tabName}.name`) || tabName || $t('messages.default')" :key="tabName">
<div class="row form-cols">
<b-col :md="_.get(layout, `tabs.${tabName}.cols`, 12)">
<b-row>
<b-row class="mt-4">
<b-form-group :class="getClass(field)" v-if="isShowField(field) && model" :state="!hasError(name)"
v-for="(field, name) in subFields" :key="id + '_' +name" v-bind="field" :label-for="'input_' + name"
:label="field.label !== false ? (field.label || $inflection.titleize(name)) : ''">
2 changes: 1 addition & 1 deletion src/components/FormField.vue
Original file line number Diff line number Diff line change
@@ -91,7 +91,7 @@
:parent="parent"
/>
<div v-else-if="['switch', 'checkbox'].includes(field.type)">
<b-switch variant="success" v-bind="field" pill type="3d" :id="id" v-model="model"/>
<b-form-checkbox variant="success" v-bind="field" size="lg" pill type="3d" :id="id" v-model="model"/>
</div>
<!-- <b-ueditor :state="state" v-else-if="['wysiwyg', 'html'].includes(field.type)" :id="id" v-bind="field" v-model="model" /> -->

Loading

0 comments on commit fcaf243

Please sign in to comment.