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

@ -49,6 +49,29 @@ module.exports = {
jsx: true jsx: true
} }
}, },
overrides: [
{
files: ["*.ts", "*.vue"],
rules: {
"no-undef": "off"
}
},
{
files: ["*.vue"],
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".vue"],
ecmaVersion: "latest",
ecmaFeatures: {
jsx: true
}
},
rules: {
"no-undef": "off"
}
}
],
rules: { rules: {
"vue/no-v-html": "off", "vue/no-v-html": "off",
"vue/require-default-prop": "off", "vue/require-default-prop": "off",
@ -94,4 +117,4 @@ module.exports = {
} }
] ]
} }
}; }

View File

@ -11,6 +11,7 @@ import { visualizer } from "rollup-plugin-visualizer";
import removeConsole from "vite-plugin-remove-console"; import removeConsole from "vite-plugin-remove-console";
import themePreprocessorPlugin from "@pureadmin/theme"; import themePreprocessorPlugin from "@pureadmin/theme";
import { genScssMultipleScopeVars } from "/@/layout/theme"; import { genScssMultipleScopeVars } from "/@/layout/theme";
import DefineOptions from "unplugin-vue-define-options/vite";
export function getPluginsList(command, VITE_LEGACY) { export function getPluginsList(command, VITE_LEGACY) {
const prodMock = true; const prodMock = true;
@ -26,6 +27,7 @@ export function getPluginsList(command, VITE_LEGACY) {
// jsx、tsx语法支持 // jsx、tsx语法支持
vueJsx(), vueJsx(),
Unocss(), Unocss(),
DefineOptions(),
// 线上环境删除console // 线上环境删除console
removeConsole(), removeConsole(),
viteBuildInfo(), viteBuildInfo(),

View File

@ -13,7 +13,7 @@ const systemRouter = {
children: [ children: [
{ {
path: "/system/user/index", path: "/system/user/index",
name: "user", name: "User",
meta: { meta: {
icon: "flUser", icon: "flUser",
title: "menus.hsUser" title: "menus.hsUser"
@ -21,7 +21,7 @@ const systemRouter = {
}, },
{ {
path: "/system/role/index", path: "/system/role/index",
name: "role", name: "Role",
meta: { meta: {
icon: "role", icon: "role",
title: "menus.hsRole" title: "menus.hsRole"
@ -29,7 +29,7 @@ const systemRouter = {
}, },
{ {
path: "/system/dept/index", path: "/system/dept/index",
name: "dept", name: "Dept",
meta: { meta: {
icon: "dept", icon: "dept",
title: "menus.hsDept" title: "menus.hsDept"
@ -38,7 +38,7 @@ const systemRouter = {
{ {
path: "/system/dict", path: "/system/dict",
component: "/system/dict/index", component: "/system/dict/index",
name: "dict", name: "Dict",
meta: { meta: {
icon: "dict", icon: "dict",
title: "menus.hsDict", title: "menus.hsDict",
@ -59,14 +59,14 @@ const permissionRouter = {
children: [ children: [
{ {
path: "/permission/page/index", path: "/permission/page/index",
name: "permissionPage", name: "PermissionPage",
meta: { meta: {
title: "menus.permissionPage" title: "menus.permissionPage"
} }
}, },
{ {
path: "/permission/button/index", path: "/permission/button/index",
name: "permissionButton", name: "PermissionButton",
meta: { meta: {
title: "menus.permissionButton", title: "menus.permissionButton",
authority: [] authority: []
@ -86,7 +86,7 @@ const frameRouter = {
children: [ children: [
{ {
path: "/iframe/pure", path: "/iframe/pure",
name: "reFramePure", name: "FramePure",
meta: { meta: {
title: "menus.hsPureDocument", title: "menus.hsPureDocument",
frameSrc: "https://pure-admin-doc.vercel.app" frameSrc: "https://pure-admin-doc.vercel.app"
@ -101,7 +101,7 @@ const frameRouter = {
}, },
{ {
path: "/iframe/ep", path: "/iframe/ep",
name: "reFrameEp", name: "FrameEp",
meta: { meta: {
title: "menus.hsEpDocument", title: "menus.hsEpDocument",
frameSrc: "https://element-plus.org/zh-CN/" frameSrc: "https://element-plus.org/zh-CN/"
@ -121,14 +121,14 @@ const tabsRouter = {
children: [ children: [
{ {
path: "/tabs/index", path: "/tabs/index",
name: "reTabs", name: "Tabs",
meta: { meta: {
title: "menus.hstabs" title: "menus.hstabs"
} }
}, },
{ {
path: "/tabs/detail", path: "/tabs/detail",
name: "tabDetail", name: "TabDetail",
meta: { meta: {
title: "", title: "",
showLink: false, showLink: false,

View File

@ -29,16 +29,16 @@
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1", "@amap/amap-jsapi-loader": "^1.0.1",
"@ctrl/tinycolor": "^3.4.1", "@ctrl/tinycolor": "^3.4.1",
"@logicflow/core": "^1.1.15", "@logicflow/core": "^1.1.16",
"@logicflow/extension": "^1.1.15", "@logicflow/extension": "^1.1.16",
"@pureadmin/components": "^1.0.6", "@pureadmin/components": "^1.0.6",
"@vueuse/core": "^8.4.2", "@vueuse/core": "^8.5.0",
"@vueuse/motion": "^2.0.0-beta.12", "@vueuse/motion": "^2.0.0-beta.12",
"@vueuse/shared": "^8.4.2", "@vueuse/shared": "^8.5.0",
"@wangeditor/editor": "^5.0.1", "@wangeditor/editor": "^5.0.1",
"@wangeditor/editor-for-vue": "^5.1.10", "@wangeditor/editor-for-vue": "^5.1.10",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"axios": "^0.27.1", "axios": "^0.27.2",
"china-area-data": "^5.0.1", "china-area-data": "^5.0.1",
"cropperjs": "^1.5.12", "cropperjs": "^1.5.12",
"css-color-function": "^1.3.3", "css-color-function": "^1.3.3",
@ -64,7 +64,7 @@
"rgb-hex": "^4.0.0", "rgb-hex": "^4.0.0",
"swiper": "^8.1.4", "swiper": "^8.1.4",
"v-contextmenu": "3.0.0", "v-contextmenu": "3.0.0",
"vue": "^3.2.33", "vue": "^3.2.34",
"vue-form-create2": "^1.2.8", "vue-form-create2": "^1.2.8",
"vue-i18n": "^9.2.0-beta.35", "vue-i18n": "^9.2.0-beta.35",
"vue-json-pretty": "^2.0.2", "vue-json-pretty": "^2.0.2",
@ -103,7 +103,7 @@
"@typescript-eslint/eslint-plugin": "^5.10.2", "@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2", "@typescript-eslint/parser": "^5.10.2",
"@vitejs/plugin-legacy": "^1.8.2", "@vitejs/plugin-legacy": "^1.8.2",
"@vitejs/plugin-vue": "^2.3.2", "@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.3.10", "@vitejs/plugin-vue-jsx": "^1.3.10",
"@vue/eslint-config-prettier": "^7.0.0", "@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0", "@vue/eslint-config-typescript": "^10.0.0",
@ -134,6 +134,7 @@
"stylelint-order": "^5.0.0", "stylelint-order": "^5.0.0",
"typescript": "^4.6.3", "typescript": "^4.6.3",
"unocss": "^0.33.4", "unocss": "^0.33.4",
"unplugin-vue-define-options": "^0.6.1",
"vite": "^2.9.9", "vite": "^2.9.9",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-plugin-remove-console": "^0.0.7", "vite-plugin-remove-console": "^0.0.7",

6179
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -15,7 +15,7 @@ const props = {
}; };
export default defineComponent({ export default defineComponent({
name: "Filpper", name: "ReFlop",
props, props,
setup(props) { setup(props) {
// eslint-disable-next-line vue/no-setup-props-destructure // 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"; import { IconJson } from "/@/components/ReIcon/data";
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined; type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;
defineOptions({
name: "IconSelect"
});
const props = defineProps({ const props = defineProps({
modelValue: { modelValue: {
require: false, 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 // 封装iconfont组件默认`font-class`引用模式,支持`unicode`引用、`font-class`引用、`symbol`引用 https://www.iconfont.cn/help/detail?spm=a313x.7781069.1998910419.20&helptype=code
export default defineComponent({ export default defineComponent({
name: "fontIcon", name: "FontIcon",
props: { props: {
icon: { icon: {
type: String, type: String,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,6 +13,10 @@ import { useI18n } from "vue-i18n";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { ref, unref, onMounted, nextTick } from "vue"; import { ref, unref, onMounted, nextTick } from "vue";
defineOptions({
name: "FrameView"
});
const { t } = useI18n(); const { t } = useI18n();
const loading = ref(false); const loading = ref(false);
const currentRoute = useRoute(); const currentRoute = useRoute();

View File

@ -2,6 +2,10 @@
import { unref } from "vue"; import { unref } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
defineOptions({
name: "Redirect"
});
const { currentRoute, replace } = useRouter(); const { currentRoute, replace } = useRouter();
const { params, query } = unref(currentRoute); const { params, query } = unref(currentRoute);

View File

@ -103,7 +103,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
const newMatched = to.matched; const newMatched = to.matched;
handleAliveRoute(newMatched, "add"); handleAliveRoute(newMatched, "add");
// 页面整体刷新和点击标签页刷新 // 页面整体刷新和点击标签页刷新
if (_from.name === undefined || _from.name === "redirect") { if (_from.name === undefined || _from.name === "Redirect") {
handleAliveRoute(newMatched); handleAliveRoute(newMatched);
} }
} }

View File

@ -13,7 +13,7 @@ const ableRouter = {
children: [ children: [
{ {
path: "/able/watermark", path: "/able/watermark",
name: "reWatermark", name: "WaterMark",
component: () => import("/@/views/able/watermark.vue"), component: () => import("/@/views/able/watermark.vue"),
meta: { meta: {
title: $t("menus.hsWatermark") title: $t("menus.hsWatermark")
@ -21,7 +21,7 @@ const ableRouter = {
}, },
{ {
path: "/able/print", path: "/able/print",
name: "rePrint", name: "Print",
component: () => import("/@/views/able/print.vue"), component: () => import("/@/views/able/print.vue"),
meta: { meta: {
title: $t("menus.hsPrint") title: $t("menus.hsPrint")
@ -29,7 +29,7 @@ const ableRouter = {
}, },
{ {
path: "/able/iconSelect", path: "/able/iconSelect",
name: "reIconSelect", name: "IconSelect",
component: () => import("/@/views/able/icon-select.vue"), component: () => import("/@/views/able/icon-select.vue"),
meta: { meta: {
title: $t("menus.hsIconSelect") title: $t("menus.hsIconSelect")
@ -37,7 +37,7 @@ const ableRouter = {
}, },
{ {
path: "/able/timeline", path: "/able/timeline",
name: "reTimeline", name: "TimeLine",
component: () => import("/@/views/able/timeline.vue"), component: () => import("/@/views/able/timeline.vue"),
meta: { meta: {
title: $t("menus.hsTimeline") title: $t("menus.hsTimeline")
@ -45,7 +45,7 @@ const ableRouter = {
}, },
{ {
path: "/able/menuTree", path: "/able/menuTree",
name: "reMenuTree", name: "MenuTree",
component: () => import("/@/views/able/menu-tree.vue"), component: () => import("/@/views/able/menu-tree.vue"),
meta: { meta: {
title: $t("menus.hsMenuTree") title: $t("menus.hsMenuTree")
@ -53,7 +53,7 @@ const ableRouter = {
}, },
{ {
path: "/able/lineTree", path: "/able/lineTree",
name: "reLineTree", name: "LineTree",
component: () => import("/@/views/able/line-tree.vue"), component: () => import("/@/views/able/line-tree.vue"),
meta: { meta: {
title: $t("menus.hsLineTree") title: $t("menus.hsLineTree")
@ -61,7 +61,7 @@ const ableRouter = {
}, },
{ {
path: "/able/antTabs", path: "/able/antTabs",
name: "reAntTabs", name: "AntTabs",
component: () => import("/@/views/able/ant-tabs.vue"), component: () => import("/@/views/able/ant-tabs.vue"),
meta: { meta: {
title: $t("menus.hsAntTabs") title: $t("menus.hsAntTabs")
@ -69,7 +69,7 @@ const ableRouter = {
}, },
{ {
path: "/able/antAnchor", path: "/able/antAnchor",
name: "reAntAnchor", name: "AntAnchor",
component: () => import("/@/views/able/ant-anchor.vue"), component: () => import("/@/views/able/ant-anchor.vue"),
meta: { meta: {
title: $t("menus.hsAntAnchor") title: $t("menus.hsAntAnchor")
@ -77,7 +77,7 @@ const ableRouter = {
}, },
{ {
path: "/able/antTreeSelect", path: "/able/antTreeSelect",
name: "reAntTreeSelect", name: "AntTreeSelect",
component: () => import("/@/views/able/ant-treeSelect.vue"), component: () => import("/@/views/able/ant-treeSelect.vue"),
meta: { meta: {
title: $t("menus.hsAntTreeSelect") title: $t("menus.hsAntTreeSelect")
@ -85,7 +85,7 @@ const ableRouter = {
}, },
{ {
path: "/able/debounce", path: "/able/debounce",
name: "reDebounce", name: "Debounce",
component: () => import("/@/views/able/debounce.vue"), component: () => import("/@/views/able/debounce.vue"),
meta: { meta: {
title: $t("menus.hsDebounce") title: $t("menus.hsDebounce")
@ -93,7 +93,7 @@ const ableRouter = {
}, },
{ {
path: "/able/barcode", path: "/able/barcode",
name: "reBarcode", name: "BarCode",
component: () => import("/@/views/able/barcode.vue"), component: () => import("/@/views/able/barcode.vue"),
meta: { meta: {
title: $t("menus.hsBarcode") title: $t("menus.hsBarcode")
@ -101,7 +101,7 @@ const ableRouter = {
}, },
{ {
path: "/able/qrcode", path: "/able/qrcode",
name: "reQrcode", name: "QrCode",
component: () => import("/@/views/able/qrcode.vue"), component: () => import("/@/views/able/qrcode.vue"),
meta: { meta: {
title: $t("menus.hsQrcode") title: $t("menus.hsQrcode")
@ -109,7 +109,7 @@ const ableRouter = {
}, },
{ {
path: "/able/cascader", path: "/able/cascader",
name: "reCascader", name: "Cascader",
component: () => import("/@/views/able/cascader.vue"), component: () => import("/@/views/able/cascader.vue"),
meta: { meta: {
title: $t("menus.hsCascader") title: $t("menus.hsCascader")
@ -117,7 +117,7 @@ const ableRouter = {
}, },
{ {
path: "/able/swiper", path: "/able/swiper",
name: "reSwiper", name: "Swiper",
component: () => import("/@/views/able/swiper.vue"), component: () => import("/@/views/able/swiper.vue"),
meta: { meta: {
title: $t("menus.hsSwiper") title: $t("menus.hsSwiper")
@ -125,7 +125,7 @@ const ableRouter = {
}, },
{ {
path: "/able/virtualList", path: "/able/virtualList",
name: "reVirtualList", name: "VirtualList",
component: () => import("/@/views/able/virtual-list/index.vue"), component: () => import("/@/views/able/virtual-list/index.vue"),
meta: { meta: {
title: $t("menus.hsVirtualList") title: $t("menus.hsVirtualList")

View File

@ -13,7 +13,7 @@ const aboutRouter = {
children: [ children: [
{ {
path: "/about/index", path: "/about/index",
name: "reAbout", name: "About",
component: () => import("/@/views/about/index.vue"), component: () => import("/@/views/about/index.vue"),
meta: { meta: {
title: $t("menus.hsAbout") title: $t("menus.hsAbout")

View File

@ -13,7 +13,7 @@ const componentsRouter = {
children: [ children: [
{ {
path: "/components/video", path: "/components/video",
name: "video", name: "Video",
component: () => import("/@/views/components/video/index.vue"), component: () => import("/@/views/components/video/index.vue"),
meta: { meta: {
title: $t("menus.hsvideo") title: $t("menus.hsvideo")
@ -21,7 +21,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/map", path: "/components/map",
name: "map", name: "Map",
component: () => import("/@/views/components/map/index.vue"), component: () => import("/@/views/components/map/index.vue"),
meta: { meta: {
title: $t("menus.hsmap"), title: $t("menus.hsmap"),
@ -33,7 +33,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/draggable", path: "/components/draggable",
name: "draggable", name: "Draggable",
component: () => import("/@/views/components/draggable/index.vue"), component: () => import("/@/views/components/draggable/index.vue"),
meta: { meta: {
title: $t("menus.hsdraggable"), title: $t("menus.hsdraggable"),
@ -43,10 +43,9 @@ const componentsRouter = {
} }
} }
}, },
{ {
path: "/components/splitPane", path: "/components/splitPane",
name: "splitPane", name: "SplitPane",
component: () => import("/@/views/components/split-pane/index.vue"), component: () => import("/@/views/components/split-pane/index.vue"),
meta: { meta: {
title: $t("menus.hssplitPane"), title: $t("menus.hssplitPane"),
@ -58,7 +57,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/button", path: "/components/button",
name: "button", name: "Button",
component: () => import("/@/views/components/button/index.vue"), component: () => import("/@/views/components/button/index.vue"),
meta: { meta: {
title: $t("menus.hsbutton") title: $t("menus.hsbutton")
@ -66,7 +65,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/cropping", path: "/components/cropping",
name: "cropping", name: "Cropping",
component: () => import("/@/views/components/cropping/index.vue"), component: () => import("/@/views/components/cropping/index.vue"),
meta: { meta: {
title: $t("menus.hscropping") title: $t("menus.hscropping")
@ -74,7 +73,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/countTo", path: "/components/countTo",
name: "countTo", name: "CountTo",
component: () => import("/@/views/components/count-to/index.vue"), component: () => import("/@/views/components/count-to/index.vue"),
meta: { meta: {
title: $t("menus.hscountTo") title: $t("menus.hscountTo")
@ -82,7 +81,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/selector", path: "/components/selector",
name: "selector", name: "Selector",
component: () => import("/@/views/components/selector/index.vue"), component: () => import("/@/views/components/selector/index.vue"),
meta: { meta: {
title: $t("menus.hsselector") title: $t("menus.hsselector")
@ -90,7 +89,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/seamlessScroll", path: "/components/seamlessScroll",
name: "seamlessScroll", name: "SeamlessScroll",
component: () => import("/@/views/components/seamless-scroll/index.vue"), component: () => import("/@/views/components/seamless-scroll/index.vue"),
meta: { meta: {
title: $t("menus.hsseamless") title: $t("menus.hsseamless")
@ -98,7 +97,7 @@ const componentsRouter = {
}, },
{ {
path: "/components/contextmenu", path: "/components/contextmenu",
name: "contextmenu", name: "ContextMenu",
component: () => import("/@/views/components/contextmenu/index.vue"), component: () => import("/@/views/components/contextmenu/index.vue"),
meta: { meta: {
title: $t("menus.hscontextmenu") title: $t("menus.hscontextmenu")

View File

@ -13,7 +13,7 @@ const editorRouter = {
children: [ children: [
{ {
path: "/editor/index", path: "/editor/index",
name: "reEditor", name: "Editor",
component: () => import("/@/views/editor/index.vue"), component: () => import("/@/views/editor/index.vue"),
meta: { meta: {
title: $t("menus.hseditor"), title: $t("menus.hseditor"),

View File

@ -13,7 +13,7 @@ const flowChartRouter = {
children: [ children: [
{ {
path: "/flowChart/index", path: "/flowChart/index",
name: "flowChart", name: "FlowChart",
component: () => import("/@/views/flow-chart/index.vue"), component: () => import("/@/views/flow-chart/index.vue"),
meta: { meta: {
title: $t("menus.hsflowChart") title: $t("menus.hsflowChart")

View File

@ -13,7 +13,7 @@ const formDesignRouter = {
children: [ children: [
{ {
path: "/formDesign/index", path: "/formDesign/index",
name: "formDesign", name: "FormDesign",
component: () => import("/@/views/form-design/index.vue"), component: () => import("/@/views/form-design/index.vue"),
meta: { meta: {
title: $t("menus.hsFormDesign") title: $t("menus.hsFormDesign")

View File

@ -13,7 +13,7 @@ const guideRouter = {
children: [ children: [
{ {
path: "/guide/index", path: "/guide/index",
name: "reGuide", name: "Guide",
component: () => import("/@/views/guide/index.vue"), component: () => import("/@/views/guide/index.vue"),
meta: { meta: {
title: $t("menus.hsguide") title: $t("menus.hsguide")

View File

@ -13,7 +13,7 @@ const ableRouter = {
children: [ children: [
{ {
path: "/list/card", path: "/list/card",
name: "listCard", name: "ListCard",
component: () => import("/@/views/list/card/index.vue"), component: () => import("/@/views/list/card/index.vue"),
meta: { meta: {
icon: "card", icon: "card",

View File

@ -13,7 +13,7 @@ const pptRouter = {
children: [ children: [
{ {
path: "/ppt/index", path: "/ppt/index",
name: "reFrameppt", name: "FramePpt",
component: IFrame, component: IFrame,
meta: { meta: {
title: "PPT", title: "PPT",

View File

@ -4,7 +4,7 @@ const Layout = () => import("/@/layout/index.vue");
const remainingRouter = [ const remainingRouter = [
{ {
path: "/login", path: "/login",
name: "login", name: "Login",
component: () => import("/@/views/login/index.vue"), component: () => import("/@/views/login/index.vue"),
meta: { meta: {
title: $t("menus.hslogin"), title: $t("menus.hslogin"),
@ -24,7 +24,7 @@ const remainingRouter = [
children: [ children: [
{ {
path: "/redirect/:path(.*)", path: "/redirect/:path(.*)",
name: "redirect", name: "Redirect",
component: () => import("/@/layout/redirect.vue") component: () => import("/@/layout/redirect.vue")
} }
] ]

View File

@ -13,7 +13,7 @@ const resultRouter = {
children: [ children: [
{ {
path: "/result/success", path: "/result/success",
name: "reSuccess", name: "Success",
component: () => import("/@/views/result/success.vue"), component: () => import("/@/views/result/success.vue"),
meta: { meta: {
title: $t("menus.hsSuccess") title: $t("menus.hsSuccess")
@ -21,7 +21,7 @@ const resultRouter = {
}, },
{ {
path: "/result/fail", path: "/result/fail",
name: "reFail", name: "Fail",
component: () => import("/@/views/result/fail.vue"), component: () => import("/@/views/result/fail.vue"),
meta: { meta: {
title: $t("menus.hsFail") title: $t("menus.hsFail")

View File

@ -1,6 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { Anchor, AnchorLink } from "@pureadmin/components"; import { Anchor, AnchorLink } from "@pureadmin/components";
defineOptions({
name: "AntAnchor"
});
function handleAnchorClick(e, link) { function handleAnchorClick(e, link) {
e.preventDefault(); e.preventDefault();
const srcolls = document.getElementById(link.href); const srcolls = document.getElementById(link.href);

View File

@ -2,6 +2,10 @@
import { ref } from "vue"; import { ref } from "vue";
import { Tabs, TabPane } from "@pureadmin/components"; import { Tabs, TabPane } from "@pureadmin/components";
defineOptions({
name: "AntTabs"
});
const mode = ref("top"); const mode = ref("top");
const activeKey = ref(1); const activeKey = ref(1);
const callback = (val: string) => { const callback = (val: string) => {

View File

@ -2,6 +2,10 @@
import { ref } from "vue"; import { ref } from "vue";
import { TreeSelect } from "@pureadmin/components"; import { TreeSelect } from "@pureadmin/components";
defineOptions({
name: "AntTreeSelect"
});
const value1 = ref<string>(""); const value1 = ref<string>("");
const treeData1 = ref([ const treeData1 = ref([
{ {

View File

@ -1,6 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import ReBarcode from "/@/components/ReBarcode"; import ReBarcode from "/@/components/ReBarcode";
defineOptions({
name: "BarCode"
});
const barcodes = [ const barcodes = [
{ {
text: "CODE128", text: "CODE128",

View File

@ -9,6 +9,10 @@ import {
} from "/@/utils/chinaArea"; } from "/@/utils/chinaArea";
import { ref } from "vue"; import { ref } from "vue";
defineOptions({
name: "Cascader"
});
const selectedOptions1 = ref(["110000", "110100"]); const selectedOptions1 = ref(["110000", "110100"]);
const selectedOptions2 = ref(["120000", "120100", "120101"]); const selectedOptions2 = ref(["120000", "120100", "120101"]);
const selectedOptions3 = ref(["130000", ""]); const selectedOptions3 = ref(["130000", ""]);

View File

@ -3,6 +3,10 @@ import { ElMessage } from "element-plus";
import { debounce } from "/@/utils/debounce"; import { debounce } from "/@/utils/debounce";
import { useDebounceFn, useThrottleFn } from "@vueuse/core"; import { useDebounceFn, useThrottleFn } from "@vueuse/core";
defineOptions({
name: "Debounce"
});
const handle = () => { const handle = () => {
ElMessage({ ElMessage({
message: "恭喜你,这是一条成功消息", message: "恭喜你,这是一条成功消息",

View File

@ -1,6 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { ref } from "vue";
import { IconSelect } from "/@/components/ReIcon"; import { IconSelect } from "/@/components/ReIcon";
defineOptions({
name: "IconSelect"
});
let icon = ref("ep:add-location"); let icon = ref("ep:add-location");
</script> </script>

View File

@ -5,6 +5,10 @@ import ElTreeLine from "/@/components/ReTreeLine";
import { extractPathList, deleteChildren } from "/@/utils/tree"; import { extractPathList, deleteChildren } from "/@/utils/tree";
import { usePermissionStoreHook } from "/@/store/modules/permission"; import { usePermissionStoreHook } from "/@/store/modules/permission";
defineOptions({
name: "LineTree"
});
let menusData = computed(() => { let menusData = computed(() => {
return deleteChildren(usePermissionStoreHook().menusTree); return deleteChildren(usePermissionStoreHook().menusTree);
}); });

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "reMenuTree"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed } from "vue"; import { ref, computed } from "vue";
import type { ElTreeV2 } from "element-plus"; import type { ElTreeV2 } from "element-plus";
@ -13,6 +7,10 @@ import { extractPathList, deleteChildren } from "/@/utils/tree";
import { usePermissionStoreHook } from "/@/store/modules/permission"; import { usePermissionStoreHook } from "/@/store/modules/permission";
import type { TreeNode } from "element-plus/es/components/tree-v2/src/types"; import type { TreeNode } from "element-plus/es/components/tree-v2/src/types";
defineOptions({
name: "MenuTree"
});
interface treeNode extends TreeNode { interface treeNode extends TreeNode {
meta: { meta: {
title: string; title: string;

View File

@ -4,6 +4,10 @@ import { reactive, ref } from "vue";
import { VxeTablePropTypes } from "vxe-table"; import { VxeTablePropTypes } from "vxe-table";
import { ReLine } from "../welcome/components"; import { ReLine } from "../welcome/components";
defineOptions({
name: "Print"
});
interface User { interface User {
date: string; date: string;
name: string; name: string;

View File

@ -4,6 +4,10 @@ import { ElMessage } from "element-plus";
import avatars from "/@/assets/avatars.jpg"; import avatars from "/@/assets/avatars.jpg";
import ReQrcode from "/@/components/ReQrcode"; import ReQrcode from "/@/components/ReQrcode";
defineOptions({
name: "QrCode"
});
const qrcodeText = "vue-pure-admin"; const qrcodeText = "vue-pure-admin";
const asyncTitle = ref(""); const asyncTitle = ref("");

View File

@ -6,6 +6,10 @@ import type { SwiperOptions } from "swiper";
import { Swiper, SwiperSlide } from "swiper/vue"; import { Swiper, SwiperSlide } from "swiper/vue";
import SwiperCore, { Autoplay, Navigation, Pagination } from "swiper"; import SwiperCore, { Autoplay, Navigation, Pagination } from "swiper";
defineOptions({
name: "Swiper"
});
type SwiperExampleOptions = Pick< type SwiperExampleOptions = Pick<
SwiperOptions, SwiperOptions,
| "navigation" | "navigation"

View File

@ -1,7 +1,11 @@
<script setup lang="ts"> <script setup lang="ts">
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
import { useRenderFlicker } from "/@/components/ReFlicker"; import { useRenderFlicker } from "/@/components/ReFlicker";
// eslint-disable-next-line no-undef
defineOptions({
name: "TimeLine"
});
const { lastBuildTime } = __APP_INFO__; const { lastBuildTime } = __APP_INFO__;
const activities = [ const activities = [
{ {

View File

@ -1,6 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import verticalList from "./vertical.vue"; import verticalList from "./vertical.vue";
import horizontalList from "./horizontal.vue"; import horizontalList from "./horizontal.vue";
defineOptions({
name: "VirtualList"
});
</script> </script>
<template> <template>

View File

@ -2,6 +2,10 @@
import { ref } from "vue"; import { ref } from "vue";
import { useWatermark } from "/@/utils/watermark"; import { useWatermark } from "/@/utils/watermark";
defineOptions({
name: "WaterMark"
});
let color = ref("#409EFF"); let color = ref("#409EFF");
let value = ref("vue-pure-admin"); let value = ref("vue-pure-admin");
const { setWatermark, clear } = useWatermark(); const { setWatermark, clear } = useWatermark();

View File

@ -4,7 +4,10 @@ export interface schemaItem {
label: string; label: string;
} }
// eslint-disable-next-line no-undef defineOptions({
name: "About"
});
const { pkg, lastBuildTime } = __APP_INFO__; const { pkg, lastBuildTime } = __APP_INFO__;
const { dependencies, devDependencies, version } = pkg; const { dependencies, devDependencies, version } = pkg;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,14 +1,12 @@
<script lang="ts">
export default {
name: "reEditor"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import "@wangeditor/editor/dist/css/style.css"; // css import "@wangeditor/editor/dist/css/style.css"; // css
import { onBeforeUnmount, ref, shallowRef, onMounted } from "vue";
import { Editor, Toolbar } from "@wangeditor/editor-for-vue"; import { Editor, Toolbar } from "@wangeditor/editor-for-vue";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
import { onBeforeUnmount, ref, shallowRef, onMounted } from "vue";
defineOptions({
name: "Editor"
});
const mode = "default"; const mode = "default";
// shallowRef // shallowRef
@ -51,9 +49,9 @@ const handleCreated = editor => {
:icon="useRenderIcon('edit')" :icon="useRenderIcon('edit')"
style="font-size: 16px; margin: 0 4px 5px" style="font-size: 16px; margin: 0 4px 5px"
> >
wangeditor Wangeditor
</el-link></span </el-link>
> </span>
</div> </div>
</template> </template>
<Toolbar <Toolbar

View File

@ -1,5 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import noAccess from "/@/assets/status/403.svg?component"; import noAccess from "/@/assets/status/403.svg?component";
defineOptions({
name: "403"
});
</script> </script>
<template> <template>

View File

@ -1,5 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import noExist from "/@/assets/status/404.svg?component"; import noExist from "/@/assets/status/404.svg?component";
defineOptions({
name: "404"
});
</script> </script>
<template> <template>

View File

@ -1,5 +1,9 @@
<script setup lang="ts"> <script setup lang="ts">
import noServer from "/@/assets/status/500.svg?component"; import noServer from "/@/assets/status/500.svg?component";
defineOptions({
name: "500"
});
</script> </script>
<template> <template>
@ -21,7 +25,7 @@ import noServer from "/@/assets/status/500.svg?component";
} }
}" }"
> >
403 500
</p> </p>
<p <p
class="mb-4 text-gray-500" class="mb-4 text-gray-500"

View File

@ -11,6 +11,10 @@ import { Snapshot, BpmnElement, Menu } from "@logicflow/extension";
import { Control, NodePanel, DataDialog } from "/@/components/ReFlowChart"; import { Control, NodePanel, DataDialog } from "/@/components/ReFlowChart";
import { toLogicflowData } from "/@/components/ReFlowChart/src/adpterForTurbo"; import { toLogicflowData } from "/@/components/ReFlowChart/src/adpterForTurbo";
defineOptions({
name: "FlowChart"
});
let lf = ref(null); let lf = ref(null);
let graphData = ref(null); let graphData = ref(null);
let dataVisible = ref<boolean>(false); let dataVisible = ref<boolean>(false);

View File

@ -3,6 +3,10 @@ import { ref, onBeforeMount } from "vue";
import { loader } from "/@/utils/loaders"; import { loader } from "/@/utils/loaders";
import { ElDesignForm } from "vue-form-create2"; import { ElDesignForm } from "vue-form-create2";
defineOptions({
name: "FormDesign"
});
const loading = ref(true); const loading = ref(true);
onBeforeMount(() => { onBeforeMount(() => {

View File

@ -2,6 +2,10 @@
import Driver from "driver.js"; import Driver from "driver.js";
import "driver.js/dist/driver.min.css"; import "driver.js/dist/driver.min.css";
defineOptions({
name: "Guide"
});
const steps = [ const steps = [
{ {
element: "#header-notice", element: "#header-notice",

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "ReCard"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { computed, PropType } from "vue"; import { computed, PropType } from "vue";
import shopIcon from "/@/assets/svg/shop.svg?component"; import shopIcon from "/@/assets/svg/shop.svg?component";
@ -19,6 +13,10 @@ export interface CardProductType {
name: string; name: string;
} }
defineOptions({
name: "ReCard"
});
const props = defineProps({ const props = defineProps({
product: { product: {
type: Object as PropType<CardProductType> type: Object as PropType<CardProductType>

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "ListCard"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { getCardList } from "/@/api/list"; import { getCardList } from "/@/api/list";
import Card from "./components/Card.vue"; import Card from "./components/Card.vue";
@ -12,6 +6,10 @@ import dialogForm from "./components/DialogForm.vue";
import { ElMessage, ElMessageBox } from "element-plus"; import { ElMessage, ElMessageBox } from "element-plus";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "ListCard"
});
const svg = ` const svg = `
<path class="path" d=" <path class="path" d="
M 30 15 M 30 15

View File

@ -17,6 +17,10 @@ import { bg, avatar, currentWeek } from "./utils/static";
import { ReImageVerify } from "/@/components/ReImageVerify"; import { ReImageVerify } from "/@/components/ReImageVerify";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "Login"
});
const imgCode = ref(""); const imgCode = ref("");
const router = useRouter(); const router = useRouter();
const loading = ref(false); const loading = ref(false);

View File

@ -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> <template>
<div> <div>
<p>{{ t("menus.hsmenu1") }}</p> <p>{{ t("menus.hsmenu1") }}</p>
@ -5,18 +17,3 @@
<el-input v-model="input" /> <el-input v-model="input" />
</div> </div>
</template> </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>

View File

@ -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> <template>
<div> <div>
<p>{{ t("menus.hsmenu1") }}</p> <p>{{ t("menus.hsmenu1") }}</p>
@ -6,18 +18,3 @@
<el-input v-model="input" /> <el-input v-model="input" />
</div> </div>
</template> </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>

View File

@ -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> <template>
<div> <div>
<p>{{ t("menus.hsmenu1") }}</p> <p>{{ t("menus.hsmenu1") }}</p>
@ -6,18 +18,3 @@
<el-input v-model="input" /> <el-input v-model="input" />
</div> </div>
</template> </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>

View File

@ -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> <template>
<div> <div>
<p>{{ t("menus.hsmenu1") }}</p> <p>{{ t("menus.hsmenu1") }}</p>
@ -5,18 +17,3 @@
<el-input v-model="input" /> <el-input v-model="input" />
</div> </div>
</template> </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>

View File

@ -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> <template>
<div> <div>
<p>{{ t("menus.hsmenu2") }}</p> <p>{{ t("menus.hsmenu2") }}</p>
<el-input v-model="input" /> <el-input v-model="input" />
</div> </div>
</template> </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>

View File

@ -1,13 +1,11 @@
<script lang="ts">
export default {
name: "permissionButton"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { ref } from "vue";
import { storageSession } from "/@/utils/storage"; import { storageSession } from "/@/utils/storage";
defineOptions({
name: "PermissionButton"
});
const auth = ref<boolean>(storageSession.getItem("info").username || "admin"); const auth = ref<boolean>(storageSession.getItem("info").username || "admin");
function changRole(value) { function changRole(value) {

View File

@ -1,14 +1,12 @@
<script lang="ts">
export default {
name: "permissionPage"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { ref, unref } from "vue"; import { ref, unref } from "vue";
import { storageSession } from "/@/utils/storage"; import { storageSession } from "/@/utils/storage";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "PermissionPage"
});
let purview = ref<string>(storageSession.getItem("info").username); let purview = ref<string>(storageSession.getItem("info").username);
function changRole() { function changRole() {

View File

@ -1,4 +1,8 @@
<script setup lang="ts"></script> <script setup lang="ts">
defineOptions({
name: "Fail"
});
</script>
<template> <template>
<el-card> <el-card>

View File

@ -1,5 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
// eslint-disable-next-line no-undef defineOptions({
name: "Success"
});
const { lastBuildTime } = __APP_INFO__; const { lastBuildTime } = __APP_INFO__;
</script> </script>

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "dept"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import dayjs from "dayjs"; import dayjs from "dayjs";
import { handleTree } from "/@/utils/tree"; import { handleTree } from "/@/utils/tree";
@ -13,6 +7,10 @@ import { reactive, ref, onMounted } from "vue";
import { EpTableProBar } from "/@/components/ReTable"; import { EpTableProBar } from "/@/components/ReTable";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "Dept"
});
const form = reactive({ const form = reactive({
user: "", user: "",
status: "" status: ""

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "dict"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import XEUtils from "xe-utils"; import XEUtils from "xe-utils";
import Config from "./config.vue"; import Config from "./config.vue";
@ -23,6 +17,10 @@ type onEditNRow = {
model: string; model: string;
}; };
defineOptions({
name: "Dict"
});
const { t } = useI18n(); const { t } = useI18n();
const dictData = reactive({ const dictData = reactive({

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "role"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import dayjs from "dayjs"; import dayjs from "dayjs";
import { getRoleList } from "/@/api/system"; import { getRoleList } from "/@/api/system";
@ -14,6 +8,10 @@ import { EpTableProBar } from "/@/components/ReTable";
import { Switch, message } from "@pureadmin/components"; import { Switch, message } from "@pureadmin/components";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "Role"
});
const form = reactive({ const form = reactive({
name: "", name: "",
code: "", code: "",

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "user"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import dayjs from "dayjs"; import dayjs from "dayjs";
import tree from "./tree.vue"; import tree from "./tree.vue";
@ -15,6 +9,10 @@ import { EpTableProBar } from "/@/components/ReTable";
import { Switch, message } from "@pureadmin/components"; import { Switch, message } from "@pureadmin/components";
import { useRenderIcon } from "/@/components/ReIcon/src/hooks"; import { useRenderIcon } from "/@/components/ReIcon/src/hooks";
defineOptions({
name: "User"
});
const form = reactive({ const form = reactive({
username: "", username: "",
mobile: "", mobile: "",

View File

@ -1,5 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
import { useDetail } from "./hooks"; import { useDetail } from "./hooks";
defineOptions({
name: "TabDetail"
});
const { initToDetail, id } = useDetail(); const { initToDetail, id } = useDetail();
initToDetail(); initToDetail();
</script> </script>

View File

@ -11,7 +11,7 @@ export function useDetail() {
useMultiTagsStoreHook().handleTags("push", { useMultiTagsStoreHook().handleTags("push", {
path: `/tabs/detail`, path: `/tabs/detail`,
parentPath: route.matched[0].path, parentPath: route.matched[0].path,
name: "tabDetail", name: "TabDetail",
query: { id: String(index) }, query: { id: String(index) },
meta: { meta: {
title: { zh: `No.${index} - 详情信息`, en: `No.${index} - DetailInfo` }, title: { zh: `No.${index} - 详情信息`, en: `No.${index} - DetailInfo` },
@ -19,7 +19,7 @@ export function useDetail() {
dynamicLevel: 3 dynamicLevel: 3
} }
}); });
router.push({ name: "tabDetail", query: { id: String(index) } }); router.push({ name: "TabDetail", query: { id: String(index) } });
} }
function initToDetail() { function initToDetail() {

View File

@ -10,6 +10,11 @@ import {
getNodeByUniqueId getNodeByUniqueId
} from "/@/utils/tree"; } from "/@/utils/tree";
import { useDetail } from "./hooks"; import { useDetail } from "./hooks";
defineOptions({
name: "Tabs"
});
const { toDetail, router } = useDetail(); const { toDetail, router } = useDetail();
let treeData = computed(() => { let treeData = computed(() => {

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "Bar"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { ECharts } from "echarts"; import { ECharts } from "echarts";
import echarts from "/@/plugins/echarts"; import echarts from "/@/plugins/echarts";

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "Line"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { ECharts } from "echarts"; import { ECharts } from "echarts";
import echarts from "/@/plugins/echarts"; import echarts from "/@/plugins/echarts";

View File

@ -1,9 +1,3 @@
<script lang="ts">
export default {
name: "Pie"
};
</script>
<script setup lang="ts"> <script setup lang="ts">
import { ECharts } from "echarts"; import { ECharts } from "echarts";
import echarts from "/@/plugins/echarts"; import echarts from "/@/plugins/echarts";

View File

@ -24,7 +24,7 @@
"@build/*": ["build/*"], "@build/*": ["build/*"],
"/#/*": ["types/*"] "/#/*": ["types/*"]
}, },
"types": ["node", "vite/client", "element-plus/global"], "types": ["node", "vite/client", "element-plus/global", "unplugin-vue-define-options"],
"typeRoots": ["./node_modules/@types/", "./types"] "typeRoots": ["./node_modules/@types/", "./types"]
}, },
"include": [ "include": [