wujingjing
2025-01-02 3675e202a47910821a86370ae64b60d3cfe93e79
Merge branch 'master' of http://47.103.154.90:83/r/WI/Web.V1.0
已修改2个文件
已添加1个文件
23 ■■■■■ 文件已修改
src/components/chat/chatComponents/summaryCom/components/recordSetTable/RecordSetTable.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/directive/index.ts 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/directive/shareDirective.ts 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chat/chatComponents/summaryCom/components/recordSetTable/RecordSetTable.vue
@@ -161,6 +161,7 @@
import { axisLabelFormatter } from '/@/utils/chart';
import { LocalPlus } from '/@/utils/storage';
import { debounce, getTextWidth, toPercent } from '/@/utils/util';
import { isSharePage } from '/@/stores/chatRoom';
const props = defineProps({
    data: {
@@ -1169,6 +1170,7 @@
    activeTab.value = 0;
};
const showCurve = (row) => {
    if(isSharePage.value) return;
    resetTab();
    chartDlgIsShow.value = true;
    const quotaChartCol = props.data?.quota_chart?.col;
src/directive/index.ts
@@ -8,6 +8,7 @@
    wavesDirective,
} from '/@/directive/customDirective';
import { inputLimit } from '/@/directive/inputLimit';
import shareDirective from './shareDirective';
/**
 * å¯¼å‡ºæŒ‡ä»¤æ–¹æ³•:v-xxx
@@ -30,5 +31,6 @@
    inputLimit(app);
    eleFocusDirective(app);
    elementResizeDirective(app);
    shareDirective(app);
    focusDirective(app);
}
src/directive/shareDirective.ts
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,19 @@
import { App } from 'vue';
import { isSharePage } from '../stores/chatRoom';
/** @description åˆ†äº«ç•Œé¢æ˜¯å¦å±•示当前页面 */
export default function shareDirective(app: App) {
    // v-share=false,默认为 false
    app.directive('share', {
        mounted(el, binding) {
            /** @description é»˜è®¤åˆ†äº«çŠ¶æ€éšè— */
            const isShow = binding.value ?? false;
            if (isSharePage.value) {
                !isShow && el.parentNode.removeChild(el);
            } else {
                /** @description éžåˆ†äº«çŠ¶æ€ï¼ŒisShow å°±æ˜¯è¦åˆ æŽ‰å½“前元素 */
                isShow && el.parentNode.removeChild(el);
            }
        },
    });
}