"use strict";(self.webpackChunknocobase=self.webpackChunknocobase||[]).push([[3781],{43781:function(p,o,e){e.r(o),e.d(o,{JSEditableFieldRunJSContext:function(){return n}});var a=e(72004),l=e.n(a),r=e(12444),s=e.n(r),_=e(31996),i=e.n(_),d=e(26037),u=e.n(d),m=e(67946),n=function(c){i()(t,c);var b=u()(t);function t(){return s()(this,t),b.apply(this,arguments)}return l()(t)}(m.Uo);n.define({label:"JSEditableField RunJS context",properties:{element:{description:"ElementProxy instance providing a safe DOM container for field rendering. In editable mode this container is typically a <span> element.",detail:"ElementProxy"},value:{description:"Current field value (read-only snapshot). In editable scenarios, prefer ctx.getValue()/ctx.setValue(v) for two-way binding.",detail:"any",examples:["const v = ctx.getValue?.() ?? ctx.value;",'ctx.setValue?.("new value");']},record:{description:"Current record data object (read-only). Available in forms that are bound to a record.",detail:"Record<string, any>"},form:{description:'Ant Design Form instance for reading/writing other fields. Example: ctx.form.getFieldValue("name")',detail:"FormInstance"},formValues:{description:"Snapshot of current form values (object). Prefer ctx.form.getFieldsValue() when you need the latest values.",detail:"Record<string, any>"},namePath:{description:"Field namePath in the form (array). Useful for advanced Form operations.",detail:"Array<string | number>"},disabled:"Whether the field is disabled (boolean).",readOnly:"Whether the field is read-only (boolean)."},methods:{getValue:{description:"Get current field value (recommended for editable custom fields).",detail:"() => any",completion:{insertText:"ctx.getValue?.()"}},setValue:{description:"Set current field value (two-way binding with the form).",detail:"(value: any) => void",completion:{insertText:"ctx.setValue?.(value)"},examples:["ctx.setValue?.(e.target.value);"]}}}),n.define({label:"JS \u53EF\u7F16\u8F91\u5B57\u6BB5 RunJS \u4E0A\u4E0B\u6587",properties:{element:{description:"ElementProxy\uFF0C\u5B57\u6BB5\u6E32\u67D3\u7684\u5B89\u5168\u5BB9\u5668\uFF08\u901A\u5E38\u4E3A <span> \u5BB9\u5668\uFF09\u3002",detail:"ElementProxy"},value:{description:"\u5B57\u6BB5\u5F53\u524D\u503C\uFF08\u53EA\u8BFB\u5FEB\u7167\uFF09\u3002\u53EF\u7F16\u8F91\u573A\u666F\u5EFA\u8BAE\u4F7F\u7528 ctx.getValue()/ctx.setValue(v) \u505A\u53CC\u5411\u7ED1\u5B9A\u3002",detail:"any",examples:["const v = ctx.getValue?.() ?? ctx.value;",'ctx.setValue?.("\u65B0\u503C");']},record:{description:"\u5F53\u524D\u8BB0\u5F55\u5BF9\u8C61\uFF08\u53EA\u8BFB\uFF1B\u8868\u5355\u7ED1\u5B9A\u8BB0\u5F55\u65F6\u53EF\u7528\uFF09\u3002",detail:"Record<string, any>"},form:{description:"Ant Design Form \u5B9E\u4F8B\uFF0C\u53EF\u8BFB\u5199\u5176\u5B83\u5B57\u6BB5\u3002",detail:"FormInstance"},formValues:{description:"\u5F53\u524D\u8868\u5355\u503C\u5FEB\u7167\uFF08\u5BF9\u8C61\uFF09\u3002\u9700\u8981\u6700\u65B0\u503C\u53EF\u7528 ctx.form.getFieldsValue()\u3002",detail:"Record<string, any>"},namePath:{description:"\u5B57\u6BB5\u5728\u8868\u5355\u4E2D\u7684 namePath\uFF08\u6570\u7EC4\uFF09\u3002",detail:"Array<string | number>"},disabled:"\u662F\u5426\u7981\u7528\uFF08boolean\uFF09",readOnly:"\u662F\u5426\u53EA\u8BFB\uFF08boolean\uFF09"},methods:{getValue:{description:"\u83B7\u53D6\u5B57\u6BB5\u5F53\u524D\u503C\uFF08\u53EF\u7F16\u8F91\u5B57\u6BB5\u63A8\u8350\u4F7F\u7528\uFF09\u3002",detail:"() => any",completion:{insertText:"ctx.getValue?.()"}},setValue:{description:"\u8BBE\u7F6E\u5B57\u6BB5\u5F53\u524D\u503C\uFF08\u4E0E\u8868\u5355\u53CC\u5411\u7ED1\u5B9A\uFF09\u3002",detail:"(value: any) => void",completion:{insertText:"ctx.setValue?.(value)"},examples:["ctx.setValue?.(e.target.value);"]}}},{locale:"zh-CN"})}}]);
