chore: remove @demo alias

This commit is contained in:
chenjiahan
2021-09-05 12:49:04 +08:00
parent f144a6e2cd
commit f7f5c6e9b5
95 changed files with 102 additions and 109 deletions
@@ -22,5 +22,6 @@
</head>
<body ontouchstart>
<div id="app"></div>
<script type="module" src="/mobile/main.js"></script>
</body>
</html>
+1 -1
View File
@@ -10,7 +10,7 @@
</template>
<script>
import DemoNav from './components/DemoNav';
import DemoNav from './components/DemoNav.vue';
export default {
components: { DemoNav },
@@ -21,7 +21,7 @@
<script>
import { config } from 'site-mobile-shared';
import DemoHomeNav from './DemoHomeNav';
import DemoHomeNav from './DemoHomeNav.vue';
export default {
components: {
@@ -16,7 +16,7 @@
</template>
<script>
import ArrowRight from './ArrowRight';
import ArrowRight from './ArrowRight.vue';
export default {
components: {
+3 -3
View File
@@ -1,9 +1,9 @@
import { createApp } from 'vue';
import DemoBlock from './components/DemoBlock';
import DemoSection from './components/DemoSection';
import DemoBlock from './components/DemoBlock.vue';
import DemoSection from './components/DemoSection.vue';
import { router } from './router';
import { packageEntry } from 'site-mobile-shared';
import App from './App';
import App from './App.vue';
import '@vant/touch-emulator';
window.app = createApp(App)
+1 -1
View File
@@ -1,6 +1,6 @@
import { watch, nextTick } from 'vue';
import { createRouter, createWebHashHistory } from 'vue-router';
import DemoHome from './components/DemoHome';
import DemoHome from './components/DemoHome.vue';
import { decamelize } from '../common';
import { demos, config } from 'site-mobile-shared';
import { getLang, setDefaultLang } from '../common/locales';
@@ -6,6 +6,7 @@ import {
getVantConfig,
smartOutputFile,
normalizePath,
isDev,
} from '../common';
import {
SRC_DIR,
@@ -79,12 +80,13 @@ function resolveDocuments(components: string[]): DocumentItem[] {
function genImportDocuments(items: DocumentItem[]) {
return items
.map(
(item) =>
`const ${
item.name
} = defineAsyncComponent(() => import('${normalizePath(item.path)}'));`
)
.map((item) => {
const path = normalizePath(item.path);
if (isDev()) {
return `const ${item.name} = defineAsyncComponent(() => import('${path}'));`;
}
return `import ${item.name} from '${path}';`;
})
.join('\n');
}
@@ -18,7 +18,7 @@ type DemoItem = {
function genInstall() {
return `import packageEntry from './package-entry';
import './package-style';
import './package-style.less';
`;
}