@dt-frames/ui 1.0.3 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/es/assets/imgs/header/avatar.png +0 -0
  2. package/es/components/curd/src/components/dialog.d.ts +21 -58
  3. package/es/components/curd/src/types/curd.type.d.ts +2 -1
  4. package/es/components/dialog/index.d.ts +2 -0
  5. package/es/components/dialog/src/hooks/useDialog.d.ts +3 -0
  6. package/es/components/forms/index.d.ts +2 -2
  7. package/es/components/forms/src/components/formIcon.d.ts +4 -47
  8. package/es/components/forms/src/index.d.ts +2 -6
  9. package/es/components/iframe/index.d.ts +2 -2
  10. package/es/components/index.d.ts +3 -2
  11. package/es/components/modal/src/components/close-icon.d.ts +0 -43
  12. package/es/components/modal/src/index.d.ts +0 -43
  13. package/es/components/source/src/types/table.type.d.ts +1 -1
  14. package/es/components/table/index.d.ts +1 -1
  15. package/es/components/table/src/components/setting/Column.d.ts +6 -5
  16. package/es/components/table/src/hooks/useColumns.d.ts +1 -1
  17. package/es/components/table/src/hooks/useDataSource.d.ts +1 -3
  18. package/es/components/table/src/hooks/useHeaderCode.d.ts +2 -0
  19. package/es/components/table/src/hooks/useRowSelection.d.ts +2 -3
  20. package/es/components/table/src/index.d.ts +15 -3
  21. package/es/components/table/src/props.d.ts +7 -1
  22. package/es/index.js +284 -272
  23. package/es/style/components/forms/{src/index.less → index.less} +2 -0
  24. package/es/style/components/icons/index.less +1 -0
  25. package/es/style/components/iframe/index.less +3 -0
  26. package/es/style/components/modal/{src/index.less → index.less} +0 -0
  27. package/es/style/components/table/{src/index.less → index.less} +12 -1
  28. package/es/style/theme/header/index.less +8 -4
  29. package/es/style/theme/theme.less +2 -1
  30. package/es/theme/header/components/logo.d.ts +43 -0
  31. package/es/theme/header/components/notify.d.ts +0 -1
  32. package/package.json +1 -1
  33. package/src/assets/imgs/header/avatar.png +0 -0
  34. package/src/components/curd/src/components/dialog.vue +11 -5
  35. package/src/components/curd/src/hooks/useCurd.tsx +24 -9
  36. package/src/components/curd/src/types/curd.type.ts +3 -1
  37. package/src/components/dialog/index.ts +5 -0
  38. package/src/components/dialog/src/hooks/useDialog.ts +85 -0
  39. package/src/components/forms/{src/index.less → index.less} +2 -0
  40. package/src/components/forms/index.ts +3 -4
  41. package/src/components/forms/src/components/formButton.vue +1 -1
  42. package/src/components/icons/{src/index.less → index.less} +1 -0
  43. package/src/components/iframe/index.less +3 -0
  44. package/src/components/iframe/index.ts +2 -2
  45. package/src/components/index.ts +5 -3
  46. package/src/components/modal/{src/index.less → index.less} +0 -0
  47. package/src/components/modal/src/components/close-icon.vue +3 -4
  48. package/src/components/modal/src/components/modal.tsx +1 -1
  49. package/src/components/modal/src/components/modalFooter.vue +1 -1
  50. package/src/components/modal/src/hooks/useModal.ts +0 -1
  51. package/src/components/source/src/hooks/useFetch.ts +3 -4
  52. package/src/components/source/src/hooks/useSource.ts +4 -3
  53. package/src/components/source/src/types/table.type.ts +1 -1
  54. package/src/components/table/{src/index.less → index.less} +12 -1
  55. package/src/components/table/index.ts +1 -1
  56. package/src/components/table/src/components/TableActions.vue +2 -2
  57. package/src/components/table/src/components/setting/Column.vue +1 -2
  58. package/src/components/table/src/hooks/useColumns.ts +2 -2
  59. package/src/components/table/src/hooks/useHeaderCode.ts +82 -0
  60. package/src/components/table/src/hooks/useRowSelection.ts +2 -3
  61. package/src/components/table/src/hooks/useTable.ts +13 -1
  62. package/src/components/table/src/hooks/useTableScroll.ts +5 -3
  63. package/src/components/table/src/index.vue +18 -19
  64. package/src/components/table/src/props.ts +8 -3
  65. package/src/directives/index.ts +0 -1
  66. package/src/directives/permission.ts +2 -3
  67. package/src/theme/footer/index.vue +1 -1
  68. package/src/theme/header/components/bread-crumb.vue +1 -1
  69. package/src/theme/header/components/fullscreen.vue +0 -2
  70. package/src/theme/header/components/logo.vue +4 -2
  71. package/src/theme/header/components/notify.vue +1 -2
  72. package/src/theme/header/components/user-info.vue +22 -5
  73. package/src/theme/header/helper/menu-tree.ts +3 -6
  74. package/src/theme/header/index.less +8 -4
  75. package/src/theme/sider/helper/split-menu.ts +1 -2
  76. package/src/theme/tabs/components/TabContent.vue +0 -1
  77. package/src/theme/tabs/index.vue +1 -1
  78. package/src/theme/theme.less +2 -1
  79. package/src/theme/theme.vue +4 -3
  80. package/es/assets/app-antd-dark-theme-style.e3b0c442.css +0 -0
  81. package/es/assets/app-theme-style.e3b0c442.css +0 -0
  82. package/es/assets/data/icon.d.ts +0 -4
  83. package/es/assets/data/icon.ts +0 -69
  84. package/es/assets/data/icon11.ts +0 -69
  85. package/es/assets/style/var.less +0 -42
  86. package/es/components/icons/pick-icon.d.ts +0 -529
  87. package/es/components/icons/svg-icon.d.ts +0 -44
  88. package/es/components/table/src/hooks/useFormat.d.ts +0 -2
  89. package/es/components/table/src/hooks/useVirtualScroll.d.ts +0 -5
  90. package/es/components/table/src/utils/format.d.ts +0 -1
  91. package/es/index.css +0 -1
  92. package/es/style/assets/style/var.less +0 -42
  93. package/es/style/components/icons/src/index.less +0 -96
  94. package/es/theme/content/index.d.ts +0 -27
  95. package/es/theme/header/components/menu-search.d.ts +0 -528
  96. package/es/theme/header/components/setting-theme.d.ts +0 -2580
  97. package/es/theme/header/components/user-info.d.ts +0 -452
  98. package/es/theme/header/index.d.ts +0 -4369
  99. package/es/theme/header/multiple-header.d.ts +0 -2001
  100. package/es/theme/styles/hooks/changeTheme.d.ts +0 -1
  101. package/es/theme/styles/hooks/generate.d.ts +0 -13
  102. package/es/theme/styles/index.d.ts +0 -2
  103. package/es/theme/tabs/components/TabRedo.d.ts +0 -7
  104. package/es/theme/tabs/index.d.ts +0 -2478
  105. package/es/theme/theme/initTheme.d.ts +0 -3
  106. package/es/theme/theme/util.d.ts +0 -5
  107. package/es/theme/theme.d.ts +0 -22
