Эх сурвалжийг харах

feat: Icon样式鼠标样式 + 二次提醒

luoyali 11 сар өмнө
parent
commit
f9668032ea

+ 1 - 0
README.md

@@ -5,6 +5,7 @@
 操作按钮组,加上class为 ml-2,如果是单个按钮,则不用调整
 text-icon-color: 按钮颜色,正常/暗黑模式
 text-lg: 按钮大小
+cursor-pointer: 鼠标呈现手指样式
 ```
 ```
 # 查看

+ 2 - 2
src/views/configure/index.vue

@@ -33,9 +33,9 @@
 
 				<template #actionSlot="scope">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(scope.row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(scope.row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(scope)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(scope)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/flow/form/index.vue

@@ -85,11 +85,11 @@
 							</el-tooltip>
 						</template>
 
-						<LeIcon class="text-lg ml-2 text-icon-color" icon-class="icon-processInfo-mage--edit" @click="tableTemplateEdit(row)" />
+						<LeIcon class="text-lg ml-2 text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="tableTemplateEdit(row)" />
 
 						<LeIcon
 							v-if="row.status !== 3"
-							class="text-lg ml-2 text-rose-700"
+							class="text-lg ml-2 text-rose-700 cursor-pointer"
 							icon-class="icon-processInfo-iconoir--trash"
 							@click="table_del1(row)"
 						/>

+ 38 - 16
src/views/flow/group/components/listGroup.vue

@@ -30,9 +30,17 @@
 							</span>
 						</div>
 						<div class="group_header_nameOperate">
-							<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="editFlowGroup('edit', item, index)" />
+							<LeIcon
+								class="text-lg text-icon-color cursor-pointer"
+								icon-class="icon-processInfo-mage--edit"
+								@click="editFlowGroup('edit', item, index)"
+							/>
 							<el-tooltip effect="dark" content="删除" placement="top">
-								<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="deleteFlowGroup(item)" />
+								<LeIcon
+									class="text-lg ml-2 text-rose-700 cursor-pointer"
+									icon-class="icon-processInfo-iconoir--trash"
+									@click="deleteFlowGroup(item)"
+								/>
 							</el-tooltip>
 						</div>
 					</div>
@@ -87,37 +95,49 @@
 												<el-tooltip effect="dark" content="版本控制" placement="top">
 													<LeIcon
 														v-if="element.processVersion > 1"
-														class="text-lg ml-2 text-icon-color"
+														class="text-lg ml-2 text-icon-color cursor-pointer"
 														icon-class="icon-processInfo-hugeicons--git-merge"
 														@click="historyEv(element)"
 													/>
 												</el-tooltip>
 
 												<el-tooltip effect="dark" content="编辑" placement="top">
-													<LeIcon class="text-lg ml-2 text-icon-color" icon-class="icon-processInfo-mage--edit" @click="updateEv(element)" />
+													<LeIcon
+														class="text-lg ml-2 text-icon-color cursor-pointer"
+														icon-class="icon-processInfo-mage--edit"
+														@click="updateEv(element)"
+													/>
 												</el-tooltip>
 
 												<el-tooltip content="复制" placement="top" effect="dark">
-													<LeIcon class="text-lg ml-2 text-icon-color" icon-class="icon-processInfo-lucide--copy" @click="copyEv(element)" />
+													<LeIcon
+														class="text-lg ml-2 text-icon-color cursor-pointer"
+														icon-class="icon-processInfo-lucide--copy"
+														@click="copyEv(element)"
+													/>
 												</el-tooltip>
 
 												<el-tooltip v-if="element.processState === 1" effect="dark" content="禁用" placement="top">
 													<LeIcon
-														class="text-lg ml-2 text-icon-color"
+														class="text-lg ml-2 text-icon-color cursor-pointer"
 														icon-class="icon-processInfo-solar--forbidden-circle-broken"
-														@click="enabledEv(element.processId, 0)"
+														@click="enabledEv(element, 0)"
 													/>
 												</el-tooltip>
 												<el-tooltip v-if="element.processState === 0" effect="dark" content="启用" placement="top">
 													<LeIcon
-														class="text-lg ml-2 text-icon-color"
+														class="text-lg ml-2 text-icon-color cursor-pointer"
 														icon-class="icon-processInfo-heroicons--lock-open"
-														@click="enabledEv(element.processId, 1)"
+														@click="enabledEv(element, 1)"
 													/>
 												</el-tooltip>
 
 												<el-tooltip content="删除" placement="top" effect="dark">
-													<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="stopEv(element)" />
+													<LeIcon
+														class="text-lg ml-2 text-rose-700 cursor-pointer"
+														icon-class="icon-processInfo-iconoir--trash"
+														@click="stopEv(element)"
+													/>
 												</el-tooltip>
 											</div>
 										</el-col>
@@ -292,14 +312,16 @@ const stopEv = (ele: any) => {
  * @param state 启用/禁用的状态,1表示启用,0表示禁用
  * @returns 无返回值,执行异步操作
  */
-const enabledEv = async (id: any, state: number) => {
-	try {
-		await process.processUpdateStateApi({ id, state: state })
+const enabledEv = async (ele: any, state: number) => {
+	ElMessageBox.confirm(`您即将${state === 1 ? '启用' : '禁用'}「${ele.processName}」流程,是否确认?`, '提示', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning'
+	}).then(async () => {
+		await process.processUpdateStateApi({ id: ele.processId, state: state })
 		ElMessage.success('操作成功')
 		flowGroupListAll()
-	} catch (e) {
-		console.log(e)
-	}
+	})
 }
 
 /**

+ 2 - 2
src/views/flow/test/business.vue

@@ -36,10 +36,10 @@
 				<template #actionSlot="{ row }">
 					<div v-if="row.status === 0" class="flex flex-align-pack-center">
 						<el-tooltip effect="dark" content="发起审批" placement="top">
-							<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-navigation" @click="submitProcessEv(row)" />
+							<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-navigation" @click="submitProcessEv(row)" />
 						</el-tooltip>
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/message/list/index.vue

@@ -29,9 +29,9 @@
 
 			<template #actionSlot="scope">
 				<div class="flex flex-align-pack-center">
-					<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-icons--view-light" @click="openDetail(scope.row)" />
+					<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-icons--view-light" @click="openDetail(scope.row)" />
 
-					<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(scope)" />
+					<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(scope)" />
 				</div>
 			</template>
 		</LeTable>

+ 2 - 2
src/views/message/list/my.vue

@@ -30,9 +30,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-icons--view-light" @click="openDetail(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-icons--view-light" @click="openDetail(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/app/index.vue

@@ -33,9 +33,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/configure/index.vue

@@ -33,9 +33,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/department/index.vue

@@ -33,9 +33,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/dict/index.vue

@@ -79,9 +79,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/post/index.vue

@@ -33,9 +33,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/region/index.vue

@@ -34,9 +34,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/role/index.vue

@@ -36,9 +36,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>

+ 2 - 2
src/views/setting/user/index.vue

@@ -65,9 +65,9 @@
 
 				<template #actionSlot="{ row }">
 					<div class="flex flex-align-pack-center">
-						<LeIcon class="text-lg text-icon-color" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
+						<LeIcon class="text-lg text-icon-color cursor-pointer" icon-class="icon-processInfo-mage--edit" @click="table_edit(row)" />
 
-						<LeIcon class="text-lg ml-2 text-rose-700" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
+						<LeIcon class="text-lg ml-2 text-rose-700 cursor-pointer" icon-class="icon-processInfo-iconoir--trash" @click="table_del(row)" />
 					</div>
 				</template>
 			</LeTable>