refactor: 引入 unplugin-auto-import,减少重复性 Vue 函数引入
避免在每个 Vue 组件中都重复性的去声明 ref 等函数
This commit is contained in:
@@ -340,7 +340,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive } from 'vue';
|
||||
import {
|
||||
DataRecord,
|
||||
ListParam,
|
||||
|
@@ -170,7 +170,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, reactive, toRefs } from 'vue';
|
||||
import { FileItem, RequestOption } from '@arco-design/web-vue';
|
||||
import {
|
||||
BasicConfigRecord,
|
||||
|
@@ -303,7 +303,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive } from 'vue';
|
||||
import { TreeNodeData, TableData } from '@arco-design/web-vue';
|
||||
import {
|
||||
DataRecord,
|
||||
|
@@ -221,7 +221,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive } from 'vue';
|
||||
import { TableData } from '@arco-design/web-vue';
|
||||
import {
|
||||
DataRecord,
|
||||
|
@@ -169,7 +169,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive, computed } from 'vue';
|
||||
import {
|
||||
DataRecord,
|
||||
ListParam,
|
||||
|
@@ -31,7 +31,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { FileItem } from '@/api/system/file';
|
||||
import FileImg from '../../main/FileMain/FileImg.vue';
|
||||
|
||||
|
@@ -28,7 +28,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { getCurrentInstance, onMounted, reactive, ref } from 'vue';
|
||||
import type { FormInstance, Modal } from '@arco-design/web-vue';
|
||||
import { FileItem, update } from '@/api/system/file';
|
||||
|
||||
|
@@ -29,7 +29,6 @@
|
||||
<script setup lang="ts">
|
||||
import { useDraggable, useWindowSize, useElementSize } from '@vueuse/core';
|
||||
import type { FileItem } from '@/api/system/file';
|
||||
import { computed, onMounted, ref } from 'vue';
|
||||
|
||||
interface Props {
|
||||
fileInfo: FileItem;
|
||||
|
@@ -14,7 +14,6 @@
|
||||
<script setup lang="ts">
|
||||
import Player from 'xgplayer';
|
||||
import type { FileItem } from '@/api/system/file';
|
||||
import { nextTick, onMounted, ref } from 'vue';
|
||||
|
||||
interface Props {
|
||||
fileInfo: FileItem;
|
||||
|
@@ -31,8 +31,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { fileTypeList, type fileTypeListItem } from '@/constant/file';
|
||||
|
||||
const route = useRoute();
|
||||
|
@@ -4,7 +4,6 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { fileExtendNameIconMap, imageTypeList } from '@/constant/file';
|
||||
import type { FileItem } from '@/api/system/file';
|
||||
import SvgIcon from '@/components/svg-icon/index.vue';
|
||||
|
@@ -72,7 +72,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { TableRowSelection } from '@arco-design/web-vue';
|
||||
import type { FileItem } from '@/api/system/file';
|
||||
import { reactive } from 'vue';
|
||||
import FileImg from './FileImg.vue';
|
||||
import FileRightMenu from './FileRightMenu.vue';
|
||||
|
||||
|
@@ -403,8 +403,6 @@
|
||||
del as delStorage,
|
||||
} from '@/api/system/storage';
|
||||
import { upload } from '@/api/common';
|
||||
import { onBeforeRouteUpdate, useRoute } from 'vue-router';
|
||||
import { getCurrentInstance, onMounted, reactive, ref, toRefs } from 'vue';
|
||||
import FileGrid from './FileGrid.vue';
|
||||
import FileList from './FileList.vue';
|
||||
import {
|
||||
|
@@ -345,7 +345,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive } from 'vue';
|
||||
import { TreeNodeData, TableData } from '@arco-design/web-vue';
|
||||
import {
|
||||
DataRecord,
|
||||
|
@@ -235,7 +235,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive } from 'vue';
|
||||
import { DataRecord, ListParam, list, del, read } from '@/api/system/message';
|
||||
|
||||
const { proxy } = getCurrentInstance() as any;
|
||||
|
@@ -422,7 +422,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive } from 'vue';
|
||||
import { TreeNodeData } from '@arco-design/web-vue';
|
||||
import {
|
||||
DataRecord,
|
||||
|
@@ -52,7 +52,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive, computed } from 'vue';
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import { BasicInfoModel, updateBasicInfo } from '@/api/system/user-center';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
@@ -56,7 +56,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, toRefs, reactive } from 'vue';
|
||||
import {
|
||||
OperationLogParam,
|
||||
OperationLogRecord,
|
||||
|
@@ -76,7 +76,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref } from 'vue';
|
||||
import {
|
||||
UserSocialBindRecord,
|
||||
listSocial,
|
||||
|
@@ -102,7 +102,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, reactive, computed } from 'vue';
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import { getMailCaptcha } from '@/api/common/captcha';
|
||||
import { UserEmailUpdateReq, updateEmail } from '@/api/system/user-center';
|
||||
|
@@ -109,7 +109,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, reactive, computed } from 'vue';
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import { BehaviorCaptchaReq, getSmsCaptcha } from '@/api/common/captcha';
|
||||
import { UserPhoneUpdateReq, updatePhone } from '@/api/system/user-center';
|
||||
|
@@ -94,7 +94,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, reactive, computed } from 'vue';
|
||||
import { FieldRule } from '@arco-design/web-vue';
|
||||
import { updatePassword } from '@/api/system/user-center';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
@@ -112,7 +112,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, ref, getCurrentInstance } from 'vue';
|
||||
import { FileItem } from '@arco-design/web-vue';
|
||||
import { uploadAvatar, cropperOptions } from '@/api/system/user-center';
|
||||
import { useUserStore } from '@/store';
|
||||
|
@@ -29,8 +29,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import UserPanel from './components/user-panel.vue';
|
||||
import BasicInfo from './components/basic-info.vue';
|
||||
import SecuritySettings from './components/security-settings.vue';
|
||||
|
@@ -514,7 +514,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { getCurrentInstance, ref, toRefs, reactive, watch } from 'vue';
|
||||
import { TreeNodeData } from '@arco-design/web-vue';
|
||||
import {
|
||||
DataRecord,
|
||||
|
Reference in New Issue
Block a user