修改前端导入规范.

This commit is contained in:
lijiahang
2023-10-25 10:26:14 +08:00
parent eb2c8eb719
commit d3825ab5b2
125 changed files with 277 additions and 231 deletions

View File

@@ -10,7 +10,7 @@
</template>
<script lang="ts" setup>
import { PropType } from 'vue';
import type { PropType } from 'vue';
import { useRoute } from 'vue-router';
defineProps({
@@ -18,14 +18,14 @@
type: Array as PropType<string[]>,
default() {
return useRoute().matched
.map(s => s.meta?.locale)
.filter(Boolean) || [];
.map(s => s.meta?.locale)
.filter(Boolean) || [];
},
},
});
</script>
<style scoped lang="less">
<style lang="less" scoped>
.container-breadcrumb {
:deep(.arco-breadcrumb-item) {

View File

@@ -263,7 +263,7 @@
</script>
<style scoped lang="less">
<style lang="less" scoped>
.navbar {
display: flex;
justify-content: space-between;

View File

@@ -17,10 +17,10 @@
</template>
<script lang="ts" setup>
import { PropType } from 'vue';
import type { PropType } from 'vue';
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
import { useAppStore } from '@/store';
import FormWrapper from './form-wrapper.vue';
import { RadioOption } from '@arco-design/web-vue/es/radio/interface';
import { updatePreferencePartial } from '@/api/user/preference';
import { Message } from '@arco-design/web-vue';
@@ -37,9 +37,7 @@
title: String,
options: {
type: Array as PropType<OptionsProps[]>,
default() {
return [];
},
default: []
},
});
@@ -77,7 +75,7 @@
};
</script>
<style scoped lang="less">
<style lang="less" scoped>
.block {
margin-bottom: 24px;
user-select: none;

View File

@@ -22,8 +22,8 @@
</template>
<script lang="ts" setup>
import { PropType } from 'vue';
import { RadioOption } from '@arco-design/web-vue/es/radio/interface';
import type { PropType } from 'vue';
import type { RadioOption } from '@arco-design/web-vue/es/radio/interface';
const props = defineProps({
type: {

View File

@@ -102,7 +102,7 @@
</script>
<style scoped lang="less">
<style lang="less" scoped>
.fixed-settings {
position: fixed;
top: 280px;

View File

@@ -19,8 +19,8 @@
</template>
<script lang="ts" setup>
import { computed, onUnmounted, ref, watch } from 'vue';
import type { RouteLocationNormalized } from 'vue-router';
import { computed, onUnmounted, ref, watch } from 'vue';
import { routerToTag } from '@/router/constants';
import { listenerRouteChange, removeRouteListener, } from '@/utils/route-listener';
import { useAppStore, useTabBarStore } from '@/store';
@@ -62,7 +62,7 @@
});
</script>
<style scoped lang="less">
<style lang="less" scoped>
.tab-bar-container {
position: relative;
background-color: var(--color-bg-2);

View File

@@ -52,10 +52,11 @@
</template>
<script lang="ts" setup>
import { PropType, computed } from 'vue';
import type { TagProps } from '@/store/modules/tab-bar/types';
import type { PropType } from 'vue';
import { computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import { useTabBarStore } from '@/store';
import type { TagProps } from '@/store/modules/tab-bar/types';
import { DEFAULT_ROUTE_NAME, REDIRECT_ROUTE_NAME } from '@/router/constants';
enum Option {
@@ -70,9 +71,7 @@
const props = defineProps({
itemData: {
type: Object as PropType<TagProps>,
default() {
return [];
},
default: [],
},
index: {
type: Number,
@@ -169,7 +168,7 @@
};
</script>
<style scoped lang="less">
<style lang="less" scoped>
.tag-link {
color: var(--color-text-2);
text-decoration: none;

View File

@@ -12,9 +12,9 @@
</script>
<script lang="ts" setup>
import type { SelectOptionData } from '@arco-design/web-vue';
import { computed } from 'vue';
import { useCacheStore } from '@/store';
import { SelectOptionData } from '@arco-design/web-vue';
const props = defineProps({
modelValue: Number,

View File

@@ -12,9 +12,9 @@
</script>
<script lang="ts" setup>
import type { SelectOptionData } from '@arco-design/web-vue';
import { computed } from 'vue';
import { useCacheStore } from '@/store';
import { SelectOptionData } from '@arco-design/web-vue';
const props = defineProps({
modelValue: Number,

View File

@@ -1,4 +1,4 @@
import { App } from 'vue';
import type { App } from 'vue';
import { use } from 'echarts/core';
import AQueryHeader from '@dangojs/a-query-header';
import { CanvasRenderer } from 'echarts/renderers';

View File

@@ -17,10 +17,13 @@
</script>
<script lang="ts" setup>
import { ref, computed, PropType } from 'vue';
import type { PropType } from 'vue';
import type { SelectOptionData } from '@arco-design/web-vue';
import type { TagCreateRequest } from '@/api/meta/tag';
import { ref, computed } from 'vue';
import { useCacheStore } from '@/store';
import { Message, SelectOptionData } from '@arco-design/web-vue';
import { createTag, TagCreateRequest } from '@/api/meta/tag';
import { Message } from '@arco-design/web-vue';
import { createTag } from '@/api/meta/tag';
const props = defineProps({
modelValue: Array as PropType<Array<number>>,

View File

@@ -16,10 +16,9 @@
</script>
<script lang="ts" setup>
import type { SelectOptionData } from '@arco-design/web-vue';
import { computed } from 'vue';
import { useCacheStore } from '@/store';
import { SelectOptionData } from '@arco-design/web-vue';
import { DictKeyQueryResponse } from '@/api/system/dict-key';
const props = defineProps({
modelValue: Number,

View File

@@ -30,8 +30,8 @@
</script>
<script lang="ts" setup>
import type { TreeNodeData } from '@arco-design/web-vue';
import { ref } from 'vue';
import { TreeNodeData } from '@arco-design/web-vue';
import { useCacheStore } from '@/store';
const treeData = ref<Array<TreeNodeData>>([]);

View File

@@ -1,7 +1,7 @@
<script lang="tsx">
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
import { compile, computed, defineComponent, h, ref } from 'vue';
import type { RouteMeta } from 'vue-router';
import { RouteRecordRaw, useRoute, useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { useAppStore } from '@/store';
import { listenerRouteChange } from '@/utils/route-listener';
import { openWindow, regexUrl } from '@/utils';

View File

@@ -1,5 +1,5 @@
import type { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
import { computed } from 'vue';
import { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
import { useMenuStore } from '@/store';
import { cloneDeep } from 'lodash';

View File

@@ -22,13 +22,9 @@
</template>
<script lang="ts" setup>
import type { MessageRecord, MessageListType } from '@/api/system/message';
import { ref, reactive, toRefs, computed } from 'vue';
import {
queryMessageList,
setMessageStatus,
MessageRecord,
MessageListType,
} from '@/api/system/message';
import { queryMessageList, setMessageStatus } from '@/api/system/message';
import useLoading from '@/hooks/loading';
import List from './list.vue';
@@ -108,7 +104,7 @@
fetchSourceData();
</script>
<style scoped lang="less">
<style lang="less" scoped>
:deep(.arco-popover-popup-content) {
padding: 0;
}

View File

@@ -72,8 +72,8 @@
</template>
<script lang="ts" setup>
import { PropType } from 'vue';
import { MessageRecord, MessageListType } from '@/api/system/message';
import type { PropType } from 'vue';
import type { MessageRecord, MessageListType } from '@/api/system/message';
const props = defineProps({
renderList: {
@@ -98,7 +98,7 @@
const showMax = 3;
</script>
<style scoped lang="less">
<style lang="less" scoped>
:deep(.arco-list) {
.arco-list-item {
min-height: 86px;

View File

@@ -16,13 +16,14 @@
</script>
<script lang="ts" setup>
import { computed, PropType } from 'vue';
import type { PropType } from 'vue';
import type { SelectOptionData } from '@arco-design/web-vue';
import { computed } from 'vue';
import { useCacheStore } from '@/store';
import { SelectOptionData } from '@arco-design/web-vue';
import { RoleStatusEnum } from '@/views/user/role/types/enum.types';
const props = defineProps({
modelValue: Object as PropType<Array<number>> | PropType<number>,
modelValue: [Number, Array] as PropType<number | Array<number>>,
loading: Boolean,
multiple: Boolean,
});

View File

@@ -222,11 +222,12 @@
};
</script>
<script setup lang="ts">
import { compile, computed, h, PropType, ref } from 'vue';
<script lang="ts" setup>
import type { PropType } from 'vue';
import type { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
import type { CardRecord, ColResponsiveValue, HandleVisible, CardFieldConfig, CardPosition } from '@/types/card';
import { compile, computed, h, ref } from 'vue';
import { useAppStore } from '@/store';
import { PaginationProps, ResponsiveValue } from '@arco-design/web-vue';
import { CardRecord, ColResponsiveValue, HandleVisible, CardFieldConfig, CardPosition } from '@/types/card';
import { triggerMouseEvent } from '@/utils';
const appStore = useAppStore();
@@ -258,61 +259,58 @@
const props = defineProps({
key: {
type: String,
default: () => 'id'
default: 'id'
},
pagination: {
type: Object as PropType<PaginationProps> | PropType<boolean>,
default: () => false
type: [Object, Boolean] as PropType<PaginationProps | boolean>,
default: false
},
loading: {
type: Boolean as PropType<Boolean>,
default: () => false
default: false
},
fieldConfig: {
type: Object as PropType<CardFieldConfig>,
default: () => []
default: []
},
cardHeight: {
type: String,
default: () => '100%'
default: '100%'
},
cardClass: String,
cardBodyStyle: Object,
contextMenu: {
type: Boolean,
default: () => true
default: true
},
filterCount: {
type: Number,
default: () => 0
default: 0
},
searchInputPlaceholder: String,
searchInputWidth: {
type: String,
default: () => '200px'
default: '200px'
},
searchValue: {
type: String,
default: () => ''
default: ''
},
createCardDescription: {
type: String,
default: () => '点击此处进行创建'
default: '点击此处进行创建'
},
createCardPosition: {
type: String as PropType<CardPosition>,
default: () => false
default: false
},
addPermission: {
type: Array as PropType<String[]>,
default: () => []
default: []
},
cardLayoutGutter: {
type: [Number, Array] as PropType<Number> |
PropType<ResponsiveValue> |
PropType<Array<Number>> |
PropType<Array<ResponsiveValue>>,
default: () => [16, 16]
type: [Number, Object, Array] as PropType<Number | ResponsiveValue | Array<Number> | Array<ResponsiveValue>>,
default: [16, 16]
},
cardLayoutCols: {
type: Object as PropType<ColResponsiveValue>,
@@ -330,7 +328,7 @@
},
list: {
type: Array as PropType<Array<CardRecord>>,
default: () => []
default: []
},
});
@@ -368,7 +366,7 @@
</script>
<style scoped lang="less">
<style lang="less" scoped>
@header-info-height: 48px;
@header-handler-height: 48px;
@top-height: 16 + @header-info-height + @header-handler-height + 12px;

View File

@@ -44,4 +44,5 @@
});
</script>
<style scoped lang="less"></style>
<style lang="less" scoped>
</style>