diff --git a/src/modules/base/views/user/index.vue b/src/modules/base/views/user/index.vue index 4bfdb33..835beb2 100644 --- a/src/modules/base/views/user/index.vue +++ b/src/modules/base/views/user/index.vue @@ -98,23 +98,23 @@ const Table = useTable({ { prop: 'name', label: '姓名', - minWidth: 150 + minWidth: 120 }, { prop: 'nickName', label: '昵称', - minWidth: 150 + minWidth: 120 }, { prop: 'departmentName', label: '部门名称', - minWidth: 150 + minWidth: 120 }, { prop: 'roleName', label: '角色', headerAlign: 'center', - minWidth: 150, + minWidth: 160, dict: [], formatter(row) { return row.roleName?.split(','); @@ -123,7 +123,7 @@ const Table = useTable({ { prop: 'status', label: '状态', - minWidth: 120, + minWidth: 100, component: { name: 'cl-switch' } @@ -131,12 +131,13 @@ const Table = useTable({ { prop: 'phone', label: '手机号码', - minWidth: 150 + minWidth: 120 }, { prop: 'remark', label: '备注', - minWidth: 150 + minWidth: 200, + showOverflowTooltip: true }, { prop: 'createTime', diff --git a/src/plugins/crud/components/render/index.tsx b/src/plugins/crud/components/render/index.tsx index 95248a1..e52626e 100644 --- a/src/plugins/crud/components/render/index.tsx +++ b/src/plugins/crud/components/render/index.tsx @@ -1,17 +1,13 @@ import { defineComponent, } from 'vue'; +import { CrudProps } from '../..'; export default defineComponent({ name: 'cl-render', props: { + ...CrudProps, modelValue: null, - scope: Object, - prop: String, - disabled: Boolean, - isDisabled: Boolean, - row: Object, - column: Object, - placeholder: String + placeholder: String, }, setup(props, { slots, }) { diff --git a/src/plugins/crud/index.ts b/src/plugins/crud/index.ts new file mode 100644 index 0000000..3d83464 --- /dev/null +++ b/src/plugins/crud/index.ts @@ -0,0 +1,10 @@ +export const CrudProps = { + prop: String, // Key + column: Object, // 列数据 + row: Object, // 行数据 + index: Number, // 行索引 + scope: Object, // 表单作用域 + disabled: Boolean, // 是否禁用 + isEdit: Boolean, // 是否编辑 + isDisabled: Boolean // 是否禁用 +}; diff --git a/src/plugins/editor-preview/components/preview.vue b/src/plugins/editor-preview/components/preview.vue index 5a20184..4e30062 100644 --- a/src/plugins/editor-preview/components/preview.vue +++ b/src/plugins/editor-preview/components/preview.vue @@ -10,7 +10,6 @@ :title="title" :scrollbar="isScroll" append-to-body - v-bind="$attrs" >
@@ -34,7 +33,9 @@ :name="`cl-editor-${name}`" height="100%" preview + v-if="name" /> + {{ content }}
@@ -51,8 +52,9 @@ import { useClipboard } from '@vueuse/core'; import { ElMessage } from 'element-plus'; import { isObject, isString } from 'lodash-es'; -import { nextTick, ref, computed, type PropType } from 'vue'; +import { nextTick, ref, computed, type PropType, useAttrs, mergeProps } from 'vue'; import { useCool } from '/@/cool'; +import { CrudProps } from '../../crud'; interface TabItem { name: string; @@ -61,12 +63,10 @@ interface TabItem { } const props = defineProps({ + ...CrudProps, modelValue: String, title: String, - name: { - type: String, - required: true - }, + name: String, text: { type: String, default: '点击查看' @@ -84,10 +84,8 @@ const props = defineProps({ default: '60%' }, formatter: Function, - // 多个内容展示 tabs: Array as PropType, - // 组件参数 props: Object }); @@ -154,6 +152,8 @@ async function open(data?: string | TabItem[]) { visible.value = true; } +function onOpened() {} + // 设置内容 function setContent(val: any) { if (isString(val)) { diff --git a/src/plugins/upload/components/upload.vue b/src/plugins/upload/components/upload.vue index 923a474..9fcae53 100644 --- a/src/plugins/upload/components/upload.vue +++ b/src/plugins/upload/components/upload.vue @@ -131,7 +131,7 @@