Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 兼容性问题:svg icon 在ie浏览器中不展示 #2232

Open
1 of 5 tasks
ink0101 opened this issue May 26, 2023 · 1 comment
Open
1 of 5 tasks

🐛 兼容性问题:svg icon 在ie浏览器中不展示 #2232

ink0101 opened this issue May 26, 2023 · 1 comment
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复

Comments

@ink0101
Copy link

ink0101 commented May 26, 2023

🏷 Version

Package Version
@antv/s2 1.47.1

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

使用umi3.x搭建的项目,配置浏览器兼容ie10+,icon无法展示,并且在控制台有报错信息,chrome可以正常展示,如下图所示:

image

image

⌨️ Code Snapshots

.umirc.ts

export default {
  targets: {
    ie: 10,
  },
  dva: {},
  antd: {},
  chainWebpack(config) {
    config.merge({
      optimization: {
        splitChunks: {
          cacheGroups: {
            styles: {
              name: 'styles',
              test: /\.(css|less)$/,
              chunks: 'async',
              minChunks: 2,
              minSize: 0,
            },
            vendors: {
              name: 'vendors',
              test({ resource }) {
                return /[\\/]node_modules[\\/]/.test(resource);
              },
              priority: 10,
              chunks: 'all',
              minSize: 30000,
              minChunks: 3,
              automaticNameDelimiter: '.',
            },
          },
        },
      },
    });
  },
  ignoreMomentLocale: true,
  metas: [{ 'http-equiv': 'A-UA-Compatible', content: 'IE=Edge,chrome=1' }],
  extraBabelPlugins: ['lodash'],
  plugins: ['lodash-webpack-plugin'],
};

package.json


export default {
  targets: {
    ie: 10,
  },
  dva: {},
  antd: {},
  chainWebpack(config) {
    config.merge({
      optimization: {
        splitChunks: {
          cacheGroups: {
            styles: {
              name: 'styles',
              test: /\.(css|less)$/,
              chunks: 'async',
              minChunks: 2,
              minSize: 0,
            },
            vendors: {
              name: 'vendors',
              test({ resource }) {
                return /[\\/]node_modules[\\/]/.test(resource);
              },
              priority: 10,
              chunks: 'all',
              minSize: 30000,
              minChunks: 3,
              automaticNameDelimiter: '.',
            },
          },
        },
      },
    });
  },
  ignoreMomentLocale: true,
  metas: [{ 'http-equiv': 'A-UA-Compatible', content: 'IE=Edge,chrome=1' }],
  extraBabelPlugins: ['lodash'],
  plugins: ['lodash-webpack-plugin'],
};

index.tsx


import { PivotSheet } from '@antv/s2';

fetch(
  'https://gw.alipayobjects.com/os/bmw-prod/2a5dbbc8-d0a7-4d02-b7c9-34f6ca63cff6.json',
)
  .then((res) => res.json())
  .then((dataCfg) => {
    const container = document.getElementById('container');

    const s2Options = {
      width: 600,
      height: 480,
      hierarchyType: 'tree',
      style: {
        collapsedRows: {
          'root[&]浙江省': true, // 折叠浙江省下面所有的城市
        }
      }
    };
    const s2 = new PivotSheet(container, dataCfg, s2Options);

    s2.render();
  });


const index = () => {
  return (
    <div id="container">
    </div>
  );
};

export default index;

🔗 Reproduce Link

这是我的仓库地址:https://github.com/ink0101/s2-demo.git

🤔 Steps to Reproduce

在ie10、ie11浏览器中均可复现

😊 Expected Behavior

在chrome和ie中均可正常访问

😅 Current Behavior

💻 System information

Environment Info
System windows11
Browser ie11
@github-actions
Copy link
Contributor

你好 @ink0101,请编辑你的 issue 标题, 一个言简意赅的 issue 标题可以节省大家的时间, 请不要将标题当做正文, 或者为空。

Hello, @ink0101, please edit your issue title. a concise issue title will save everyone time. please do not leave the title as the body or empty.

@ink0101 ink0101 changed the title 🐛 🐛 兼容性问题:svg icon 在ie浏览器中不展示 May 26, 2023
@github-actions github-actions bot added the 💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 label Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复
Projects
None yet
Development

No branches or pull requests

1 participant