feat: create dev server for desktop site
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import VanDoc from './components';
|
||||
import VanDoc from './components/index.vue';
|
||||
import { config } from 'site-desktop-shared';
|
||||
import { setLang } from '../common/locales';
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
<style lang="less">
|
||||
@import '../../common/style/var';
|
||||
|
||||
.card {
|
||||
.van-doc-card {
|
||||
margin-bottom: 24px;
|
||||
padding: 24px;
|
||||
background-color: #fff;
|
||||
@@ -211,7 +211,7 @@ export default {
|
||||
flex: 1;
|
||||
padding: 0 0 75px;
|
||||
|
||||
> section {
|
||||
.van-doc-markdown-body {
|
||||
padding: 24px;
|
||||
overflow: hidden;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SearchInput from './SearchInput';
|
||||
import SearchInput from './SearchInput.vue';
|
||||
import { packageVersion } from 'site-desktop-shared';
|
||||
|
||||
export default {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavLink from './NavLink';
|
||||
import NavLink from './NavLink.vue';
|
||||
|
||||
export default {
|
||||
name: 'VanDocNav',
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DocNav from './Nav';
|
||||
import DocHeader from './Header';
|
||||
import DocContent from './Content';
|
||||
import DocContainer from './Container';
|
||||
import DocSimulator from './Simulator';
|
||||
import DocNav from './Nav.vue';
|
||||
import DocHeader from './Header.vue';
|
||||
import DocContent from './Content.vue';
|
||||
import DocContainer from './Container.vue';
|
||||
import DocSimulator from './Simulator.vue';
|
||||
|
||||
export default {
|
||||
name: 'VanDoc',
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
<meta
|
||||
name="description"
|
||||
content="<%= htmlWebpackPlugin.options.description %>"
|
||||
/>
|
||||
<link
|
||||
rel="icon"
|
||||
type="image/png"
|
||||
href="<%= htmlWebpackPlugin.options.logo %>"
|
||||
/>
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
||||
/>
|
||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<% if (htmlWebpackPlugin.options.baiduAnalytics) { %>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement('script');
|
||||
hm.src =
|
||||
'https://hm.baidu.com/hm.js?<%= htmlWebpackPlugin.options.baiduAnalytics.seed %>';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body ontouchstart>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,7 +1,7 @@
|
||||
import { createApp } from 'vue';
|
||||
import { packageEntry } from 'site-desktop-shared';
|
||||
import App from './App';
|
||||
import DemoPlayground from './components/DemoPlayground';
|
||||
import App from './App.vue';
|
||||
import DemoPlayground from './components/DemoPlayground.vue';
|
||||
import { router } from './router';
|
||||
|
||||
window.app = createApp(App)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover"
|
||||
/>
|
||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
</head>
|
||||
<body ontouchstart>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/desktop/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -19,21 +19,6 @@
|
||||
<meta http-equiv="Cache-Control" content="no-cache" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<% if (htmlWebpackPlugin.options.baiduAnalytics) { %>
|
||||
<script>
|
||||
// avoid to load analytics in iframe
|
||||
if (window.top === window) {
|
||||
var _hmt = _hmt || [];
|
||||
(function() {
|
||||
var hm = document.createElement('script');
|
||||
hm.src =
|
||||
'https://hm.baidu.com/hm.js?<%= htmlWebpackPlugin.options.baiduAnalytics.seed %>';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
}
|
||||
</script>
|
||||
<% } %>
|
||||
</head>
|
||||
<body ontouchstart>
|
||||
<div id="app"></div>
|
||||
|
||||
Reference in New Issue
Block a user