@@ -99,11 +99,10 @@
99
99
  import { Tooltip, Popover, Checkbox, Button, CheckboxGroup, Divider } from 'ant-design-vue'
100
100
  import { getPopupContainer as getParentContainer, isNullAndUnDef } from '@dt-frames/core'
101
101
  import { DtIcon } from '../../../../icons/index'
102
- import { computed, reactive, ref, unref, watchEffect, useAttrs } from 'vue'
102
+ import { computed, reactive, ref, unref, watchEffect, useAttrs, nextTick } from 'vue'
103
103
  import type { ColumnStateType, ColumnOptionsType } from '../../types/tableHeader.type'
104
104
  import { getTableInstance } from '../../hooks/useTableInstance'
105
105
  import { BasicColumn } from '../../types/table.type'
106
- import { nextTick } from 'process'
107
106
  import { isFunction } from '@vueuse/core'
108
107
  import { cloneDeep, omit } from 'lodash-es'
109
108
 
@@ -147,7 +147,7 @@ function handleActionColumn(propsRef: ComputedRef<BasicTableProps>, columns: Bas
147
147
  title: '操作',
148
148
  align: 'center',
149
149
  expand,
150
- width: (expand ? (column.btns.length * 30 + 40) : 70) + 'px',
150
+ width: `${ (expand ? (column.btns.length * 30 + 40) : 70) }px`,
151
151
  ...column,
152
152
  flag: ACTION_COLUMN,
153
153
  }
