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 97 <ContentWrap>
98 98 <!-- 操作工具栏 -->
99 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 108 type="warning"
  109 + preIcon="ep:download"
  110 + :title="t('action.export')"
105 111 v-hasPermi="['${permissionPrefix}:export']"
106   - :loading="tableObject.exportLoading"
107 112 @click="exportList('数据.xls')"
108   - >
109   - <Icon icon="ep:download" class="mr-5px" /> {{ t('action.export') }}
110   - </el-button>
  113 + />
111 114 </div>
112 115 <!-- 列表 -->
113 116 <Table
... ... @@ -137,30 +140,30 @@ getList()
137 140 #end
138 141 #end
139 142 <template #action="{ row }">
140   - <el-button
  143 + <XButton
141 144 link
142 145 type="primary"
  146 + preIcon="ep:edit"
  147 + :title="t('action.edit')"
143 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 152 link
150 153 type="primary"
  154 + preIcon="ep:view"
  155 + :title="t('action.detail')"
151 156 v-hasPermi="['${permissionPrefix}:update']"
152 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 160 link
158 161 type="primary"
  162 + preIcon="ep:delete"
  163 + :title="t('action.del')"
159 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 167 </template>
165 168 </Table>
166 169 </ContentWrap>
... ... @@ -196,15 +199,14 @@ getList()
196 199 </Descriptions>
197 200 <!-- 操作按钮 -->
198 201 <template #footer>
199   - <el-button
  202 + <XButton
200 203 v-if="['create', 'update'].includes(actionType)"
201   - type="primary"
202 204 :loading="actionLoading"
  205 + :title="t('action.save')"
  206 + type="primary"
203 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 210 </template>
209 211 </Dialog>
210 212 </template>
... ...