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

多文件编辑时,文件路径有中文或者特殊字符会被转义,应该怎么处理 #5

Open
Johnboy-max opened this issue Nov 13, 2023 · 0 comments

Comments

@Johnboy-max
Copy link

Johnboy-max commented Nov 13, 2023

function App() {
const defaultFiles = {
'/src/app.jsx': `
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';

(async () => {
const {Button} = await import('./Button.jsx');
const root = document.getElementById('root');
ReactDOM.render((

Direct
), root); })(); `, '/src/app.css': 'body { background: #fff }', '/index.html': `
<script type="importmap"> { "imports": { "react": "https://cdn.skypack.dev/react", "react-dom": "https://cdn.skypack.dev/react-dom", "lodash": "https://cdn.skypack.dev/lodash" } } </script> <script type="module"> import './app/index.jsx'; import './index.js'; </script> `, '/src/@test.ts': ` import { add } from './index/cc';

const App = () => {
console.log(add(1, 2));
};

export default App;
, '/src/@index/cc.ts':
export function add(a, b) {
return a + b;
}

export function minus(a, b) {
return a - b;
}
`
}
return (
<div style={{ width: '800px', height: '600px' }}>
<MultiEditor

          defaultFiles={defaultFiles}
          options={{
              fontSize: 14,
              automaticLayout: true,

          }} />
  </div>

)
}

export default App;

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant