@dt-frames/ui 1.0.4 → 1.0.5

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 (65) 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/index.d.ts +2 -1
  10. package/es/components/modal/src/components/close-icon.d.ts +0 -43
  11. package/es/components/modal/src/index.d.ts +0 -43
  12. package/es/components/source/src/types/table.type.d.ts +1 -1
  13. package/es/components/table/index.d.ts +1 -1
  14. package/es/components/table/src/components/setting/Column.d.ts +6 -5
  15. package/es/components/table/src/hooks/useColumns.d.ts +1 -1
  16. package/es/components/table/src/hooks/useDataSource.d.ts +1 -3
  17. package/es/components/table/src/hooks/useHeaderCode.d.ts +2 -0
  18. package/es/components/table/src/hooks/useRowSelection.d.ts +2 -3
  19. package/es/components/table/src/index.d.ts +15 -3
  20. package/es/components/table/src/props.d.ts +7 -1
  21. package/es/index.js +466 -95
  22. package/es/style/components/icons/index.less +1 -0
  23. package/es/style/components/modal/index.less +0 -3
  24. package/es/style/components/table/index.less +12 -1
  25. package/es/style/theme/header/index.less +8 -4
  26. package/es/theme/header/components/logo.d.ts +43 -0
  27. package/package.json +6 -3
  28. package/src/assets/imgs/header/avatar.png +0 -0
  29. package/src/components/curd/src/components/dialog.vue +11 -5
  30. package/src/components/curd/src/hooks/useCurd.tsx +24 -9
  31. package/src/components/curd/src/types/curd.type.ts +3 -1
  32. package/src/components/dialog/index.ts +5 -0
  33. package/src/components/dialog/src/hooks/useDialog.ts +85 -0
  34. package/src/components/forms/index.ts +3 -4
  35. package/src/components/icons/index.less +1 -0
  36. package/src/components/iframe/src/index.less +3 -0
  37. package/src/components/index.ts +3 -1
  38. package/src/components/modal/index.less +0 -3
  39. package/src/components/modal/src/components/close-icon.vue +4 -4
  40. package/src/components/modal/src/components/modal.tsx +1 -1
  41. package/src/components/modal/src/components/modalFooter.vue +1 -1
  42. package/src/components/modal/src/hooks/useModal.ts +0 -1
  43. package/src/components/source/src/hooks/useFetch.ts +3 -4
  44. package/src/components/source/src/hooks/useSource.ts +4 -3
  45. package/src/components/source/src/types/table.type.ts +1 -1
  46. package/src/components/table/index.less +12 -1
  47. package/src/components/table/index.ts +1 -1
  48. package/src/components/table/src/components/TableActions.vue +2 -2
  49. package/src/components/table/src/components/setting/Column.vue +1 -2
  50. package/src/components/table/src/hooks/useColumns.ts +2 -2
  51. package/src/components/table/src/hooks/useHeaderCode.ts +82 -0
  52. package/src/components/table/src/hooks/useRowSelection.ts +2 -3
  53. package/src/components/table/src/hooks/useTable.ts +13 -1
  54. package/src/components/table/src/hooks/useTableScroll.ts +5 -3
  55. package/src/components/table/src/index.vue +18 -19
  56. package/src/components/table/src/props.ts +8 -3
  57. package/src/theme/header/components/logo.vue +4 -2
  58. package/src/theme/header/components/user-info.vue +21 -4
  59. package/src/theme/header/index.less +8 -4
  60. package/es/index.css +0 -1
  61. package/es/style/components/forms/src/index.less +0 -82
  62. package/es/style/components/icons/src/index.less +0 -96
  63. package/es/style/components/modal/src/index.less +0 -60
  64. package/es/style/components/table/src/index.less +0 -162
  65. package/es/theme/header/components/user-info.d.ts +0 -452
@@ -9,6 +9,7 @@
9
9
  .dt-icon{
10
10
  display: inline-block;
11
11
  text-align: center;
12
+ vertical-align: middle;
12
13
  & > svg{
13
14
  vertical-align: middle;
14
15
  }
@@ -1,6 +1,3 @@
1
-
2
- // @import 'ant-design-vue/es/modal/style/index.less';
3
-
4
1
  .fullscreen-modal {
5
2
  overflow: hidden;
6
3
 
@@ -82,6 +82,11 @@
82
82
  }
83
83
  }
