mirror of
https://github.com/sveltejs/svelte.git
synced 2024-12-01 17:30:59 +01:00
19 lines
308 B
HTML
19 lines
308 B
HTML
<script>
|
|
export default {
|
|
methods: {
|
|
foo ( bar ) {
|
|
console.log( bar );
|
|
}
|
|
},
|
|
setup: (Component) => {
|
|
Component.SOME_CONSTANT = 42;
|
|
Component.factory = function (target) {
|
|
return new Component({
|
|
target: target
|
|
});
|
|
}
|
|
Component.prototype.foo( 'baz' );
|
|
}
|
|
};
|
|
</script>
|