Skip to content

Commit

Permalink
docs: replace withBase with BASE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyuanchen committed Apr 23, 2024
1 parent 23bfd85 commit b8c8a51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
5 changes: 3 additions & 2 deletions docs/.vitepress/components/CropperCanvasToNativeCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@

<script lang="ts">
import type CropperCanvas from '@cropper/element-canvas';
import { withBase } from 'vitepress';
const { BASE_URL } = import.meta.env;
export default {
name: 'CropperCanvasToNativeCanvas',
data() {
return {
src: withBase('picture.jpg'),
src: `${BASE_URL}picture.jpg`,
};
},
methods: {
Expand Down
5 changes: 3 additions & 2 deletions docs/.vitepress/components/CropperExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
</template>

<script lang="ts">
import { withBase } from 'vitepress';
import Cropper from 'cropperjs';
const { BASE_URL } = import.meta.env;
export default {
name: 'CropperExample',
data() {
return {
src: withBase('picture.jpg'),
src: `${BASE_URL}picture.jpg`,
};
},
mounted(): void {
Expand Down
5 changes: 3 additions & 2 deletions docs/.vitepress/components/CropperPlayground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1663,11 +1663,12 @@
</template>

<script lang="ts">
import { withBase } from 'vitepress';
import type CropperCanvas from '@cropper/element-canvas';
import type CropperSelection from '@cropper/element-selection';
import ColorInput from './ColorInput.vue';
const { BASE_URL } = import.meta.env;
export default {
name: 'CropperPlayground',
components: {
Expand All @@ -1691,7 +1692,7 @@ export default {
scalable: true,
skewable: true,
translatable: true,
src: withBase('picture.jpg'),
src: `${BASE_URL}picture.jpg`,
alt: 'The image to crop',
},
shade: {
Expand Down
5 changes: 3 additions & 2 deletions docs/.vitepress/components/CropperSelectionToNativeCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@

<script lang="ts">
import type CropperCanvas from '@cropper/element-canvas';
import { withBase } from 'vitepress';
const { BASE_URL } = import.meta.env;
export default {
name: 'CropperSelectionToNativeCanvas',
data() {
return {
src: withBase('picture.jpg'),
src: `${BASE_URL}picture.jpg`,
};
},
methods: {
Expand Down

0 comments on commit b8c8a51

Please sign in to comment.