db
Former-commit-id: 1205d4cd03396ee388632e406c816d46780178a3 [formerly 1205d4cd03396ee388632e406c816d46780178a3 [formerly 1205d4cd03396ee388632e406c816d46780178a3 [formerly 1205d4cd03396ee388632e406c816d46780178a3 [formerly 80d9cf0302f08fc268cdc0e5d895674dbf57ca2f [formerly 070b1d2fe7b2e790ec6ceb8be31adc33e64ee637]]]]] Former-commit-id: 1c1d13a8d7a70c17539877d558a6c7fbcb262fb0 Former-commit-id: baa33fdffa02d320b4fbe6c0d9e91402d21f49d7 Former-commit-id: 755d70918e2459f40ccf4c5f523b811470ebd40c [formerly c10b57dfd1410ee7b1dc753f1166dd2408948251] Former-commit-id: 2cc9546dfe7200822fa75f3f10da05c0e4958aaf Former-commit-id: 8285923188bee29334a7fb1cc4766972b3446548 Former-commit-id: cb7b394ced669932a2e1a47fb9bd24651256bd84 Former-commit-id: 23be03c7a903e6c489c06eeb51ebd08235fa3e9f Former-commit-id: be11dd81b5a833fb7bdda3d73d7c5fcb7fbc8fb6
This commit is contained in:
@@ -41,13 +41,13 @@ export default {
|
|||||||
title: '数据持久化',
|
title: '数据持久化',
|
||||||
icon: 'database',
|
icon: 'database',
|
||||||
children: [
|
children: [
|
||||||
{ path: `${pre}db/all`, title: '全部数据', icon: 'table' },
|
{ path: `${pre}db/all`, title: '总览', icon: 'table' },
|
||||||
{ path: `${pre}db/user`, title: '用户数据', icon: 'user' },
|
{ path: `${pre}db/public`, title: '公共存储', icon: 'users' },
|
||||||
{ path: `${pre}db/public`, title: '公用数据', icon: 'users' },
|
{ path: `${pre}db/user`, title: '私有数据', icon: 'user' },
|
||||||
{ path: `${pre}db/page-public`, title: '页面存储', icon: 'file-o' },
|
{ path: `${pre}db/page-public`, title: '路由存储', icon: 'file-o' },
|
||||||
{ path: `${pre}db/page-user`, title: '页面存储 用户', icon: 'file-o' },
|
{ path: `${pre}db/page-user`, title: '私有路由存储', icon: 'file-o' },
|
||||||
{ path: `${pre}db/page-snapshot-public`, title: '页面快照', icon: 'file' },
|
{ path: `${pre}db/page-snapshot-public`, title: '路由快照', icon: 'file' },
|
||||||
{ path: `${pre}db/page-snapshot-user`, title: '页面快照 用户', icon: 'file' }
|
{ path: `${pre}db/page-snapshot-user`, title: '私有路由快照', icon: 'file' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container>
|
<d2-container>
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
|
<el-alert
|
||||||
|
type="success"
|
||||||
|
:closable="false"
|
||||||
|
title="这个页面展示的是全部数据的存储结构,包括系统区域和存储区域,涵盖所有用户,也就是整个 D2Admin 的数据存储结构"/>
|
||||||
|
</template>
|
||||||
|
<d2-highlight :code="dbData"/>
|
||||||
|
<template slot="footer">
|
||||||
<el-button type="primary" @click="load">
|
<el-button type="primary" @click="load">
|
||||||
重新获取本地数据
|
重新获取本地数据
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<d2-highlight :code="dbData"/>
|
|
||||||
</d2-container>
|
</d2-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container>
|
<d2-container>
|
||||||
<template slot="header">持久化存储数据(此页面独享)</template>
|
<template slot="header">
|
||||||
|
<el-alert
|
||||||
|
type="success"
|
||||||
|
:closable="false"
|
||||||
|
title="路由存储指当前路由的存储区域,
|
||||||
|
不同路由之间存储不会相互干扰,
|
||||||
|
使用 await this.$store.dispatch('d2admin/db/databasePage', { vm: this }) 获得存储实例进行操作,
|
||||||
|
不同路由条件下获取的存储实例指向位置不同,
|
||||||
|
可以指定路由区分依据 name | path | fullPath,
|
||||||
|
默认根据路由的 name 区分不同的路由"/>
|
||||||
|
</template>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<p class="d2-mt-0">增加不重复字段</p>
|
<p class="d2-mt-0">增加不重复字段</p>
|
||||||
|
|||||||
@@ -1,16 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container>
|
<d2-container>
|
||||||
|
<template slot="header">
|
||||||
<el-alert
|
<el-alert
|
||||||
slot="header"
|
|
||||||
type="success"
|
type="success"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
title="下面的表单来自 Element 的表单示例,
|
title="路由快照相当于路由存储一种快捷操作,
|
||||||
|
会将传入 vm 实例的 $data 全部持久化,
|
||||||
|
下面的表单来自 Element 的表单示例,
|
||||||
在 D2Admin 的本页示例中你可以随意填写这个表单,
|
在 D2Admin 的本页示例中你可以随意填写这个表单,
|
||||||
表单内容会自动实时持久化,
|
表单内容会自动实时持久化,
|
||||||
无论是切换标签页、重新打开标签页、刷新浏览器、重开浏览器、重开浏览器标签页等,
|
无论是切换标签页、重新打开标签页、刷新浏览器、重开浏览器、重开浏览器标签页等,
|
||||||
该页面数据都会自动恢复到上次填写的状态,
|
该页面数据都会自动恢复到上次填写的状态,
|
||||||
这些都只需要你使用 D2Admin 提供的两个方法,
|
这些都只需要你使用 D2Admin 提供的两个方法,
|
||||||
总共只需要多写十几行代码"/>
|
总共只需要多写十几行代码"/>
|
||||||
|
</template>
|
||||||
<el-form ref="form" :model="form" label-width="80px" style="max-width: 600px; margin: 0px auto;">
|
<el-form ref="form" :model="form" label-width="80px" style="max-width: 600px; margin: 0px auto;">
|
||||||
<el-form-item label="活动名称">
|
<el-form-item label="活动名称">
|
||||||
<el-input v-model="form.name"></el-input>
|
<el-input v-model="form.name"></el-input>
|
||||||
|
|||||||
@@ -4,18 +4,15 @@
|
|||||||
<el-alert
|
<el-alert
|
||||||
type="success"
|
type="success"
|
||||||
:closable="false"
|
:closable="false"
|
||||||
class="d2-mb-10"
|
title="私有路由快照相当于私有路由存储一种快捷操作,
|
||||||
title="下面的表单来自 Element 的表单示例,
|
会将传入 vm 实例的 $data 全部根据用户区分持久化,
|
||||||
|
下面的表单来自 Element 的表单示例,
|
||||||
在 D2Admin 的本页示例中你可以随意填写这个表单,
|
在 D2Admin 的本页示例中你可以随意填写这个表单,
|
||||||
表单内容会自动实时持久化,
|
表单内容会自动实时持久化,
|
||||||
无论是切换标签页、重新打开标签页、刷新浏览器、重开浏览器、重开浏览器标签页等,
|
无论是切换标签页、重新打开标签页、刷新浏览器、重开浏览器、重开浏览器标签页等,
|
||||||
该页面数据都会自动恢复到上次填写的状态,
|
该页面数据都会自动恢复到上次填写的状态,
|
||||||
这些都只需要你使用 D2Admin 提供的两个方法,
|
这些都只需要你使用 D2Admin 提供的两个方法,
|
||||||
总共只需要多写十几行代码"/>
|
总共只需要多写十几行代码"/>
|
||||||
<el-alert
|
|
||||||
type="success"
|
|
||||||
:closable="false"
|
|
||||||
title="此页面数据持久化自动区分用户保存"/>
|
|
||||||
</template>
|
</template>
|
||||||
<el-form ref="form" :model="form" label-width="80px" style="max-width: 600px; margin: 0px auto;">
|
<el-form ref="form" :model="form" label-width="80px" style="max-width: 600px; margin: 0px auto;">
|
||||||
<el-form-item label="活动名称">
|
<el-form-item label="活动名称">
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container>
|
<d2-container>
|
||||||
<template slot="header">持久化存储数据(此页面独享)</template>
|
<template slot="header">
|
||||||
|
<el-alert
|
||||||
|
type="success"
|
||||||
|
:closable="false"
|
||||||
|
title="私有路由存储指当前路由的存储区域,
|
||||||
|
并且同时还根据用户区分,
|
||||||
|
相当于结合了 “路由存储” 和 “私有存储”,
|
||||||
|
不同路由以及不同用户之间存储不会相互干扰,
|
||||||
|
使用 await this.$store.dispatch('d2admin/db/databasePage', { vm: this, user: true }) 获得存储实例进行操作,
|
||||||
|
不同路由和用户条件下获取的存储实例指向位置不同,
|
||||||
|
可以指定路由区分依据 name | path | fullPath,
|
||||||
|
默认根据路由的 name 区分不同的路由"/>
|
||||||
|
</template>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<p class="d2-mt-0">增加不重复字段</p>
|
<p class="d2-mt-0">增加不重复字段</p>
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container>
|
<d2-container>
|
||||||
<template slot="header">持久化存储公用数据(所有用户共享)</template>
|
<template slot="header">
|
||||||
|
<el-alert
|
||||||
|
type="success"
|
||||||
|
:closable="false"
|
||||||
|
title="公用存储指所有用户共用的存储区域,
|
||||||
|
使用 await this.$store.dispatch('d2admin/db/database') 获得存储实例进行操作"/>
|
||||||
|
</template>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<p class="d2-mt-0">增加不重复字段</p>
|
<p class="d2-mt-0">增加不重复字段</p>
|
||||||
|
|||||||
@@ -1,6 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<d2-container>
|
<d2-container>
|
||||||
<template slot="header">持久化存储公用数据(当前用户)</template>
|
<template slot="header">
|
||||||
|
<el-alert
|
||||||
|
type="success"
|
||||||
|
:closable="false"
|
||||||
|
title="私有存储指当前用户专用的存储区域,
|
||||||
|
不同用户之间存储不会相互干扰,
|
||||||
|
使用 await this.$store.dispatch('d2admin/db/database', { user: true }) 获得存储实例进行操作,
|
||||||
|
不同用户条件下获取的存储实例指向位置不同"/>
|
||||||
|
</template>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<p class="d2-mt-0">增加不重复字段</p>
|
<p class="d2-mt-0">增加不重复字段</p>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
7558a0da48296f987f92467e104ef3cd36eb2dde
|
d1701498ab5c7359fcd9d5098540ae29b236d7ee
|
||||||
Reference in New Issue
Block a user