<template>
  <div class="JNPF-common-layout">
    <Form ref="Form" />
  </div>
</template>

<script>
import Form from './Form'
export default {
  name: 'zeroCode-webDesign',
  components: { Form },
  data() {
    return {}
  },
  created() {
    this.addOrUpdateHandle(this.$route.query.id, this.$route.query.type, this.$route.query.webType)
  },
  methods: {
    // 新增 / 修改
    addOrUpdateHandle(id, type, webType) {
      this.$nextTick(() => {
        this.$refs.Form.init(id, type, webType)
      })
    },
    // handleAdd(webType) {
    //   this.addOrUpdateHandle('', webType)
    // },
    // addOrUpdateHandle(id, webType) {
    //   this.formVisible = true
    //   this.$nextTick(() => {
    //     this.$refs.Form.init(this.categoryList, id, this.query.type, webType)
    //   })
    // },
    preview(id) {
      this.$router.push(`/previewModel?isPreview=1&id=${id}`)
    }
  }
}
</script>
