@alibarbar/components 1.0.0

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 (51) hide show
  1. package/README.md +181 -0
  2. package/dist/components/FatForm/FatForm.vue.d.ts +99 -0
  3. package/dist/components/FatForm/FatForm.vue.d.ts.map +1 -0
  4. package/dist/components/FatForm/FatFormItem.vue.d.ts +35 -0
  5. package/dist/components/FatForm/FatFormItem.vue.d.ts.map +1 -0
  6. package/dist/components/FatForm/index.d.ts +7 -0
  7. package/dist/components/FatForm/index.d.ts.map +1 -0
  8. package/dist/components/FatForm/types.d.ts +101 -0
  9. package/dist/components/FatForm/types.d.ts.map +1 -0
  10. package/dist/components/FatFormLayout/FatFormLayout.vue.d.ts +47 -0
  11. package/dist/components/FatFormLayout/FatFormLayout.vue.d.ts.map +1 -0
  12. package/dist/components/FatFormLayout/index.d.ts +5 -0
  13. package/dist/components/FatFormLayout/index.d.ts.map +1 -0
  14. package/dist/components/FatFormLayout/types.d.ts +15 -0
  15. package/dist/components/FatFormLayout/types.d.ts.map +1 -0
  16. package/dist/components/FatTable/FatTable.vue.d.ts +42 -0
  17. package/dist/components/FatTable/FatTable.vue.d.ts.map +1 -0
  18. package/dist/components/FatTable/index.d.ts +9 -0
  19. package/dist/components/FatTable/index.d.ts.map +1 -0
  20. package/dist/components/FatTable/types.d.ts +274 -0
  21. package/dist/components/FatTable/types.d.ts.map +1 -0
  22. package/dist/components/FatTableLayout/FatTableLayout.vue.d.ts +47 -0
  23. package/dist/components/FatTableLayout/FatTableLayout.vue.d.ts.map +1 -0
  24. package/dist/components/FatTableLayout/index.d.ts +5 -0
  25. package/dist/components/FatTableLayout/index.d.ts.map +1 -0
  26. package/dist/components/FatTableLayout/types.d.ts +19 -0
  27. package/dist/components/FatTableLayout/types.d.ts.map +1 -0
  28. package/dist/hooks/index.d.ts +4 -0
  29. package/dist/hooks/index.d.ts.map +1 -0
  30. package/dist/i18n/index.d.ts +61 -0
  31. package/dist/i18n/index.d.ts.map +1 -0
  32. package/dist/i18n/locales/en-US.d.ts +30 -0
  33. package/dist/i18n/locales/en-US.d.ts.map +1 -0
  34. package/dist/i18n/locales/zh-CN.d.ts +30 -0
  35. package/dist/i18n/locales/zh-CN.d.ts.map +1 -0
  36. package/dist/index.d.ts +485 -0
  37. package/dist/index.d.ts.map +1 -0
  38. package/dist/index.js +972 -0
  39. package/dist/index.js.map +1 -0
  40. package/dist/style.css +1 -0
  41. package/dist/utils/index.d.ts +5 -0
  42. package/dist/utils/index.d.ts.map +1 -0
  43. package/dist/utils/types.d.ts +5 -0
  44. package/dist/utils/types.d.ts.map +1 -0
  45. package/package.json +61 -0
  46. package/src/style/fat-form-layout.scss +53 -0
  47. package/src/style/fat-form.scss +132 -0
  48. package/src/style/fat-table-layout.scss +43 -0
  49. package/src/style/fat-table.scss +132 -0
  50. package/src/style/index.scss +14 -0
  51. package/src/style/variables.scss +23 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/i18n/locales/zh-CN.ts","../src/i18n/locales/en-US.ts","../src/i18n/index.ts","../src/components/FatTable/FatTable.vue","../src/components/FatTable/index.ts","../src/components/FatForm/FatForm.vue","../src/components/FatForm/FatFormItem.vue","../src/components/FatForm/index.ts","../src/components/FatTableLayout/FatTableLayout.vue","../src/components/FatTableLayout/index.ts","../src/components/FatFormLayout/FatFormLayout.vue","../src/components/FatFormLayout/index.ts","../src/utils/index.ts","../src/hooks/index.ts","../src/index.ts"],"sourcesContent":["export default {\n common: {\n confirm: '确认',\n cancel: '取消',\n submit: '提交',\n reset: '重置',\n search: '搜索',\n add: '新增',\n edit: '编辑',\n delete: '删除',\n save: '保存',\n loading: '加载中...',\n noData: '暂无数据'\n },\n table: {\n total: '共 {total} 条',\n pageSize: '每页显示',\n page: '页',\n goto: '前往',\n pageSizeOptions: ['10', '20', '50', '100']\n },\n form: {\n required: '此项为必填项',\n invalidFormat: '格式不正确',\n submitSuccess: '提交成功',\n submitFailed: '提交失败'\n }\n}\n","export default {\n common: {\n confirm: 'Confirm',\n cancel: 'Cancel',\n submit: 'Submit',\n reset: 'Reset',\n search: 'Search',\n add: 'Add',\n edit: 'Edit',\n delete: 'Delete',\n save: 'Save',\n loading: 'Loading...',\n noData: 'No Data'\n },\n table: {\n total: 'Total {total} items',\n pageSize: 'Items per page',\n page: 'Page',\n goto: 'Go to',\n pageSizeOptions: ['10', '20', '50', '100']\n },\n form: {\n required: 'This field is required',\n invalidFormat: 'Invalid format',\n submitSuccess: 'Submit successful',\n submitFailed: 'Submit failed'\n }\n}\n","import { createI18n } from 'vue-i18n'\nimport zhCN from './locales/zh-CN'\nimport enUS from './locales/en-US'\n\nexport type Locale = 'zh-CN' | 'en-US'\n\nconst messages = {\n 'zh-CN': zhCN,\n 'en-US': enUS\n}\n\nexport const i18n = createI18n({\n legacy: false,\n locale: 'zh-CN',\n fallbackLocale: 'en-US',\n messages\n})\n\nexport default i18n\n","<template>\n <div class=\"fat-table-wrapper\">\n <div class=\"fat-table\" :style=\"tableStyle\">\n <table class=\"fat-table__inner\">\n <thead class=\"fat-table__header\">\n <tr>\n <th\n v-for=\"(column, index) in columns\"\n :key=\"getColumnKey(column, index)\"\n :style=\"getColumnStyle(column)\"\n :class=\"getColumnClass(column)\"\n >\n <div class=\"fat-table__cell\">\n <slot\n :name=\"`header-${getColumnKey(column, index)}`\"\n :column=\"column\"\n :index=\"index\"\n >\n <span v-if=\"column.renderHeader\">\n <component\n :is=\"() => column.renderHeader?.(column, index)\"\n />\n </span>\n <span v-else>{{ column.label }}</span>\n <span\n v-if=\"column.sortable\"\n class=\"fat-table__sort\"\n @click=\"handleSort(column)\"\n >\n <span\n class=\"fat-table__sort-icon\"\n :class=\"{ active: sortState.prop === column.prop && sortState.order === 'ascending' }\"\n >\n ↑\n </span>\n <span\n class=\"fat-table__sort-icon\"\n :class=\"{ active: sortState.prop === column.prop && sortState.order === 'descending' }\"\n >\n ↓\n </span>\n </span>\n </slot>\n </div>\n </th>\n </tr>\n </thead>\n <tbody class=\"fat-table__body\">\n <tr\n v-if=\"loading\"\n class=\"fat-table__loading-row\"\n >\n <td :colspan=\"columns.length\" class=\"fat-table__loading-cell\">\n {{ t('common.loading') }}\n </td>\n </tr>\n <tr\n v-else-if=\"!list || list.length === 0\"\n class=\"fat-table__empty-row\"\n >\n <td :colspan=\"columns.length\" class=\"fat-table__empty-cell\">\n {{ emptyText || t('common.noData') }}\n </td>\n </tr>\n <tr\n v-else\n v-for=\"(row, rowIndex) in list\"\n :key=\"getRowKey(row, rowIndex)\"\n :class=\"[\n 'fat-table__row',\n { 'fat-table__row--stripe': stripe && rowIndex % 2 === 1 }\n ]\"\n @click=\"handleRowClick(row, $event)\"\n >\n <td\n v-for=\"(column, colIndex) in columns\"\n :key=\"getColumnKey(column, colIndex)\"\n :class=\"getCellClass(column)\"\n :style=\"getColumnStyle(column)\"\n >\n <div class=\"fat-table__cell\">\n <slot\n :name=\"`cell-${getColumnKey(column, colIndex)}`\"\n :row=\"row\"\n :column=\"column\"\n :value=\"getCellValue(row, column)\"\n :index=\"rowIndex\"\n >\n <span v-if=\"column.render\">\n <component\n :is=\"() => column.render?.(getCellValue(row, column), row, rowIndex)\"\n />\n </span>\n <span v-else>{{ formatCellValue(row, column) }}</span>\n </slot>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n <div\n v-if=\"pagination\"\n class=\"fat-table__pagination\"\n >\n <div class=\"fat-table__pagination-info\">\n {{ t('table.total', { total: paginationData.total }) }}\n </div>\n <div class=\"fat-table__pagination-controls\">\n <select\n :value=\"paginationData.pageSize\"\n class=\"fat-table__page-size-select\"\n @change=\"handlePageSizeChange($event)\"\n >\n <option\n v-for=\"size in pageSizes\"\n :key=\"size\"\n :value=\"size\"\n >\n {{ size }}\n </option>\n </select>\n <span class=\"fat-table__pagination-text\">{{ t('table.pageSize') }}</span>\n <button\n class=\"fat-table__pagination-btn\"\n :disabled=\"paginationData.currentPage === 1\"\n @click=\"handlePageChange(paginationData.currentPage - 1)\"\n >\n 上一页\n </button>\n <span class=\"fat-table__pagination-text\">\n {{ t('table.page') }} {{ paginationData.currentPage }} / {{ totalPages }}\n </span>\n <button\n class=\"fat-table__pagination-btn\"\n :disabled=\"paginationData.currentPage >= totalPages\"\n @click=\"handlePageChange(paginationData.currentPage + 1)\"\n >\n 下一页\n </button>\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\" generic=\"T extends Record<string, any> = any, S extends Record<string, any> = Record<string, any>\">\nimport { ref, computed, reactive, watch, onMounted } from 'vue'\nimport { useI18n } from 'vue-i18n'\nimport type { FatTableColumn, SortOrder, FatTableProps, FatTableEmits, FatTableRequestParams, FatTableRequestResponse } from './types'\n\nconst props = withDefaults(defineProps<FatTableProps<T, S>>(), {\n data: () => [],\n loading: false,\n pagination: false,\n stripe: false,\n border: true,\n size: 'default',\n emptyText: '',\n requestOnMounted: true,\n requestOnQueryChange: true,\n requestOnSortChange: true\n})\n\nconst emit = defineEmits<FatTableEmits<T, S>>()\n\nconst { t } = useI18n()\n\n// 内部状态管理(当使用 fetchHandler 时)\nconst internalList = ref<T[]>([]) as { value: T[] }\nconst internalLoading = ref(false)\nconst internalPagination = reactive({\n currentPage: 1,\n pageSize: 10,\n total: 0\n})\n\n// 查询参数\nconst query = computed(() => props.query || ({} as S))\n\n// 排序状态\nconst sortState = reactive<{ prop: string; order: SortOrder }>({\n prop: '',\n order: null\n})\n\n// 判断是否使用 fetchHandler 模式\nconst useFetchHandler = computed(() => !!props.fetchHandler)\n\n// 数据列表:如果使用 fetchHandler,使用内部数据;否则使用外部 data\nconst list = computed(() => {\n if (useFetchHandler.value) {\n return internalList.value\n }\n return props.data || []\n})\n\n// 加载状态:如果使用 fetchHandler,使用内部 loading;否则使用外部 loading\nconst loading = computed(() => {\n if (useFetchHandler.value) {\n return internalLoading.value\n }\n return props.loading\n})\n\n// 分页数据\nconst paginationData = computed(() => {\n if (useFetchHandler.value) {\n return internalPagination\n }\n if (typeof props.pagination === 'boolean') {\n return {\n currentPage: 1,\n pageSize: 10,\n total: list.value.length\n }\n }\n return props.pagination\n})\n\nconst pageSizes = computed(() => {\n if (typeof props.pagination === 'object' && props.pagination.pageSizes) {\n return props.pagination.pageSizes\n }\n return [10, 20, 50, 100]\n})\n\nconst totalPages = computed(() => {\n const total = paginationData.value.total\n const pageSize = paginationData.value.pageSize\n return Math.ceil(total / pageSize)\n})\n\nconst tableStyle = computed(() => {\n const style: Record<string, string> = {}\n if (props.height) {\n style.height = typeof props.height === 'number' ? `${props.height}px` : props.height\n }\n if (props.maxHeight) {\n style.maxHeight = typeof props.maxHeight === 'number' ? `${props.maxHeight}px` : props.maxHeight\n }\n return style\n})\n\nconst getColumnKey = (column: FatTableColumn<T, S>, index: number) => {\n return column.key || column.prop || `column-${index}`\n}\n\nconst getRowKey = (row: T, index: number) => {\n if (typeof props.rowKey === 'function') {\n return props.rowKey(row)\n }\n if (typeof props.rowKey === 'string') {\n return (row as any)[props.rowKey]\n }\n return index\n}\n\nconst getColumnStyle = (column: FatTableColumn<T, S>) => {\n const style: Record<string, string> = {}\n if (column.width) {\n style.width = typeof column.width === 'number' ? `${column.width}px` : column.width\n }\n if (column.minWidth) {\n style.minWidth = typeof column.minWidth === 'number' ? `${column.minWidth}px` : column.minWidth\n }\n if (column.align) {\n style.textAlign = column.align\n }\n return style\n}\n\nconst getColumnClass = (column: FatTableColumn<T, S>) => {\n return {\n 'fat-table__header-cell--fixed-left': column.fixed === 'left' || (column.fixed === true),\n 'fat-table__header-cell--fixed-right': column.fixed === 'right'\n }\n}\n\nconst getCellClass = (column: FatTableColumn<T, S>) => {\n return {\n 'fat-table__cell--fixed-left': column.fixed === 'left' || (column.fixed === true),\n 'fat-table__cell--fixed-right': column.fixed === 'right'\n }\n}\n\nconst getCellValue = (row: T, column: FatTableColumn<T, S>) => {\n if (!column.prop) return undefined\n return (row as any)[column.prop]\n}\n\nconst formatCellValue = (row: T, column: FatTableColumn<T, S>) => {\n const value = getCellValue(row, column)\n return value ?? ''\n}\n\n// 获取请求参数\nconst getRequestParams = (): FatTableRequestParams<T, S> => {\n const page = paginationData.value.currentPage\n const pageSize = paginationData.value.pageSize\n \n return {\n pagination: {\n pageSize,\n page,\n offset: (page - 1) * pageSize\n },\n sort: sortState.prop && sortState.order ? {\n prop: sortState.prop,\n order: sortState.order\n } : undefined,\n query: query.value,\n list: internalList.value\n }\n}\n\n// 执行数据获取\nconst fetchData = async () => {\n if (!props.fetchHandler) return\n \n internalLoading.value = true\n try {\n const params = getRequestParams()\n const response: FatTableRequestResponse<T> = await props.fetchHandler(params)\n \n internalList.value = response.list as T[]\n internalPagination.total = response.total\n } catch (error) {\n console.error('FatTable fetchData error:', error)\n internalList.value = []\n internalPagination.total = 0\n } finally {\n internalLoading.value = false\n }\n}\n\nconst handleSort = (column: FatTableColumn<T, S>) => {\n if (!column.sortable || !column.prop) return\n\n if (sortState.prop === column.prop) {\n if (sortState.order === 'ascending') {\n sortState.order = 'descending'\n } else if (sortState.order === 'descending') {\n sortState.prop = ''\n sortState.order = null\n } else {\n sortState.order = 'ascending'\n }\n } else {\n sortState.prop = column.prop\n sortState.order = 'ascending'\n }\n\n if (sortState.prop && sortState.order && column.prop) {\n emit('sort-change', {\n column,\n prop: column.prop,\n order: sortState.order\n })\n \n // 如果使用 fetchHandler 且开启了自动请求,则触发数据获取\n if (useFetchHandler.value && props.requestOnSortChange) {\n internalPagination.currentPage = 1 // 排序时重置到第一页\n fetchData()\n }\n }\n}\n\nconst handlePageChange = (page: number) => {\n if (useFetchHandler.value) {\n internalPagination.currentPage = page\n fetchData()\n } else if (typeof props.pagination === 'object') {\n emit('page-change', page)\n }\n}\n\nconst handlePageSizeChange = (event: Event) => {\n const target = event.target as HTMLSelectElement\n const pageSize = Number(target.value)\n \n if (useFetchHandler.value) {\n internalPagination.pageSize = pageSize\n internalPagination.currentPage = 1 // 改变每页条数时重置到第一页\n fetchData()\n } else if (typeof props.pagination === 'object') {\n emit('page-size-change', pageSize)\n }\n}\n\nconst handleRowClick = (row: T, event: Event) => {\n emit('row-click', row, {} as FatTableColumn<T, S>, event)\n}\n\n// 监听查询参数变化\nwatch(\n () => props.query,\n () => {\n if (useFetchHandler.value && props.requestOnQueryChange) {\n internalPagination.currentPage = 1 // 查询时重置到第一页\n fetchData()\n }\n },\n { deep: true }\n)\n\n// 监听分页配置变化(外部传入的分页配置)\nwatch(\n () => props.pagination,\n (newPagination) => {\n if (useFetchHandler.value && typeof newPagination === 'object') {\n internalPagination.currentPage = newPagination.currentPage\n internalPagination.pageSize = newPagination.pageSize\n // total 由 fetchHandler 返回,不从这里更新\n }\n },\n { deep: true }\n)\n\n// 挂载时获取数据\nonMounted(() => {\n if (useFetchHandler.value && props.requestOnMounted) {\n fetchData()\n }\n})\n\n// 暴露方法供外部调用\ndefineExpose({\n /**\n * 刷新数据\n */\n refresh: () => {\n if (useFetchHandler.value) {\n fetchData()\n }\n },\n /**\n * 重置并重新获取数据\n */\n reset: () => {\n if (useFetchHandler.value) {\n internalPagination.currentPage = 1\n sortState.prop = ''\n sortState.order = null\n fetchData()\n }\n },\n /**\n * 获取请求参数\n */\n getRequestParams\n})\n</script>\n\n<style scoped>\n.fat-table-wrapper {\n width: 100%;\n}\n\n.fat-table {\n width: 100%;\n overflow: auto;\n border: 1px solid #ebeef5;\n border-radius: 4px;\n}\n\n.fat-table__inner {\n width: 100%;\n border-collapse: collapse;\n table-layout: fixed;\n}\n\n.fat-table__header {\n background-color: #fafafa;\n}\n\n.fat-table__header th {\n padding: 12px 0;\n text-align: left;\n font-weight: 500;\n color: #606266;\n border-bottom: 1px solid #ebeef5;\n padding-left: 12px;\n padding-right: 12px;\n}\n\n.fat-table__body td {\n padding: 12px;\n border-bottom: 1px solid #ebeef5;\n color: #606266;\n}\n\n.fat-table__row {\n transition: background-color 0.25s;\n}\n\n.fat-table__row:hover {\n background-color: #f5f7fa;\n}\n\n.fat-table__row--stripe {\n background-color: #fafafa;\n}\n\n.fat-table__row--stripe:hover {\n background-color: #f5f7fa;\n}\n\n.fat-table__cell {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.fat-table__sort {\n display: flex;\n flex-direction: column;\n cursor: pointer;\n margin-left: 4px;\n}\n\n.fat-table__sort-icon {\n font-size: 12px;\n color: #c0c4cc;\n line-height: 1;\n transition: color 0.25s;\n}\n\n.fat-table__sort-icon.active {\n color: #409eff;\n}\n\n.fat-table__loading-cell,\n.fat-table__empty-cell {\n text-align: center;\n padding: 40px 0;\n color: #909399;\n}\n\n.fat-table__pagination {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-top: 16px;\n padding: 0 12px;\n}\n\n.fat-table__pagination-controls {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.fat-table__page-size-select {\n padding: 4px 8px;\n border: 1px solid #dcdfe6;\n border-radius: 4px;\n outline: none;\n}\n\n.fat-table__pagination-btn {\n padding: 6px 12px;\n border: 1px solid #dcdfe6;\n border-radius: 4px;\n background: #fff;\n cursor: pointer;\n transition: all 0.25s;\n}\n\n.fat-table__pagination-btn:hover:not(:disabled) {\n color: #409eff;\n border-color: #409eff;\n}\n\n.fat-table__pagination-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.fat-table__pagination-text {\n color: #606266;\n font-size: 14px;\n}\n</style>\n","import FatTable from './FatTable.vue'\nimport type { App } from 'vue'\nimport type { ComponentPublicInstance } from 'vue'\n\nconst FatTableWithInstall = FatTable as typeof FatTable & {\n install: (app: App) => void\n}\n\nFatTableWithInstall.install = (app: App) => {\n app.component('FatTable', FatTable)\n}\n\nexport default FatTableWithInstall\nexport * from './types'\n","<template>\n <form class=\"fat-form\" :class=\"formClass\" @submit.prevent=\"handleSubmit\">\n <slot :form=\"formInstance\" />\n \n <div v-if=\"enableSubmitter\" class=\"fat-form__submitter\">\n <slot name=\"submitter\" :form=\"formInstance\">\n <button\n type=\"submit\"\n class=\"fat-form__submit-btn\"\n :disabled=\"submitting || disabled\"\n :loading=\"submitting\"\n >\n {{ submitText || t('common.submit') }}\n </button>\n <button\n v-if=\"enableReset\"\n type=\"button\"\n class=\"fat-form__reset-btn\"\n :disabled=\"submitting || disabled\"\n @click=\"handleReset\"\n >\n {{ resetText || t('common.reset') }}\n </button>\n </slot>\n </div>\n </form>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, reactive, provide } from 'vue'\nimport { useI18n } from 'vue-i18n'\nimport type { FatFormMethods, FatFormMode, FatFormLayout } from './types'\n\ninterface Props {\n modelValue?: Record<string, any>\n mode?: FatFormMode\n layout?: FatFormLayout\n labelWidth?: string | number\n labelSuffix?: string\n size?: 'large' | 'default' | 'small'\n disabled?: boolean\n loading?: boolean\n initialValue?: Record<string, any>\n rules?: Record<string, any[]>\n enableSubmitter?: boolean\n enableReset?: boolean\n submitText?: string\n resetText?: string\n onSubmit?: (values: Record<string, any>) => Promise<void> | void\n}\n\nconst props = withDefaults(defineProps<Props>(), {\n modelValue: () => ({}),\n mode: 'editable',\n layout: 'horizontal',\n labelSuffix: ':',\n size: 'default',\n disabled: false,\n loading: false,\n initialValue: () => ({}),\n rules: () => ({}),\n enableSubmitter: true,\n enableReset: true\n})\n\nconst emit = defineEmits<{\n 'update:modelValue': [value: Record<string, any>]\n 'submit': [values: Record<string, any>]\n 'reset': [values: Record<string, any>]\n 'validate': [prop: string, isValid: boolean, message?: string]\n}>()\n\nconst { t } = useI18n()\n\nconst submitting = ref(false)\nconst formValues = reactive<Record<string, any>>({ ...props.initialValue, ...props.modelValue })\nconst errors = reactive<Record<string, string>>({})\n\nconst formClass = computed(() => {\n return [\n `fat-form--${props.layout}`,\n `fat-form--${props.size}`,\n {\n 'fat-form--disabled': props.disabled,\n 'fat-form--preview': props.mode === 'preview'\n }\n ]\n})\n\nconst formInstance: FatFormMethods = {\n get mode() {\n return props.mode\n },\n get layout() {\n return props.layout\n },\n get disabled() {\n return props.disabled\n },\n get loading() {\n return computed(() => props.loading || submitting.value)\n },\n get submitting() {\n return computed(() => submitting.value)\n },\n get values() {\n return computed(() => formValues)\n },\n async submit() {\n const isValid = await this.validate()\n if (!isValid) {\n return\n }\n \n submitting.value = true\n try {\n if (props.onSubmit) {\n await props.onSubmit({ ...formValues })\n }\n emit('submit', { ...formValues })\n } finally {\n submitting.value = false\n }\n },\n reset() {\n Object.keys(formValues).forEach(key => {\n delete formValues[key]\n })\n Object.assign(formValues, { ...props.initialValue })\n Object.keys(errors).forEach(key => {\n delete errors[key]\n })\n emit('update:modelValue', { ...formValues })\n emit('reset', { ...formValues })\n },\n async validate() {\n let isValid = true\n const rules = props.rules || {}\n \n for (const [prop, ruleList] of Object.entries(rules)) {\n const value = formValues[prop]\n for (const rule of ruleList) {\n if (rule.required && (value === undefined || value === null || value === '')) {\n errors[prop] = rule.message || `${prop} 不能为空`\n emit('validate', prop, false, errors[prop])\n isValid = false\n break\n }\n if (rule.validator && typeof rule.validator === 'function') {\n try {\n await rule.validator(rule, value, formValues)\n } catch (error: any) {\n errors[prop] = error.message || '验证失败'\n emit('validate', prop, false, errors[prop])\n isValid = false\n break\n }\n }\n }\n if (isValid && errors[prop]) {\n delete errors[prop]\n emit('validate', prop, true)\n }\n }\n \n return isValid\n },\n async validateField(prop: string | string[]) {\n const propsToValidate = Array.isArray(prop) ? prop : [prop]\n let isValid = true\n \n for (const p of propsToValidate) {\n const rules = props.rules?.[p] || []\n const value = formValues[p]\n \n for (const rule of rules) {\n if (rule.required && (value === undefined || value === null || value === '')) {\n errors[p] = rule.message || `${p} 不能为空`\n emit('validate', p, false, errors[p])\n isValid = false\n break\n }\n if (rule.validator && typeof rule.validator === 'function') {\n try {\n await rule.validator(rule, value, formValues)\n } catch (error: any) {\n errors[p] = error.message || '验证失败'\n emit('validate', p, false, errors[p])\n isValid = false\n break\n }\n }\n }\n if (isValid && errors[p]) {\n delete errors[p]\n emit('validate', p, true)\n }\n }\n \n return isValid\n },\n clearValidate(prop?: string | string[]) {\n if (!prop) {\n Object.keys(errors).forEach(key => {\n delete errors[key]\n })\n } else {\n const propsToClear = Array.isArray(prop) ? prop : [prop]\n propsToClear.forEach(p => {\n delete errors[p]\n })\n }\n },\n getFieldValue(prop: string) {\n return formValues[prop]\n },\n setFieldValue(prop: string, value: any) {\n formValues[prop] = value\n emit('update:modelValue', { ...formValues })\n }\n}\n\nprovide('fatForm', formInstance)\nprovide('fatFormErrors', errors)\n\nconst handleSubmit = async () => {\n await formInstance.submit()\n}\n\nconst handleReset = () => {\n formInstance.reset()\n}\n</script>\n\n<style scoped>\n.fat-form {\n width: 100%;\n}\n\n.fat-form--horizontal {\n /* 水平布局样式 */\n}\n\n.fat-form--vertical {\n /* 垂直布局样式 */\n}\n\n.fat-form--inline {\n /* 行内布局样式 */\n}\n\n.fat-form--disabled {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.fat-form__submitter {\n display: flex;\n gap: 12px;\n margin-top: 24px;\n}\n\n.fat-form__submit-btn,\n.fat-form__reset-btn {\n padding: 8px 16px;\n border-radius: 4px;\n cursor: pointer;\n transition: all 0.25s;\n font-size: 14px;\n}\n\n.fat-form__submit-btn {\n background-color: #409eff;\n color: #fff;\n border: 1px solid #409eff;\n}\n\n.fat-form__submit-btn:hover:not(:disabled) {\n background-color: #66b1ff;\n border-color: #66b1ff;\n}\n\n.fat-form__submit-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.fat-form__reset-btn {\n background-color: #fff;\n color: #606266;\n border: 1px solid #dcdfe6;\n}\n\n.fat-form__reset-btn:hover:not(:disabled) {\n color: #409eff;\n border-color: #409eff;\n}\n\n.fat-form__reset-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n</style>\n","<template>\n <div\n v-if=\"!hidden\"\n class=\"fat-form-item\"\n :class=\"formItemClass\"\n >\n <label\n v-if=\"label\"\n class=\"fat-form-item__label\"\n :style=\"labelStyle\"\n >\n <span v-if=\"required\" class=\"fat-form-item__required\">*</span>\n {{ label }}{{ labelSuffix }}\n </label>\n <div class=\"fat-form-item__content\" :style=\"contentStyle\">\n <slot :value=\"value\" :form=\"form\" />\n <div v-if=\"errorMessage\" class=\"fat-form-item__error\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, inject, watch } from 'vue'\nimport type { FatFormMethods } from './types'\n\ninterface Props {\n prop: string\n label?: string\n required?: boolean\n hidden?: boolean\n disabled?: boolean\n labelWidth?: string | number\n width?: string | number\n}\n\nconst props = defineProps<Props>()\n\nconst form = inject<FatFormMethods>('fatForm')\nconst errors = inject<Record<string, string>>('fatFormErrors', {})\n\nconst labelSuffix = computed(() => {\n return form?.layout === 'horizontal' ? (form as any).labelSuffix || ':' : ''\n})\n\nconst value = computed(() => {\n return form?.getFieldValue(props.prop)\n})\n\nconst errorMessage = computed(() => {\n return errors[props.prop]\n})\n\nconst hidden = computed(() => {\n return props.hidden || form?.mode === 'preview'\n})\n\nconst formItemClass = computed(() => {\n return [\n `fat-form-item--${form?.layout || 'horizontal'}`,\n {\n 'fat-form-item--error': !!errorMessage.value,\n 'fat-form-item--required': props.required,\n 'fat-form-item--disabled': props.disabled || form?.disabled\n }\n ]\n})\n\nconst labelStyle = computed(() => {\n const style: Record<string, string> = {}\n if (form?.layout === 'horizontal' && (props.labelWidth || (form as any).labelWidth)) {\n const width = props.labelWidth || (form as any).labelWidth\n style.width = typeof width === 'number' ? `${width}px` : width\n }\n return style\n})\n\nconst contentStyle = computed(() => {\n const style: Record<string, string> = {}\n if (props.width) {\n style.width = typeof props.width === 'number' ? `${props.width}px` : props.width\n }\n return style\n})\n\nwatch(\n () => value.value,\n (newVal) => {\n if (form) {\n form.setFieldValue(props.prop, newVal)\n }\n },\n { deep: true }\n)\n</script>\n\n<style scoped>\n.fat-form-item {\n display: flex;\n margin-bottom: 18px;\n}\n\n.fat-form-item--horizontal {\n flex-direction: row;\n align-items: flex-start;\n}\n\n.fat-form-item--vertical {\n flex-direction: column;\n}\n\n.fat-form-item__label {\n padding-right: 12px;\n line-height: 32px;\n color: #606266;\n font-size: 14px;\n flex-shrink: 0;\n}\n\n.fat-form-item__required {\n color: #f56c6c;\n margin-right: 4px;\n}\n\n.fat-form-item__content {\n flex: 1;\n position: relative;\n}\n\n.fat-form-item__error {\n color: #f56c6c;\n font-size: 12px;\n line-height: 1;\n padding-top: 4px;\n}\n\n.fat-form-item--error .fat-form-item__content {\n /* 错误状态样式 */\n}\n\n.fat-form-item--disabled {\n opacity: 0.6;\n pointer-events: none;\n}\n</style>\n","import FatForm from './FatForm.vue'\nimport FatFormItem from './FatFormItem.vue'\nimport type { App } from 'vue'\n\nFatForm.install = (app: App) => {\n app.component('FatForm', FatForm)\n app.component('FatFormItem', FatFormItem)\n}\n\nexport default FatForm\nexport { FatFormItem }\nexport * from './types'\n","<template>\n <div class=\"fat-table-layout\">\n <div v-if=\"title || $slots.title\" class=\"fat-table-layout__header\">\n <slot name=\"title\">\n <h2 v-if=\"title\" class=\"fat-table-layout__title\">{{ title }}</h2>\n </slot>\n </div>\n \n <div v-if=\"showQuery && $slots.query\" class=\"fat-table-layout__query\">\n <slot name=\"query\" />\n </div>\n \n <div v-if=\"showToolbar && $slots.toolbar\" class=\"fat-table-layout__toolbar\">\n <slot name=\"toolbar\" />\n </div>\n \n <div class=\"fat-table-layout__table\">\n <slot name=\"default\" />\n </div>\n \n <div v-if=\"showPagination && $slots.pagination\" class=\"fat-table-layout__pagination\">\n <slot name=\"pagination\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { FatTableLayoutProps } from './types'\n\nwithDefaults(defineProps<FatTableLayoutProps>(), {\n showQuery: true,\n showToolbar: true,\n showPagination: true\n})\n</script>\n\n<style scoped>\n.fat-table-layout {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.fat-table-layout__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.fat-table-layout__title {\n margin: 0;\n font-size: 18px;\n font-weight: 500;\n color: #303133;\n}\n\n.fat-table-layout__query {\n padding: 16px;\n background-color: #fff;\n border-radius: 4px;\n border: 1px solid #ebeef5;\n}\n\n.fat-table-layout__toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 12px 0;\n}\n\n.fat-table-layout__table {\n flex: 1;\n}\n\n.fat-table-layout__pagination {\n display: flex;\n justify-content: flex-end;\n padding: 12px 0;\n}\n</style>\n","import FatTableLayout from './FatTableLayout.vue'\nimport type { App } from 'vue'\n\nFatTableLayout.install = (app: App) => {\n app.component('FatTableLayout', FatTableLayout)\n}\n\nexport default FatTableLayout\nexport * from './types'\n","<template>\n <div class=\"fat-form-layout\">\n <div v-if=\"title || $slots.title || showBack\" class=\"fat-form-layout__header\">\n <div class=\"fat-form-layout__header-left\">\n <button\n v-if=\"showBack\"\n class=\"fat-form-layout__back-btn\"\n @click=\"handleBack\"\n >\n ← {{ t('common.cancel') }}\n </button>\n <slot name=\"title\">\n <h2 v-if=\"title\" class=\"fat-form-layout__title\">{{ title }}</h2>\n </slot>\n </div>\n <div v-if=\"$slots.extra\" class=\"fat-form-layout__header-extra\">\n <slot name=\"extra\" />\n </div>\n </div>\n \n <div class=\"fat-form-layout__content\">\n <slot name=\"default\" />\n </div>\n \n <div v-if=\"showSubmitter && $slots.submitter\" class=\"fat-form-layout__footer\">\n <slot name=\"submitter\" />\n </div>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { useI18n } from 'vue-i18n'\nimport type { FatFormLayoutProps } from './types'\n\nwithDefaults(defineProps<FatFormLayoutProps>(), {\n showSubmitter: true,\n showBack: false\n})\n\nconst emit = defineEmits<{\n back: []\n}>()\n\nconst { t } = useI18n()\n\nconst handleBack = () => {\n emit('back')\n}\n</script>\n\n<style scoped>\n.fat-form-layout {\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 24px;\n}\n\n.fat-form-layout__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding-bottom: 16px;\n border-bottom: 1px solid #ebeef5;\n}\n\n.fat-form-layout__header-left {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n.fat-form-layout__back-btn {\n padding: 4px 8px;\n background: transparent;\n border: none;\n cursor: pointer;\n color: #606266;\n font-size: 14px;\n transition: color 0.25s;\n}\n\n.fat-form-layout__back-btn:hover {\n color: #409eff;\n}\n\n.fat-form-layout__title {\n margin: 0;\n font-size: 20px;\n font-weight: 500;\n color: #303133;\n}\n\n.fat-form-layout__content {\n flex: 1;\n}\n\n.fat-form-layout__footer {\n padding-top: 16px;\n border-top: 1px solid #ebeef5;\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n}\n</style>\n","import FatFormLayout from './FatFormLayout.vue'\nimport type { App } from 'vue'\n\nFatFormLayout.install = (app: App) => {\n app.component('FatFormLayout', FatFormLayout)\n}\n\nexport default FatFormLayout\nexport * from './types'\n","import { useI18n } from 'vue-i18n'\nimport type { Composer } from 'vue-i18n'\n\nexport const useI18nT = (): Composer['t'] => {\n const { t } = useI18n()\n return t\n}\n\nexport * from './types'\n","import { useI18n } from 'vue-i18n'\nimport type { Composer } from 'vue-i18n'\n\nexport const useT = (): Composer['t'] => {\n const { t } = useI18n()\n return t\n}\n","import type { App } from 'vue'\nimport { i18n } from './i18n'\nimport './style/index.scss'\n\n// 组件\nimport FatTable from './components/FatTable'\nimport FatForm from './components/FatForm'\nimport FatTableLayout from './components/FatTableLayout'\nimport FatFormLayout from './components/FatFormLayout'\n\n// 导出类型\nexport * from './components/FatTable/types'\nexport * from './components/FatForm/types'\nexport * from './components/FatTableLayout/types'\nexport * from './components/FatFormLayout/types'\n\n// 导出组件\nexport { FatTable, FatForm, FatTableLayout, FatFormLayout }\nexport { default as i18n } from './i18n'\n\n// 导出工具函数\nexport * from './utils'\nexport * from './hooks'\n\n// 组件列表\nconst components = [\n FatTable,\n FatForm,\n FatTableLayout,\n FatFormLayout\n]\n\n// 安装函数\nconst install = (app: App) => {\n components.forEach(component => {\n const comp = component as any\n if (comp.install) {\n app.use(comp)\n } else if (comp.name) {\n app.component(comp.name, comp)\n }\n })\n \n // 安装 i18n\n app.use(i18n)\n}\n\n// 支持按需引入\nexport default {\n install,\n FatTable,\n FatForm,\n FatTableLayout,\n FatFormLayout\n}\n"],"names":["index","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_hoisted_2","_hoisted_3","_Fragment","_renderList","_normalizeStyle","_normalizeClass","_hoisted_4","_renderSlot","_hoisted_5","_createBlock","_resolveDynamicComponent","_hoisted_6","_toDisplayString","_unref","$slots","_hoisted_7","FatTable"],"mappings":";;AAAA,MAAA,OAAe;AAAA,EACb,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,EAAA;AAAA,EAEV,OAAO;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB,CAAC,MAAM,MAAM,MAAM,KAAK;AAAA,EAAA;AAAA,EAE3C,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,eAAe;AAAA,IACf,eAAe;AAAA,IACf,cAAc;AAAA,EAAA;AAElB;AC3BA,MAAA,OAAe;AAAA,EACb,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,KAAK;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,EAAA;AAAA,EAEV,OAAO;AAAA,IACL,OAAO;AAAA,IACP,UAAU;AAAA,IACV,MAAM;AAAA,IACN,MAAM;AAAA,IACN,iBAAiB,CAAC,MAAM,MAAM,MAAM,KAAK;AAAA,EAAA;AAAA,EAE3C,MAAM;AAAA,IACJ,UAAU;AAAA,IACV,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AAAA,UADJU,WAAyB,KAAA,QAAA,aAAA,CAAA,GAAA,QAAA,IAAA;AAAA,QAAA;;;;;;ACtB/B,cAAc,UAAU,CAAC,QAAa;AACpC,MAAI,UAAU,iBAAiB,aAAa;AAC9C;ACFO,MAAM,WAAW,MAAqB;AAC3C,QAAM,EAAE,EAAA,IAAM,QAAA;AACd,SAAO;AACT;ACHO,MAAM,OAAO,MAAqB;AACvC,QAAM,EAAE,EAAA,IAAM,QAAA;AACd,SAAO;AACT;ACmBA,MAAM,aAAa;AAAA,EACjBS;AAAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGA,MAAM,UAAU,CAAC,QAAa;AAC5B,aAAW,QAAQ,CAAA,cAAa;AAC9B,UAAM,OAAO;AACb,QAAI,KAAK,SAAS;AAChB,UAAI,IAAI,IAAI;AAAA,IACd,WAAW,KAAK,MAAM;AACpB,UAAI,UAAU,KAAK,MAAM,IAAI;AAAA,IAC/B;AAAA,EACF,CAAC;AAGD,MAAI,IAAI,IAAI;AACd;AAGA,MAAA,QAAe;AAAA,EACb;AAAA,EAAA,UACAA;AAAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
