refactor: 引入 unplugin-auto-import,减少重复性 Vue 函数引入

避免在每个 Vue 组件中都重复性的去声明 ref 等函数
This commit is contained in:
2024-01-07 23:54:43 +08:00
parent b2aa7114bc
commit b56f029e68
55 changed files with 302 additions and 63 deletions

View File

@@ -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';

View File

@@ -56,7 +56,6 @@
</template>
<script lang="ts" setup>
import { ref, toRefs, reactive } from 'vue';
import {
OperationLogParam,
OperationLogRecord,

View File

@@ -76,7 +76,6 @@
</template>
<script lang="ts" setup>
import { getCurrentInstance, ref } from 'vue';
import {
UserSocialBindRecord,
listSocial,

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';