diff --git a/components.d.ts b/components.d.ts index 47ffc43..3959057 100644 --- a/components.d.ts +++ b/components.d.ts @@ -26,6 +26,7 @@ declare module 'vue' { NDrawer: typeof import('naive-ui')['NDrawer'] NDrawerContent: typeof import('naive-ui')['NDrawerContent'] NDropdown: typeof import('naive-ui')['NDropdown'] + NEmpty: typeof import('naive-ui')['NEmpty'] NFlex: typeof import('naive-ui')['NFlex'] NForm: typeof import('naive-ui')['NForm'] NFormItem: typeof import('naive-ui')['NFormItem'] diff --git a/components/buckets/info-bak.vue b/components/buckets/info-bak.vue new file mode 100644 index 0000000..62f25bf --- /dev/null +++ b/components/buckets/info-bak.vue @@ -0,0 +1,431 @@ + + + 桶信息详情 + + + + + 事件 + + + + + 副本 + + + + + 生命周期 + + + + + + + 匿名访问 + + + + + + + 删除 + + + 删除存储桶 + {{}} + ? + + + refresh()"> + + 刷新 + + + + + + + + + + + {{ bucketName }} + + + + + 访问策略 + + + + + {{ policyOptions.find(item => item.value === bucketPolicy)?.label }} + + + + 加密类型 + + + + + 禁用 + + + + + 副本 + + + + + 关闭 + + + + + + 标签 + + + + + + {{ tag.Key }}:{{ tag.Value }} + + + + + + 对象锁 + + + + + 关闭 + + + + + 版本控制 + + + + + + + + + + + + + + + + + + 确认 + 取消 + + + + + + + + + + + + + + + 确认 + 取消 + + + + + + + + + + + + + + + + 确认 + 取消 + + + + + + diff --git a/components/buckets/info.vue b/components/buckets/info.vue index a998b42..53c26a1 100644 --- a/components/buckets/info.vue +++ b/components/buckets/info.vue @@ -1,432 +1,22 @@ - - 桶信息详情 - - - - - 事件 - - - - - 副本 - - - - - 生命周期 - - - - - - - 匿名访问 - - - - - - - 删除 - - - 删除存储桶 - {{}} - ? - - - refresh()"> - - 刷新 - - - - - - - - - - - {{ bucketName }} - - - - - 访问策略 - - - - - {{ policyOptions.find(item => item.value === bucketPolicy)?.label }} - - - - 加密类型 - - - - - 禁用 - - - - - 副本 - - - - - 关闭 - - - - - - 标签 - - - - - - {{ tag.Key }}:{{ tag.Value }} - - - - - - 对象锁 - - - - - 关闭 - - - - - 版本控制 - - - - - - - - - - - - - - - - - - 确认 - 取消 - - - - - - - - - - - - - - - 确认 - 取消 - - - - - - - - - - - - - - - - 确认 - 取消 - - - + + + 《斯通纳》是美国作家约翰·威廉姆斯在 1965 年出版的小说。 + + - + + \ No newline at end of file diff --git a/components/buckets/replication.vue b/components/buckets/replication.vue new file mode 100644 index 0000000..e69de29 diff --git a/components/events/new-form.vue b/components/events/new-form.vue new file mode 100644 index 0000000..e69de29 diff --git a/components/json-editor.vue b/components/json-editor.vue index e19fa44..80e9d95 100644 --- a/components/json-editor.vue +++ b/components/json-editor.vue @@ -6,12 +6,13 @@ import "vanilla-jsoneditor/themes/jse-theme-dark.css" // const validator = createAjvValidator({ schema, schemaDefinitions }) const attrs = useAttrs() const model = defineModel() -const value = ref(model.value) +// const value = ref(model.value) // 监听model变化 watch( model, (newValue) => { - value.value = JSON.stringify(JSON.parse(newValue), null, 2) + model.value = JSON.stringify(JSON.parse(newValue), null, 2) + // value.value = JSON.stringify(JSON.parse(newValue), null, 2) }, { deep: true, @@ -26,7 +27,7 @@ watch( diff --git a/components/object/list.vue b/components/object/list.vue index 0b79964..d1b09d7 100644 --- a/components/object/list.vue +++ b/components/object/list.vue @@ -158,7 +158,12 @@ const columns: DataTableColumns = [ const keyInUri = row.Key; - return h(NuxtLink, { href: bucketPath(keyInUri), class: "block text-cyan-400" }, () => label); + return h(NuxtLink, { href: 'javascript:;' , class: "block text-cyan-400" ,onClick:(e:MouseEvent)=>{ + // 阻止跳转 + + e.preventDefault(); + alert(1) + }}, () => label); }, }, { key: "Size", title: "大小", render: (row: { Size: number }) => (row.Size ? formatBytes(row.Size) : "") }, diff --git a/config/navs.ts b/config/navs.ts index f5e3f41..1df930b 100644 --- a/config/navs.ts +++ b/config/navs.ts @@ -20,11 +20,21 @@ export default [ to: '/users', icon: 'ri:file-user-line' }, - // { - // label: '事件', - // to: '/events', - // icon: 'ri:broadcast-line', - // }, + { + label: '事件', + to: '/events', + icon: 'ri:broadcast-line', + }, + { + label: '副本', + to: '/replication', + icon: 'ri:file-copy-line', + }, + { + label: '生命周期', + to: '/lifecycle', + icon: 'ri:exchange-2-line', + }, // { // label: '配置', // to: '/configuration', diff --git a/pages/browser/index.vue b/pages/browser/index.vue index 7ffa476..7fa2c68 100644 --- a/pages/browser/index.vue +++ b/pages/browser/index.vue @@ -30,6 +30,7 @@ + @@ -37,7 +38,6 @@ import { Icon, NuxtLink } from '#components' import dayjs from 'dayjs' import { NButton, NSpace, type DataTableColumns } from 'naive-ui' -import { useRouter } from 'vue-router' const { listBuckets } = useBucket({}); const formVisible = ref(false); @@ -92,7 +92,7 @@ const columns: DataTableColumns = [ { size: 'small', secondary: true, - onClick: () => handleRowClick(row), + onClick: (e) => handleRowClick(row,e), }, { default: () => '', @@ -126,11 +126,10 @@ const filteredData = computed(() => { ); }); -const router = useRouter(); -const handleRowClick = (row: RowData) => { - router.push({ - path: `/buckets/${encodeURIComponent(row.Name)}`, - }); +const infoRef = ref(); +const handleRowClick = (row: RowData,e: Event) => { + e.stopPropagation(); + infoRef.value.openDrawer(row.Name); }; const handleFormClosed = (show: boolean) => { formVisible.value = show; diff --git a/pages/events/index.vue b/pages/events/index.vue new file mode 100644 index 0000000..27f4b54 --- /dev/null +++ b/pages/events/index.vue @@ -0,0 +1,139 @@ + + + + + 事件 + + + + + + + + + + + + (formVisible = true)"> + + 添加订阅事件 + + + + 刷新 + + + + + + + + + + + + + + diff --git a/pages/lifecycle/index.vue b/pages/lifecycle/index.vue new file mode 100644 index 0000000..b85bdbf --- /dev/null +++ b/pages/lifecycle/index.vue @@ -0,0 +1,136 @@ + + + + + 生命周期 + + + + + + + + + + + + (formVisible = true)"> + + 添加生命周期规则 + + + + 刷新 + + + + + + + + + + + diff --git a/pages/replication/index.vue b/pages/replication/index.vue new file mode 100644 index 0000000..a42cef3 --- /dev/null +++ b/pages/replication/index.vue @@ -0,0 +1,139 @@ + + + + + 桶复制 + + + + + + + + + + + + (formVisible = true)"> + + 添加副本规则 + + + + 刷新 + + + + + + + + + + + + + +