编译的html打开空白,vue项目打包后打开空白解决办法.html

(function(){

if(''){

if (prompt('请输入文章密码') !== ''){

alert('密码错误!');

history.back();

}

}

})();

var NexT = window.NexT || {};

var CONFIG = {

hostname: new URL('https://kechenhh.gitee.io').hostname,

root: '/',

scheme: 'Gemini',

version: '7.7.0',

exturl: false,

sidebar: {"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},

copycode: {"enable":false,"show_result":false,"style":null},

back2top: {"enable":true,"sidebar":false,"scrollpercent":false},

bookmark: {"enable":false,"color":"#222","save":"auto"},

fancybox: false,

mediumzoom: false,

lazyload: false,

pangu: false,

comments: {"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},

algolia: {

appID: '',

apiKey: '',

indexName: '',

hits: {"per_page":10},

labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}

},

localsearch: {"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},

path: 'search.xml',

motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}

};

// https://hexo.io/docs/variables.html

CONFIG.page = {

sidebar: "",

isHome: false,

isPost: true

};

vue项目打包后打开空白解决办法 | 我的博客

.use-motion .brand,

.use-motion .menu-item,

.sidebar-inner,

.use-motion .post-block,

.use-motion .pagination,

.use-motion .comments,

.use-motion .post-header,

.use-motion .post-body,

.use-motion .collection-header { opacity: initial; }

.use-motion .site-title,

.use-motion .site-subtitle {

opacity: initial;

top: initial;

}

.use-motion .logo-line-before i { left: initial; }

.use-motion .logo-line-after i { right: initial; }

我的博客

my blog

0%

vue项目打包后打开空白解决办法

解决办法:

根目录新建 vue.config.js

12345
module.exports = {  publicPath: process.env.NODE_ENV === 'production'     ? './'     : '/' }

GiteePages自动更新

vue-cli(脚手架)创建Vue项目

window.addEventListener('tabs:register', () => {

let activeClass = CONFIG.comments.activeClass;

if (CONFIG.comments.storage) {

activeClass = localStorage.getItem('comments_active') || activeClass;

}

if (activeClass) {

let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);

if (activeTab) {

activeTab.click();

}

}

});

if (CONFIG.comments.storage) {

window.addEventListener('tabs:click', event => {

if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;

let commentClass = event.target.classList[1];

localStorage.setItem('comments_active', commentClass);

});

}

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值