feat: use unplugin-vue-define-options add setup name

This commit is contained in:
xiaoxian521
2022-05-21 12:29:54 +08:00
parent dca722cb29
commit 747e2b9c1c
93 changed files with 2387 additions and 4420 deletions

View File

@@ -1,13 +1,11 @@
<script lang="ts">
export default {
name: "ReBarcode"
};
</script>
<script setup lang="ts">
import JsBarcode from "jsbarcode";
import { ref, onMounted } from "vue";
defineOptions({
name: "ReBarcode"
});
const props = defineProps({
tag: {
type: String,

View File

@@ -10,7 +10,7 @@ import { countToProps } from "./props";
import { isNumber } from "/@/utils/is";
export default defineComponent({
name: "Normal",
name: "ReNormalCountTo",
props: countToProps,
emits: ["mounted", "callback"],
setup(props, { emit }) {

View File

@@ -10,7 +10,7 @@ import {
import { reboundProps } from "./props";
export default defineComponent({
name: "Rebound",
name: "ReboundCountTo",
props: reboundProps,
setup(props) {
const timer = ref(null);

View File

@@ -74,7 +74,7 @@ const props = {
};
export default defineComponent({
name: "Cropper",
name: "ReCropper",
props,
setup(props) {
const cropper: any = ref<Nullable<Cropper>>(null);

View File

@@ -20,7 +20,7 @@ export interface attrsType {
*/
export function useRenderFlicker(attrs?: attrsType): Component {
return defineComponent({
name: "Flicker",
name: "ReFlicker",
render() {
return h(
"div",

View File

@@ -15,7 +15,7 @@ const props = {
};
export default defineComponent({
name: "Filpper",
name: "ReFlop",
props,
setup(props) {
// eslint-disable-next-line vue/no-setup-props-destructure

View File

@@ -4,6 +4,10 @@ import { ref, computed, CSSProperties, toRef, watch } from "vue";
import { IconJson } from "/@/components/ReIcon/data";
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;
defineOptions({
name: "IconSelect"
});
const props = defineProps({
modelValue: {
require: false,

View File

@@ -2,7 +2,7 @@ import { h, defineComponent } from "vue";
// 封装iconfont组件默认`font-class`引用模式,支持`unicode`引用、`font-class`引用、`symbol`引用 https://www.iconfont.cn/help/detail?spm=a313x.7781069.1998910419.20&helptype=code
export default defineComponent({
name: "fontIcon",
name: "FontIcon",
props: {
icon: {
type: String,

View File

@@ -147,7 +147,7 @@ addIcon("location-company", LocationCompany);
// Iconify Icon在Vue里离线使用用于内网环境https://docs.iconify.design/icon-components/vue/offline.html
export default defineComponent({
name: "IconifyIcon",
name: "IconifyIconOffline",
components: { IconifyIcon },
props: {
icon: {

View File

@@ -3,7 +3,7 @@ import { Icon as IconifyIcon } from "@iconify/vue";
// Iconify Icon在Vue里在线使用用于外网环境
export default defineComponent({
name: "IconifyIcon",
name: "IconifyIconOnline",
components: { IconifyIcon },
props: {
icon: {

View File

@@ -1,13 +1,11 @@
<script lang="ts">
export default {
name: "ReImageVerify"
};
</script>
<script setup lang="ts">
import { watch } from "vue";
import { useImageVerify } from "./hooks";
defineOptions({
name: "ReImageVerify"
});
interface Props {
code?: string;
}

View File

@@ -15,6 +15,10 @@ export interface MapConfigureInter {
plugin?: Fn;
}
defineOptions({
name: "Amap"
});
type resultType = {
info: Array<undefined>;
};

View File

@@ -11,6 +11,10 @@ import * as utilsMethods from "./utils";
const { animationFrame, copyObj } = utilsMethods;
animationFrame();
defineOptions({
name: "ReSeamlessScroll"
});
const props = defineProps({
data: {
type: Array as PropType<unknown>

View File

@@ -50,7 +50,7 @@ const props = {
};
export default defineComponent({
name: "Selector",
name: "ReSelector",
props,
emits: ["selectedVal"],
setup(props, { emit }) {

View File

@@ -10,7 +10,7 @@ export interface ContextProps {
/** 切割面板组件 */
export default defineComponent({
name: "splitPane",
name: "SplitPane",
components: { resizer },
props: {
splitSet: {

View File

@@ -2,7 +2,7 @@ import { computed, unref, defineComponent } from "vue";
import "./resizer.css";
export default defineComponent({
name: "resizer",
name: "Resizer",
props: {
split: {
type: String,

View File

@@ -43,7 +43,7 @@ const props = {
};
export default defineComponent({
name: "epTableProBar",
name: "EpTableProBar",
props,
emits: ["refresh"],
setup(props, { emit, slots, attrs }) {

View File

@@ -11,7 +11,7 @@ import type {
/** 树形连接线组件 */
export default defineComponent({
name: "el-tree-line",
name: "ReTreeLine",
props: {
node: {
type: Object as PropType<TreeNode>,