diff --git a/dev/serve.vue b/dev/serve.vue
index 19227b6..1f902ff 100644
--- a/dev/serve.vue
+++ b/dev/serve.vue
@@ -22,6 +22,7 @@ export default {
async created() {
// react-notion tester: 2e22de6b770e4166be301490f6ffd420
// equation tester: 2a1d5226d68246deba627012081693f9
+ // table tester: bd1de400a8b349dc824f4f00e61d0797
// todo tester: 235057194b954a60ace89c052a65d102
this.blockMap = await getPageBlocks("2e22de6b770e4166be301490f6ffd420");
},
diff --git a/src/blocks/helpers/table-row.vue b/src/blocks/helpers/table-row.vue
deleted file mode 100644
index 79b0991..0000000
--- a/src/blocks/helpers/table-row.vue
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
- |
-
-
-
-
diff --git a/src/blocks/table-row.vue b/src/blocks/table-row.vue
new file mode 100644
index 0000000..4fd92c4
--- /dev/null
+++ b/src/blocks/table-row.vue
@@ -0,0 +1,51 @@
+
+
+
+
+ |
+
+
+
+
diff --git a/src/blocks/table.vue b/src/blocks/table.vue
index f80a911..0780b9c 100644
--- a/src/blocks/table.vue
+++ b/src/blocks/table.vue
@@ -2,41 +2,17 @@
diff --git a/src/components/block.vue b/src/components/block.vue
index f385b31..5113ca4 100644
--- a/src/components/block.vue
+++ b/src/components/block.vue
@@ -34,7 +34,8 @@
v-else-if="isType(['image', 'embed', 'figma', 'video', 'audio'])"
v-bind="pass"
/>
-
+
+
todo: {{ type }}
@@ -50,16 +51,17 @@ import NotionBookmark from "@/blocks/bookmark";
import NotionCallout from "@/blocks/callout";
import NotionCode from "@/blocks/code";
import NotionColumn from "@/blocks/column";
+import NotionEquation from "@/blocks/equation";
import NotionFigure from "@/blocks/helpers/figure";
+import NotionHeader from "@/blocks/header";
import NotionList from "@/blocks/list";
import NotionPage from "@/blocks/page";
-import NotionHeader from "@/blocks/header";
-import NotionText from "@/blocks/text";
-import NotionToggle from "@/blocks/toggle";
import NotionQuote from "@/blocks/quote";
-import NotionEquation from "@/blocks/equation";
-import NotionTodo from "@/blocks/todo";
import NotionTable from "@/blocks/table";
+import NotionTableRow from "@/blocks/table-row";
+import NotionText from "@/blocks/text";
+import NotionTodo from "@/blocks/todo";
+import NotionToggle from "@/blocks/toggle";
export default {
extends: Blockable,
@@ -69,16 +71,17 @@ export default {
NotionCallout,
NotionCode,
NotionColumn,
+ NotionEquation,
NotionFigure,
+ NotionHeader,
NotionList,
NotionPage,
- NotionHeader,
- NotionText,
- NotionToggle,
NotionQuote,
NotionTable,
- NotionEquation,
+ NotionTableRow,
+ NotionText,
NotionTodo,
+ NotionToggle,
},
};
diff --git a/src/components/notion-renderer.vue b/src/components/notion-renderer.vue
index 8c7bbeb..6eadd7e 100644
--- a/src/components/notion-renderer.vue
+++ b/src/components/notion-renderer.vue
@@ -1,11 +1,12 @@
@@ -25,6 +26,7 @@ export default {
props: {
blockMap: [Object],
contentId: String,
+ contentIndex: { type: Number, default: 0 },
fullPage: { type: Boolean, default: false },
hideList: { type: Array, default: () => [] },
level: { type: Number, default: 0 },
diff --git a/src/lib/blockable.js b/src/lib/blockable.js
index 8acdd61..460997e 100644
--- a/src/lib/blockable.js
+++ b/src/lib/blockable.js
@@ -3,6 +3,7 @@ import { getTextContent } from "@/lib/utils";
export const blockProps = {
blockMap: { type: Object, required: true },
contentId: { type: String, required: false },
+ contentIndex: { type: Number, default: 0 },
embedAllow: { type: String, default: "fullscreen" },
fullPage: { type: Boolean, default: false },
hideList: { type: Array, default: () => [] },
@@ -23,6 +24,7 @@ export const blockComputed = {
return {
blockMap: this.blockMap,
contentId: this.contentId,
+ contentIndex: this.contentIndex,
embedAllow: this.embedAllow,
fullPage: this.fullPage,
hideList: this.hideList,
@@ -84,6 +86,9 @@ export const blockComputed = {
hasPageLinkOptions() {
return this.pageLinkOptions?.component && this.pageLinkOptions?.href;
},
+ parent() {
+ return this.blockMap[this.value?.parent_id];
+ },
};
export default {
diff --git a/src/styles.css b/src/styles.css
index 0dc548d..c79e30e 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -714,3 +714,8 @@ img.notion-nav-icon {
font-size: 14px;
line-height: 20px;
}
+
+.notion-simple-table-header {
+ background: rgb(247, 246, 243);
+ font-weight: 500;
+}