perf: standard code format

This commit is contained in:
xiaoxian521 2022-05-14 09:59:02 +08:00
parent 2214ce7911
commit 1cf82eb7a4
29 changed files with 85 additions and 82 deletions

View File

@ -1,6 +1,7 @@
import { App } from "vue";
import reBarcode from "./src/index.vue";
/** 条形码组件 */
export const ReBarcode = Object.assign(reBarcode, {
install(app: App) {
app.component(reBarcode.name, reBarcode);

View File

@ -1,10 +0,0 @@
import { App } from "vue";
import reCard from "./src/index.vue";
export const ReCard = Object.assign(reCard, {
install(app: App) {
app.component(reCard.name, reCard);
}
});
export default ReCard;

View File

@ -1,36 +0,0 @@
import { App } from "vue";
import reBar from "./src/Bar.vue";
import reGithub from "./src/Github.vue";
import reInfinite from "./src/Infinite.vue";
import reLine from "./src/Line.vue";
import rePie from "./src/Pie.vue";
export const ReBar = Object.assign(reBar, {
install(app: App) {
app.component(reBar.name, reBar);
}
});
export const ReGithub = Object.assign(reGithub, {
install(app: App) {
app.component(reGithub.name, reGithub);
}
});
export const ReInfinite = Object.assign(reInfinite, {
install(app: App) {
app.component(reInfinite.name, reInfinite);
}
});
export const ReLine = Object.assign(reLine, {
install(app: App) {
app.component(reLine.name, reLine);
}
});
export const RePie = Object.assign(rePie, {
install(app: App) {
app.component(rePie.name, rePie);
}
});

View File

@ -2,14 +2,18 @@ import { App } from "vue";
import reNormalCountTo from "./src/normal";
import reboundCountTo from "./src/rebound";
export const ReNormalCountTo = Object.assign(reNormalCountTo, {
/** 普通数字动画组件 */
const ReNormalCountTo = Object.assign(reNormalCountTo, {
install(app: App) {
app.component(reNormalCountTo.name, reNormalCountTo);
}
});
export const ReboundCountTo = Object.assign(reboundCountTo, {
/** 回弹式数字动画组件 */
const ReboundCountTo = Object.assign(reboundCountTo, {
install(app: App) {
app.component(reboundCountTo.name, reboundCountTo);
}
});
export { ReNormalCountTo, ReboundCountTo };

View File

@ -1,6 +1,7 @@
import { App } from "vue";
import reCropper from "./src";
/** 图片裁剪组件 */
export const ReCropper = Object.assign(reCropper, {
install(app: App) {
app.component(reCropper.name, reCropper);

View File

@ -1,6 +1,7 @@
import { App } from "vue";
import reFlop from "./src/index.vue";
/** 时间翻牌组件 */
export const ReFlop = Object.assign(reFlop, {
install(app: App) {
app.component(reFlop.name, reFlop);

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { ref, unref, nextTick, onUnmounted } from "vue";
import { templateRef } from "@vueuse/core";
import flippers from "./Filpper";
import flippers from "./filpper";
let timer = ref(null);
let flipObjs = ref([]);

View File

@ -3,20 +3,27 @@ import control from "./src/Control.vue";
import nodePanel from "./src/NodePanel.vue";
import dataDialog from "./src/DataDialog.vue";
export const Control = Object.assign(control, {
/** LogicFlow流程图-控制面板 */
const Control = Object.assign(control, {
install(app: App) {
app.component(control.name, control);
}
});
export const NodePanel = Object.assign(nodePanel, {
/** LogicFlow流程图-拖拽面板 */
const NodePanel = Object.assign(nodePanel, {
install(app: App) {
app.component(nodePanel.name, nodePanel);
}
});
export const DataDialog = Object.assign(dataDialog, {
/** LogicFlow流程图-查看数据 */
const DataDialog = Object.assign(dataDialog, {
install(app: App) {
app.component(dataDialog.name, dataDialog);
}
});
export { Control, NodePanel, DataDialog };
// LogicFlow流程图文档http://logic-flow.org/

View File

@ -1,16 +1,15 @@
import iconifyIconOffline from "./src/iconifyIconOffline";
import iconifyIconOnline from "./src/iconifyIconOnline";
import iconSelect from "./src/Select.vue";
import fontIcon from "./src/iconfont";
import iconSelect from "./src/select.vue";
export const IconifyIconOffline = iconifyIconOffline;
export const IconifyIconOnline = iconifyIconOnline;
export const FontIcon = fontIcon;
export const IconSelect = iconSelect;
/** 离线图标组件 */
const IconifyIconOffline = iconifyIconOffline;
/** 在线图标组件 */
const IconifyIconOnline = iconifyIconOnline;
/** 图标选择器组件 */
const IconSelect = iconSelect;
/** iconfont组件 */
const FontIcon = fontIcon;
export default {
IconifyIconOffline,
IconifyIconOnline,
FontIcon,
IconSelect
};
export { IconifyIconOffline, IconifyIconOnline, IconSelect, FontIcon };

View File

@ -1,12 +1,11 @@
import { App } from "vue";
import reImageVerify from "./src/index.vue";
/** 图形验证码组件 */
export const ReImageVerify = Object.assign(reImageVerify, {
install(app: App) {
app.component(reImageVerify.name, reImageVerify);
}
});
export default {
ReImageVerify
};
export default ReImageVerify;

View File

@ -1,12 +1,11 @@
import { App } from "vue";
import amap from "./src/Amap.vue";
/** 高德地图组件 */
export const Amap = Object.assign(amap, {
install(app: App) {
app.component(amap.name, amap);
}
});
export default {
Amap
};
export default Amap;

View File

@ -1,8 +1,8 @@
<script setup lang="ts">
import AMapLoader from "@amap/amap-jsapi-loader";
import { reactive, getCurrentInstance, onBeforeMount, onUnmounted } from "vue";
import { mapJson } from "/@/api/mock";
import { deviceDetection } from "/@/utils/deviceDetection";
import AMapLoader from "@amap/amap-jsapi-loader";
import { mapJson } from "/@/api/mock";
import car from "/@/assets/car.png";
export interface MapConfigureInter {

View File

@ -1,6 +1,7 @@
import { App } from "vue";
import reQrcode from "./src/index";
/** 二维码组件 */
export const ReQrcode = Object.assign(reQrcode, {
install(app: App) {
app.component(reQrcode.name, reQrcode);

View File

@ -1,6 +1,7 @@
import { App } from "vue";
import reSeamlessScroll from "./src/index.vue";
/** 无缝滚动组件 */
export const ReSeamlessScroll = Object.assign(reSeamlessScroll, {
install(app: App) {
app.component(reSeamlessScroll.name, reSeamlessScroll);

View File

@ -1,6 +1,7 @@
import { App } from "vue";
import reSelector from "./src";
/** 选择器组件 */
export const ReSelector = Object.assign(reSelector, {
install(app: App) {
app.component(reSelector.name, reSelector);

View File

@ -8,6 +8,7 @@ export interface ContextProps {
split: string;
}
/** 切割面板组件 */
export default defineComponent({
name: "splitPane",
components: { resizer },

View File

@ -1,6 +1,7 @@
import { App } from "vue";
import epTableProBar from "./src/bar";
/** table-crud组件 */
export const EpTableProBar = Object.assign(epTableProBar, {
install(app: App) {
app.component(epTableProBar.name, epTableProBar);

View File

@ -9,6 +9,7 @@ import type {
TreeNodeData
} from "element-plus/es/components/tree-v2/src/types";
/** 树形连接线组件 */
export default defineComponent({
name: "el-tree-line",
props: {

View File

@ -15,7 +15,7 @@ const homeRouter = {
{
path: "/welcome",
name: "welcome",
component: () => import("/@/views/welcome.vue"),
component: () => import("/@/views/welcome/index.vue"),
meta: {
title: $t("menus.hshome")
}

View File

@ -2,7 +2,7 @@
import Print from "/@/utils/print";
import { reactive, ref } from "vue";
import { VxeTablePropTypes } from "vxe-table";
import { ReLine } from "/@/components/ReCharts/index";
import { ReLine } from "../welcome/components";
interface User {
date: string;

View File

@ -6,7 +6,7 @@ export default {
<script setup lang="ts">
import { getCardList } from "/@/api/list";
import ReCard from "/@/components/ReCard";
import Card from "./components/Card.vue";
import { ref, onMounted, nextTick } from "vue";
import dialogForm from "./components/DialogForm.vue";
import { ElMessage, ElMessageBox } from "element-plus";
@ -152,7 +152,7 @@ const handleManageProduct = product => {
:lg="6"
:xl="4"
>
<ReCard
<Card
:product="product"
@delete-item="handleDeleteItem"
@manage-product="handleManageProduct"

View File

@ -0,0 +1,38 @@
import reInfinite from "./Infinite.vue";
import reGithub from "./Github.vue";
import reLine from "./Line.vue";
import reBar from "./Bar.vue";
import rePie from "./Pie.vue";
import { App } from "vue";
const ReInfinite = Object.assign(reInfinite, {
install(app: App) {
app.component(reInfinite.name, reInfinite);
}
});
const ReGithub = Object.assign(reGithub, {
install(app: App) {
app.component(reGithub.name, reGithub);
}
});
const ReLine = Object.assign(reLine, {
install(app: App) {
app.component(reLine.name, reLine);
}
});
const ReBar = Object.assign(reBar, {
install(app: App) {
app.component(reBar.name, reBar);
}
});
const RePie = Object.assign(rePie, {
install(app: App) {
app.component(rePie.name, rePie);
}
});
export { ReInfinite, ReGithub, ReLine, ReBar, RePie };

View File

@ -1,11 +1,5 @@
<script setup lang="ts">
import {
ReGithub,
ReInfinite,
RePie,
ReLine,
ReBar
} from "/@/components/ReCharts/index";
import { ReGithub, ReInfinite, RePie, ReLine, ReBar } from "./components";
import { ref, computed } from "vue";
import avatars from "/@/assets/avatars.jpg";