mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
feat(app,utils,runtime): 将resetcss.css移到utils,在runtime中引入
This commit is contained in:
parent
ed4b3c77ef
commit
01d1dccbb6
@ -18,8 +18,6 @@
|
|||||||
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
import './resetcss.css';
|
|
||||||
|
|
||||||
export * from './events';
|
export * from './events';
|
||||||
|
|
||||||
export { default as Env } from './Env';
|
export { default as Env } from './Env';
|
||||||
|
@ -9,6 +9,10 @@
|
|||||||
".": {
|
".": {
|
||||||
"import": "./dist/tmagic-utils.js",
|
"import": "./dist/tmagic-utils.js",
|
||||||
"require": "./dist/tmagic-utils.umd.cjs"
|
"require": "./dist/tmagic-utils.umd.cjs"
|
||||||
|
},
|
||||||
|
"./resetcss.css": {
|
||||||
|
"import": "./src/resetcss.css",
|
||||||
|
"require": "./src/resetcss.css"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
v-if="previewVisible"
|
v-if="previewVisible"
|
||||||
ref="iframe"
|
ref="iframe"
|
||||||
width="100%"
|
width="100%"
|
||||||
|
style="border: none"
|
||||||
:height="stageRect && stageRect.height"
|
:height="stageRect && stageRect.height"
|
||||||
:src="previewUrl"
|
:src="previewUrl"
|
||||||
></iframe>
|
></iframe>
|
||||||
|
@ -28,6 +28,7 @@ export default defineConfig({
|
|||||||
alias: [
|
alias: [
|
||||||
{ find: /^react$/, replacement: path.join(__dirname, 'node_modules/react/index.js') },
|
{ find: /^react$/, replacement: path.join(__dirname, 'node_modules/react/index.js') },
|
||||||
{ find: /^react-dom$/, replacement: path.join(__dirname, 'node_modules/react-dom/index.js') },
|
{ find: /^react-dom$/, replacement: path.join(__dirname, 'node_modules/react-dom/index.js') },
|
||||||
|
{ find: /^@tmagic\/utils\/resetcss.css/, replacement: path.join(__dirname, '../../packages/utils') },
|
||||||
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
||||||
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
||||||
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
{ find: /^@tmagic\/schema/, replacement: path.join(__dirname, '../../packages/schema/src/index.ts') },
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
|
|
||||||
@ -28,6 +27,8 @@ import components from '../.tmagic/comp-entry';
|
|||||||
import plugins from '../.tmagic/plugin-entry';
|
import plugins from '../.tmagic/plugin-entry';
|
||||||
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
|
import '@tmagic/utils/resetcss.css';
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
magicDSL: MApp[];
|
magicDSL: MApp[];
|
||||||
|
@ -31,6 +31,8 @@ import plugins from '../.tmagic/plugin-entry';
|
|||||||
|
|
||||||
import App from './App';
|
import App from './App';
|
||||||
|
|
||||||
|
import '@tmagic/utils/resetcss.css';
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
appInstance: Core;
|
appInstance: Core;
|
||||||
|
@ -27,6 +27,7 @@ export default defineConfig({
|
|||||||
resolve: {
|
resolve: {
|
||||||
alias: [
|
alias: [
|
||||||
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm.js') },
|
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm.js') },
|
||||||
|
{ find: /^@tmagic\/utils\/resetcss.css/, replacement: path.join(__dirname, '../../packages/utils') },
|
||||||
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
||||||
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
||||||
{ find: /^@data-source/, replacement: path.join(__dirname, '../../packages/data-source/src') },
|
{ find: /^@data-source/, replacement: path.join(__dirname, '../../packages/data-source/src') },
|
||||||
|
@ -28,6 +28,8 @@ import request from './utils/request';
|
|||||||
import AppComponent from './App.vue';
|
import AppComponent from './App.vue';
|
||||||
import { getLocalConfig } from './utils';
|
import { getLocalConfig } from './utils';
|
||||||
|
|
||||||
|
import '@tmagic/utils/resetcss.css';
|
||||||
|
|
||||||
Vue.use(request);
|
Vue.use(request);
|
||||||
|
|
||||||
const app = new Core({
|
const app = new Core({
|
||||||
|
@ -22,6 +22,8 @@ import Core from '@tmagic/core';
|
|||||||
|
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
|
||||||
|
import '@tmagic/utils/resetcss.css';
|
||||||
|
|
||||||
Promise.all([import('../.tmagic/comp-entry'), import('../.tmagic/plugin-entry')]).then(([components, plugins]) => {
|
Promise.all([import('../.tmagic/comp-entry'), import('../.tmagic/plugin-entry')]).then(([components, plugins]) => {
|
||||||
Object.entries(components.default).forEach(([type, component]: [string, any]) => {
|
Object.entries(components.default).forEach(([type, component]: [string, any]) => {
|
||||||
Vue.component(`magic-ui-${type}`, component);
|
Vue.component(`magic-ui-${type}`, component);
|
||||||
|
@ -28,6 +28,7 @@ export default defineConfig({
|
|||||||
resolve: {
|
resolve: {
|
||||||
alias: [
|
alias: [
|
||||||
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js') },
|
{ find: /^vue$/, replacement: path.join(__dirname, 'node_modules/vue/dist/vue.esm-bundler.js') },
|
||||||
|
{ find: /^@tmagic\/utils\/resetcss.css/, replacement: path.join(__dirname, '../../packages/utils') },
|
||||||
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
{ find: /^@tmagic\/utils/, replacement: path.join(__dirname, '../../packages/utils/src/index.ts') },
|
||||||
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
{ find: /^@tmagic\/core/, replacement: path.join(__dirname, '../../packages/core/src/index.ts') },
|
||||||
{ find: /^@tmagic\/data-source/, replacement: path.join(__dirname, '../../packages/data-source/src/index.ts') },
|
{ find: /^@tmagic\/data-source/, replacement: path.join(__dirname, '../../packages/data-source/src/index.ts') },
|
||||||
|
@ -28,6 +28,8 @@ import request from './utils/request';
|
|||||||
import AppComponent from './App.vue';
|
import AppComponent from './App.vue';
|
||||||
import { getLocalConfig } from './utils';
|
import { getLocalConfig } from './utils';
|
||||||
|
|
||||||
|
import '@tmagic/utils/resetcss.css';
|
||||||
|
|
||||||
const magicApp = createApp(AppComponent);
|
const magicApp = createApp(AppComponent);
|
||||||
|
|
||||||
magicApp.use(request);
|
magicApp.use(request);
|
||||||
|
@ -22,6 +22,8 @@ import Core from '@tmagic/core';
|
|||||||
|
|
||||||
import App from './App.vue';
|
import App from './App.vue';
|
||||||
|
|
||||||
|
import '@tmagic/utils/resetcss.css';
|
||||||
|
|
||||||
Promise.all([import('../.tmagic/comp-entry'), import('../.tmagic/plugin-entry')]).then(([components, plugins]) => {
|
Promise.all([import('../.tmagic/comp-entry'), import('../.tmagic/plugin-entry')]).then(([components, plugins]) => {
|
||||||
const magicApp = createApp(App);
|
const magicApp = createApp(App);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user