jingrow-ui/src/components/Resource.vue
jingrow c7bac1a7a0
Some checks failed
Publish on NPM / publish (push) Has been cancelled
Build and Deploy Storybook / build (push) Has been cancelled
Tests / test (push) Has been cancelled
initial commit
2025-10-24 00:40:30 +08:00

22 lines
519 B
Vue

<script>
export default {
name: 'Resource',
props: ['options'],
resources: {
resource() {
return this.options
},
},
render() {
return this.$slots.default({
resource: this.$resources.resource,
data: this.$resources.resource.data,
error: this.$resources.resource.error,
loading: this.$resources.resource.loading,
fetch: (params) => this.$resources.resource.fetch(params),
submit: (params) => this.$resources.resource.submit(params),
})
},
}
</script>