Skip to content

Commit 1ed6b84

Browse files
Update vue-code-block usage
1 parent f37e630 commit 1ed6b84

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/main.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import '@/libraries/fontawesome';
22
import App from './App.vue';
3-
import CodeBlock from '@wdns/vue-code-block';
3+
import { createVCodeBlock } from '@wdns/vue-code-block';
44
import { createApp } from 'vue';
55
import { createPinia } from 'pinia';
66
import { registerPlugins } from './plugins';
@@ -10,7 +10,8 @@ import { VColorField } from './index';
1010

1111
const app = createApp(App);
1212

13-
app.component('CodeBlock', CodeBlock);
13+
app.use(createVCodeBlock());
14+
1415
app.use(createPinia());
1516
app.component('font-awesome-icon', FontAwesomeIcon);
1617
app.component('FaIcon', FontAwesomeIcon);

src/playground/configs/playground.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import '@/libraries/fontawesome';
22
import PlaygroundApp from './PlaygroundApp.vue';
3-
import CodeBlock from '@wdns/vue-code-block';
43
import { createApp } from 'vue';
54
import { createPinia } from 'pinia';
65
import { registerPlugins } from '../../plugins';
76
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
87
import VColorField from '../../index';
98

9+
1010
const app = createApp(PlaygroundApp);
11-
app.component('CodeBlock', CodeBlock);
11+
1212
app.use(createPinia());
1313
app.component('font-awesome-icon', FontAwesomeIcon);
1414
app.component('FaIcon', FontAwesomeIcon);

0 commit comments

Comments
 (0)