Skip to content

Commit 9327133

Browse files
committed
Remove view-source component - closes #10
1 parent 7131b63 commit 9327133

File tree

6 files changed

+19
-51
lines changed

6 files changed

+19
-51
lines changed

demo/src/demo/base.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { sources } from './routes';
44
var prettyHtml = require('pretty');
55
var prettyTs = require('js-beautify').js_beautify;
66
var demoAreaTemplate: string = require('./layout.html');
7-
7+
import { ViewSource } from '../view-source';
88

99

1010

@@ -17,7 +17,11 @@ var demoAreaTemplate: string = require('./layout.html');
1717
* @class Demo
1818
* @extends {Vue}
1919
*/
20-
@Component()
20+
@Component({
21+
components: {
22+
'ui-view-source': ViewSource
23+
}
24+
})
2125
export abstract class Base extends Vue {
2226

2327
beforeCreate() {

src/components/etc/view-source/index.ts renamed to demo/src/view-source/index.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component, Prop } from 'vue-typed';
22
import * as Vue from 'vue'
3-
import { _ViewSourceBase } from './_base';
43

54

65
var hljs = require('highlight.js');
@@ -17,10 +16,21 @@ var hljs = require('highlight.js');
1716
@Component({
1817
template: '<pre><code :class="lang"><slot></slot></code></pre>'
1918
})
20-
export class ViewSource extends _ViewSourceBase {
21-
19+
export class ViewSource extends Vue {
20+
2221
isDemo: boolean = true
2322

23+
/**
24+
* Source code language. The list of supported language is available in th: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html. Fill with `nohighlight` to disable highlighting.
25+
*
26+
* @type {string}
27+
* @memberOf ViewSource
28+
*/
29+
@Prop({
30+
type: String
31+
})
32+
lang: string
33+
2434
@Prop()
2535
noHighlight: boolean = false
2636

doc/api.json

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -924,18 +924,5 @@
924924
}
925925
},
926926
"methods": {}
927-
},
928-
"view-source": {
929-
"module": "view-source",
930-
"base": {
931-
"Vue": "vue"
932-
},
933-
"props": {
934-
"lang": {
935-
"type": "string",
936-
"description": "Source code language. The list of supported language is available in th: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html. Fill with `nohighlight` to disable highlighting."
937-
}
938-
},
939-
"methods": {}
940927
}
941928
}

src/components/etc/view-source/_base.ts

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/components/etc/view-source/schema/props.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ export * from './menus/menu-vertical';
3030
export * from './menus/menu-horizontal';
3131
export * from './menus/menu-item';
3232
export * from './menus/menu-dropdown';
33-
export * from './etc/view-source';
3433
export * from './etc/header';
3534
export * from './etc/message';
3635

0 commit comments

Comments
 (0)