mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
339 B
23 lines
339 B
6 years ago
|
<pre>{JSON.stringify(props)}</pre>
|
||
|
<script>
|
||
|
export default {
|
||
|
data: () => ({
|
||
|
unwanted: 1,
|
||
|
wanted: 2
|
||
|
}),
|
||
|
|
||
|
helpers: {
|
||
|
// prevent this being mixed in with data
|
||
|
JSON
|
||
|
},
|
||
|
|
||
|
computed: {
|
||
|
props: (state) => {
|
||
|
var result = Object.assign({}, state);
|
||
|
delete result.unwanted;
|
||
|
return result;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|