package/dist/style.css ADDED
@@ -0,0 +1 @@
1
+ .fat-table-wrapper{width:100%}.fat-table{width:100%;overflow:auto;border:1px solid #ebeef5;border-radius:4px;background-color:#fff}.fat-table__inner{width:100%;border-collapse:collapse;table-layout:fixed}.fat-table__header{background-color:#fafafa}.fat-table__header th{padding:12px;text-align:left;font-weight:500;color:#606266;border-bottom:1px solid #ebeef5;font-size:14px}.fat-table__body td{padding:12px;border-bottom:1px solid #ebeef5;color:#606266;font-size:14px}.fat-table__row{transition:background-color .25s}.fat-table__row:hover{background-color:#f5f7fa}.fat-table__row--stripe{background-color:#fafafa}.fat-table__row--stripe:hover{background-color:#f5f7fa}.fat-table__cell{display:flex;align-items:center;gap:8px}.fat-table__sort{display:flex;flex-direction:column;cursor:pointer;margin-left:4px}.fat-table__sort-icon{font-size:12px;color:#c0c4cc;line-height:1;transition:color .25s}.fat-table__sort-icon.active{color:#409eff}.fat-table__loading-cell,.fat-table__empty-cell{text-align:center;padding:40px 0;color:#909399}.fat-table__pagination{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding:0 12px}.fat-table__pagination-controls{display:flex;align-items:center;gap:8px}.fat-table__page-size-select{padding:4px 8px;border:1px solid #dcdfe6;border-radius:4px;outline:none;font-size:14px}.fat-table__pagination-btn{padding:6px 12px;border:1px solid #dcdfe6;border-radius:4px;background:#fff;cursor:pointer;transition:all .25s;font-size:14px;color:#606266}.fat-table__pagination-btn:hover:not(:disabled){color:#409eff;border-color:#409eff}.fat-table__pagination-btn:disabled{opacity:.5;cursor:not-allowed}.fat-table__pagination-text{color:#606266;font-size:14px}.fat-form{width:100%}.fat-form--horizontal .fat-form-item{flex-direction:row;align-items:flex-start}.fat-form--vertical .fat-form-item{flex-direction:column}.fat-form--inline .fat-form-item{display:inline-flex;margin-right:16px}.fat-form--disabled{opacity:.6;pointer-events:none}.fat-form--preview .fat-form-item__content{color:#606266}.fat-form__submitter{display:flex;gap:12px;margin-top:24px}.fat-form__submit-btn,.fat-form__reset-btn{padding:8px 16px;border-radius:4px;cursor:pointer;transition:all .25s;font-size:14px;border:1px solid transparent}.fat-form__submit-btn{background-color:#409eff;color:#fff;border-color:#409eff}.fat-form__submit-btn:hover:not(:disabled){background-color:#73b8ff;border-color:#73b8ff}.fat-form__submit-btn:disabled{opacity:.5;cursor:not-allowed}.fat-form__reset-btn{background-color:#fff;color:#606266;border-color:#dcdfe6}.fat-form__reset-btn:hover:not(:disabled){color:#409eff;border-color:#409eff}.fat-form__reset-btn:disabled{opacity:.5;cursor:not-allowed}.fat-form-item{display:flex;margin-bottom:18px}.fat-form-item--horizontal{flex-direction:row;align-items:flex-start}.fat-form-item--vertical{flex-direction:column}.fat-form-item__label{padding-right:12px;line-height:32px;color:#606266;font-size:14px;flex-shrink:0}.fat-form-item__required{color:#f56c6c;margin-right:4px}.fat-form-item__content{flex:1;position:relative}.fat-form-item__error{color:#f56c6c;font-size:12px;line-height:1;padding-top:4px}.fat-form-item--disabled{opacity:.6;pointer-events:none}.fat-table-layout{width:100%;display:flex;flex-direction:column;gap:16px}.fat-table-layout__header{display:flex;align-items:center;justify-content:space-between}.fat-table-layout__title{margin:0;font-size:18px;font-weight:500;color:#303133}.fat-table-layout__query{padding:16px;background-color:#fff;border-radius:4px;border:1px solid #ebeef5}.fat-table-layout__toolbar{display:flex;align-items:center;justify-content:space-between;padding:12px 0}.fat-table-layout__table{flex:1}.fat-table-layout__pagination{display:flex;justify-content:flex-end;padding:12px 0}.fat-form-layout{width:100%;display:flex;flex-direction:column;gap:24px}.fat-form-layout__header{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid #ebeef5}.fat-form-layout__header-left{display:flex;align-items:center;gap:16px}.fat-form-layout__back-btn{padding:4px 8px;background:transparent;border:none;cursor:pointer;color:#606266;font-size:14px;transition:color .25s}.fat-form-layout__back-btn:hover{color:#409eff}.fat-form-layout__title{margin:0;font-size:20px;font-weight:500;color:#303133}.fat-form-layout__content{flex:1}.fat-form-layout__footer{padding-top:16px;border-top:1px solid #ebeef5;display:flex;justify-content:flex-end;gap:12px}.fat-table-wrapper[data-v-1245c8df]{width:100%}.fat-table[data-v-1245c8df]{width:100%;overflow:auto;border:1px solid #ebeef5;border-radius:4px}.fat-table__inner[data-v-1245c8df]{width:100%;border-collapse:collapse;table-layout:fixed}.fat-table__header[data-v-1245c8df]{background-color:#fafafa}.fat-table__header th[data-v-1245c8df]{text-align:left;font-weight:500;color:#606266;border-bottom:1px solid #ebeef5;padding:12px}.fat-table__body td[data-v-1245c8df]{padding:12px;border-bottom:1px solid #ebeef5;color:#606266}.fat-table__row[data-v-1245c8df]{transition:background-color .25s}.fat-table__row[data-v-1245c8df]:hover{background-color:#f5f7fa}.fat-table__row--stripe[data-v-1245c8df]{background-color:#fafafa}.fat-table__row--stripe[data-v-1245c8df]:hover{background-color:#f5f7fa}.fat-table__cell[data-v-1245c8df]{display:flex;align-items:center;gap:8px}.fat-table__sort[data-v-1245c8df]{display:flex;flex-direction:column;cursor:pointer;margin-left:4px}.fat-table__sort-icon[data-v-1245c8df]{font-size:12px;color:#c0c4cc;line-height:1;transition:color .25s}.fat-table__sort-icon.active[data-v-1245c8df]{color:#409eff}.fat-table__loading-cell[data-v-1245c8df],.fat-table__empty-cell[data-v-1245c8df]{text-align:center;padding:40px 0;color:#909399}.fat-table__pagination[data-v-1245c8df]{display:flex;justify-content:space-between;align-items:center;margin-top:16px;padding:0 12px}.fat-table__pagination-controls[data-v-1245c8df]{display:flex;align-items:center;gap:8px}.fat-table__page-size-select[data-v-1245c8df]{padding:4px 8px;border:1px solid #dcdfe6;border-radius:4px;outline:none}.fat-table__pagination-btn[data-v-1245c8df]{padding:6px 12px;border:1px solid #dcdfe6;border-radius:4px;background:#fff;cursor:pointer;transition:all .25s}.fat-table__pagination-btn[data-v-1245c8df]:hover:not(:disabled){color:#409eff;border-color:#409eff}.fat-table__pagination-btn[data-v-1245c8df]:disabled{opacity:.5;cursor:not-allowed}.fat-table__pagination-text[data-v-1245c8df]{color:#606266;font-size:14px}.fat-form[data-v-13c5bb85]{width:100%}.fat-form--disabled[data-v-13c5bb85]{opacity:.6;pointer-events:none}.fat-form__submitter[data-v-13c5bb85]{display:flex;gap:12px;margin-top:24px}.fat-form__submit-btn[data-v-13c5bb85],.fat-form__reset-btn[data-v-13c5bb85]{padding:8px 16px;border-radius:4px;cursor:pointer;transition:all .25s;font-size:14px}.fat-form__submit-btn[data-v-13c5bb85]{background-color:#409eff;color:#fff;border:1px solid #409eff}.fat-form__submit-btn[data-v-13c5bb85]:hover:not(:disabled){background-color:#66b1ff;border-color:#66b1ff}.fat-form__submit-btn[data-v-13c5bb85]:disabled{opacity:.5;cursor:not-allowed}.fat-form__reset-btn[data-v-13c5bb85]{background-color:#fff;color:#606266;border:1px solid #dcdfe6}.fat-form__reset-btn[data-v-13c5bb85]:hover:not(:disabled){color:#409eff;border-color:#409eff}.fat-form__reset-btn[data-v-13c5bb85]:disabled{opacity:.5;cursor:not-allowed}.fat-form-item[data-v-2793b4e0]{display:flex;margin-bottom:18px}.fat-form-item--horizontal[data-v-2793b4e0]{flex-direction:row;align-items:flex-start}.fat-form-item--vertical[data-v-2793b4e0]{flex-direction:column}.fat-form-item__label[data-v-2793b4e0]{padding-right:12px;line-height:32px;color:#606266;font-size:14px;flex-shrink:0}.fat-form-item__required[data-v-2793b4e0]{color:#f56c6c;margin-right:4px}.fat-form-item__content[data-v-2793b4e0]{flex:1;position:relative}.fat-form-item__error[data-v-2793b4e0]{color:#f56c6c;font-size:12px;line-height:1;padding-top:4px}.fat-form-item--disabled[data-v-2793b4e0]{opacity:.6;pointer-events:none}.fat-table-layout[data-v-69de3a24]{width:100%;display:flex;flex-direction:column;gap:16px}.fat-table-layout__header[data-v-69de3a24]{display:flex;align-items:center;justify-content:space-between}.fat-table-layout__title[data-v-69de3a24]{margin:0;font-size:18px;font-weight:500;color:#303133}.fat-table-layout__query[data-v-69de3a24]{padding:16px;background-color:#fff;border-radius:4px;border:1px solid #ebeef5}.fat-table-layout__toolbar[data-v-69de3a24]{display:flex;align-items:center;justify-content:space-between;padding:12px 0}.fat-table-layout__table[data-v-69de3a24]{flex:1}.fat-table-layout__pagination[data-v-69de3a24]{display:flex;justify-content:flex-end;padding:12px 0}.fat-form-layout[data-v-4698d66e]{width:100%;display:flex;flex-direction:column;gap:24px}.fat-form-layout__header[data-v-4698d66e]{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid #ebeef5}.fat-form-layout__header-left[data-v-4698d66e]{display:flex;align-items:center;gap:16px}.fat-form-layout__back-btn[data-v-4698d66e]{padding:4px 8px;background:transparent;border:none;cursor:pointer;color:#606266;font-size:14px;transition:color .25s}.fat-form-layout__back-btn[data-v-4698d66e]:hover{color:#409eff}.fat-form-layout__title[data-v-4698d66e]{margin:0;font-size:20px;font-weight:500;color:#303133}.fat-form-layout__content[data-v-4698d66e]{flex:1}.fat-form-layout__footer[data-v-4698d66e]{padding-top:16px;border-top:1px solid #ebeef5;display:flex;justify-content:flex-end;gap:12px}
@@ -0,0 +1,5 @@
1
+ import { Composer } from 'vue-i18n';
2
+
3
+ export declare const useI18nT: () => Composer["t"];
4
+ export * from './types';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAExC,eAAO,MAAM,QAAQ,QAAO,QAAQ,CAAC,GAAG,CAGvC,CAAA;AAED,cAAc,SAAS,CAAA"}
@@ -0,0 +1,5 @@
1
+ import { Ref } from 'vue';
2
+
3
+ export type MaybeRef<T> = T | Ref<T>;
4
+ export type MaybeArray<T> = T | T[];
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;AACpC,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAA"}
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@alibarbar/components",
3
+ "version": "1.0.0",
4
+ "description": "业务组件库 - FatTable、FatForm、FatTableLayout、FatFormLayout",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "publishConfig": {
10
+ "access": "public"
11
+ },
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ },
17
+ "./style": "./dist/style.css"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "src/style",
22
+ "README.md"
23
+ ],
24
+ "sideEffects": [
25
+ "**/*.scss",
26
+ "**/*.css"
27
+ ],
28
+ "scripts": {
29
+ "dev": "vite",
30
+ "build": "vite build",
31
+ "build:check": "vue-tsc --noEmit && vite build",
32
+ "preview": "vite preview",
33
+ "type-check": "vue-tsc --noEmit",
34
+ "prepublishOnly": "pnpm build",
35
+ "release": "pnpm build && npm publish"
36
+ },
37
+ "keywords": [
38
+ "vue3",
39
+ "components",
40
+ "fat-table",
41
+ "fat-form",
42
+ "typescript"
43
+ ],
44
+ "author": "",
45
+ "license": "MIT",
46
+ "dependencies": {
47
+ "vue": "^3.4.0",
48
+ "vue-i18n": "^9.8.0"
49
+ },
50
+ "devDependencies": {
51
+ "@vitejs/plugin-vue": "^5.0.0",
52
+ "sass": "^1.69.0",
53
+ "typescript": "^5.3.0",
54
+ "vite": "^5.0.0",
55
+ "vite-plugin-dts": "^3.6.0",
56
+ "vue-tsc": "^1.8.27"
57
+ },
58
+ "peerDependencies": {
59
+ "vue": "^3.4.0"
60
+ }
61
+ }
@@ -0,0 +1,53 @@
1
+ .fat-form-layout {
2
+ width: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 24px;
6
+ }
7
+
8
+ .fat-form-layout__header {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ padding-bottom: 16px;
13
+ border-bottom: 1px solid $border-color-lighter;
14
+ }
15
+
16
+ .fat-form-layout__header-left {
17
+ display: flex;
18
+ align-items: center;
19
+ gap: 16px;
20
+ }
21
+
22
+ .fat-form-layout__back-btn {
23
+ padding: 4px 8px;
24
+ background: transparent;
25
+ border: none;
26
+ cursor: pointer;
27
+ color: $text-color-regular;
28
+ font-size: 14px;
29
+ transition: color 0.25s;
30
+ }
31
+
32
+ .fat-form-layout__back-btn:hover {
33
+ color: $primary-color;
34
+ }
35
+
36
+ .fat-form-layout__title {
37
+ margin: 0;
38
+ font-size: 20px;
39
+ font-weight: 500;
40
+ color: $text-color-primary;
41
+ }
42
+
43
+ .fat-form-layout__content {
44
+ flex: 1;
45
+ }
46
+
47
+ .fat-form-layout__footer {
48
+ padding-top: 16px;
49
+ border-top: 1px solid $border-color-lighter;
50
+ display: flex;
51
+ justify-content: flex-end;
52
+ gap: 12px;
53
+ }
@@ -0,0 +1,132 @@
1
+ .fat-form {
2
+ width: 100%;
3
+ }
4
+
5
+ .fat-form--horizontal {
6
+ .fat-form-item {
7
+ flex-direction: row;
8
+ align-items: flex-start;
9
+ }
10
+ }
11
+
12
+ .fat-form--vertical {
13
+ .fat-form-item {
14
+ flex-direction: column;
15
+ }
16
+ }
17
+
18
+ .fat-form--inline {
19
+ .fat-form-item {
20
+ display: inline-flex;
21
+ margin-right: 16px;
22
+ }
23
+ }
24
+
25
+ .fat-form--disabled {
26
+ opacity: 0.6;
27
+ pointer-events: none;
28
+ }
29
+
30
+ .fat-form--preview {
31
+ .fat-form-item__content {
32
+ color: $text-color-regular;
33
+ }
34
+ }
35
+
36
+ .fat-form__submitter {
37
+ display: flex;
38
+ gap: 12px;
39
+ margin-top: 24px;
40
+ }
41
+
42
+ .fat-form__submit-btn,
43
+ .fat-form__reset-btn {
44
+ padding: 8px 16px;
45
+ border-radius: $border-radius-base;
46
+ cursor: pointer;
47
+ transition: all 0.25s;
48
+ font-size: 14px;
49
+ border: 1px solid transparent;
50
+ }
51
+
52
+ .fat-form__submit-btn {
53
+ background-color: $primary-color;
54
+ color: #fff;
55
+ border-color: $primary-color;
56
+ }
57
+
58
+ .fat-form__submit-btn:hover:not(:disabled) {
59
+ background-color: lighten($primary-color, 10%);
60
+ border-color: lighten($primary-color, 10%);
61
+ }
62
+
63
+ .fat-form__submit-btn:disabled {
64
+ opacity: 0.5;
65
+ cursor: not-allowed;
66
+ }
67
+
68
+ .fat-form__reset-btn {
69
+ background-color: #fff;
70
+ color: $text-color-regular;
71
+ border-color: $border-color-base;
72
+ }
73
+
74
+ .fat-form__reset-btn:hover:not(:disabled) {
75
+ color: $primary-color;
76
+ border-color: $primary-color;
77
+ }
78
+
79
+ .fat-form__reset-btn:disabled {
80
+ opacity: 0.5;
81
+ cursor: not-allowed;
82
+ }
83
+
84
+ .fat-form-item {
85
+ display: flex;
86
+ margin-bottom: 18px;
87
+ }
88
+
89
+ .fat-form-item--horizontal {
90
+ flex-direction: row;
91
+ align-items: flex-start;
92
+ }
93
+
94
+ .fat-form-item--vertical {
95
+ flex-direction: column;
96
+ }
97
+
98
+ .fat-form-item__label {
99
+ padding-right: 12px;
100
+ line-height: 32px;
101
+ color: $text-color-regular;
102
+ font-size: 14px;
103
+ flex-shrink: 0;
104
+ }
105
+
106
+ .fat-form-item__required {
107
+ color: $danger-color;
108
+ margin-right: 4px;
109
+ }
110
+
111
+ .fat-form-item__content {
112
+ flex: 1;
113
+ position: relative;
114
+ }
115
+
116
+ .fat-form-item__error {
117
+ color: $danger-color;
118
+ font-size: 12px;
119
+ line-height: 1;
120
+ padding-top: 4px;
121
+ }
122
+
123
+ .fat-form-item--error {
124
+ .fat-form-item__content {
125
+ // 错误状态样式
126
+ }
127
+ }
128
+
129
+ .fat-form-item--disabled {
130
+ opacity: 0.6;
131
+ pointer-events: none;
132
+ }
@@ -0,0 +1,43 @@
1
+ .fat-table-layout {
2
+ width: 100%;
3
+ display: flex;
4
+ flex-direction: column;
5
+ gap: 16px;
6
+ }
7
+
8
+ .fat-table-layout__header {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ }
13
+
14
+ .fat-table-layout__title {
15
+ margin: 0;
16
+ font-size: 18px;
17
+ font-weight: 500;
18
+ color: $text-color-primary;
19
+ }
20
+
21
+ .fat-table-layout__query {
22
+ padding: 16px;
23
+ background-color: #fff;
24
+ border-radius: $border-radius-base;
25
+ border: 1px solid $border-color-lighter;
26
+ }
27
+
28
+ .fat-table-layout__toolbar {
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: space-between;
32
+ padding: 12px 0;
33
+ }
34
+
35
+ .fat-table-layout__table {
36
+ flex: 1;
37
+ }
38
+
39
+ .fat-table-layout__pagination {
40
+ display: flex;
41
+ justify-content: flex-end;
42
+ padding: 12px 0;
43
+ }
@@ -0,0 +1,132 @@
1
+ .fat-table-wrapper {
2
+ width: 100%;
3
+ }
4
+
5
+ .fat-table {
6
+ width: 100%;
7
+ overflow: auto;
8
+ border: 1px solid $border-color-lighter;
9
+ border-radius: $border-radius-base;
10
+ background-color: #fff;
11
+ }
12
+
13
+ .fat-table__inner {
14
+ width: 100%;
15
+ border-collapse: collapse;
16
+ table-layout: fixed;
17
+ }
18
+
19
+ .fat-table__header {
20
+ background-color: $background-color-light;
21
+ }
22
+
23
+ .fat-table__header th {
24
+ padding: 12px;
25
+ text-align: left;
26
+ font-weight: 500;
27
+ color: $text-color-regular;
28
+ border-bottom: 1px solid $border-color-lighter;
29
+ font-size: 14px;
30
+ }
31
+
32
+ .fat-table__body td {
33
+ padding: 12px;
34
+ border-bottom: 1px solid $border-color-lighter;
35
+ color: $text-color-regular;
36
+ font-size: 14px;
37
+ }
38
+
39
+ .fat-table__row {
40
+ transition: background-color 0.25s;
41
+ }
42
+
43
+ .fat-table__row:hover {
44
+ background-color: $background-color-base;
45
+ }
46
+
47
+ .fat-table__row--stripe {
48
+ background-color: $background-color-light;
49
+ }
50
+
51
+ .fat-table__row--stripe:hover {
52
+ background-color: $background-color-base;
53
+ }
54
+
55
+ .fat-table__cell {
56
+ display: flex;
57
+ align-items: center;
58
+ gap: 8px;
59
+ }
60
+
61
+ .fat-table__sort {
62
+ display: flex;
63
+ flex-direction: column;
64
+ cursor: pointer;
65
+ margin-left: 4px;
66
+ }
67
+
68
+ .fat-table__sort-icon {
69
+ font-size: 12px;
70
+ color: $text-color-placeholder;
71
+ line-height: 1;
72
+ transition: color 0.25s;
73
+ }
74
+
75
+ .fat-table__sort-icon.active {
76
+ color: $primary-color;
77
+ }
78
+
79
+ .fat-table__loading-cell,
80
+ .fat-table__empty-cell {
81
+ text-align: center;
82
+ padding: 40px 0;
83
+ color: $text-color-secondary;
84
+ }
85
+
86
+ .fat-table__pagination {
87
+ display: flex;
88
+ justify-content: space-between;
89
+ align-items: center;
90
+ margin-top: 16px;
91
+ padding: 0 12px;
92
+ }
93
+
94
+ .fat-table__pagination-controls {
95
+ display: flex;
96
+ align-items: center;
97
+ gap: 8px;
98
+ }
99
+
100
+ .fat-table__page-size-select {
101
+ padding: 4px 8px;
102
+ border: 1px solid $border-color-base;
103
+ border-radius: $border-radius-base;
104
+ outline: none;
105
+ font-size: 14px;
106
+ }
107
+
108
+ .fat-table__pagination-btn {
109
+ padding: 6px 12px;
110
+ border: 1px solid $border-color-base;
111
+ border-radius: $border-radius-base;
112
+ background: #fff;
113
+ cursor: pointer;
114
+ transition: all 0.25s;
115
+ font-size: 14px;
116
+ color: $text-color-regular;
117
+ }
118
+
119
+ .fat-table__pagination-btn:hover:not(:disabled) {
120
+ color: $primary-color;
121
+ border-color: $primary-color;
122
+ }
123
+
124
+ .fat-table__pagination-btn:disabled {
125
+ opacity: 0.5;
126
+ cursor: not-allowed;
127
+ }
128
+
129
+ .fat-table__pagination-text {
130
+ color: $text-color-regular;
131
+ font-size: 14px;
132
+ }
@@ -0,0 +1,14 @@
1
+ // 变量定义
2
+ @import './variables';
3
+
4
+ // FatTable 样式
5
+ @import './fat-table';
6
+
7
+ // FatForm 样式
8
+ @import './fat-form';
9
+
10
+ // FatTableLayout 样式
11
+ @import './fat-table-layout';
12
+
13
+ // FatFormLayout 样式
14
+ @import './fat-form-layout';
@@ -0,0 +1,23 @@
1
+ // 颜色变量
2
+ $primary-color: #409eff;
3
+ $success-color: #67c23a;
4
+ $warning-color: #e6a23c;
5
+ $danger-color: #f56c6c;
6
+ $info-color: #909399;
7
+
8
+ $text-color-primary: #303133;
9
+ $text-color-regular: #606266;
10
+ $text-color-secondary: #909399;
11
+ $text-color-placeholder: #c0c4cc;
12
+
13
+ $border-color-base: #dcdfe6;
14
+ $border-color-light: #e4e7ed;
15
+ $border-color-lighter: #ebeef5;
16
+ $border-color-extra-light: #f2f6fc;
17
+
18
+ $background-color-base: #f5f7fa;
19
+ $background-color-light: #fafafa;
20
+
21
+ // 尺寸变量
22
+ $border-radius-base: 4px;
23
+ $border-radius-small: 2px;