调整代码生成器模板
This commit is contained in:
parent
75badfa160
commit
d2acb7addc
|
|
@ -20,7 +20,7 @@
|
|||
:data="treeList"
|
||||
clearable
|
||||
node-key="${table.treePrimary}"
|
||||
:props="{label: ${table.treeName}, value: ${table.treePrimary}, children: 'children'}"
|
||||
:props="{ label: '${table.treeName}', value: '${table.treePrimary}', children: 'children' }"
|
||||
:default-expand-all="true"
|
||||
placeholder="请选择${column.columnComment}"
|
||||
check-strictly
|
||||
|
|
@ -73,6 +73,7 @@
|
|||
#else
|
||||
:value="item.value"
|
||||
#end
|
||||
clearable
|
||||
:disabled="!item.status"
|
||||
/>
|
||||
#else
|
||||
|
|
@ -104,7 +105,7 @@
|
|||
#elseif($column.htmlType=="datetime")
|
||||
<el-form-item label="${column.columnComment}" prop="${column.javaField}">
|
||||
<el-date-picker
|
||||
v-model="form.${column.javaField}"
|
||||
v-model="formData.${column.javaField}"
|
||||
type="date"
|
||||
clearable
|
||||
value-format="YYYY-MM-DD"
|
||||
|
|
@ -128,7 +129,7 @@
|
|||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type { FormInstance } from 'element-plus'
|
||||
import { #if($table.treePrimary && $table.treeParent)${moduleName}Lists,#end ${moduleName}Edit,${moduleName}Add, ${moduleName}Detail } from '@/api/${moduleName}'
|
||||
import { #if($table.treePrimary && $table.treeParent)${moduleName}Lists,#end ${moduleName}Edit, ${moduleName}Add, ${moduleName}Detail } from '@/api/${moduleName}'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import feedback from '@/utils/feedback'
|
||||
import type { PropType } from 'vue'
|
||||
|
|
|
|||
|
|
@ -179,7 +179,6 @@ const { dictData } = useDictData<{
|
|||
}>([#foreach ($dict in $dictFields)'${dict}'#if($dictFields[$dictSize] != ${dict}),#end#end])
|
||||
#end
|
||||
|
||||
|
||||
const handleAdd = async (${table.treePrimary}?: number) => {
|
||||
showEdit.value = true
|
||||
await nextTick()
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@
|
|||
删除
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table class="mt-4"
|
||||
<el-table
|
||||
class="mt-4"
|
||||
size="large"
|
||||
v-loading="pager.loading"
|
||||
:data="pager.lists"
|
||||
|
|
@ -172,7 +173,7 @@ const { dictData } = useDictData<{
|
|||
|
||||
const selectData = ref<any[]>([])
|
||||
const handleSelectionChange = (selection: any[]) => {
|
||||
selectData.value = selection.map(item => item.${primaryKey})
|
||||
selectData.value = selection.map((item) => item.${primaryKey})
|
||||
}
|
||||
|
||||
const handleAdd = async () => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue