sun-biz 0.0.2-beta.17 → 0.0.2-beta.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1884,6 +1884,7 @@ function useColumnConfig(options) {
1884
1884
  width: "70vw",
1885
1885
  trigger: "hover",
1886
1886
  placement: "bottom",
1887
+ spellcheck: "false",
1887
1888
  "show-arrow": false
1888
1889
  }, {
1889
1890
  reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -3548,6 +3549,7 @@ const WB_NO = "wbNo";
3548
3549
  // 是否为检索模式
3549
3550
  const isInlineMode = "inline" === props.layoutMode;
3550
3551
  const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
3552
+ const itemRefs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
3551
3553
  const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(configData.value));
3552
3554
  const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
3553
3555
  const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getFormRules(configData.value));
@@ -3572,7 +3574,11 @@ const WB_NO = "wbNo";
3572
3574
  });
3573
3575
  __expose({
3574
3576
  ref: formRef,
3575
- model: formModel
3577
+ model: formModel,
3578
+ getItemRef: (name)=>{
3579
+ const index = configData.value.findIndex((item)=>item.name === name);
3580
+ return itemRefs.value[index];
3581
+ }
3576
3582
  });
3577
3583
  return (_ctx, _cache)=>{
3578
3584
  const _component_el_form_item = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-form-item");
@@ -3596,7 +3602,7 @@ const WB_NO = "wbNo";
3596
3602
  }, item.formItemProps || {}), [
3597
3603
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_form_item, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
3598
3604
  "label-width": item.labelWidth || '',
3599
- label: item.label,
3605
+ label: 'function' == typeof item.label ? '' : item.label,
3600
3606
  prop: item.name,
3601
3607
  class: item.className,
3602
3608
  style: isInlineMode ? 'margin-right: 16px;' : '',
@@ -3614,6 +3620,9 @@ const WB_NO = "wbNo";
3614
3620
  }, item.extraProps || {}, {
3615
3621
  modelValue: formModel[item.name],
3616
3622
  "onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
3623
+ ref_for: true,
3624
+ ref_key: "itemRefs",
3625
+ ref: itemRefs,
3617
3626
  onChange: (...args)=>{
3618
3627
  if (item?.onModelChange) item.onModelChange(args, formModel);
3619
3628
  if (item?.triggerModelChange) emit('model-change', formModel, item.name);
package/dist/index.js CHANGED
@@ -2188,6 +2188,7 @@ function useColumnConfig(options) {
2188
2188
  width: "70vw",
2189
2189
  trigger: "hover",
2190
2190
  placement: "bottom",
2191
+ spellcheck: "false",
2191
2192
  "show-arrow": false
2192
2193
  }, {
2193
2194
  reference: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
@@ -4180,6 +4181,7 @@ const WB_NO = "wbNo";
4180
4181
  // 是否为检索模式
4181
4182
  const isInlineMode = "inline" === props.layoutMode;
4182
4183
  const formRef = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4184
+ const itemRefs = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
4183
4185
  const formModel = (0, __WEBPACK_EXTERNAL_MODULE_vue__.reactive)(getFormModel(configData.value));
4184
4186
  const model = (0, __WEBPACK_EXTERNAL_MODULE_vue__.useModel)(__props, "modelValue");
4185
4187
  const rules = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getFormRules(configData.value));
@@ -4204,7 +4206,11 @@ const WB_NO = "wbNo";
4204
4206
  });
4205
4207
  __expose({
4206
4208
  ref: formRef,
4207
- model: formModel
4209
+ model: formModel,
4210
+ getItemRef: (name)=>{
4211
+ const index = configData.value.findIndex((item)=>item.name === name);
4212
+ return itemRefs.value[index];
4213
+ }
4208
4214
  });
4209
4215
  return (_ctx, _cache)=>{
4210
4216
  const _component_el_form_item = (0, __WEBPACK_EXTERNAL_MODULE_vue__.resolveComponent)("el-form-item");
@@ -4228,7 +4234,7 @@ const WB_NO = "wbNo";
4228
4234
  }, item.formItemProps || {}), [
4229
4235
  (0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)(_component_el_form_item, (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
4230
4236
  "label-width": item.labelWidth || '',
4231
- label: item.label,
4237
+ label: 'function' == typeof item.label ? '' : item.label,
4232
4238
  prop: item.name,
4233
4239
  class: item.className,
4234
4240
  style: isInlineMode ? 'margin-right: 16px;' : '',
@@ -4246,6 +4252,9 @@ const WB_NO = "wbNo";
4246
4252
  }, item.extraProps || {}, {
4247
4253
  modelValue: formModel[item.name],
4248
4254
  "onUpdate:modelValue": ($event)=>formModel[item.name] = $event,
4255
+ ref_for: true,
4256
+ ref_key: "itemRefs",
4257
+ ref: itemRefs,
4249
4258
  onChange: (...args)=>{
4250
4259
  if (item?.onModelChange) item.onModelChange(args, formModel);
4251
4260
  if (item?.triggerModelChange) emit('model-change', formModel, item.name);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sun-biz",
3
- "version": "0.0.2-beta.17",
3
+ "version": "0.0.2-beta.18",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {