feat: 管理端公账支付与确认、锁店遮罩及表单提交修复
新增公账账单/到账确认页与全局锁店组件;系统配置补公账参数面板; 统一弹窗 onConfirm 校验提交,并完善订单详情与门店相关交互。
This commit is contained in:
@@ -152,12 +152,15 @@ const withDefaultPlaceholder = <T extends Component>(
|
||||
return defineComponent({
|
||||
name: (component as any).name,
|
||||
inheritAttrs: false,
|
||||
setup: (props: any, { attrs, expose, slots }) => {
|
||||
const placeholder =
|
||||
props?.placeholder ||
|
||||
attrs?.placeholder ||
|
||||
$t(`ui.placeholder.${type}`);
|
||||
// 透传组件暴露的方法
|
||||
// 必须声明 value:inheritAttrs:false 时若只靠 attrs 转发,异步 Input/Select
|
||||
// 收不到 v-model,表现是能打字但表单仍是 defaultValue(查询参数一直为空)
|
||||
props: {
|
||||
placeholder: { type: String, default: undefined },
|
||||
value: { default: undefined },
|
||||
},
|
||||
emits: ['update:value'],
|
||||
setup: (props, { attrs, emit, expose, slots }) => {
|
||||
// 透传内部组件暴露的方法(如 focus),给表单 autofocus 等使用
|
||||
const innerRef = ref();
|
||||
expose(
|
||||
new Proxy(
|
||||
@@ -168,12 +171,24 @@ const withDefaultPlaceholder = <T extends Component>(
|
||||
},
|
||||
),
|
||||
);
|
||||
return () =>
|
||||
h(
|
||||
return () => {
|
||||
const placeholder =
|
||||
props.placeholder ||
|
||||
(attrs.placeholder as string | undefined) ||
|
||||
$t(`ui.placeholder.${type}`);
|
||||
return h(
|
||||
component,
|
||||
{ ...componentProps, placeholder, ...props, ...attrs, ref: innerRef },
|
||||
{
|
||||
...componentProps,
|
||||
...attrs,
|
||||
placeholder,
|
||||
value: props.value,
|
||||
'onUpdate:value': (val: unknown) => emit('update:value', val),
|
||||
ref: innerRef,
|
||||
},
|
||||
slots,
|
||||
);
|
||||
};
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user