mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-15 14:03:36 +08:00
feat: use unplugin-vue-define-options add setup name
This commit is contained in:
@@ -1,3 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
defineOptions({
|
||||
name: "Menu1-1"
|
||||
});
|
||||
|
||||
let input = ref("");
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>{{ t("menus.hsmenu1") }}</p>
|
||||
@@ -5,18 +17,3 @@
|
||||
<el-input v-model="input" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { defineComponent, ref } from "vue";
|
||||
export default defineComponent({
|
||||
name: "Menu1-1",
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
return {
|
||||
input: ref(""),
|
||||
t
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
defineOptions({
|
||||
name: "Menu1-2-1"
|
||||
});
|
||||
|
||||
let input = ref("");
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>{{ t("menus.hsmenu1") }}</p>
|
||||
@@ -6,18 +18,3 @@
|
||||
<el-input v-model="input" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { defineComponent, ref } from "vue";
|
||||
export default defineComponent({
|
||||
name: "Menu1-2-1",
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
return {
|
||||
input: ref(""),
|
||||
t
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
defineOptions({
|
||||
name: "Menu1-2-2"
|
||||
});
|
||||
|
||||
let input = ref("");
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>{{ t("menus.hsmenu1") }}</p>
|
||||
@@ -6,18 +18,3 @@
|
||||
<el-input v-model="input" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { defineComponent, ref } from "vue";
|
||||
export default defineComponent({
|
||||
name: "Menu1-2-2",
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
return {
|
||||
input: ref(""),
|
||||
t
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,3 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
defineOptions({
|
||||
name: "Menu1-3"
|
||||
});
|
||||
|
||||
let input = ref("");
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>{{ t("menus.hsmenu1") }}</p>
|
||||
@@ -5,18 +17,3 @@
|
||||
<el-input v-model="input" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { defineComponent, ref } from "vue";
|
||||
export default defineComponent({
|
||||
name: "Menu1-3",
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
return {
|
||||
input: ref(""),
|
||||
t
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
defineOptions({
|
||||
name: "Menu2"
|
||||
});
|
||||
|
||||
let input = ref("");
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<p>{{ t("menus.hsmenu2") }}</p>
|
||||
<el-input v-model="input" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { defineComponent, ref } from "vue";
|
||||
export default defineComponent({
|
||||
name: "Menu2",
|
||||
setup() {
|
||||
const { t } = useI18n();
|
||||
return {
|
||||
input: ref(""),
|
||||
t
|
||||
};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user