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,6 +1,11 @@
<script setup lang="ts">
import { ref } from "vue";
import { loadEnv } from "@build/index";
defineOptions({
name: "Button"
});
const { VITE_PUBLIC_PATH } = loadEnv();
const url = ref(`${VITE_PUBLIC_PATH}html/button.html`);

View File

@@ -2,6 +2,10 @@
import basic from "./basic.vue";
import menuGroup from "./menuGroup.vue";
import menuDynamic from "./menuDynamic.vue";
defineOptions({
name: "ContextMenu"
});
</script>
<template>

View File

@@ -1,5 +1,9 @@
<script setup lang="ts">
import { ReNormalCountTo, ReboundCountTo } from "/@/components/ReCountTo";
defineOptions({
name: "CountTo"
});
</script>
<template>

View File

@@ -3,6 +3,10 @@ import { ref, nextTick, getCurrentInstance } from "vue";
import Cropper from "/@/components/ReCropper";
import img from "./picture.jpeg";
defineOptions({
name: "Cropping"
});
let info = ref<object>(null);
let cropperImg = ref<string>("");
const instance = getCurrentInstance();

View File

@@ -3,6 +3,10 @@ import { ref, onMounted } from "vue";
import draggable from "vuedraggable/src/vuedraggable";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "Draggable"
});
let gridLists = ref<Array<Object>>([
{ grid: "cn", num: 1 },
{ grid: "cn", num: 2 },
@@ -36,7 +40,6 @@ const change = (evt): void => {
onMounted(() => {
// 使用原生sortable实现元素位置切换
// @ts-ignore
// eslint-disable-next-line no-undef
new Sortable(document.querySelector(".cut-container"), {
swap: true,
forceFallback: true,

View File

@@ -1,5 +1,9 @@
<script setup lang="ts">
import { Amap } from "/@/components/ReMap";
defineOptions({
name: "Map"
});
</script>
<template>

View File

@@ -3,7 +3,10 @@ import { ref, reactive, unref } from "vue";
import { templateRef } from "@vueuse/core";
import SeamlessScroll from "/@/components/ReSeamlessScroll";
// eslint-disable-next-line no-undef
defineOptions({
name: "SeamlessScroll"
});
const scroll = templateRef<ElRef | null>("scroll", null);
let listData = ref([

View File

@@ -2,6 +2,10 @@
import { ref } from "vue";
import Selector from "/@/components/ReSelector";
defineOptions({
name: "Selector"
});
let selectRange = ref<string>("");
let dataLists = ref([
{

View File

@@ -2,6 +2,10 @@
import splitpane, { ContextProps } from "/@/components/ReSplitPane";
import { reactive } from "vue";
defineOptions({
name: "SplitPane"
});
const settingLR: ContextProps = reactive({
minPercent: 20,
defaultPercent: 40,

View File

@@ -7,6 +7,10 @@ import { deviceDetection } from "/@/utils/deviceDetection";
import playbackRate from "xgplayer/es/controls/playbackRate";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "Video"
});
onMounted(() => {
new Player({
id: "mse",