@dt-frames/ui 1.0.3 → 1.0.4

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 (58) hide show
  1. package/es/components/iframe/index.d.ts +2 -2
  2. package/es/components/index.d.ts +2 -2
  3. package/es/index.css +1 -1
  4. package/es/index.js +34 -393
  5. package/{src/components/forms/src → es/style/components/forms}/index.less +2 -0
  6. package/{src/components/iframe/src → es/style/components/iframe}/index.less +0 -0
  7. package/{src/components/modal/src → es/style/components/modal}/index.less +3 -0
  8. package/{src/components/table/src → es/style/components/table}/index.less +0 -0
  9. package/es/style/theme/theme.less +2 -1
  10. package/es/theme/header/components/notify.d.ts +0 -1
  11. package/es/theme/header/components/user-info.d.ts +1 -1
  12. package/package.json +2 -5
  13. package/src/components/forms/index.less +84 -0
  14. package/src/components/forms/src/components/formButton.vue +1 -1
  15. package/src/components/icons/{src/index.less → index.less} +0 -0
  16. package/src/components/iframe/index.less +3 -0
  17. package/src/components/iframe/index.ts +2 -2
  18. package/src/components/index.ts +2 -2
  19. package/src/components/modal/index.less +63 -0
  20. package/src/components/table/index.less +162 -0
  21. package/src/directives/index.ts +0 -1
  22. package/src/directives/permission.ts +2 -3
  23. package/src/theme/footer/index.vue +1 -1
  24. package/src/theme/header/components/bread-crumb.vue +1 -1
  25. package/src/theme/header/components/fullscreen.vue +0 -2
  26. package/src/theme/header/components/notify.vue +1 -2
  27. package/src/theme/header/components/user-info.vue +4 -4
  28. package/src/theme/header/helper/menu-tree.ts +3 -6
  29. package/src/theme/sider/helper/split-menu.ts +1 -2
  30. package/src/theme/tabs/components/TabContent.vue +0 -1
  31. package/src/theme/tabs/index.vue +1 -1
  32. package/src/theme/theme.less +2 -1
  33. package/src/theme/theme.vue +4 -3
  34. package/es/assets/app-antd-dark-theme-style.e3b0c442.css +0 -0
  35. package/es/assets/app-theme-style.e3b0c442.css +0 -0
  36. package/es/assets/data/icon.d.ts +0 -4
  37. package/es/assets/data/icon.ts +0 -69
  38. package/es/assets/data/icon11.ts +0 -69
  39. package/es/assets/style/var.less +0 -42
  40. package/es/components/icons/pick-icon.d.ts +0 -529
  41. package/es/components/icons/svg-icon.d.ts +0 -44
  42. package/es/components/table/src/hooks/useFormat.d.ts +0 -2
  43. package/es/components/table/src/hooks/useVirtualScroll.d.ts +0 -5
  44. package/es/components/table/src/utils/format.d.ts +0 -1
  45. package/es/style/assets/style/var.less +0 -42
  46. package/es/theme/content/index.d.ts +0 -27
  47. package/es/theme/header/components/menu-search.d.ts +0 -528
  48. package/es/theme/header/components/setting-theme.d.ts +0 -2580
  49. package/es/theme/header/index.d.ts +0 -4369
  50. package/es/theme/header/multiple-header.d.ts +0 -2001
  51. package/es/theme/styles/hooks/changeTheme.d.ts +0 -1
  52. package/es/theme/styles/hooks/generate.d.ts +0 -13
  53. package/es/theme/styles/index.d.ts +0 -2
  54. package/es/theme/tabs/components/TabRedo.d.ts +0 -7
  55. package/es/theme/tabs/index.d.ts +0 -2478
  56. package/es/theme/theme/initTheme.d.ts +0 -3
  57. package/es/theme/theme/util.d.ts +0 -5
  58. package/es/theme/theme.d.ts +0 -22
