refactor: init new state for body

This commit is contained in:
liyasthomas
2021-07-23 00:07:39 +05:30
parent 8597c04ff1
commit f694f1ad36
14 changed files with 336 additions and 166 deletions

View File

@@ -104,7 +104,7 @@
@click.native="toggleActive(index, param)"
/>
</div>
<div v-if="contentType === 'multipart/form-data'">
<div>
<label for="attachment" class="p-0">
<ButtonSecondary
class="w-full"
@@ -133,10 +133,15 @@
</AppSection>
</template>
<script>
export default {
props: {
bodyParams: { type: Array, default: () => [] },
<script lang="ts">
import { defineComponent, toRef } from "@nuxtjs/composition-api"
import { useRESTRequestBody } from "~/newstore/RESTSession"
export default defineComponent({
setup() {
return {
bodyParams: toRef(useRESTRequestBody(), "body"),
}
},
computed: {
contentType() {
@@ -249,7 +254,7 @@ export default {
})
},
},
}
})
</script>
<style scoped lang="scss">