no message
This commit is contained in:
parent
3e100c108a
commit
3f816b355a
@ -8,7 +8,7 @@ export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, './src')
|
||||
'@': resolve(__dirname, './src'),
|
||||
}
|
||||
},
|
||||
build: {
|
||||
|
||||
@ -14,6 +14,6 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useMindMapStore } from "../../store/index";
|
||||
import { useMindMapStore } from "../../index";
|
||||
const { exportFile } = useMindMapStore();
|
||||
</script>
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useMindMapStore } from "../../store/index";
|
||||
import { useMindMapStore } from "../../index";
|
||||
|
||||
import { ref } from "vue";
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useMindMapStore } from "../../store/index";
|
||||
import { useMindMapStore } from "../../index";
|
||||
import { createUid } from 'simple-mind-map/src/utils'
|
||||
|
||||
const { insertChildNode } = useMindMapStore();
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useMindMapStore } from "../../store/index";
|
||||
import { useMindMapStore } from "../../index";
|
||||
import { createUid } from "simple-mind-map/src/utils";
|
||||
|
||||
const { insertSiblingNode } = useMindMapStore();
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<select
|
||||
v-model="currentLayout"
|
||||
@change="
|
||||
(e) => {
|
||||
const target = e?.target as HTMLSelectElement;
|
||||
@ -26,14 +25,15 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onMounted } from "vue";
|
||||
import type { LayoutType } from "../../store/helpers/layoutGroupList";
|
||||
|
||||
import type { LayoutType } from "@store/helpers/layoutGroupList";
|
||||
import { layoutGroupList } from "../../store/helpers/layoutGroupList";
|
||||
import { useMindMapStore } from "../../index";
|
||||
import { storeToRefs } from "pinia";
|
||||
|
||||
const { useLayout } = useMindMapStore();
|
||||
const { currentLayout } = storeToRefs(useMindMapStore());
|
||||
// 使用单一store实例
|
||||
const store = useMindMapStore();
|
||||
const { useLayout } = store;
|
||||
// const { currentLayout } = storeToRefs(store);
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useMindMapStore } from "../../store/index";
|
||||
import { useMindMapStore } from "../../index";
|
||||
const { removeNode } = useMindMapStore();
|
||||
|
||||
function remove() {
|
||||
|
||||
@ -4,6 +4,7 @@ import './styles/index.css';
|
||||
import pinia from './store';
|
||||
|
||||
export { MindMap };
|
||||
|
||||
export * from './store';
|
||||
|
||||
|
||||
|
||||
@ -18,7 +18,20 @@
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noFallthroughCasesInSwitch": true
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
/* Path Aliases */
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["src/*"],
|
||||
"@components/*": ["src/components/*"],
|
||||
"@store/*": ["src/store/*"],
|
||||
"@views/*": ["src/views/*"],
|
||||
"@assets/*": ["src/assets/*"],
|
||||
"@utils/*": ["src/utils/*"],
|
||||
"@styles/*": ["src/styles/*"],
|
||||
"@helpers/*": ["src/store/helpers/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { resolve } from 'path'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': resolve(__dirname, 'src'),
|
||||
},
|
||||
},
|
||||
css: {
|
||||
postcss: './postcss.config.ts',
|
||||
// 确保 CSS 被正确处理
|
||||
preprocessorOptions: {
|
||||
css: {
|
||||
charset: false
|
||||
}
|
||||
}
|
||||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: resolve(__dirname, 'src/index.ts'),
|
||||
name: 'MindMap',
|
||||
fileName: (format) => `mind-map.${format}.js`,
|
||||
formats: ['es', 'umd', 'cjs'],
|
||||
},
|
||||
cssCodeSplit: true,
|
||||
sourcemap: true,
|
||||
rollupOptions: {
|
||||
external: ['vue'],
|
||||
output: {
|
||||
globals: {
|
||||
vue: 'Vue',
|
||||
},
|
||||
exports: 'named',
|
||||
assetFileNames: (assetInfo) => {
|
||||
if (assetInfo.name === 'style.css') return 'mind-map.css';
|
||||
return assetInfo.name;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user