@@ -0,0 +1,84 @@
1
+ @import '../modal/index.less';
2
+
3
+ .text-secondary{
4
+ color: #666;
5
+ }
6
+
7
+ .suffix-item .suffix {
8
+ display: inline-flex;
9
+ padding-left: 6px;
10
+ margin-top: 1px;
11
+ line-height: 1;
12
+ align-items: center;
13
+ }
14
+
15
+ .form-btns{
16
+ button{
17
+ margin-left: 12px;
18
+ }
19
+
20
+ .advanced{
21
+ margin-left: 8px;
22
+ .text{
23
+ margin-right: 5px;
24
+ }
25
+ .basic-arrow{
26
+ margin-left: -8px;
27
+ }
28
+ }
29
+ }
30
+
31
+ .basic-arrow{
32
+ display: inline-block;
33
+ cursor: pointer;
34
+ transform: rotate(0deg);
35
+ transition: all 0.3s ease 0.1s;
36
+ transform-origin: center center;
37
+
38
+
39
+ .dt-icon{
40
+ vertical-align: middle;
41
+ color: @primary-color !important;
42
+ }
43
+
44
+ &--active{
45
+ transform: rotate(180deg);
46
+ }
47
+ }
48
+
49
+ .form-btns{
50
+ .ant-form-item-control-input-content{
51
+ display: flex;
52
+ .ant-btn{
53
+ display: flex;
54
+ align-items: center;
55
+ }
56
+ .ant-btn .dt-icon{
57
+ font-size: 20px;
58
+ height: 100%;
59
+
60
+ svg{
61
+ display: block;
62
+ height: 100%;
63
+ text-align: center;
64
+ }
65
+
66
+ .preIcon{
67
+ padding-right: 2px;
68
+ }
69
+ }
70
+
71
+ .ant-btn-primary .dt-icon svg{
72
+ color: #fff;
73
+ }
74
+ }
75
+ }
76
+
77
+ .basic-form--compact{
78
+ .ant-form-item {
79
+ margin-bottom: 14px !important;
80
+ }
81
+ }
82
+
83
+
84
+
@@ -29,7 +29,7 @@
29
29
  @click="toggleAdvanced">
30
30
  <span class="text">{{ advancedRef ? '收起' : '展开' }}</span>
31
31
  <span :class="getAdvanceClass">
32
- <DtIcon :icon-class="'ic:baseline-arrow-drop-down'" :size="22"></DtIcon>
32
+ <DtIcon icon-class="ic:baseline-arrow-drop-down" :size="22"></DtIcon>
33
33
  </span>
34
34
  </Button>
35
35
 
@@ -0,0 +1,3 @@
1
+ .iframe-page{
2
+ height: 100%;
3
+ }
@@ -1,5 +1,5 @@
1
- import DtIFrame from './src/index.vue'
1
+ import DtIframe from './src/index.vue'
2
2
 
3
3
  export {
4
- DtIFrame
4
+ DtIframe
5
5
  }
@@ -7,7 +7,7 @@ import { DtTable, useTable } from './table'
7
7
  import { useSource } from './source'
8
8
  import { useCurd } from './curd'
9
9
  import { export2Excel } from './excel'
10
- import { DtIFrame } from './iframe'
10
+ import { DtIframe } from './iframe'
11
11
 
