fix:移除defineProps,defineEmits 两个全局宏命令引入,消除控制台警告

This commit is contained in:
落小梅 2022-02-05 20:05:16 +08:00
parent ef1c2b0f5a
commit b62f72baaf
54 changed files with 33 additions and 63 deletions

View File

@ -39,7 +39,7 @@
</template> </template>
<script setup name="LaySelect" lang="ts"> <script setup name="LaySelect" lang="ts">
import { defineProps, ref } from 'vue' import { ref } from 'vue'
import { useRouter, useRoute } from 'vue-router' import { useRouter, useRoute } from 'vue-router'
import { Recordable } from '../../../src/module/type' import { Recordable } from '../../../src/module/type'

View File

@ -5,7 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps } from "vue";
import "./index.less"; import "./index.less";
const props = defineProps<{ const props = defineProps<{

View File

@ -5,7 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps } from "vue";
</script> </script>
<template> <template>

View File

@ -6,8 +6,6 @@ export default {
<script lang="ts" setup> <script lang="ts" setup>
import { import {
defineProps,
defineEmits,
ref, ref,
shallowRef, shallowRef,
withDefaults, withDefaults,

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps } from "vue"; import { computed } from "vue";
import "./index.less"; import "./index.less";
export interface LayBadgeProps { export interface LayBadgeProps {

View File

@ -5,7 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps } from "vue";
import "./index.less"; import "./index.less";
const props = defineProps<{ const props = defineProps<{

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, provide, withDefaults } from "vue"; import { provide, withDefaults } from "vue";
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

View File

@ -17,7 +17,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, inject, useSlots } from "vue"; import { inject, useSlots } from "vue";
const slot = useSlots(); const slot = useSlots();

View File

@ -7,7 +7,6 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import { import {
withDefaults, withDefaults,
defineProps,
provide, provide,
useSlots, useSlots,
ref, ref,

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, inject } from "vue"; import { inject } from "vue";
const props = defineProps<{ const props = defineProps<{
id: string; id: string;

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps, inject } from "vue"; import { computed, inject } from "vue";
import "./index.less"; import "./index.less";
export interface LayCheckboxProps { export interface LayCheckboxProps {

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps, provide, ref, watch } from "vue"; import { provide, ref, watch } from "vue";
import { Recordable } from "../../types"; import { Recordable } from "../../types";
export interface LayCheckboxGroupProps { export interface LayCheckboxGroupProps {

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps } from "vue"; import { computed } from "vue";
const props = defineProps<{ const props = defineProps<{
md?: string; md?: string;

View File

@ -7,10 +7,8 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import { import {
withDefaults, withDefaults,
defineProps,
provide, provide,
ref, ref,
defineEmits,
watch, watch,
} from "vue"; } from "vue";

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { withDefaults, defineProps, inject, computed, ref } from "vue"; import { withDefaults, inject, computed, ref } from "vue";
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps } from "vue"; import { computed } from "vue";
import "./index.less"; import "./index.less";
export interface LayContainerProps { export interface LayContainerProps {

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, provide, ref, watch } from "vue"; import { provide, ref, watch } from "vue";
import { useClickOutside } from "@layui/hooks-vue"; import { useClickOutside } from "@layui/hooks-vue";
const dropdownRef = ref<null | HTMLElement>(null); const dropdownRef = ref<null | HTMLElement>(null);

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, withDefaults } from "vue"; import { withDefaults } from "vue";
import "./index.less"; import "./index.less";
export interface LayEmptyProps { export interface LayEmptyProps {

View File

@ -4,7 +4,7 @@ export default {
} }
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, useSlots } from "vue"; import { useSlots } from "vue";
import "./index.less"; import "./index.less";
export interface LayDropdownProps { export interface LayDropdownProps {

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, useSlots } from "vue"; import { useSlots } from "vue";
const slot = useSlots(); const slot = useSlots();

View File

@ -7,7 +7,6 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import "./index.less"; import "./index.less";
import { import {
defineProps,
inject, inject,
withDefaults, withDefaults,
ref, ref,

View File

@ -85,7 +85,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, Ref, ref } from "vue"; import { Ref, ref } from "vue";
import { LayIconList as icons } from "@layui/icons-vue"; import { LayIconList as icons } from "@layui/icons-vue";
export interface LayIconPickerProps { export interface LayIconPickerProps {

View File

@ -5,8 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, defineEmits } from "vue";
export interface LayInputProps { export interface LayInputProps {
name?: string; name?: string;
type?: string; type?: string;

View File

@ -10,8 +10,6 @@ import layIcon from "../icon/index";
import layInput from "../input/index"; import layInput from "../input/index";
import "./index.less"; import "./index.less";
import { import {
defineProps,
defineEmits,
ref, ref,
watch, watch,
withDefaults, withDefaults,

View File

@ -5,8 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps } from "vue";
const props = defineProps<{ const props = defineProps<{
theme?: string; theme?: string;
}>(); }>();

View File

@ -11,5 +11,4 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps } from "vue";
</script> </script>

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps, provide } from "vue"; import { computed, provide } from "vue";
import "./index.less"; import "./index.less";
export interface LayMenuProps { export interface LayMenuProps {

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, inject, Ref, useSlots } from "vue"; import { inject, Ref, useSlots } from "vue";
const slots = useSlots(); const slots = useSlots();

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, Ref, ref, watch, useSlots, computed } from "vue"; import { Ref, ref, watch, useSlots, computed } from "vue";
const slots = useSlots(); const slots = useSlots();

View File

@ -27,7 +27,6 @@ import {
CSSProperties, CSSProperties,
ref, ref,
watch, watch,
defineEmits,
onMounted, onMounted,
} from "vue"; } from "vue";
import { on } from "../../utils/domUtil"; import { on } from "../../utils/domUtil";

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps } from "vue"; import { computed } from "vue";
const props = defineProps<{ const props = defineProps<{
percent: number | string; percent: number | string;

View File

@ -5,8 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, defineEmits } from "vue";
const props = defineProps<{ const props = defineProps<{
modelValue: string; modelValue: string;
disabled?: boolean; disabled?: boolean;

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps, ref, withDefaults } from "vue"; import { computed, ref, withDefaults } from "vue";
import "./index.less"; import "./index.less";
export interface LayRateProps { export interface LayRateProps {

View File

@ -6,7 +6,7 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import "./index.less"; import "./index.less";
import { defineProps, useSlots } from "vue"; import { useSlots } from "vue";
export interface LayResultProps { export interface LayResultProps {
title?: string; title?: string;

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps } from "vue"; import { computed } from "vue";
import "./index.less"; import "./index.less";
export interface LayRowProps { export interface LayRowProps {

View File

@ -5,7 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps } from "vue";
</script> </script>
<template> <template>

View File

@ -8,7 +8,6 @@ export default {
import "./index.less"; import "./index.less";
import LaySelectOption from "../selectOption/index.vue"; import LaySelectOption from "../selectOption/index.vue";
import { import {
defineProps,
provide, provide,
isProxy, isProxy,
ref, ref,

View File

@ -7,7 +7,7 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import LayCheckbox from "../checkbox"; import LayCheckbox from "../checkbox";
import { SelectItem, SelectItemHandle, SelectItemPush } from "../../types"; import { SelectItem, SelectItemHandle, SelectItemPush } from "../../types";
import { computed, defineProps, inject, onMounted, Ref } from "vue"; import { computed, inject, onMounted, Ref } from "vue";
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps, CSSProperties } from "vue"; import { computed, CSSProperties } from "vue";
import "./index.less"; import "./index.less";
export interface LaySideProps { export interface LaySideProps {

View File

@ -7,7 +7,7 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import LaySkeletonItem from '../skeletonItem/index.vue' import LaySkeletonItem from '../skeletonItem/index.vue'
import './index.less' import './index.less'
import { defineProps, withDefaults} from "vue"; import { withDefaults} from "vue";
export interface LaySkeletonProps { export interface LaySkeletonProps {
rows?: number; rows?: number;

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, withDefaults} from "vue"; import { withDefaults} from "vue";
export interface LaySkeletonProps { export interface LaySkeletonProps {
type?: string; type?: string;

View File

@ -102,7 +102,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, Ref, ref, toRef } from "vue"; import { Ref, ref, toRef } from "vue";
import { on, off } from "evtd"; import { on, off } from "evtd";
import "./index.less"; import "./index.less";

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, provide, defineProps, withDefaults, onMounted } from "vue"; import { ref, watch, provide, withDefaults, onMounted } from "vue";
import "./index.less"; import "./index.less";
// //

View File

@ -13,7 +13,6 @@ import {
getCurrentInstance, getCurrentInstance,
onBeforeUnmount, onBeforeUnmount,
reactive, reactive,
defineProps,
withDefaults, withDefaults,
watch, watch,
} from "vue"; } from "vue";

View File

@ -9,9 +9,7 @@ import {
ref, ref,
watch, watch,
provide, provide,
defineProps,
withDefaults, withDefaults,
defineEmits,
} from "vue"; } from "vue";
import "./index.less"; import "./index.less";

View File

@ -13,7 +13,6 @@ import {
getCurrentInstance, getCurrentInstance,
onBeforeUnmount, onBeforeUnmount,
reactive, reactive,
defineProps,
withDefaults, withDefaults,
} from "vue"; } from "vue";

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, defineProps, inject, Ref, useSlots } from "vue"; import { computed, inject, Ref, useSlots } from "vue";
const slots = useSlots(); const slots = useSlots();

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, defineEmits, computed } from "vue"; import { computed } from "vue";
import "./index.less"; import "./index.less";
export interface LaySwitchProps { export interface LaySwitchProps {

View File

@ -7,7 +7,6 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import tabItem from "../tabItem/index.vue"; import tabItem from "../tabItem/index.vue";
import { import {
defineProps,
Component, Component,
computed, computed,
useSlots, useSlots,

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { withDefaults, defineProps, inject, Ref } from "vue"; import { withDefaults, inject, Ref } from "vue";
const props = withDefaults( const props = withDefaults(
defineProps<{ defineProps<{

View File

@ -9,9 +9,7 @@ import {
ref, ref,
watch, watch,
useSlots, useSlots,
defineProps,
withDefaults, withDefaults,
defineEmits,
onMounted, onMounted,
} from "vue"; } from "vue";
import { Recordable } from "../../types"; import { Recordable } from "../../types";

View File

@ -5,8 +5,6 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, defineEmits } from "vue";
export interface LayTextareaProps { export interface LayTextareaProps {
name?: string; name?: string;
modelValue?: string; modelValue?: string;

View File

@ -5,7 +5,7 @@ export default {
</script> </script>
<script setup lang="ts"> <script setup lang="ts">
import { defineProps, useSlots } from "vue"; import { useSlots } from "vue";
const slot = useSlots(); const slot = useSlots();

View File

@ -6,7 +6,7 @@ export default {
<script setup lang="ts"> <script setup lang="ts">
import "./index.less"; import "./index.less";
import { defineProps, Ref, ref, useSlots, watch } from "vue"; import { Ref, ref, useSlots, watch } from "vue";
import { Recordable } from "../../types"; import { Recordable } from "../../types";
const slot = useSlots(); const slot = useSlots();