diff --git a/docs/src/components/mobile-computed.js b/docs/src/components/mobile-computed.js index fa478aa69..aa83cbb61 100644 --- a/docs/src/components/mobile-computed.js +++ b/docs/src/components/mobile-computed.js @@ -8,9 +8,9 @@ export default { computed: { mobileUrl() { if (process.env.NODE_ENV === 'production') { - return '/vue/examples#' + location.pathname.slice(4); + return '/zanui/vue/examples#' + location.pathname; } else { - return '/examples.html#' + location.pathname.slice(4); + return '/examples.html#' + location.pathname; } } }, diff --git a/docs/src/examples.js b/docs/src/examples.js index 68fe3033c..ca3759936 100644 --- a/docs/src/examples.js +++ b/docs/src/examples.js @@ -15,6 +15,7 @@ Vue.use(ZanUI.Lazyload, { }); Vue.use(VueRouter); +const isProduction = process.env.NODE_ENV === 'production'; const routesConfig = routes(navConfig, true); routesConfig.push({ path: '/', @@ -22,7 +23,7 @@ routesConfig.push({ }); const router = new VueRouter({ mode: 'hash', - base: '/zanui/vue', + base: isProduction ? '/zanui/vue/' : __dirname, routes: routesConfig }); diff --git a/docs/src/index.js b/docs/src/index.js index 8b7344424..f673a3261 100644 --- a/docs/src/index.js +++ b/docs/src/index.js @@ -6,6 +6,7 @@ import routes from './router.config'; import ZanUI from 'src/index.js'; import packageJson from '../../package.json'; +const isProduction = process.env.NODE_ENV === 'production'; const global = { version: packageJson.version }; @@ -34,7 +35,7 @@ routesConfig.push({ const router = new VueRouter({ mode: 'history', - base: '/zanui/vue', + base: isProduction ? '/zanui/vue/' : __dirname, routes: routesConfig }); @@ -43,7 +44,7 @@ router.beforeEach((route, redirect, next) => { window.scrollTo(0, 0); } - const pathname = process.env.NODE_ENV === 'production' ? '/vue/examples' : '/examples.html'; + const pathname = isProduction ? '/vue/examples' : '/examples.html'; if (isMobile()) { window.location.replace(pathname); return; diff --git a/packages/zanui-css/src/dialog.css b/packages/zanui-css/src/dialog.css index e842e3c96..038aabcc0 100644 --- a/packages/zanui-css/src/dialog.css +++ b/packages/zanui-css/src/dialog.css @@ -25,7 +25,6 @@ @e content { padding: 15px 20px; - min-height: 36px; position: relative; &::after { @@ -71,6 +70,7 @@ } @e btn { + font-size: 16px; line-height: 40px; border: 0; background-color: #fff;