12
12
  const dtComponents = [
13
13
  { name: 'dt-base-router', component: DtBaseRouter },
@@ -35,7 +35,7 @@ export {
35
35
  DtForm,
36
36
  DtTable,
37
37
  FormButtons,
38
- DtIFrame,
38
+ DtIframe,
39
39
  useForm,
40
40
  useTable,
41
41
  useSource,
@@ -0,0 +1,63 @@
1
+
2
+ // @import 'ant-design-vue/es/modal/style/index.less';
3
+
4
+ .fullscreen-modal {
5
+ overflow: hidden;
6
+
7
+ .ant-modal {
8
+ top: 0 !important;
9
+ right: 0 !important;
10
+ bottom: 0 !important;
11
+ left: 0 !important;
12
+ width: 100% !important;
13
+ height: 100%;
14
+ padding: 0;
15
+
16
+ &-content {
17
+ height: 100%;
18
+ }
19
+ }
20
+ }
21
+
22
+ .dt-basic-modal-close {
23
+ display: flex;
24
+ height: 95%;
25
+ align-items: center;
26
+ justify-content: space-around;
27
+
28
+ > span {
29
+ margin-left: 48px;
30
+ font-size: 16px;
31
+ }
32
+
33
+ &--can-full {
34
+ margin-right: 15px;
35
+ > i {
36
+ padding-right: 15px;
37
+ width: 40px;
38
+ }
39
+ }
40
+
41
+ &:not(&--can-full) {
42
+ > i:nth-child(1) {
43
+ &:hover {
44
+ font-weight: 700;
45
+ }
46
+ }
47
+
48
+ &>i:nth-child(1) {
49
+ display: inline-block;
50
+ padding: 10px;
51
+
52
+ &:hover {
53
+ color: @primary-color;
54
+ }
55
+ }
56
+
57
+ &>i:last-child {
58
+ &:hover {
59
+ color: @error-color;
60
+ }
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,162 @@
1
+ .table-striped td {
2
+ background-color: #fafafa;
3
+ }
4
+
5
+ .dt-table-header{
6
+ .dt-table-header-actions{
7
+ display: flex;
8
+ flex-direction: row;
9
+ justify-content: space-between;
10
+ }
11
+
12
+ .dt-table-header-actions__right{
13
+ display: flex;
14
+ .dt-icon{
15
+ margin: 0 5px;
16
+ cursor: pointer;
17
+ }
18
+ }
19
+ }
20
+
21
+ .column-setting{
22
+ &__check-item{
23
+ display: flex;
24
+ align-items: center;
25
+ min-width: 100%;
26
+ padding: 4px 16px 8px 0;
27
+ }
28
+ &__popover-title {
29
+ display: flex;
30
+ }
31
+ }
32
+
33
+ .column-setting__cloumn-list {
34
+ .ant-popover-inner-content{
35
+ padding: 12px 0 0 0;
36
+ }
37
+ .ant-checkbox-group {
38
+ width: 100%;
39
+ min-width: 260px;
40
+ }
41
+
42
+ .drag-icon{
43
+ margin: 0 5px;
44
+ cursor: move;
45
+ }
46
+
47
+ .ant-checkbox-wrapper{
48
+ flex: 1;
49
+ }
50
+
51
+ .dt-icon{
52
+ cursor: pointer;
53
+ display: flex;
54
+ }
55
+
56
+ .disabled{
57
+ .dt-icon{
58
+ cursor: not-allowed;
59
+ opacity: 0.5;
60
+ }
61
+ }
62
+
63
+ .active{
64
+ .dt-icon{
65
+ color: @primary-color !important;
66
+ }
67
+ }
68
+
69
+ .ant-popover-inner-content {
70
+ max-height: 400px;
71
+ overflow-y: auto;
72
+ }
73
+ }
74
+
75
+ .dt-table-action-btn{
76
+ width: 24px;
77
+ display: inline-block;
78
+ vertical-align: middle;
79
+ cursor: pointer;
80
+ svg{
81
+ display: flex;
82
+ }
83
+ }
84
+
85
+ .ant-table-fixed-left table, .ant-table-fixed-right table{
86
+ width: min-content;
87
+ }
88
+
89
+ .ant-table-cell {
90
+ height: 44px !important;
91
+ line-height: 24px !important;
92
+ font-size: 14px !important;
93
+ padding: 4px 8px !important;
94
+ }
95
+
96
+ .ant-table-small{
97
+ .ant-table-cell {
98
+ height: 32px !important;
99
+ line-height: 16px !important;
100
+ font-size: 12px !important;
101
+ padding: 2px 8px !important;
102
+ }
103
+ }
104
+
105
+ .ant-table-middle{
106
+ .ant-table-cell {
107
+ height: 38px !important;
108
+ line-height: 20px !important;
109
+ font-size: 13px !important;
110
+ padding: 4px 8px !important;
111
+ }
112
+ }
113
+
114
+ .dt-action-select{
115
+ .ant-dropdown-menu-title-content{
116
+ display: flex;
117
+ align-items: center;
118
+ svg{
119
+ display: block;
120
+ }
121
+
122
+ .dt-icon{
123
+ padding: 0 8px;
124
+ }
125
+ }
126
+ }
127
+
128
+
129
+ .dt-table{
130
+ .ant-table-pagination{
131
+ margin: 0 !important;
132
+ padding: 10px 0;
133
+ border: 1px solid #f0f0f0;
134
+ }
135
+
136
+ .ant-table-title{
137
+ padding: 8px 0 !important;
138
+ border: none !important;
139
+ }
140
+
141
+ .ant-table-resize-handle{
142
+ right: -7px;
143
+ .ant-table-resize-handle-line{
144
+ width: 2px;
145
+ }
146
+ }
147
+
148
+ .ant-table-body {
149
+ position: relative;
150
+ table{
151
+ position: absolute;
152
+ top: 0;
153
+ left: 0;
154
+ }
155
+ }
156
+
157
+ .form-btns{
158
+ button:first-of-type {
159
+ margin-left: 0;
160
+ }
161
+ }
162
+ }
@@ -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>
@@ -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>
@@ -27,17 +27,17 @@
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 :src="getUserInfo?.avatar" :size="28" />
31
+ <span class="name">{{ getUserInfo?.realName }}</span>
32
32
  </div>
33
33
  </Popover>
34
34
  </template>
35
35
 
36
36
  <script setup lang="ts">
37
37
  import { Popover, Avatar } from 'ant-design-vue';
38
- import { useAuthStore, useHeader } from '@dt-frames/core';
38
+ import { CacheKey, DtCache, useHeader } from '@dt-frames/core';
39
39
 
40
- const { getUserInfo } = useAuthStore()
40
+ const getUserInfo = DtCache.getLocal(CacheKey.USER_INFO)
41
41
  const { getUserActions } = useHeader()
42
42
 
43
43
  </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
  }
@@ -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
- ]