feat: the cache can be configured to be encrypted

This commit is contained in:
vben
2020-11-23 23:24:13 +08:00
parent 3a132f3f4f
commit 234c1d1fae
20 changed files with 300 additions and 185 deletions

View File

@@ -1,3 +1,7 @@
import AppLocalPicker from './src/AppLocalPicker.vue';
import AppFooterToolbar from './src/AppFooterToolbar.vue';
import { withInstall } from '../util';
export { AppLocalPicker };
export { AppLocalPicker, AppFooterToolbar };
export default withInstall(AppLocalPicker, AppFooterToolbar);

View File

@@ -10,11 +10,14 @@
</template>
<script lang="ts">
import { defineComponent, computed, unref } from 'vue';
import { SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH } from '/@/enums/appEnum';
import { appStore } from '/@/store/modules/app';
import { menuStore } from '/@/store/modules/menu';
export default defineComponent({
name: 'AppFooter',
name: 'AppFooterToolbar',
setup() {
const getMiniWidth = computed(() => {
const {

View File

@@ -1,8 +1,7 @@
import type { App } from 'vue';
import Authority from './src/index.vue';
export default (app: App): void => {
app.component(Authority.name, Authority);
};
import { withInstall } from '../util';
export default withInstall(Authority);
export { Authority };

View File

@@ -1 +0,0 @@
export { default as AppFooter } from './src/index.vue';

View File

@@ -1,6 +1,5 @@
import Icon from './Icon/index';
import Button from './Button/index.vue';
import { AppFooter } from './Footer';
import {
// Need
Button as AntButton,
@@ -35,7 +34,7 @@ import {
} from 'ant-design-vue';
import { getApp } from '/@/setup/App';
const compList = [Icon, Button, AntButton.Group, AppFooter];
const compList = [Icon, Button, AntButton.Group];
// Fix hmr multiple registered components
let registered = false;

View File

@@ -1,4 +1,13 @@
import type { VNodeChild } from 'vue';
import type { App, Component } from 'vue';
export function withInstall(...components: Component[]) {
return (app: App) => {
components.forEach((comp) => {
comp.name && app.component(comp.name, comp);
});
};
}
export function convertToUnit(
str: string | number | null | undefined,