<template>
  <div>
    <el-form-item label-width="0">
      <el-divider class="custom-divider-margin-top">请求访问设置</el-divider>
    </el-form-item>
    <el-form-item label="数据返回类型">
      <el-select v-model="optionModel.accessReturnType">
        <el-option value="1" label="集合List"></el-option>
        <el-option value="2" label="分页集合数据"></el-option><!--
        <el-option :value="3" label="单条数据"></el-option>-->
      </el-select>
    </el-form-item>
<!--    <el-form-item label="启用表单脚本">
      <el-switch v-model="optionModel.formScriptEnabled"></el-switch>
    </el-form-item>-->
    <template>
      <el-form-item label="表单脚本编码">
        <el-input v-model="optionModel.formScriptCode" clearable></el-input>
      </el-form-item>
      <el-form-item label="查询参数">
        <a href="javascript:void(0);" class="a-link link-oneLind"
           @click="editEventHandler('formScriptParam', ['dataId', 'formCode'])">
          <span>{{ optionModel.formScriptParam }}</span>
          <i class="el-icon-edit"></i>
        </a>
      </el-form-item>
      <el-form-item label="自定义回调">
        <a href="javascript:void(0);" class="a-link link-oneLind"
           @click="editEventHandler('formScriptCallback', ['dataId', 'formCode','rows'])">
          <span>{{ optionModel.formScriptCallback }}</span>
          <i class="el-icon-edit"></i>
        </a>
      </el-form-item>
    </template>
  </div>
</template>

<script>
import i18n from "../../../../../../components/xform/utils/i18n"
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin"

export default {
  name: "accessUrl-editor",
  mixins: [i18n, eventMixin],
  props: {
    designer: Object,
    selectedWidget: Object,
    optionModel: Object,
    scriptConfig: Object,
    title: {
      type: String,
      default: () => "请求访问设置"
    },
    isFormSetting: {
      type: Boolean,
      default: () => false
    },
    accessParamArguments: {
      type: Array,
      default: () => []
    },

  },
  components: {}
}
</script>

<style scoped>

</style>
