diff --git a/src/components/common-table/common-table-column.vue b/src/components/common-table/common-table-column.vue index ff60a6a..68e7f28 100644 --- a/src/components/common-table/common-table-column.vue +++ b/src/components/common-table/common-table-column.vue @@ -10,6 +10,10 @@ * @property {string} slot 自定义插槽 * @property [ButtonProps] buttons 自定义按钮 * @property {Object} attrs 其他属性 + * @property {string} link 链接地址 + * @property {Object} linkAttrs 链接配置 + * @method click 点击事件 + * @method formatter 格式化 */ /** * 配置信息 @@ -22,6 +26,9 @@ const props = defineProps({ type: Object, required: true }, + /** + * @type {'large'|'small'|'default'} + */ buttonSize: { type: String, default: 'small' @@ -37,13 +44,24 @@ const props = defineProps({ :property="column.property" :width="column.width" v-bind="column.attrs" + :formatter="column.formatter" > diff --git a/src/components/common-table/index.vue b/src/components/common-table/index.vue index d7650dc..986190f 100644 --- a/src/components/common-table/index.vue +++ b/src/components/common-table/index.vue @@ -67,7 +67,10 @@ const props = defineProps({ } } }) - +/** + * + * @type {ComputedRef<[CommonTableColumn]>} + */ const calcColumns = computed(() => { let _columns = props.columns if (props.buttons.length || props.buttonsSlot) { @@ -102,8 +105,10 @@ const calcColumns = computed(() => { #default="scope" > diff --git a/src/components/common-tabs-view/tabs-view-item.vue b/src/components/common-tabs-view/tabs-view-item.vue index 5e9d7fe..ccb6b4e 100644 --- a/src/components/common-tabs-view/tabs-view-item.vue +++ b/src/components/common-tabs-view/tabs-view-item.vue @@ -25,6 +25,16 @@ const menuName = computed(() => { const menuInfo = computed(() => { return props.tabItem.path === '/' ? { icon: 'HomeFilled' } : useMenuInfo(props.tabItem) }) + +const menuIcon = computed(() => { + if (menuInfo.value && menuInfo.value.icon) { + return menuInfo.value.icon + } + if (props.tabItem.meta && props.tabItem.meta.icon) { + return props.tabItem.meta.icon + } + return null +})