@@ -256,7 +256,7 @@ export function useColumns(
256
256
 
257
257
 
258
258
  // 设置列信息
259
- function setColumns(columnList: Partial<BasicColumn>[] | string[]) {
259
+ function setColumns(columnList: Partial<BasicColumn>[] | string[] = []) {
260
260
  const columns = cloneDeep(columnList)
261
261
 
262
262
  if( !isArray( columns ) ) return
@@ -0,0 +1,82 @@
1
+ import { error, http, Recordable, useAppStore } from "@dt-frames/core"
2
+ import { BasicColumn, CellFormat } from "../types/table.type"
3
+
4
+
5
+ // 解析header
6
+ export function useHeaderCode(code: string, templates: CellFormat = {}, changeColumns: ( rows: BasicColumn[] ) => void) {
7
+ const { appConf } = useAppStore()
8
+
9
+ if( !appConf.pages.queryColumnApi ) {
10
+ error('请在init.config.ts中配置queryColumnApi!')
11
+ return
12
+ }
13
+
14
+
15
+ // 设置文字对齐方式
16
+ const getAlign = ( key: number | null ) => key === 0 ? 'center' : key === 2 ? 'right' : 'left'
17
+
18
+
19
+ // 渲染单元格
20
+ const renderCell = ( type: number, ctx: string ): Recordable => {
21
+ switch( type ) {
22
+ // 时间
23
+ case 0: return { date: ctx }
24
+
25
+ // 字典
26
+ case 1: return { dict: ctx }
27
+
28
+ // 百分比
29
+ case 5: return { percent: ctx }
30
+
31
+ // structure
32
+ case 7:
33
+ if( !appConf.structure[ctx] ) {
34
+ error(`未找到structure: ${ ctx } !`)
35
+ return { }
36
+ }
37
+ return { dict: appConf.structure[ctx] }
38
+
39
+ // 自定义模板
40
+ case 10: return templates[ctx]
41
+
42
+ // 数字
43
+ case 11: return { number: ctx }
44
+ }
45
+ }
46
+
47
+
48
+ function getColumns() {
49
+ http.post(
50
+ appConf.pages.queryColumnApi,
51
+ { tableCode: code }
52
+ ).then( rsp => {
53
+ handleData(rsp)
54
+ } )
55
+ }
56
+
57
+ function handleData(data: Recordable[]) {
58
+ let rows: BasicColumn[] = []
59
+
60
+ data.forEach( it => {
61
+ let obj: BasicColumn = {
62
+ title: it.cloumnName,
63
+ dataIndex: it.cloumnCode,
64
+ sorter: it.ifOrder,
65
+ align: getAlign(it.textAlign),
66
+ ifShow: Boolean( it.ifDisplay ),
67
+ defaultHidden: !Boolean( it.ifDisplay )
68
+ }
69
+
70
+ if( it.cloumnType !== undefined ) obj.render = renderCell( it.cloumnType, it.dictCode )
71
+
72
+ if( it.width ) obj.width = Number(it.width)
73
+
74
+ rows.push(obj)
75
+ } )
76
+
77
+ changeColumns( rows )
78
+ }
79
+
80
+ getColumns()
81
+
82
+ }
@@ -4,9 +4,8 @@
4
4
 
5
5
  import { isFunction, Recordable } from "@dt-frames/core";
6
6
  import type { TableRowSelection } from 'ant-design-vue/lib/table/interface'
7
- import { computed, ComputedRef, ref, Ref, toRaw, unref, watch, nextTick } from "vue";
8
- import { BasicTableProps } from "../types/table.type";
9
- import { omit } from 'lodash-es'
7
+ import { computed, ComputedRef, ref, Ref, toRaw, unref, watch, nextTick } from "vue"
8
+ import { BasicTableProps } from "../types/table.type"
10
9
 
11
10
  interface TreeHelperConfig {
12
11
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { DynamicProps, Nullable, getDynamicProps, error } from '@dt-frames/core'
2
2
  import { onUnmounted, ref, toRaw, unref, watch } from 'vue'
3
- import { BasicColumn, BasicTableProps, TableActionType } from '../types/table.type'
3
+ import { BasicColumn, BasicTableProps, CellFormat, TableActionType } from '../types/table.type'
4
+ import { useHeaderCode } from './useHeaderCode'
4
5
 
5
6
 
6
7
  type Props = Partial<DynamicProps<BasicTableProps>>
@@ -18,6 +19,17 @@ export function useTable(tableProps?: Props) {
18
19
  if( unref(loadedRef) && instance === unref(tableRef) ) return
19
20
 
20
21
  tableRef.value = instance
22
+
23
+ if( tableProps.columnCode ) {
24
+ useHeaderCode(
25
+ tableProps.columnCode as string,
26
+ tableProps.templates as CellFormat,
27
+ (columns: BasicColumn[]) => {
28
+ tableProps.columns = columns
29
+ }
30
+ )
31
+ }
32
+
21
33
  tableProps && instance.setProps(getDynamicProps(tableProps))
22
34
 
23
35
  watch(
@@ -20,11 +20,12 @@ export function useTableScroll(
20
20
  const debounceRedoHeight = useDebounceFn( redoHeight, 100 )
21
21
 
22
22
  watch(
23
- () => unref(propsRef)?.dataSource?.length,
24
- () => {
23
+ () => propsRef.value.dataSource,
24
+ (v) => {
25
25
  debounceRedoHeight()
26
26
  },
27
27
  {
28
+ deep: true,
28
29
  flush: 'post' // 在dom渲染之后监听
29
30
  }
30
31
  )
@@ -194,7 +195,8 @@ export function useTableScroll(
194
195
  calcScroll(bodyEl)
195
196
 
196
197
  bodyEl.addEventListener('scroll', (e) => {
197
- calcScroll(bodyEl)
198
+ // 这里做一个节流
199
+ useDebounceFn( () => { calcScroll(bodyEl) }, 100 )()
198
200
  })
199
201
  }
200
202
 
@@ -14,7 +14,7 @@
14
14
  </template>
15
15
 
16
16
  <template #bodyCell="{ column, record, index }">
17
- <template v-if="column.render">
17
+ <template v-if="column?.render">
18
18
  <TableRender :column="column" :record="record" :index="index"></TableRender>
19
19
  </template>
20
20
  </template>
@@ -127,6 +127,21 @@
127
127
  getRowClassName
128
128
  } = useRows( getProps )
129
129
 
130
+ /**
131
+ * 表格改变
132
+ */
133
+ const {
134
+ handleTableChange
135
+ } = useDataSource(
136
+ getProps,
137
+ {
138
+ getPaginationInfo,
139
+ setPagination,
140
+ clearSelectedRowKeys
141
+ },
142
+ emit
143
+ )
144
+
130
145
 
131
146
  const getBind = computed(() => {
132
147
  return {
@@ -139,7 +154,7 @@
139
154
  pagination: toRaw(unref(getPaginationInfo)),
140
155
  rowSelection: unref(getRowSelectionRef),
141
156
  rowKey: unref(getProps).rowKey,
142
- columns: toRaw(unref(getViewColumns)),
157
+ columns: unref(getViewColumns),
143
158
  tableLayout: 'fixed'
144
159
  }
145
160
  })
@@ -163,22 +178,6 @@
163
178
  }
164
179
  const { getHeaderProps } = useTableHeader(getProps, slots, handlers)
165
180
 
166
-
167
- /**
168
- * 表格改变
169
- */
170
- const {
171
- handleTableChange
172
- } = useDataSource(
173
- getProps,
174
- {
175
- getPaginationInfo,
176
- setPagination,
177
- clearSelectedRowKeys
178
- },
179
- emit
180
- )
181
-
182
181
  emit('register', tableAction)
183
182
 
184
183
  return {
@@ -188,7 +187,7 @@
188
187
  handleTableChange,
189
188
  getSelectRows,
190
189
  handleResizeColumn: (w, col) => {
191
- col.width = w;
190
+ col.width = w
192
191
  setCacheColumnsByField(col.dataIndex, col)
193
192
  }
194
193
  }
@@ -3,7 +3,7 @@ import { PropType } from 'vue'
3
3
  import { DEFAULT_SORT_FN } from './const'
4
4
  import type { PaginationProps } from 'ant-design-vue/lib/pagination'
5
5
  import type { TableRowSelection } from 'ant-design-vue/lib/table/interface'
6
- import { ActionType, BasicColumn, BtnsType, SizeType } from './types/table.type'
6
+ import { ActionType, BasicColumn, BtnsType, CellFormat, SizeType } from './types/table.type'
7
7
  import { ButtonProps } from '../../forms'
8
8
  import { DownloadType } from './types/tableHeader.type'
9
9
 
@@ -28,7 +28,7 @@ export const TableProps = {
28
28
  maxWidth: { type: Number },
29
29
 
30
30
  // 是否需要虚拟滚动
31
- virtual: { type: Boolean, default: true },
31
+ virtual: { type: Boolean, default: false },
32
32
 
33
33
  // 排序
34
34
  sortFn: { type: Function, default: DEFAULT_SORT_FN },
@@ -50,6 +50,11 @@ export const TableProps = {
50
50
  // 默认的排序
51
51
  defSort: { type: Object as PropType<Recordable>, default: null },
52
52
 
53
+ // 列code编码
54
+ columnCode: { type: String },
55
+ // 列自定义的模板
56
+ templates: { type: Object as PropType<CellFormat> },
57
+
53
58
  // 列
54
59
  columns: { type: [Array] as PropType<BasicColumn[]>, default: () => [] },
55
60
 
@@ -82,7 +87,7 @@ export const TableProps = {
82
87
 
83
88
  size: {
84
89
  type: String as PropType<SizeType>,
85
- default: 'default',
90
+ default: 'small',
86
91
  },
87
92
 
88
93
  // 分页、排序、筛选变化时触发
@@ -2,7 +2,6 @@
2
2
  import { App } from 'vue'
3
3
  import { authMounted } from './permission'
4
4
  import { iconMounted } from './icon'
5
- import '@purge-icons/generated'
6
5
 
7
6
 
8
7
  const dtDirectives = [
@@ -2,7 +2,7 @@
2
2
  * 权限控制,不使用传统的通过css隐藏dom元素
3
3
  * 使用方法: v-auth="'ADD'"
4
4
  */
5
- import { useAuthStore } from '@dt-frames/core';
5
+ import { CacheKey, DtCache } from '@dt-frames/core';
6
6
  import type { DirectiveBinding } from 'vue';
7
7
 
8
8
 
@@ -10,8 +10,7 @@ function hasAuth( el: Element, binding: any ) {
10
10
  const value = binding.value;
11
11
  if (!value) return;
12
12
 
13
- let { getAuths } = useAuthStore();
14
- if(!getAuths.includes( value )) {
13
+ if(!DtCache.getLocal(CacheKey.AUTHS).includes( value )) {
15
14
  el.parentNode?.removeChild(el);
16
15
  }
17
16
  }
@@ -6,7 +6,7 @@
6
6
  </template>
7
7
 
8
8
  <script setup lang="ts">
9
- import { useMenu, useTheme } from '@dt-frames/core';
9
+ import { useTheme } from '@dt-frames/core';
10
10
  import { LayoutFooter } from 'ant-design-vue';
11
11
  import { computed, unref } from 'vue';
12
12
 
@@ -9,7 +9,7 @@
9
9
  </template>
10
10
 
11
11
  <script lang="ts" setup>
12
- import { ref, watch, watchEffect } from 'vue'
12
+ import { ref, watchEffect } from 'vue'
13
13
  import { Breadcrumb } from 'ant-design-vue'
14
14
  import { getBreadCrumb } from '../helper/menu-tree'
15
15
  import { useRouter } from 'vue-router';
@@ -7,8 +7,6 @@
7
7
 
8
8
  <script lang="ts" setup>
9
9
  import { useFullscreen } from '@vueuse/core';
10
- import { DtIcon } from '../../../components/icons'
11
-
12
10
  const { toggle, isFullscreen } = useFullscreen();
13
11
 
14
12
  </script>
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div class="dt-logo" :class="getLogoClass">
3
- <img src="../../../assets/imgs/logo/logo.png" />
3
+ <!-- <img src="../../../assets/imgs/logo/logo.jpeg" /> -->
4
+ <DtIcon icon-class="logo" :size="42" class-name="brand-logo"></DtIcon>
4
5
  <div class="dt-logo__title" v-show="showTitle">
5
6
  {{ title }}
6
7
  </div>
@@ -10,8 +11,9 @@
10
11
  <script lang="ts" setup>
11
12
  import { computed, unref } from "vue";
12
13
  import { useMenu, useTheme } from "@dt-frames/core"
14
+ import { DtIcon } from "../../../components"
13
15
 
14
- const title = 'Ithink-DT 深迪科技';
16
+ const title = '隆基税务后台管理系统';
15
17
  const { getCollapsedShowTitle } = useMenu()
16
18
 
17
19
  const props = defineProps({
@@ -14,10 +14,9 @@
14
14
 
15
15
  <script lang="ts" setup>
16
16
  import { ref } from 'vue';
17
- import { Popover, Tabs, TabPane } from 'ant-design-vue';
17
+ import { Popover } from 'ant-design-vue';
18
18
  import { useHeader } from '@dt-frames/core';
19
19
 
20
- const activeKey = ref('1');
21
20
  const { getShowNotice } = useHeader()
22
21
 
23
22
  </script>
@@ -19,7 +19,7 @@
19
19
  <span v-icon="'ic:baseline-lock'"></span>
20
20
  锁定屏幕
21
21
  </li>
22
- <li>
22
+ <li @click="signOut()">
23
23
  <span v-icon="'ant-design:logout-outlined'"></span>
24
24
  退出系统
25
25
  </li>
@@ -27,17 +27,34 @@
27
27
  </template>
28
28
 
29
29
  <div class="userInfo">
30
- <Avatar :src="getUserInfo.avatar" :size="28" />
31
- <span class="name">{{ getUserInfo.realName }}</span>
30
+ <Avatar :size="28" >
31
+ <template #icon><img src="../../../assets/imgs/header/avatar.png" /></template>
32
+ </Avatar>
33
+ <span class="name">{{ getUserInfo?.userNo }}</span>
32
34
  </div>
33
35
  </Popover>
34
36
  </template>
35
37
 
36
38
  <script setup lang="ts">
37
39
  import { Popover, Avatar } from 'ant-design-vue';
38
- import { useAuthStore, useHeader } from '@dt-frames/core';
40
+ import { CacheKey, DtCache, useAppStore, useHeader, isObject, isFunction, useGo, Pages } from '@dt-frames/core'
39
41
 
40
- const { getUserInfo } = useAuthStore()
42
+ const getUserInfo = DtCache.getLocal(CacheKey.USER_INFO)
41
43
  const { getUserActions } = useHeader()
44
+ const { appConf } = useAppStore()
45
+ const go = useGo()
46
+
47
+
48
+ // 退出系统
49
+ function signOut() {
50
+ if( isObject(appConf.pages?.ssoLogin) && appConf.pages.ssoLogin?.logout) {
51
+ let redictUrl = isFunction(appConf.pages.ssoLogin.logout)
52
+ ? appConf.pages.ssoLogin.logout()
53
+ : appConf.pages.ssoLogin.logout
42
54
 
55
+ location.href = redictUrl
56
+ } else {
57
+ go(Pages.LOGIN)
58
+ }
59
+ }
43
60
  </script>
@@ -1,7 +1,7 @@
1
1
  /** =====================================
2
2
  * 定义一些菜单操作的方法
3
3
  * =====================================*/
4
- import { Menus, useAuthStore } from "@dt-frames/core";
4
+ import { CacheKey, DtCache, Menus, useAuthStore } from "@dt-frames/core";
5
5
  import { trim } from 'lodash-es'
6
6
 
7
7
  function deleteChildrenProp( menu: any ) {
@@ -13,8 +13,7 @@ function deleteChildrenProp( menu: any ) {
13
13
 
14
14
  // 获取当前路由的面包屑
15
15
  export function getBreadCrumb(path: string, menus?: Menus[]) {
16
- const { getMenus } = useAuthStore()
17
- const _menus = menus || getMenus
16
+ const _menus = menus || DtCache.getLocal(CacheKey.MENUS) || []
18
17
 
19
18
  let routes: Menus[] = []
20
19
 
@@ -45,8 +44,6 @@ export function getBreadCrumb(path: string, menus?: Menus[]) {
45
44
  }
46
45
 
47
46
  export function getFilterMenu( filter: string = '', flag: boolean = false) {
48
- const { getMenus } = useAuthStore()
49
-
50
47
  let _menus = [];
51
48
 
52
49
  if( !trim(filter) && !flag ) return _menus;
@@ -61,7 +58,7 @@ export function getFilterMenu( filter: string = '', flag: boolean = false) {
61
58
  } )
62
59
  }
63
60
 
64
- getTargetMenus( getMenus );
61
+ getTargetMenus( DtCache.getLocal(CacheKey.MENUS) );
65
62
 
66
63
  return _menus;
67
64
  }
@@ -121,10 +121,6 @@
121
121
  color: #333;
122
122
  }
123
123
  }
124
-
125
- .icon{
126
- padding: 0 14px;
127
- }
128
124
  }
129
125
 
130
126
  &--light{
@@ -209,6 +205,14 @@
209
205
  right: 4px;
210
206
  top: 10px;
211
207
  }
208
+
209
+
210
+ }
211
+
212
+ .brand-logo{
213
+ width: 40px;
214
+ height: 60px;
215
+ margin-left: -7px;
212
216
  }
213
217
 
214
218
  .dt-multiple-header{
@@ -67,8 +67,7 @@ export function useSplitMenu( splitType: Ref<MenuSplitTye> ) {
67
67
 
68
68
  async function getMenus() {
69
69
  if (unref(normalType)) {
70
- const { getMenus } = useAuthStore()
71
- menusRef.value = getMenus
70
+ menusRef.value = DtCache.getLocal(CacheKey.MENUS)
72
71
  return;
73
72
  }
74
73
 
@@ -29,7 +29,6 @@
29
29
 
30
30
  <script lang="ts" setup>
31
31
  import { Dropdown, Menu, MenuDivider, MenuItem } from 'ant-design-vue'
32
- import { DtIcon } from '../../../components/icons';
33
32
  import { useTabDropdown } from '../hooks/useTabDropdown';
34
33
 
35
34
  const { getDropMenuList, handleContext, handleMenuEvent } = useTabDropdown()
@@ -30,7 +30,7 @@
30
30
  import { Tabs, TabPane } from 'ant-design-vue'
31
31
  import { computed, ref, unref, watch } from 'vue'
32
32
  import { menuList2Map, RouteReuseStore, useGo, useMultipleTab } from '@dt-frames/core'
33
- import { useRouter, Router } from 'vue-router'
33
+ import { useRouter } from 'vue-router'
34
34
  import TabContent from './components/TabContent.vue'
35
35
  import TabRedo from './components/TabRedo.vue'
36
36
  import { initAffixTabs, useTabsDrag } from './hooks/useMultifyTabs'
@@ -3,7 +3,8 @@
3
3
  @import './tabs/index.less';
4
4
  @import './footer/index.less';
5
5
  @import './transition.less';
6
-
6
+ @import '../components/icons/index.less';
7
+ @import '../components/container/index.less';
7
8
 
8
9
  @page-bg-color: #f0f2f5;
9
10
 
@@ -1,8 +1,8 @@
1
1
  <template>
2
- <div class="dt-theme">
2
+ <div class="dt-theme" v-if="currentRoute.fullPath && getAppConf?.router.unRequireAuthPage.length">
3
3
  <ConfigProvider :locale="zhCN">
4
4
  <!-- 不需要权限登录 -->
5
- <template v-if="currentRoute.meta?.requiresAuth === false">
5
+ <template v-if="getAppConf?.router.unRequireAuthPage.includes(currentRoute.fullPath)">
6
6
  <router-view></router-view>
7
7
  </template>
8
8
 
@@ -33,7 +33,7 @@
33
33
  import { computed, unref, ref } from 'vue'
34
34
  import { useRouter } from 'vue-router'
35
35
  import { Layout, ConfigProvider } from 'ant-design-vue'
36
- import { useHeader, useMenu, useTheme } from '@dt-frames/core'
36
+ import { useAppStore, useHeader, useMenu, useTheme } from '@dt-frames/core'
37
37
 
38
38
  import DtFeature from './feature/index.vue'
39
39
  import DtHeader from './header/index.vue'
@@ -57,6 +57,7 @@
57
57
  const { getShowFullHeaderRef, getFixed, getHeaderHeight } = useHeader()
58
58
  const { getSplit, getShowMenu, getShowSidebar } = useMenu()
59
59
  const { getFooter, getShowFooter } = useTheme()
60
+ const { getAppConf } = useAppStore()
60
61
 
61
62
  const { height } = unref(getFooter) as any;
62
63
 
File without changes
File without changes
@@ -1,4 +0,0 @@
1
- export declare const pickIcons: {
2
- type: string;
3
- icons: string[];
4
- }[];
@@ -1,69 +0,0 @@
1
- export const pickIcons = [
2
- {
3
- type: '操作',
4
- icons: [
5
- 'ic:baseline-3d-rotation',
6
- 'ic:baseline-abc',
7
- 'ic:baseline-accessibility',
8
- 'ic:baseline-accessibility-new',
9
- 'ic:baseline-accessible',
10
- 'ic:baseline-accessible-forward',
11
- 'ic:baseline-account-balance',
12
- 'ic:baseline-account-balance-wallet',
13
- 'ic:baseline-account-box',
14
- 'ic:baseline-account-circle',
15
- 'ic:baseline-add-card',
16
- 'ic:baseline-add-shopping-cart',
17
- 'ic:baseline-add-task',
18
- 'ic:baseline-add-to-drive',
19
- 'ic:baseline-addchart',
20
- 'ic:baseline-admin-panel-settings',
21
- 'ic:baseline-ads-click',
22
- 'ic:baseline-alarm',
23
- 'ic:baseline-alarm-add',
24
- 'ic:baseline-alarm-off',
25
- 'ic:baseline-alarm-on',
26
- 'ic:baseline-all-inbox',
27
- 'ic:baseline-analytics',
28
- 'ic:baseline-anchor',
29
- 'ic:baseline-android',
30
- 'ic:baseline-announcement',
31
- 'ic:baseline-api',
32
- 'ic:baseline-app-blocking',
33
- 'ic:baseline-app-shortcut',
34
- 'ic:baseline-arrow-circle-down'
35
- ]
36
- }, {
37
- type: '警告',
38
- icons: [
39
- 'ic:baseline-add-alert',
40
- 'ic:baseline-auto-delete',
41
- 'ic:baseline-error',
42
- 'ic:baseline-error-outline',
43
- 'ic:baseline-notification-important',
44
- 'ic:baseline-warning',
45
- 'ic:baseline-warning-amber',
46
- 'ic:outline-add-alert',
47
- 'ic:outline-auto-delete',
48
- 'ic:outline-error',
49
- 'ic:outline-error-outline',
50
- 'ic:outline-notification-important',
51
- 'ic:outline-warning',
52
- 'ic:outline-warning-amber',
53
- 'ic:round-add-alert',
54
- 'ic:round-auto-delete',
55
- 'ic:round-error',
56
- 'ic:round-error-outline',
57
- 'ic:round-notification-important',
58
- 'ic:round-warning',
59
- 'ic:round-warning-amber',
60
- 'ic:sharp-add-alert',
61
- 'ic:sharp-auto-delete',
62
- 'ic:sharp-error',
63
- 'ic:sharp-error-outline',
64
- 'ic:sharp-notification-important',
65
- 'ic:sharp-warning',
66
- 'ic:sharp-warning-amber'
67
- ]
68
- }
69
- ]