Browse Source

chore: setup dev branch

dev
hechang27-sprt 6 months ago
parent
commit
4a8a577755
  1. 3
      .env.development
  2. 6
      .gitignore
  3. 1807
      bun.lock
  4. 89
      examples/App.vue
  5. 4
      examples/view/home.vue
  6. 4
      package.json
  7. 5910
      yarn.lock

3
.env.development

@ -1,3 +1,4 @@ @@ -1,3 +1,4 @@
NODE_ENV="preview"
# VUE_APP_BASE_URL="http://172.16.16.120:8080"
VUE_APP_BASE_URL="http://10.100.0.108:8082"
# VUE_APP_BASE_URL="http://10.100.0.108:8082"
VUE_APP_BASE_URL="http://localhost:80"

6
.gitignore vendored

@ -11,4 +11,8 @@ test/ @@ -11,4 +11,8 @@ test/
/node_modules
/dist
/dist
.prettierrc
.idea

1807
bun.lock

File diff suppressed because it is too large Load Diff

89
examples/App.vue

@ -1,47 +1,62 @@ @@ -1,47 +1,62 @@
<template>
<!-- <Index :menus="menus" @updatePwd="pwd => console.log(pwd)" :checkUser="false" username="超级管理员"
mode="horizontal">
</Index> -->
<ZhuBeiDong :menus="menus" :checkUser="false" username="超级管理员">
</ZhuBeiDong>
<Index
@updatePwd="updatePwd"
@logout="logout"
:langAble="false"
:styleAble="true"
center=""
:username="state.user.name"
>
</Index>
</template>
<script lang="ts" setup>
import { reactive, onMounted, ref } from "vue";
import { useStore } from "vuex";
import { Index, ZhuBeiDong, Views } from "noob-mengyxu";
const store = useStore();
const { buff, dictionary, config, permission, role, user, status, log } = Views.menus;
const menus = [
{
i18n: "menu.home", path: "home", icon: "HomeFilled"
},
{
i18n: "menu.operator", path: "operator", icon: "Platform", children: [
buff, dictionary, config, permission, role, user, status, log
]
},
{
i18n: "menu.base", path: "base", icon: "House", children: [
{ i18n: "menu.table", path: "table", icon: "List" },
{ i18n: "menu.form", path: "form", icon: "Postcard" },
]
},
{
i18n: "menu.tool", path: "tool", icon: "Tools", children: [
{ i18n: "menu.terminal", path: "terminal", icon: "Platform" },
{ i18n: "menu.color", path: "color", icon: "MagicStick" },
]
}
]
// const menus = null;
onMounted(() => { });
import { Index, Element, Http } from "noob-mengyxu";
const { showMessage } = Element;
import md5 from "js-md5";
import { useI18n } from "vue3-i18n";
const { t } = useI18n();
const { commit, dispatch, state } = useStore();
// const logo = ref("/logo.png");
const updatePwd = (pwd) => {
if (state.user.password != md5(pwd.old)) {
showMessage("error", "旧密码不正确");
return;
}
state.user.password = md5(pwd.new);
};
const logout = () => {
dispatch("logout");
};
onMounted(() => {
dispatch("getMenus");
document.title = t("title");
});
</script>
<style lang="scss">
// ::v-deep .no-padding .el-dialog__body {
// background-color: black;
// }</style>
/* Force selection colors to work globally */
*::selection {
background-color: #3367d1 !important;
color: #fff !important;
}
*::-moz-selection {
background-color: #3367d1 !important;
color: #fff !important;
}
.el-dialog {
background-color: rgba($color: #e6e8eb, $alpha: 1) !important;
}
.el-select-dropdown {
background-color: rgba($color: #e6e8eb, $alpha: 1) !important;
}
</style>

4
examples/view/home.vue

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
<template>
<!-- <NoobTag>{{ t('title') }}</NoobTag>
<NoobTag type="success">{{ t('title') }}</NoobTag> -->
<GrafanaIframe :src="src" />
<!-- <GrafanaIframe :src="src" />-->
</template>
<script lang="ts" setup>
@ -14,4 +14,4 @@ const src = "http://www.baidu.com"; @@ -14,4 +14,4 @@ const src = "http://www.baidu.com";
</script>
<style lang="scss" scoped>
</style>
</style>

4
package.json

@ -32,6 +32,7 @@ @@ -32,6 +32,7 @@
"dependencies": {
"axios": "^0.19.2",
"core-js": "^3.8.3",
"dayjs": "^1.11.19",
"element-plus": "2.4.0",
"vue": "^3.2.25",
"vue-class-component": "^8.0.0-0",
@ -72,6 +73,5 @@ @@ -72,6 +73,5 @@
"last 2 versions",
"not dead",
"not ie 11"
],
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
]
}

5910
yarn.lock

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save