|
|
@@ -58,13 +58,38 @@
|
|
|
</fieldset>
|
|
|
<fieldset class="formFieldSet">
|
|
|
<legend>品类信息</legend>
|
|
|
- <!-- <a-table class="dialogTable" :data-source="dataSource" :columns="columns" :pagination="false">
|
|
|
- <a slot="name" slot-scope="text">{{ text }}</a>
|
|
|
- <span slot="customTitle"><a-icon type="smile-o" /> Name</span>
|
|
|
- </a-table> -->
|
|
|
<a-table class="dialogTable" :columns="columns" :data-source="dataSource" :pagination="false">
|
|
|
- <a slot="name" slot-scope="text">{{ text }}</a>
|
|
|
- <span slot="customTitle">品类</span>
|
|
|
+ <template #type>
|
|
|
+ <a-input class="dialogInput"></a-input>
|
|
|
+ </template>
|
|
|
+ <template #customType>
|
|
|
+ <span>
|
|
|
+ <span class="red">*</span>
|
|
|
+ 品类
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #unit>
|
|
|
+ <a-input class="dialogInput"></a-input>
|
|
|
+ </template>
|
|
|
+ <template #customUnit>
|
|
|
+ <span>
|
|
|
+ <span class="red">*</span>
|
|
|
+ 单位
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #coefficient>
|
|
|
+ <a-input class="dialogInput"></a-input>
|
|
|
+ </template>
|
|
|
+ <template #customCoefficient>
|
|
|
+ <span>
|
|
|
+ <span class="red">*</span>
|
|
|
+ 标仓系数
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template #action>
|
|
|
+ <a-button class="minusBtn"></a-button>
|
|
|
+ <a-button class="plusBtn"></a-button>
|
|
|
+ </template>
|
|
|
</a-table>
|
|
|
</fieldset>
|
|
|
</a-form>
|
|
|
@@ -84,39 +109,30 @@ export default defineComponent({
|
|
|
const loading = ref<boolean>(false);
|
|
|
const columns = [
|
|
|
{
|
|
|
- // title: 'name',
|
|
|
- dataIndex: 'name',
|
|
|
- key: 'name',
|
|
|
- slots: { title: 'customTitle' },
|
|
|
- scopedSlots: { customRender: 'name' },
|
|
|
+ dataIndex: 'type',
|
|
|
+ key: 'type',
|
|
|
+ slots: { title: 'customType', customRender: 'type' },
|
|
|
},
|
|
|
{
|
|
|
- title: 'age',
|
|
|
- dataIndex: 'age',
|
|
|
- key: 'age',
|
|
|
+ dataIndex: 'unit',
|
|
|
+ key: 'unit',
|
|
|
+ slots: { title: 'customUnit', customRender: 'unit' },
|
|
|
},
|
|
|
{
|
|
|
- title: 'address',
|
|
|
- dataIndex: 'address',
|
|
|
- key: 'address',
|
|
|
+ dataIndex: 'coefficient',
|
|
|
+ key: 'coefficient',
|
|
|
+ slots: { title: 'customCoefficient', customRender: 'coefficient' },
|
|
|
},
|
|
|
{
|
|
|
- title: 'tags',
|
|
|
- key: 'tags',
|
|
|
- dataIndex: 'tags',
|
|
|
- // scopedSlots: { customRender: 'tags' },
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'action',
|
|
|
+ title: '操作',
|
|
|
key: 'action',
|
|
|
- scopedSlots: { customRender: 'action' },
|
|
|
},
|
|
|
];
|
|
|
|
|
|
const dataSource = [
|
|
|
{
|
|
|
key: '1',
|
|
|
- name: 'John Brown',
|
|
|
+ type: 'John Brown',
|
|
|
age: 32,
|
|
|
address: 'New York No. 1 Lake Park',
|
|
|
tags: ['nice', 'developer'],
|