mirror of
https://github.com/certd/certd.git
synced 2026-05-16 21:27:34 +08:00
🔱: [client] sync upgrade with 6 commits [trident-sync]
chore: perf: v-model editable-row示例 chore: mock tip fix: 修复行编辑模式下,render、conditionalRender无效的bug fix: 修复行编辑初始化无效的bug
This commit is contained in:
@@ -8,6 +8,19 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
|
||||
isMergeWhenUpdate: true,
|
||||
isAppendWhenAdd: true
|
||||
},
|
||||
//启用addRow按钮
|
||||
actionbar: { buttons: { add: { show: false }, addRow: { show: true } } },
|
||||
table: {
|
||||
remove: {
|
||||
//删除数据后不请求后台
|
||||
refreshTable: false
|
||||
},
|
||||
editable: {
|
||||
enabled: true,
|
||||
mode: "row",
|
||||
activeTrigger: false
|
||||
}
|
||||
},
|
||||
search: {
|
||||
show: false
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, reactive } from "vue";
|
||||
import { defineComponent, onMounted, reactive } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import FeatureLocalModelValueInput from "./local.vue";
|
||||
export default defineComponent({
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, watch } from "vue";
|
||||
import { defineComponent, onMounted, watch } from "vue";
|
||||
import createCrudOptions from "./crud";
|
||||
import { useFs } from "@fast-crud/fast-crud";
|
||||
|
||||
@@ -19,6 +19,10 @@ export default defineComponent({
|
||||
setup(props) {
|
||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions });
|
||||
|
||||
onMounted(() => {
|
||||
crudExpose.editable.enable({ mode: "row" });
|
||||
});
|
||||
|
||||
//通过导出modelValue, 可以导出成为一个input组件
|
||||
watch(
|
||||
() => {
|
||||
|
||||
Reference in New Issue
Block a user