Commit 2c1419fb1a15b37743e7ee4e767ba57d1c03d9ff

Authored by xingyu4j
1 parent 6f1f8d8e

vue3 代码生成

yudao-module-infra/yudao-module-infra-biz/src/main/resources/codegen/vue3/views/index.vue.vm
@@ -97,17 +97,20 @@ getList() @@ -97,17 +97,20 @@ getList()
97 <ContentWrap> 97 <ContentWrap>
98 <!-- 操作工具栏 --> 98 <!-- 操作工具栏 -->
99 <div class="mb-10px"> 99 <div class="mb-10px">
100 - <el-button type="primary" v-hasPermi="['${permissionPrefix}:create']" @click="handleCreate">  
101 - <Icon icon="ep:zoom-in" class="mr-5px" /> {{ t('action.add') }}  
102 - </el-button>  
103 - <el-button 100 + <XButton
  101 + type="primary"
  102 + preIcon="ep:zoom-in"
  103 + :title="t('action.add')"
  104 + v-hasPermi="['${permissionPrefix}:create']"
  105 + @click="handleCreate()"
  106 + />
  107 + <XButton
104 type="warning" 108 type="warning"
  109 + preIcon="ep:download"
  110 + :title="t('action.export')"
105 v-hasPermi="['${permissionPrefix}:export']" 111 v-hasPermi="['${permissionPrefix}:export']"
106 - :loading="tableObject.exportLoading"  
107 @click="exportList('数据.xls')" 112 @click="exportList('数据.xls')"
108 - >  
109 - <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}  
110 - </el-button> 113 + />
111 </div> 114 </div>
112 <!-- 列表 --> 115 <!-- 列表 -->
113 <Table 116 <Table
@@ -137,30 +140,30 @@ getList() @@ -137,30 +140,30 @@ getList()
137 #end 140 #end
138 #end 141 #end
139 <template #action="{ row }"> 142 <template #action="{ row }">
140 - <el-button 143 + <XButton
141 link 144 link
142 type="primary" 145 type="primary"
  146 + preIcon="ep:edit"
  147 + :title="t('action.edit')"
143 v-hasPermi="['${permissionPrefix}:update']" 148 v-hasPermi="['${permissionPrefix}:update']"
144 - @click="handleUpdate(row)"  
145 - >  
146 - <Icon icon="ep:edit" class="mr-1px" /> {{ t('action.edit') }}  
147 - </el-button>  
148 - <el-button 149 + @click="handleUpdate(row.id)"
  150 + />
  151 + <XButton
149 link 152 link
150 type="primary" 153 type="primary"
  154 + preIcon="ep:view"
  155 + :title="t('action.detail')"
151 v-hasPermi="['${permissionPrefix}:update']" 156 v-hasPermi="['${permissionPrefix}:update']"
152 @click="handleDetail(row)" 157 @click="handleDetail(row)"
153 - >  
154 - <Icon icon="ep:view" class="mr-1px" /> {{ t('action.detail') }}  
155 - </el-button>  
156 - <el-button 158 + />
  159 + <XButton
157 link 160 link
158 type="primary" 161 type="primary"
  162 + preIcon="ep:delete"
  163 + :title="t('action.del')"
159 v-hasPermi="['${permissionPrefix}:delete']" 164 v-hasPermi="['${permissionPrefix}:delete']"
160 - @click="delList(row.id, false)"  
161 - >  
162 - <Icon icon="ep:delete" class="mr-1px" /> {{ t('action.del') }}  
163 - </el-button> 165 + @click="handleDelete(row.id)"
  166 + />
164 </template> 167 </template>
165 </Table> 168 </Table>
166 </ContentWrap> 169 </ContentWrap>
@@ -196,15 +199,14 @@ getList() @@ -196,15 +199,14 @@ getList()
196 </Descriptions> 199 </Descriptions>
197 <!-- 操作按钮 --> 200 <!-- 操作按钮 -->
198 <template #footer> 201 <template #footer>
199 - <el-button 202 + <XButton
200 v-if="['create', 'update'].includes(actionType)" 203 v-if="['create', 'update'].includes(actionType)"
201 - type="primary"  
202 :loading="actionLoading" 204 :loading="actionLoading"
  205 + :title="t('action.save')"
  206 + type="primary"
203 @click="submitForm" 207 @click="submitForm"
204 - >  
205 - {{ t('action.save') }}  
206 - </el-button>  
207 - <el-button @click="dialogVisible = false">{{ t('dialog.close') }}</el-button> 208 + />
  209 + <XButton :loading="actionLoading" :title="t('dialog.close')" @click="dialogVisible = false" />
208 </template> 210 </template>
209 </Dialog> 211 </Dialog>
210 </template> 212 </template>