提交 1e10941e 编写于 作者: ibizdev's avatar ibizdev

lxm1993 发布系统代码 [TrainSys,网页端]

上级 05fa5995
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
"dependencies": { "dependencies": {
"@floating-ui/dom": "^1.0.11", "@floating-ui/dom": "^1.0.11",
"@ibiz-template/command": "^0.0.1-beta.50", "@ibiz-template/command": "^0.0.1-beta.50",
"@ibiz-template/controller": "^0.0.1-beta.65", "@ibiz-template/controller": "^0.0.1-beta.67",
"@ibiz-template/core": "^0.0.1-beta.65", "@ibiz-template/core": "^0.0.1-beta.67",
"@ibiz-template/model": "^0.0.1-beta.65", "@ibiz-template/model": "^0.0.1-beta.67",
"@ibiz-template/runtime": "^0.0.1-beta.65", "@ibiz-template/runtime": "^0.0.1-beta.67",
"@ibiz-template/service": "^0.0.1-beta.65", "@ibiz-template/service": "^0.0.1-beta.67",
"@ibiz-template/theme": "^0.0.1-beta.65", "@ibiz-template/theme": "^0.0.1-beta.67",
"@ibiz-template/vue-util": "^0.0.1-beta.65", "@ibiz-template/vue-util": "^0.0.1-beta.67",
"@ibiz/dynamic-model-api": "^2.1.17", "@ibiz/dynamic-model-api": "^2.1.17",
"@riophae/vue-treeselect": "^0.4.0", "@riophae/vue-treeselect": "^0.4.0",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
......
此差异已折叠。
...@@ -6,6 +6,8 @@ git commit -m "build: 升级底包" ...@@ -6,6 +6,8 @@ git commit -m "build: 升级底包"
git push git push
git checkout publish git checkout publish
git pull git pull
git merge vue2 git merge vue2 --no-edit
git push git push
git checkout vue2 git checkout vue2
\ No newline at end of file
exit 0
\ No newline at end of file
...@@ -6,4 +6,5 @@ yarn add "@ibiz-template/vue-util@latest" "@ibiz-template/service@latest" "@ibiz ...@@ -6,4 +6,5 @@ yarn add "@ibiz-template/vue-util@latest" "@ibiz-template/service@latest" "@ibiz
yarn build yarn build
rm -rf node_modules rm -rf node_modules
pnpm install pnpm install
npm run dev
\ No newline at end of file exit 0
\ No newline at end of file
import { TreeModel } from '@ibiz-template/model'; import { TreeModel } from '@ibiz-template/model';
import { ITreeNodeData } from '@ibiz-template/service'; import { ITreeNodeData } from '@ibiz-template/service';
import { useTreeController, useNamespace } from '@ibiz-template/vue-util'; import { useTreeController, useNamespace } from '@ibiz-template/vue-util';
import { defineComponent, getCurrentInstance, h, PropType, ref } from 'vue'; import {
CreateElement,
defineComponent,
getCurrentInstance,
h,
PropType,
ref,
} from 'vue';
import { Tree } from 'element-ui'; import { Tree } from 'element-ui';
import '@ibiz-template/theme/style/components/widgets/tree/tree.scss';
export const TreeControl = defineComponent({ export const TreeControl = defineComponent({
name: 'TreeControl', name: 'TreeControl',
...@@ -86,6 +94,22 @@ export const TreeControl = defineComponent({ ...@@ -86,6 +94,22 @@ export const TreeControl = defineComponent({
isLeaf: 'leaf', isLeaf: 'leaf',
}); });
const renderContent = (
_h: CreateElement,
{ node, data, _store }: IData,
) => {
return (
<span class={ns.b('custom-tree-node')}>
{data.image ? (
<span class={ns.b('node-icon')}>
<app-icon icon={data.image} />
</span>
) : null}
<span class={ns.b('node-label')}>{node.label}</span>
</span>
);
};
return { return {
c, c,
ns, ns,
...@@ -95,6 +119,7 @@ export const TreeControl = defineComponent({ ...@@ -95,6 +119,7 @@ export const TreeControl = defineComponent({
onCurrentChange, onCurrentChange,
loadData, loadData,
defaultProps, defaultProps,
renderContent,
}; };
}, },
render() { render() {
...@@ -106,6 +131,7 @@ export const TreeControl = defineComponent({ ...@@ -106,6 +131,7 @@ export const TreeControl = defineComponent({
{this.c.complete && {this.c.complete &&
h(Tree, { h(Tree, {
ref: 'treeRef', ref: 'treeRef',
class: this.ns.b(),
props: { props: {
data: this.c.treeNodes, data: this.c.treeNodes,
props: this.defaultProps, props: this.defaultProps,
...@@ -116,6 +142,7 @@ export const TreeControl = defineComponent({ ...@@ -116,6 +142,7 @@ export const TreeControl = defineComponent({
lazy: true, lazy: true,
load: this.loadData, load: this.loadData,
'expand-on-click-node': false, 'expand-on-click-node': false,
'render-content': this.renderContent,
}, },
on: { on: {
'current-change': this.onCurrentChange, 'current-change': this.onCurrentChange,
......
...@@ -73,10 +73,6 @@ export function useIndexRouteManage( ...@@ -73,10 +73,6 @@ export function useIndexRouteManage(
// 只处理有二级路由,只有首页的时候不需要 // 只处理有二级路由,只有首页的时候不需要
if (newVal !== oldVal) { if (newVal !== oldVal) {
const route = useRoute(proxy); const route = useRoute(proxy);
// 当跳转到二级路由的时候清空缓存
if (route.matched.length <= 2) {
deleteRouteCache(keyHistory.value.splice(0));
}
currentKey.value = getView2Value(route); currentKey.value = getView2Value(route);
indexPath.value = getView1Value(route); indexPath.value = getView1Value(route);
// 更新或新建对应key的全路由信息,主要是三级路由变更时会用 // 更新或新建对应key的全路由信息,主要是三级路由变更时会用
......
...@@ -651,54 +651,54 @@ ...@@ -651,54 +651,54 @@
dependencies: dependencies:
qx-util "^0.4.8" qx-util "^0.4.8"
"@ibiz-template/controller@^0.0.1-beta.65": "@ibiz-template/controller@^0.0.1-beta.67":
version "0.0.1-beta.65" version "0.0.1-beta.67"
resolved "http://npm.zhr.icu/@ibiz-template/controller/-/controller-0.0.1-beta.65.tgz#cf1738f8cb715eaafe363fa6ecdc85fb3822d184" resolved "http://npm.zhr.icu/@ibiz-template/controller/-/controller-0.0.1-beta.67.tgz#3f00d44ecd37b1842736734b757ec142a85562fc"
integrity sha512-G8wwC0LjGjK3P4br8x42Ug0UwRR5CkrDTRSVnlTluqo51SvxdGMQEMsiUTr9YCn+3vSja1y2CHWzkQEOhay1Qw== integrity sha512-uDURuRzI1drCabG1LGqie6XUR8h3O5o6AoIgqPavPF3Ls39hynrRFjuA7o5XVsXQqVXwW/E//8hISxG3AyjcfQ==
dependencies: dependencies:
async-validator "^4.2.5" async-validator "^4.2.5"
dayjs "^1.11.5" dayjs "^1.11.5"
"@ibiz-template/core@^0.0.1-beta.65": "@ibiz-template/core@^0.0.1-beta.67":
version "0.0.1-beta.65" version "0.0.1-beta.67"
resolved "http://npm.zhr.icu/@ibiz-template/core/-/core-0.0.1-beta.65.tgz#74ca1ab9f8d75d3f104653729e525dbd8f835018" resolved "http://npm.zhr.icu/@ibiz-template/core/-/core-0.0.1-beta.67.tgz#c528ab7fbc79a19e767677eac63d1be9e8dd3b60"
integrity sha512-T7mxdBkLzLSARHCsdJ3wYfEnmAuHpSogD8Mb6omwRkey5vFv4dw/1dB2mQw+Vfv8Jbi/alTP2apDBG6B6wSsdQ== integrity sha512-i0MuCzt7y4KziWGXcahAt2C+/hRtQzzFR91Csay38upb+gAmaMUSNJdkPYQb1C52yBl8qQ4J708XxnF228bSjQ==
dependencies: dependencies:
axios "^1.2.1" axios "^1.2.1"
loglevel "^1.8.0" loglevel "^1.8.0"
pluralize "^8.0.0" pluralize "^8.0.0"
qs "^6.11.0" qs "^6.11.0"
"@ibiz-template/model@^0.0.1-beta.65": "@ibiz-template/model@^0.0.1-beta.67":
version "0.0.1-beta.65" version "0.0.1-beta.67"
resolved "http://npm.zhr.icu/@ibiz-template/model/-/model-0.0.1-beta.65.tgz#8e62d49f47ffd55710d5ecbfac55160f6e4fb70c" resolved "http://npm.zhr.icu/@ibiz-template/model/-/model-0.0.1-beta.67.tgz#34ee3728ade9e91f9ce1830be97c9db2cac662ef"
integrity sha512-muSKLTuzgweisCdx/LJxRcM49i6tZZ7/uCMULNEF1fOHw+UFrVRurQpMLIETLM+H/wTj6mgAIUdO8Knky9hBFw== integrity sha512-MhSwptRLJBglQb+upmrnA6uBS2MsbowLIPFHRnyMrr63cacmcirZUTMc+R/lBv7WygF9drFdUHi61v/CqiBy2g==
dependencies: dependencies:
"@ibiz/dynamic-model-api" "^2.1.17" "@ibiz/dynamic-model-api" "^2.1.17"
pluralize "^8.0.0" pluralize "^8.0.0"
"@ibiz-template/runtime@^0.0.1-beta.65": "@ibiz-template/runtime@^0.0.1-beta.67":
version "0.0.1-beta.65" version "0.0.1-beta.67"
resolved "http://npm.zhr.icu/@ibiz-template/runtime/-/runtime-0.0.1-beta.65.tgz#4e2af9e6a4272e9e688bef6bcdea6c3fd196296c" resolved "http://npm.zhr.icu/@ibiz-template/runtime/-/runtime-0.0.1-beta.67.tgz#d1d1a1a574ec16e629cdda4e10b6b76e03650e2a"
integrity sha512-fq196X4KweWLl9eTGtFF4/H13xI8pd73ryWi0m1B+Zq2sW/kER9gd2my2gwTj1F0md7v/8+HM/nhDbOrxbDzdw== integrity sha512-RSGV5MBFkiVRDK3bfiUmdBGPNIwmGFoxH6fqhwWPbU8AOaM7PGNVaC10xiw5TkOA2a7QbCYFNc52g76L4hq9iw==
dependencies: dependencies:
"@ibiz-template/command" "^0.0.1-beta.50" "@ibiz-template/command" "^0.0.1-beta.50"
qs "^6.11.0" qs "^6.11.0"
"@ibiz-template/service@^0.0.1-beta.65": "@ibiz-template/service@^0.0.1-beta.67":
version "0.0.1-beta.65" version "0.0.1-beta.67"
resolved "http://npm.zhr.icu/@ibiz-template/service/-/service-0.0.1-beta.65.tgz#c0fad064edd29d699f756db8e4145dd4485ae05b" resolved "http://npm.zhr.icu/@ibiz-template/service/-/service-0.0.1-beta.67.tgz#d2b3d3a74fd27d5a6e54b97591d0c90cacb58dc8"
integrity sha512-Hk9kKS/KGCKgIxwbUMQYzreQ1mWLyizR117k5TeRC2ixuEof3hX41t26XJZSVFTFaRP4lxioPnt5ihHu9Nl0vg== integrity sha512-IHWtLZ6WSSbfX3xVuKcNVFwaujSOxRO2QJFf97d3DRX4lQ9qVaI12JZQfiMPYkbhIul8hhTFDC9jTM66Ukr7Yw==
"@ibiz-template/theme@^0.0.1-beta.65": "@ibiz-template/theme@^0.0.1-beta.67":
version "0.0.1-beta.65" version "0.0.1-beta.67"
resolved "http://npm.zhr.icu/@ibiz-template/theme/-/theme-0.0.1-beta.65.tgz#93f1ff2813a30ed83b71ff1997e9e2908d19acf3" resolved "http://npm.zhr.icu/@ibiz-template/theme/-/theme-0.0.1-beta.67.tgz#56a5d0f42321ec42cb070e2612767af0a072b5af"
integrity sha512-Y6uWfZXwIlZo+7PfxTs/hFeaiawm7OSs1VTjQABPXph+EEJDd/qrXThLrBhKIaqqLIR9EXH3Ck6jalqDH5qfnQ== integrity sha512-6FxGBzuQ3Fj7gcr8WNt13SXkiPzs15TIKfHRqV+L1CDkk+l+hFwSEmnL/L9r/3HWnjkAeM+qLTKltEEPu99+nw==
"@ibiz-template/vue-util@^0.0.1-beta.65": "@ibiz-template/vue-util@^0.0.1-beta.67":
version "0.0.1-beta.65" version "0.0.1-beta.67"
resolved "http://npm.zhr.icu/@ibiz-template/vue-util/-/vue-util-0.0.1-beta.65.tgz#d2c6a6a81288ea18e7e5371dada880d56181bff4" resolved "http://npm.zhr.icu/@ibiz-template/vue-util/-/vue-util-0.0.1-beta.67.tgz#9b118ad5e079ceb26eb3dad144da92ed79ccc45a"
integrity sha512-78hJEgsRpKmLEsM1BQdkaKPV/4ZUuKlhxPKVjS7fSoj2e142ZKDR6AEPjLF2GmBNDCqrnvMJm1Q+0XwG7xHKUQ== integrity sha512-lGt4pZ6hviJaCOa4s10KaMvOkjnSgJWvjf6CV7GjwUzcbiCfk1kWQkSdnPfKQGz5xfzSDNUXUkbEXiRve88yFA==
"@ibiz/dynamic-model-api@^2.1.17": "@ibiz/dynamic-model-api@^2.1.17":
version "2.1.17" version "2.1.17"
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册