-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from zernonia/remove-vue-fragment
remove fragment-for-vue dependencies
- Loading branch information
Showing
4 changed files
with
13 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,32 @@ | ||
<script setup lang="ts"> | ||
import { computed } from "vue" | ||
import { Fragment } from "fragment-for-vue/vue3" | ||
import { computed } from "vue"; | ||
const baseWidth = 46 // todo: add magic numbers to a config json | ||
const baseWidth = 46; // todo: add magic numbers to a config json | ||
const props = defineProps({ | ||
format: { type: Object, required: true }, | ||
}) | ||
}); | ||
const columnStyle = computed(() => { | ||
const columns = Number((1 / props.format.column_ratio).toFixed(0)) | ||
const totalWidth = (columns - 1) * baseWidth | ||
const columns = Number((1 / props.format.column_ratio).toFixed(0)); | ||
const totalWidth = (columns - 1) * baseWidth; | ||
return { | ||
width: `calc((100% - ${totalWidth}px) * ${props.format.column_ratio})`, | ||
} | ||
}) | ||
}; | ||
}); | ||
const spacerStyle = computed(() => ({ width: `${baseWidth}px` })) | ||
const spacerStyle = computed(() => ({ width: `${baseWidth}px` })); | ||
</script> | ||
|
||
<script lang="ts"> | ||
export default { | ||
name: "NotionColumn", | ||
} | ||
}; | ||
</script> | ||
|
||
<template> | ||
<Fragment> | ||
<div class="notion-column" :style="columnStyle"> | ||
<slot /> | ||
</div> | ||
<div class="notion-spacer" :style="spacerStyle" /> | ||
</Fragment> | ||
<div class="notion-column" :style="columnStyle"> | ||
<slot /> | ||
</div> | ||
<div class="notion-spacer" :style="spacerStyle" /> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96cea06
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vue3-notion – ./demo/nuxt
vue3-notion-zernonia.vercel.app
vue3-notion-git-master-zernonia.vercel.app
vue3-notion.vercel.app
96cea06
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
vue3-notion-preview – ./
vue3-notion-preview-git-master-zernonia.vercel.app
vue3-notion-preview.vercel.app
vue3-notion-preview-zernonia.vercel.app