use-avue
v0.0.7
Published
例子: ```js import { useCrud } from 'use-avue' import type { CrudOptionType } from 'use-avue' // 所有选项 import { getListApi,submitApi,removeApi } from '@/api/xxx' const {crudDataList, crudParams, crudLoading, crudPage, onEvent, bindAttr} = useCrud({ httpLis
Downloads
20
Readme
例子:
import { useCrud } from 'use-avue'
import type { CrudOptionType } from 'use-avue' // 所有选项
import { getListApi,submitApi,removeApi } from '@/api/xxx'
const {crudDataList, crudParams, crudLoading, crudPage, onEvent, bindAttr} = useCrud({
httpListApi: getListApi, // 搜索接口
httpAddApi: submitApi,// 添加接口
httpUpdateApi: submitApi,// 更新接口
httpDelApi: removeApi // 删除接口
})
bindAttr.value.option = {
height: 'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
dialogWidth: "65%",
labelWidth: 130,
menuWidth: 250,
index: true,
viewBtn: true,
selection: true,
dialogClickModal: false,
columnBtn: false,
column: [
//...
]
}
<avue-crud v-bind="bindAttr"
v-on="onEvent"
v-model="crudForm"
v-model:page="crudPage"
>
</avue-crud>