84
84
 
85
+ .dt-table-action-dropdown{
86
+ vertical-align: middle;
87
+ cursor: pointer;
88
+ }
89
+
85
90
  .ant-table-fixed-left table, .ant-table-fixed-right table{
86
91
  width: min-content;
87
92
  }
@@ -115,12 +120,13 @@
115
120
  .ant-dropdown-menu-title-content{
116
121
  display: flex;
117
122
  align-items: center;
123
+ font-size: 13px;
118
124
  svg{
119
125
  display: block;
120
126
  }
121
127
 
122
128
  .dt-icon{
123
- padding: 0 8px;
129
+ padding-right: 8px;
124
130
  }
125
131
  }
126
132
  }
@@ -159,4 +165,9 @@
159
165
  margin-left: 0;
160
166
  }
161
167
  }
168
+
169
+ .ant-table-thead > tr > th{
170
+ font-weight: bolder;
171
+ color: #333;
172
+ }
162
173
  }
@@ -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{
@@ -25,6 +25,49 @@ declare const _sfc_main: import("vue").DefineComponent<{
25
25
  getLogoClass: import("vue").ComputedRef<(string | {
26
26
  'collapsed-show-title': boolean;
27
27
  })[]>;
28
+ DtIcon: import("vue").DefineComponent<{
29
+ iconClass: {
30
+ type: StringConstructor;
31
+ required: true;
32
+ };
33
+ className: {
34
+ type: (StringConstructor | ArrayConstructor)[];
35
+ default: string;
36
+ };
37
+ color: {
38
+ type: StringConstructor;
39
+ default: string;
40
+ };
41
+ size: {
42
+ type: NumberConstructor;
43
+ default: number;
44
+ };
45
+ }, {
46
+ isSvgIcon: import("vue").ComputedRef<boolean>;
47
+ iconName: import("vue").ComputedRef<string>;
48
+ clsName: import("vue").ComputedRef<string>;
49
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
50
+ iconClass: {
51
+ type: StringConstructor;
52
+ required: true;
53
+ };
54
+ className: {
55
+ type: (StringConstructor | ArrayConstructor)[];
56
+ default: string;
57
+ };
58
+ color: {
59
+ type: StringConstructor;
60
+ default: string;
61
+ };
62
+ size: {
63
+ type: NumberConstructor;
64
+ default: number;
65
+ };
66
+ }>>, {
67
+ className: string | unknown[];
68
+ color: string;
69
+ size: number;
70
+ }>;
28
71
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
29
72
  theme: {
30
73
  type: StringConstructor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-frames/ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "keywords": [
5
5
  "ui",
6
6
  "dt-ui"
@@ -23,11 +23,12 @@
23
23
  "tsconfig.json"
24
24
  ],
25
25
  "exports": {
26
- ".": "./es/index.js"
26
+ ".": "./es/index.ts"
27
27
  },
28
28
  "types": "./es/index.d.ts",
29
29
  "sideEffects": false,
30
30
  "dependencies": {
31
+ "@iconify/iconify": "^2.1.2",
31
32
  "@vueuse/core": "^7.5.2",
32
33
  "lodash-es": "^4.17.21",
33
34
  "sortablejs": "^1.15.0",
@@ -42,6 +43,8 @@
42
43
  "devDependencies": {
43
44
  "@iconify/json": "^1.1.460",
44
45
  "@vitejs/plugin-vue": "^2.0.0",
45
- "vite": "^2.7.2"
46
+ "vite": "^2.7.2",
47
+ "vite-plugin-purge-icons": "^0.7.0",
48
+ "vite-plugin-theme": "^0.8.6"
46
49
  }
47
50
  }
@@ -9,7 +9,7 @@
9
9
  import { isFunction, Recordable } from "@dt-frames/core";
10
10
  import { omit } from 'lodash-es'
11
11
  import { Ref, PropType, watch, toRaw, unref, watchEffect } from "vue";
12
- import { useForm, DtForm } from "../../../forms";
12
+ import { useForm, DtForm, FormProps } from "../../../forms";
13
13
  import { DtModal, useModal } from "../../../modal"
14
14
  import { basicProps } from "./props";
15
15
 
@@ -18,28 +18,34 @@
18
18
  ...{
19
19
  onRegister: { type: Function },
20
20
  formProps: {
21
+ type: Object as PropType<Ref<Partial<FormProps>>>
22
+ },
23
+ formsVal: {
21
24
  type: Object as PropType<Ref<Recordable>>
22
25
  }
23
26
  }
24
27
  } )
25
28
 
26
- const [registerDialog, { }] = useModal({
29
+ const [registerDialog] = useModal({
27
30
  ...omit(toRaw(props), [
28
31
  'actions',
29
32
  'curd',
30
33
  'formProps',
34
+ 'formsVal',
31
35
  'onRegister',
32
36
  'schemas'
33
- ])
37
+ ]),
38
+ destroyOnClose: true
34
39
  })
35
40
 
36
41
  const [ registerForm, { getFormValues, setFormValues } ] = useForm({
42
+ ...( props.formProps.value || {} ),
37
43
  schemas: props.schemas,
38
44
  mode: 'dialog'
39
45
  })
40
46
 
41
47
  watch(
42
- () => props.formProps.value,
48
+ () => props.formsVal.value,
43
49
  v => {
44
50
  if( v ) {
45
51
  setFormValues( toRaw(v) )
@@ -53,7 +59,7 @@
53
59
 
54
60
  let obj = Object.assign(
55
61
  {},
56
- props.formProps.value || {},
62
+ props.formsVal.value || {},
57
63
  getFormValues()
58
64
  )
59
65
 
@@ -1,21 +1,22 @@
1
- import { DtCreateDialog, error, isFunction, Recordable } from "@dt-frames/core";
2
- import { DtForm, useForm } from "../../../forms";
3
- import { h, ref, unref } from "vue"
4
- import { useModal, useModalOut } from "../../../modal"
1
+ import { error, isFunction, Recordable, useMessage } from "@dt-frames/core";
2
+ import { h, ref } from "vue"
3
+ import { useModalOut } from "../../../modal"
5
4
  import DtModal from "../components/dialog.vue";
6
5
  import { CrudOptType } from "../types/curd.type";
7
6
 
8
7
 
9
8
  export function useCurd(curdOpt: CrudOptType) {
10
- const formProps = ref<Recordable>()
9
+ const formsVal = ref<Recordable>()
11
10
  const [register, { closeModal, setModalProps, openModal }] = useModalOut()
11
+ const { confirm } = useMessage()
12
12
 
13
13
  const DtCurdModal = () => {
14
14
  return h(
15
15
  <div class="curdModal">
16
16
  <DtModal
17
17
  { ...curdOpt }
18
- formProps = { formProps }
18
+ formsVal = { formsVal }
19
+ formProps = { curdOpt.formProps }
19
20
  onRegister = { register }
20
21
  ></DtModal>
21
22
  </div>
@@ -32,7 +33,14 @@ export function useCurd(curdOpt: CrudOptType) {
32
33
  const { primaryKey = 'id', curd } = curdOpt
33
34
 
34
35
  if( curd && curd.onDeletes && isFunction( curd.onDeletes ) ) {
35
- curd.onDeletes( [row[ primaryKey ]] )
36
+ confirm({
37
+ title: '删除确认',
38
+ content: '确认要删除选中的数据?',
39
+ iconType: 'warning',
40
+ onOk() {
41
+ curd.onDeletes( [row[ primaryKey ]] )
42
+ }
43
+ })
36
44
  } else {
37
45
  error(`缺少curd函数配置, 请将useSource中返回的curd参数传入useCurd配置项中!`)
38
46
  }
@@ -43,7 +51,7 @@ export function useCurd(curdOpt: CrudOptType) {
43
51
  const { primaryKey = 'id', curd } = curdOpt
44
52
 
45
53
  curd.onQueryById(row[primaryKey]).then( rsp => {
46
- formProps.value = rsp
54
+ formsVal.value = rsp
47
55
  } )
48
56
 
49
57
  openModal()
@@ -55,7 +63,14 @@ export function useCurd(curdOpt: CrudOptType) {
55
63
  const { curd } = curdOpt
56
64
 
57
65
  if( curd && curd.onDeletes && isFunction( curd.onDeletes ) ) {
58
- curd.onDeletes( ids )
66
+ confirm({
67
+ title: '批量删除确认',
68
+ content: '确认要批量删除选中的数据?',
69
+ iconType: 'warning',
70
+ onOk() {
71
+ curd.onDeletes( ids )
72
+ }
73
+ })
59
74
  } else {
60
75
  error(`缺少curd函数配置, 请将useSource中返回的curd参数传入useCurd配置项中!`)
61
76
  }
@@ -1,5 +1,5 @@
1
1
  import { Recordable } from "@dt-frames/core"
2
- import { FormSchema, ButtonProps } from "../../../forms/src/types/form.type"
2
+ import { FormSchema, ButtonProps, FormProps } from "../../../forms/src/types/form.type"
3
3
 
4
4
  export type CrudOptType = {
5
5
  // 标题
@@ -16,6 +16,8 @@ export type CrudOptType = {
16
16
  showClose?: boolean
17
17
  // 物理主键
18
18
  primaryKey?: string
19
+ // 弹框中表格的属性
20
+ formProps?: Partial<FormProps>,
19
21
  // 增删改查接口
20
22
  curd?: {
21
23
  onAdd?: ( model: Recordable ) => void
@@ -0,0 +1,5 @@
1
+ import { useDialog } from './src/hooks/useDialog'
2
+
3
+ export {
4
+ useDialog
5
+ }
@@ -0,0 +1,85 @@
1
+ import { ModalProps, Recordable } from "@dt-frames/core"
2
+ import { VNode, h, createVNode, render as vueRender, Component } from "vue"
3
+
4
+ export function useDialog() {
5
+ function createDialog( component: any, options: any ) {
6
+ return new Promise( resolve => {
7
+ const div = document.createElement('div');
8
+ document.body.appendChild(div);
9
+
10
+ const wrapper = () => {
11
+ return h(component, {
12
+ params: {
13
+ ...options,
14
+ afterClose: ( data: any ) => destroy( data )
15
+ }
16
+
17
+ })
18
+ };
19
+
20
+ let dialogInstance = render();
21
+
22
+ function render() {
23
+ const vm = createVNode(component.children[0]);
24
+ vueRender(vm, div);
25
+ return vm;
26
+ }
27
+
28
+ function destroy( data: any ) {
29
+ if (dialogInstance && div.parentNode) {
30
+ vueRender(null, div);
31
+ dialogInstance.component.update();
32
+ dialogInstance = null;
33
+ div.parentNode.removeChild(div);
34
+ }
35
+
36
+ resolve( data );
37
+ }
38
+ } )
39
+ }
40
+ // function createDialog(component: any, props?: ModalProps) {
41
+ // const afterClose = (rsp: Recordable) => { }
42
+
43
+ // const div = document.createElement('div')
44
+ // document.body.appendChild(div)
45
+
46
+ // const wrapper = () => {
47
+ // return (
48
+ // h(component, {
49
+ // params: {
50
+ // ...props,
51
+ // afterClose: ( data: Recordable ) => destroy( data )
52
+ // }
53
+ // })
54
+ // )
55
+ // }
56
+
57
+ // let dialogInstance = render()
58
+
59
+ // function render(){
60
+ // const vm = createVNode(wrapper)
61
+ // vueRender(vm, div)
62
+ // return vm
63
+ // }
64
+
65
+ // const destroy = ( data: Recordable ) => {
66
+ // if (dialogInstance && div.parentNode) {
67
+ // vueRender(null, div)
68
+ // dialogInstance.component.update()
69
+ // dialogInstance = null
70
+ // div.parentNode.removeChild(div)
71
+ // }
72
+
73
+ // afterClose( data )
74
+ // }
75
+
76
+
77
+ // return {
78
+ // afterClose
79
+ // }
80
+ // }
81
+
82
+ return {
83
+ createDialog
84
+ }
85
+ }
@@ -1,12 +1,11 @@
1
1
  import DtForm from './src/index.vue'
2
2
  import { useForm } from './src/hooks/useForm'
3
- import { ButtonProps, FormSchema } from './src/types/form.type'
4
3
  import FormButtons from './src/components/formButton.vue'
5
4
 
5
+ export * from './src/types/form.type'
6
+
6
7
  export {
7
8
  FormButtons,
8
9
  DtForm,
9
- useForm,
10
- FormSchema,
11
- ButtonProps
10
+ useForm
12
11
  }
@@ -9,6 +9,7 @@
9
9
  .dt-icon{
10
10
  display: inline-block;
11
11
  text-align: center;
12
+ vertical-align: middle;
12
13
  & > svg{
13
14
  vertical-align: middle;
14
15
  }
@@ -0,0 +1,3 @@
1
+ .iframe-page{
2
+ height: 100%;
3
+ }
@@ -8,6 +8,7 @@ import { useSource } from './source'
8
8
  import { useCurd } from './curd'
9
9
  import { export2Excel } from './excel'
10
10
  import { DtIframe } from './iframe'
11
+ import { useDialog } from './dialog';
11
12
 
12
13
  const dtComponents = [
13
14
  { name: 'dt-base-router', component: DtBaseRouter },
@@ -42,5 +43,6 @@ export {
42
43
  useCurd,
43
44
  useModal,
44
45
  useModalOut,
45
- export2Excel
46
+ export2Excel,
47
+ useDialog
46
48
  }
@@ -1,6 +1,3 @@
1
-
2
- // @import 'ant-design-vue/es/modal/style/index.less';
3
-
4
1
  .fullscreen-modal {
5
2
  overflow: hidden;
6
3
 
@@ -2,21 +2,21 @@
2
2
  <div :class="getClass">
3
3
  <template v-if="canFullscreen">
4
4
  <Tooltip title="退出全屏" placement="bottom" v-if="fullScreen">
5
- <i v-icon="'ic:baseline-fullscreen-exit'" @click="handleFullScreen" />
5
+ <i class="i ic:baseline-fullscreen-exit" @click="handleFullScreen" />
6
6
  </Tooltip>
7
7
  <Tooltip title="全屏" placement="bottom" v-else>
8
- <i v-icon="'ic:baseline-fullscreen'" @click="handleFullScreen" />
8
+ <i class="i ic:baseline-fullscreen" @click="handleFullScreen" />
9
9
  </Tooltip>
10
10
  </template>
11
11
 
12
- <DtIcon icon-class="mdi:close" @click="handleCancel" />
12
+ <i class="i mdi:close" @click="handleCancel" />
13
13
  </div>
14
14
  </template>
15
15
 
16
16
  <script lang="ts" setup>
17
17
  import { computed } from 'vue';
18
18
  import { Tooltip } from 'ant-design-vue';
19
- import { DtIcon } from '../../../icons';
19
+ // import { DtIcon } from '../../../icons';
20
20
 
21
21
  const props = defineProps({
22
22
  canFullscreen: { type: Boolean, default: true },
@@ -1,4 +1,4 @@
1
- import { defineComponent, Slots, toRefs, unref } from "vue";
1
+ import { defineComponent, toRefs, unref } from "vue";
2
2
  import { Modal } from 'ant-design-vue';
3
3
  import { useAttrs, useSlots } from '@dt-frames/core';
4
4
  import { basicProps } from '../props';
@@ -23,7 +23,7 @@
23
23
  })
24
24
 
25
25
  const buttonActions: ButtonProps[] = [
26
- { name: '保存', preIcon: 'mdi:content-save', type: 'primary', flag: 'OK', show: props.showSave },
26
+ { name: '保存', preIcon: 'mdi:content-save', type: 'primary', flag: 'OK' },
27
27
  { name: '关闭', preIcon: 'mdi:close', flag: 'CANCEL' },
28
28
  ]
29
29
 
@@ -2,7 +2,6 @@ import { error, isFunction, Nullable } from "@dt-frames/core";
2
2
  import { ModalProps } from "@dt-frames/core"
3
3
  import { isEqual } from 'lodash-es'
4
4
  import { tryOnUnmounted } from '@vueuse/core'
5
- import { basicProps } from '../props'
6
5
  import { ModalMethods, ReturnInnerMethods, ReturnMethods, UseModalInnerReturnType, UseModalReturnType } from '../types/modal.type';
7
6
  import { computed, ExtractPropTypes, getCurrentInstance, nextTick, onUnmounted, reactive, ref, toRaw, unref, watch, watchEffect } from "vue";
8
7
 
@@ -48,13 +48,12 @@ export function useFetch(api: string | ApiType, baseUrl: string = '') {
48
48
  ...header,
49
49
  ...{ onlyData: false }
50
50
  }).then(
51
- (data: JsonResult) => {
51
+ (data: JsonResult) => {
52
52
  if( afterFetch && isFunction(afterFetch) ) {
53
53
  data = afterFetch( data )
54
54
  }
55
- if( data.status ) {
56
- resolve( data.data )
57
- }
55
+
56
+ resolve( data?.data )
58
57
  },
59
58
  (error) => {
60
59
  reject( error )
@@ -1,5 +1,5 @@
1
1
  import { computed, ref, reactive, toRaw, Ref } from 'vue'
2
- import { http, isFunction, isString, JsonResult, Recordable } from "@dt-frames/core"
2
+ import { http, isArray, isFunction, isObject, isString, JsonResult, Recordable } from "@dt-frames/core"
3
3
  import { BaseDataType, SourceType } from "../types/source.type"
4
4
  import { useFetch } from './useFetch'
5
5
  import { TableParamsType } from '../types/table.type'
@@ -74,7 +74,8 @@ export function useSource(opt: SourceType) {
74
74
  pageSize: pagination.pageSize
75
75
  }
76
76
 
77
- baseData.orderDTOs = sort
77
+ // baseData.orderDTOs = sort.length ?? null
78
+ baseData.orderDTOs = []
78
79
 
79
80
  if( needSearch ) search()
80
81
  }
@@ -90,7 +91,7 @@ export function useSource(opt: SourceType) {
90
91
  ).then( (rsp: any) => {
91
92
  const { records, pageDTO } = rsp
92
93
 
93
- dataSource.value = records
94
+ dataSource.value.splice(0, dataSource.value.length, ...records)
94
95
 
95
96
  pagination.value = {
96
97
  current: (pageDTO?.pageNo??0) + 1,
@@ -3,6 +3,6 @@ import { Recordable } from "@dt-frames/core";
3
3
  export type TableParamsType = {
4
4
  pagination: any,
5
5
  showBtnLoading: boolean,
6
- sort: Recordable,
6
+ sort: Recordable[],
7
7
  filter: any
8
8
  }
@@ -82,6 +82,11 @@
82
82
  }
83
83
  }
84
84
 
85
+ .dt-table-action-dropdown{
86
+ vertical-align: middle;
87
+ cursor: pointer;
88
+ }
89
+
85
90
  .ant-table-fixed-left table, .ant-table-fixed-right table{
86
91
  width: min-content;
87
92
  }
@@ -115,12 +120,13 @@
115
120
  .ant-dropdown-menu-title-content{
116
121
  display: flex;
117
122
  align-items: center;
123
+ font-size: 13px;
118
124
  svg{
119
125
  display: block;
120
126
  }
121
127
 
122
128
  .dt-icon{
123
- padding: 0 8px;
129
+ padding-right: 8px;
124
130
  }
125
131
  }
126
132
  }
@@ -159,4 +165,9 @@
159
165
  margin-left: 0;
160
166
  }
161
167
  }
168
+
169
+ .ant-table-thead > tr > th{
170
+ font-weight: bolder;
171
+ color: #333;
172
+ }
162
173
  }
@@ -3,5 +3,5 @@ import DtTable from "./src/index.vue"
3
3
 
4
4
  export {
5
5
  DtTable,
6
- useTable
6
+ useTable,
7
7
  }
@@ -13,7 +13,7 @@
13
13
  :getPopupContainer="getPopupContainer"
14
14
  :trigger="['click']"
15
15
  >
16
- <DtIcon :icon-class="'mdi:cog-outline'"></DtIcon>
16
+ <DtIcon :icon-class="'ic:baseline-settings'" class-name="dt-table-action-dropdown"></DtIcon>
17
17
 
18
18
  <template #overlay>
19
19
  <Menu class="dt-action-select">
@@ -22,7 +22,7 @@
22
22
  v-if="item.ifShow"
23
23
  @click="handleAction(item)"
24
24
  >
25
- <DtIcon :icon-class="item.icon" :color="item.color"></DtIcon>
25
+ <DtIcon :icon-class="item.icon" :color="item.color" :size="16"></DtIcon>
26
26
  <span>{{ item.title }}</span>
27
27
  </MenuItem>
28
28
  </template>
@@ -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