提交 d0e2b16b 编写于 作者: jlj05024111@163.com's avatar jlj05024111@163.com

feat: 更新下拉列表支持DROPDOWN_100类型,表单多数据支持通过权限配置控制新增,删除按钮的显隐

上级 0faf9c08
...@@ -106,6 +106,9 @@ export const IBizDropdown = defineComponent({ ...@@ -106,6 +106,9 @@ export const IBizDropdown = defineComponent({
<div <div
class={[ class={[
this.ns.b(), this.ns.b(),
this.c.model.editorType === 'DROPDOWNLIST_100'
? this.ns.m('width_100')
: '',
this.disabled ? this.ns.m('disabled') : '', this.disabled ? this.ns.m('disabled') : '',
this.readonly ? this.ns.m('readonly') : '', this.readonly ? this.ns.m('readonly') : '',
]} ]}
......
...@@ -59,9 +59,8 @@ export const FormMDCtrl = defineComponent({ ...@@ -59,9 +59,8 @@ export const FormMDCtrl = defineComponent({
}; };
if (this.modelData.mdCtrlType === 'REPEATER') { if (this.modelData.mdCtrlType === 'REPEATER') {
formProps.simpleDataIndex = index; formProps.simpleDataIndex = index;
} else {
formProps.enableAutoSave = true;
} }
formProps.enableAutoSave = this.c.enableUpdate;
const formEmits: IData = {}; const formEmits: IData = {};
if (this.modelData.mdCtrlType === 'REPEATER') { if (this.modelData.mdCtrlType === 'REPEATER') {
formEmits.neuronInit = this.c.onNeuronInit(data.srfkey); formEmits.neuronInit = this.c.onNeuronInit(data.srfkey);
...@@ -76,6 +75,7 @@ export const FormMDCtrl = defineComponent({ ...@@ -76,6 +75,7 @@ export const FormMDCtrl = defineComponent({
return ( return (
<div class={this.ns.b('form-content')} key={data.srfkey}> <div class={this.ns.b('form-content')} key={data.srfkey}>
{formComponent} {formComponent}
{this.c.enableDelete && (
<div class={this.ns.b('btn')}> <div class={this.ns.b('btn')}>
<i-button <i-button
class={this.ns.b('remove-btn')} class={this.ns.b('remove-btn')}
...@@ -85,6 +85,7 @@ export const FormMDCtrl = defineComponent({ ...@@ -85,6 +85,7 @@ export const FormMDCtrl = defineComponent({
删除 删除
</i-button> </i-button>
</div> </div>
)}
</div> </div>
); );
}) })
...@@ -99,6 +100,7 @@ export const FormMDCtrl = defineComponent({ ...@@ -99,6 +100,7 @@ export const FormMDCtrl = defineComponent({
<span class={this.ns.b('caption')}> <span class={this.ns.b('caption')}>
{this.modelData.source.caption} {this.modelData.source.caption}
</span> </span>
{this.c.enableCreate && (
<i-button <i-button
class={this.ns.b('add-btn')} class={this.ns.b('add-btn')}
type='text' type='text'
...@@ -106,6 +108,7 @@ export const FormMDCtrl = defineComponent({ ...@@ -106,6 +108,7 @@ export const FormMDCtrl = defineComponent({
> >
添加 添加
</i-button> </i-button>
)}
</div>, </div>,
renderFormContent(), renderFormContent(),
]} ]}
......
...@@ -43,6 +43,7 @@ export function presetEditorProvider(): void { ...@@ -43,6 +43,7 @@ export function presetEditorProvider(): void {
// 下拉列表 // 下拉列表
const dropDownListProvider = new DropDownListEditorProvider(); const dropDownListProvider = new DropDownListEditorProvider();
editorRegister.register('DROPDOWNLIST', dropDownListProvider); editorRegister.register('DROPDOWNLIST', dropDownListProvider);
editorRegister.register('DROPDOWNLIST_100', dropDownListProvider);
editorRegister.register('MDROPDOWNLIST', dropDownListProvider); editorRegister.register('MDROPDOWNLIST', dropDownListProvider);
// 日期选择器 // 日期选择器
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册