Parcourir la source

!190 chore: 统一style标签的字段顺序
Merge pull request !190 from yangxu52/feat/standardize

疯狂的狮子Li il y a 1 mois
Parent
commit
b814fb5105

+ 1 - 1
src/components/DictTag/index.vue

@@ -87,7 +87,7 @@ const handleArray = (array: Array<string | number>) => {
 };
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
 .el-tag + .el-tag {
   margin-left: 10px;
 }

+ 1 - 1
src/components/FileUpload/index.vue

@@ -216,7 +216,7 @@ const listToString = (list: any[], separator?: string) => {
 };
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .upload-file-uploader {
   margin-bottom: 5px;
 }

+ 1 - 1
src/components/IconSelect/index.vue

@@ -65,7 +65,7 @@ const selectedIcon = (iconName: string) => {
 };
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .el-scrollbar {
   max-height: calc(50vh - 100px) !important;
   overflow-y: auto;

+ 1 - 1
src/components/ImageUpload/index.vue

@@ -234,7 +234,7 @@ const listToString = (list: any[], separator?: string) => {
 };
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 // .el-upload--picture-card 控制加号部分
 :deep(.hide .el-upload--picture-card) {
   display: none;

+ 2 - 11
src/components/Pagination/index.vue

@@ -14,13 +14,7 @@
   </div>
 </template>
 
-<script lang="ts">
-export default {
-  name: 'Pagination'
-};
-</script>
-
-<script setup lang="ts">
+<script setup name="Pagination" lang="ts">
 import { scrollTo } from '@/utils/scroll-to';
 import { propTypes } from '@/utils/propTypes';
 
@@ -28,10 +22,7 @@ const props = defineProps({
   total: propTypes.number,
   page: propTypes.number.def(1),
   limit: propTypes.number.def(20),
-  pageSizes: {
-    type: Array,
-    default: () => [10, 20, 30, 50]
-  },
+  pageSizes: { type: Array<number>, default: () => [10, 20, 30, 50] },
   // 移动端页码按钮的数量端默认值5
   pagerCount: propTypes.number.def(document.body.clientWidth < 992 ? 5 : 7),
   layout: propTypes.string.def('total, sizes, prev, pager, next, jumper'),

+ 1 - 1
src/components/Process/approvalRecord.vue

@@ -72,7 +72,7 @@
     </el-dialog>
   </div>
 </template>
-<script lang="ts" setup>
+<script setup lang="ts">
 import { flowImage } from '@/api/workflow/instance';
 import { propTypes } from '@/utils/propTypes';
 import { listByIds } from '@/api/system/oss';

+ 1 - 1
src/components/Process/processMeddle.vue

@@ -49,7 +49,7 @@
     </el-dialog>
   </el-dialog>
 </template>
-<script lang="ts" setup>
+<script setup lang="ts">
 import { propTypes } from '@/utils/propTypes';
 import { FlowTaskVO, TaskOperationBo } from '@/api/workflow/task/types';
 import UserSelect from '@/components/UserSelect';

+ 1 - 1
src/components/Process/submitVerify.vue

@@ -132,7 +132,7 @@
   </el-dialog>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { ref } from 'vue';
 import { ComponentInternalInstance } from 'vue';
 import { ElForm } from 'element-plus';

+ 1 - 1
src/components/RuoYiDoc/index.vue

@@ -4,7 +4,7 @@
   </div>
 </template>
 
-<script setup>
+<script setup lang="ts">
 const url = ref('https://plus-doc.dromara.org/');
 
 function goto() {

+ 1 - 1
src/components/RuoYiGit/index.vue

@@ -4,7 +4,7 @@
   </div>
 </template>
 
-<script setup>
+<script setup lang="ts">
 const url = ref('https://gitee.com/dromara/RuoYi-Vue-Plus');
 
 function goto() {

+ 1 - 1
src/components/SvgIcon/index.vue

@@ -21,7 +21,7 @@ const svgClass = computed(() => {
 });
 </script>
 
-<style scope lang="scss">
+<style lang="scss" scoped>
 .sub-el-icon,
 .nav-icon {
   display: inline-block;

+ 0 - 2
src/components/UserSelect/index.vue

@@ -306,5 +306,3 @@ defineExpose({
   close: userDialog.closeDialog
 });
 </script>
-
-<style lang="scss" scoped></style>

+ 1 - 1
src/layout/components/TopBar/search.vue

@@ -130,7 +130,7 @@ defineExpose({
 });
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .layout-search-dialog {
   position: relative;
   :deep(.el-dialog) {

+ 1 - 1
src/layout/components/notice/index.vue

@@ -65,7 +65,7 @@ onMounted(() => {
 });
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .layout-navbars-breadcrumb-user-news {
   .head-box {
     display: flex;

+ 1 - 1
src/views/index.vue

@@ -100,7 +100,7 @@ const goTarget = (url: string) => {
 };
 </script>
 
-<style scoped lang="scss">
+<style lang="scss" scoped>
 .home {
   blockquote {
     padding: 10px 20px;

+ 1 - 1
src/views/monitor/operlog/oper-info-dialog.vue

@@ -95,7 +95,7 @@ const typeFormat = (row: OperLogForm) => {
 };
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
 /**
 label宽度固定
 */

+ 1 - 1
src/views/redirect/index.vue

@@ -2,7 +2,7 @@
   <div></div>
 </template>
 
-<script setup>
+<script setup lang="ts">
 import { useRoute, useRouter } from 'vue-router';
 
 const route = useRoute();

+ 0 - 2
src/views/system/role/authUser.vue

@@ -156,5 +156,3 @@ onMounted(() => {
   getList();
 });
 </script>
-
-<style lang="scss" scoped></style>

+ 0 - 2
src/views/system/role/selectUser.vue

@@ -128,5 +128,3 @@ defineExpose({
   show
 });
 </script>
-
-<style scoped></style>

+ 4 - 6
src/views/system/user/index.vue

@@ -288,15 +288,15 @@
 <script setup name="User" lang="ts">
 import api from '@/api/system/user';
 import { UserForm, UserQuery, UserVO } from '@/api/system/user/types';
-import {DeptTreeVO, DeptVO} from '@/api/system/dept/types';
+import { DeptTreeVO, DeptVO } from '@/api/system/dept/types';
 import { RoleVO } from '@/api/system/role/types';
 import { PostQuery, PostVO } from '@/api/system/post/types';
 import { treeselect } from '@/api/system/dept';
 import { globalHeaders } from '@/utils/request';
 import { to } from 'await-to-js';
 import { optionselect } from '@/api/system/post';
-import {hasPermi} from "@/directive/permission";
-import {checkPermi} from "@/utils/permission";
+import { hasPermi } from '@/directive/permission';
+import { checkPermi } from '@/utils/permission';
 
 const router = useRouter();
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
@@ -453,7 +453,7 @@ const getDeptTree = async () => {
 
 /** 过滤禁用的部门 */
 const filterDisabledDept = (deptList: DeptTreeVO[]) => {
-  return deptList.filter(dept => {
+  return deptList.filter((dept) => {
     if (dept.disabled) {
       return false;
     }
@@ -663,5 +663,3 @@ async function handleDeptChange(value: number | string) {
   form.value.postIds = [];
 }
 </script>
-
-<style lang="scss" scoped></style>

+ 1 - 1
src/views/system/user/profile/onlineDevice.vue

@@ -26,7 +26,7 @@
   </div>
 </template>
 
-<script name="Online" lang="ts" setup>
+<script setup name="Online" lang="ts">
 import { delOnline } from '@/api/monitor/online';
 import { propTypes } from '@/utils/propTypes';
 

+ 5 - 4
src/views/system/user/profile/thirdParty.vue

@@ -55,7 +55,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { authUnlock, authBinding } from '@/api/system/social/auth';
 import { propTypes } from '@/utils/propTypes';
 import useUserStore from '@/store/modules/user';
@@ -94,7 +94,7 @@ const authUrl = (source: string) => {
 };
 </script>
 
-<style type="text/css">
+<style lang="scss" scoped>
 .user-bind .third-app {
   display: -webkit-box;
   display: -ms-flexbox;
@@ -128,8 +128,9 @@ a {
 }
 
 .provider-desc {
-  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
-    'Liberation Sans', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Wenquanyi Micro Hei', 'WenQuanYi Zen Hei', 'ST Heiti', SimHei, SimSun,
+  font-family:
+    -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Liberation Sans',
+    'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Wenquanyi Micro Hei', 'WenQuanYi Zen Hei', 'ST Heiti', SimHei, SimSun,
     'WenQuanYi Zen Hei Sharp', sans-serif;
   font-size: 1.071rem;
 }

+ 15 - 13
src/views/workflow/processDefinition/index.vue

@@ -190,7 +190,7 @@
   </div>
 </template>
 
-<script lang="ts" setup name="processDefinition">
+<script setup name="processDefinition" lang="ts">
 import { listDefinition, deleteDefinition, active, importDef, unPublishList, publish, add, edit, getInfo, copy } from '@/api/workflow/definition';
 import { categoryTree } from '@/api/workflow/category';
 import { CategoryTreeVO } from '@/api/workflow/category/types';
@@ -325,7 +325,7 @@ const handleSelectionChange = (selection: any) => {
 };
 //分页
 const getPageList = async () => {
-  console.log(proxy.$route.query.activeName)
+  console.log(proxy.$route.query.activeName);
   if (proxy.$route.query.activeName) {
     activeName.value = proxy.$route.query.activeName;
   }
@@ -371,7 +371,7 @@ const handlePublish = async (row?: FlowDefinitionVo) => {
   loading.value = true;
   await publish(row.id).finally(() => (loading.value = false));
   processDefinitionDialog.visible = false;
-  activeName.value = "0"
+  activeName.value = '0';
   await handleQuery();
   proxy?.$modal.msgSuccess('发布成功');
 };
@@ -418,7 +418,7 @@ const handlerImportDefinition = (data: UploadRequestOptions): XMLHttpRequest =>
     .then(() => {
       uploadDialog.visible = false;
       proxy?.$modal.msgSuccess('部署成功');
-      activeName.value = "1"
+      activeName.value = '1';
       handleQuery();
     })
     .finally(() => {
@@ -483,9 +483,9 @@ const handleSubmit = async () => {
     if (valid) {
       loading.value = true;
       if (form.value.id) {
-        await edit(form.value).finally(() => loading.value = false);
+        await edit(form.value).finally(() => (loading.value = false));
       } else {
-        await add(form.value).finally(() => loading.value = false);
+        await add(form.value).finally(() => (loading.value = false));
       }
       proxy?.$modal.msgSuccess('操作成功');
       modelDialog.visible = false;
@@ -501,13 +501,15 @@ const handleCopyDef = async (row: FlowDefinitionVo) => {
     type: 'warning'
   } as ElMessageBoxOptions).then(() => {
     loading.value = true;
-    copy(row.id).then((resp) => {
-      if (resp.code === 200) {
-        proxy?.$modal.msgSuccess('操作成功');
-        activeName.value = "1"
-        handleQuery();
-      }
-    }).finally(() => loading.value = false);
+    copy(row.id)
+      .then((resp) => {
+        if (resp.code === 200) {
+          proxy?.$modal.msgSuccess('操作成功');
+          activeName.value = '1';
+          handleQuery();
+        }
+      })
+      .finally(() => (loading.value = false));
   });
 };
 

+ 1 - 1
src/views/workflow/processInstance/index.vue

@@ -174,7 +174,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { pageByRunning, pageByFinish, deleteByInstanceIds, instanceVariable, invalid } from '@/api/workflow/instance';
 import { categoryTree } from '@/api/workflow/category';
 import { CategoryTreeVO } from '@/api/workflow/category/types';

+ 1 - 1
src/views/workflow/task/allTaskWaiting.vue

@@ -104,7 +104,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { pageByAllTaskWait, pageByAllTaskFinish, updateAssignee } from '@/api/workflow/task';
 import UserSelect from '@/components/UserSelect';
 import { TaskQuery } from '@/api/workflow/task/types';

+ 1 - 1
src/views/workflow/task/myDocument.vue

@@ -101,7 +101,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { pageByCurrent, deleteByInstanceIds, cancelProcessApply } from '@/api/workflow/instance';
 import { categoryTree } from '@/api/workflow/category';
 import { CategoryTreeVO } from '@/api/workflow/category/types';

+ 1 - 1
src/views/workflow/task/taskCopyList.vue

@@ -59,7 +59,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { pageByTaskCopy } from '@/api/workflow/task';
 import { TaskQuery } from '@/api/workflow/task/types';
 import workflowCommon from '@/api/workflow/workflowCommon';

+ 1 - 1
src/views/workflow/task/taskFinish.vue

@@ -80,7 +80,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { pageByTaskFinish } from '@/api/workflow/task';
 import { TaskQuery, FlowTaskVO } from '@/api/workflow/task/types';
 import workflowCommon from '@/api/workflow/workflowCommon';

+ 1 - 1
src/views/workflow/task/taskWaiting.vue

@@ -77,7 +77,7 @@
   </div>
 </template>
 
-<script lang="ts" setup>
+<script setup lang="ts">
 import { pageByTaskWait } from '@/api/workflow/task';
 import { TaskQuery, FlowTaskVO } from '@/api/workflow/task/types';
 import workflowCommon from '@/api/workflow/workflowCommon';

+ 3 - 3
vite.config.ts

@@ -1,9 +1,9 @@
-import { type UserConfig, type ConfigEnv, loadEnv, defineConfig } from 'vite';
+import { defineConfig, loadEnv } from 'vite';
 import createPlugins from './vite/plugins';
 import autoprefixer from 'autoprefixer'; // css自动添加兼容性前缀
-
 import path from 'path';
-export default defineConfig(({ mode, command }: ConfigEnv): UserConfig => {
+
+export default defineConfig(({ mode, command }) => {
   const env = loadEnv(mode, process.cwd());
   return {
     // 部署生产环境和开发环境下的URL。