🔱: [client] sync upgrade with 7 commits [trident-sync]

build: publish success
chore:
perf: editable支持单元格插槽

https://github.com/fast-crud/fast-crud/issues/431
perf: 独立使用表单支持插槽

https://github.com/fast-crud/fast-crud/issues/435
perf: 表单支持左右插槽
chore:
This commit is contained in:
GitHub Actions Bot
2024-10-23 19:24:45 +00:00
parent 18c9c4a166
commit b928bb46c7
10 changed files with 75 additions and 12 deletions
@@ -65,7 +65,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
},
valueResolve({ value, row, key }) {
if (value != null) {
row[key] = value.unix();
row[key] = value.valueOf();
}
}
},
@@ -87,7 +87,7 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
},
valueResolve({ value, row, key }) {
if (value != null) {
row[key] = value.unix();
row[key] = value.valueOf();
}
}
},
@@ -221,6 +221,10 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
{ id: "sh", text: "上海" }
]
})
},
slot: {
title: "插槽",
type: "text"
}
}
}
@@ -8,6 +8,9 @@
<div class="more"><a target="_blank" href="http://fast-crud.docmirror.cn/api/crud-options/table.html#editable">文档</a></div>
</template>
<fs-crud ref="crudRef" v-bind="crudBinding">
<template #cell_slot="scope">
<span>{{ scope.row.slot }}=插槽显示</span>
</template>
<template #actionbar-right>
<!-- <fs-button class="ml-1" @click="addRow">添加行</fs-button>-->
<a-radio-group v-model:value="crudBinding.table.editable.enabled" class="ml-5">
@@ -38,7 +41,7 @@
<script lang="ts">
import { defineComponent, onMounted } from "vue";
import createCrudOptions from "./crud";
import {useFs, utils} from "@fast-crud/fast-crud";
import { useFs, utils } from "@fast-crud/fast-crud";
import { message } from "ant-design-vue";
export default defineComponent({
@@ -11,7 +11,8 @@ const list = [
{
radio: "2"
}
]
],
slot: "1"
},
{
radio: "2"
@@ -92,6 +92,18 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
context.close();
}
}
},
beforeClose: (context) => {
console.log("beforeClose", context);
},
onClosed(context) {
console.log("onClosed", context);
},
onOpen(context) {
console.log("onOpen", context);
},
onOpened(context) {
console.log("onOpened", context);
}
}
},
@@ -48,6 +48,9 @@ export default function ({}: CreateCrudOptionsProps): CreateCrudOptionsRet {
title: "日期",
type: "date"
},
slot: {
title: "插槽"
},
age: {
title: "jsx",
type: "text",
@@ -36,17 +36,41 @@
</a-card>
<a-card class="mt-10" title="打开表单对话框">
<a-button @click="openFormWrapper"> 打开表单对话框 </a-button>
<fs-form-wrapper ref="formWrapperRef" v-bind="formWrapperOptions" />
<fs-form-wrapper ref="formWrapperRef" v-bind="formWrapperOptions">
<template #form_slot="scope">
<a-input v-model:value="scope.form.slot">
<template #prefix>
<fs-icon icon="ion:search"></fs-icon>
</template>
</a-input>
</template>
</fs-form-wrapper>
</a-card>
<a-card class="mt-10" title="打开表单对话框(复用crudOptions">
<a-button @click="openFormWrapper2"> 打开表单对话框 </a-button>
<fs-form-wrapper ref="formWrapper2Ref" v-bind="formWrapper2Options" />
<fs-form-wrapper ref="formWrapper2Ref" v-bind="formWrapper2Options">
<template #form_slot="scope">
<a-input v-model:value="scope.form.slot">
<template #prefix>
<fs-icon icon="ion:search"></fs-icon>
</template>
</a-input>
</template>
</fs-form-wrapper>
</a-card>
<a-card class="mt-10" title="打开表单对话框【复用crudBinding】">
<a-button @click="openFormWrapper2"> 打开表单对话框 </a-button>
<fs-form-wrapper ref="formWrapperRef2" v-bind="formWrapperOptions2" />
<fs-form-wrapper ref="formWrapperRef2" v-bind="formWrapperOptions2">
<template #form_slot="scope">
<a-input v-model:value="scope.form.slot">
<template #prefix>
<fs-icon icon="ion:search"></fs-icon>
</template>
</a-input>
</template>
</fs-form-wrapper>
</a-card>
</a-col>
</a-row>
@@ -24,6 +24,13 @@
<a-alert type="warning" message="form-body-bottom 插槽" />
</template>
<template #form-body-left>
<a-alert type="warning" message="form-body-left 插槽" />
</template>
<template #form-body-right>
<a-alert type="warning" message="form-body-right 插槽" />
</template>
<template #form-footer-left>
<a-button type="danger">form-footer-left 插槽</a-button>
</template>