3333 </q-btn >
3434
3535 <q-space />
36- <div class =" q-px-md" >
36+ <div v-show = " !config.toolBarHiddenOfficialWebsite " class =" q-px-md" >
3737 <a class =" text-white" target =" _blank" href =" https://crudapi.cn" >
3838 官网
3939 </a >
4040 </div >
41- <q-btn
41+ <q-btn v-show = " !config.toolBarHiddenHelp "
4242 unelevated
4343 label =" 帮助"
4444 flat
8383 </q-btn >
8484
8585 <q-btn
86+ v-show =" !config.toolBariddenCode"
8687 unelevated
8788 label =" 源码"
8889 flat
@@ -226,7 +227,7 @@ export default {
226227 leftDrawerOpen: true ,
227228
228229 selected: null ,
229-
230+ config : {},
230231 appName: " crudapi" ,
231232 systemMenu: {
232233 label: " 系统" ,
@@ -325,13 +326,14 @@ export default {
325326 console .warn (" Please upgrade the back-end version, otherwise it may not be compatible!" );
326327 }
327328
329+ this .config = config;
328330 if (config .appName ) {
329- this .appName = config .appName ;
330- document .title = this .appName ;
331- }
332-
333- const menu = {};
334- try {
331+ this .appName = config .appName ;
332+ document .title = this .appName ;
333+ }
334+
335+ const menu = {};
336+ try {
335337 const menus = await userService .menu (dataSourceName);
336338 menus .forEach ((t ) => {
337339 menu[t .code ] = t .name ;
@@ -340,7 +342,7 @@ export default {
340342 } catch (error) {
341343 console .warn (" Please upgrade the back-end version, otherwise it may not be compatible!" );
342344 }
343-
345+
344346 const dataSourceMenu = {
345347 label: dataSource .caption ,
346348 labelKey: " /dataSource/" + dataSourceName,
@@ -411,9 +413,8 @@ export default {
411413 }
412414 }
413415
414-
415- const isSuperAdmin = permissionService .isSuperAdmin ();
416-
416+ const isSuperAdmin = permissionService .isSuperAdmin ();
417+
417418 (isSuperAdmin || menu[" business" ]) && dataSourceMenu .children .push (businessMenu);
418419 (isSuperAdmin || menu[" systemBusiness" ]) && dataSourceMenu .children .push (systemBusinessMenu);
419420 (isSuperAdmin || menu[" metadata" ]) && dataSourceMenu .children .push (metadataMenu);
0 commit comments