Commit c82f7fb6 by linjinhong

修改bug

parent 3d2cca41
**Table 属性 (Props)** **Table 属性 (Props)**
| 参数 | 说明 | 类型 | 默认值 | | 参数 | 说明 | 类型 | 默认值 |
| :-------------: | :------------: | :-----------: | :----: | | :-------------: | :----------------------------: | :-----------: | :----: |
| config | 表格列配置 | TableColumn[] | [] | | config | 表格列配置 | TableColumn[] | [] |
| tableEditConfig | 表格编辑配置 | Object | {} | | tableEditConfig | 表格编辑配置 | Object | {} |
| modelValue | 表格数据 | Object[] | [] | | modelValue | 表格数据 | Object[] | [] |
| getTablelist | 数据加载方法 | Function | null | | getTablelist | 数据加载方法 | Function | null |
| isShowCheckBox | 是否显示复选框 | Boolean | true | | isShowCheckBox | 是否显示复选框 | Boolean | true |
| ... | 其余属性与 vxetable 文档中相同 | ... | ... |
**TableColumn 结构** **TableColumn 结构**
...@@ -17,7 +18,7 @@ ...@@ -17,7 +18,7 @@
| attrs | 额外属性 | ColumnAttrs | | attrs | 额外属性 | ColumnAttrs |
| render | 自定义渲染函数 | RenderFunctions(默认使用 default,如要开启单元格编辑 edit 需在 Table 中传入 tableEditConfig.enabled=true) | | render | 自定义渲染函数 | RenderFunctions(默认使用 default,如要开启单元格编辑 edit 需在 Table 中传入 tableEditConfig.enabled=true) |
_ColumnAttrs_ ## ColumnAttrs
```ts ```ts
interface ColumnAttrs { interface ColumnAttrs {
...@@ -48,7 +49,13 @@ const columns = [ ...@@ -48,7 +49,13 @@ const columns = [
{ {
prop: 'name', prop: 'name',
label: '姓名', label: '姓名',
attrs: { width: 180, fixed: 'left' }, attrs: {
width: 200,
fixed: 'left',
align: 'center',
sortable: true,
className: 'name-column',
},
}, },
{ {
prop: 'status', prop: 'status',
......
...@@ -126,6 +126,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -126,6 +126,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
label: '规则名称', label: '规则名称',
attrs: { attrs: {
clearable: true,
placeholder: '请输入规则名称', placeholder: '请输入规则名称',
}, },
}, },
......
...@@ -59,6 +59,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -59,6 +59,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
label: '邮编', label: '邮编',
attrs: { attrs: {
clearable: true,
placeholder: '请输入邮编', placeholder: '请输入邮编',
}, },
}, },
...@@ -67,6 +68,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -67,6 +68,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
type: 'amountInput', type: 'amountInput',
label: '重量', label: '重量',
attrs: { attrs: {
clearable: true,
placeholder: '请输入重量', placeholder: '请输入重量',
hasUnit: true, hasUnit: true,
suffix: 'g', suffix: 'g',
......
...@@ -136,6 +136,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -136,6 +136,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
label: '物流方式', label: '物流方式',
attrs: { attrs: {
clearable: true,
placeholder: '请输入物流方式', placeholder: '请输入物流方式',
}, },
}, },
...@@ -144,6 +145,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -144,6 +145,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
type: 'select', type: 'select',
label: '启用状态', label: '启用状态',
attrs: { attrs: {
clearable: true,
placeholder: '请选择启用状态', placeholder: '请选择启用状态',
options: [ options: [
{ label: '启用', value: 1 }, { label: '启用', value: 1 },
...@@ -156,6 +158,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -156,6 +158,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
type: 'input', type: 'input',
label: '物流编码', label: '物流编码',
attrs: { attrs: {
clearable: true,
placeholder: '请输入物流编码', placeholder: '请输入物流编码',
}, },
}, },
...@@ -395,7 +398,7 @@ const tableConfig = ref<TableColumn[]>([ ...@@ -395,7 +398,7 @@ const tableConfig = ref<TableColumn[]>([
}, },
{ {
prop: 'status1', prop: 'status1',
label: '平台状态', label: '平台物流名称',
attrs: { width: '400px', align: 'center' }, attrs: { width: '400px', align: 'center' },
render: { render: {
......
...@@ -102,6 +102,7 @@ const searchConfig = ref<ISeachFormConfig[]>([ ...@@ -102,6 +102,7 @@ const searchConfig = ref<ISeachFormConfig[]>([
type: 'input', type: 'input',
label: '邮编编码', label: '邮编编码',
attrs: { attrs: {
clearable: true,
placeholder: '请输入邮编编码', placeholder: '请输入邮编编码',
}, },
}, },
......
...@@ -79,7 +79,6 @@ ...@@ -79,7 +79,6 @@
@close="cancelFn" @close="cancelFn"
> >
<CustomizeForm <CustomizeForm
v-if="formVisible"
ref="editFormRef" ref="editFormRef"
v-model="editForm" v-model="editForm"
:config="formConfig" :config="formConfig"
...@@ -550,8 +549,10 @@ const save = debounce(async () => { ...@@ -550,8 +549,10 @@ const save = debounce(async () => {
*/ */
async function addDialog() { async function addDialog() {
// await getAllList() // await getAllList()
dialogVisible.value = true
formVisible.value = true formVisible.value = true
dialogVisible.value = true
console.log(502, editForm.value) console.log(502, editForm.value)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment