Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

vue项目的样式都不见了?

main.js

import Vue from "vue";
import Router from "vue-router";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";
// import {
//   Button,
//   Layout,
//   AutoComplete,
//   Affix,
//   Tooltip,
//   Icon,
//   Input,
//   Dropdown,
//   Carousel,
//   Skeleton,
//   Spin,
//   message
// } from "ant-design-vue";
// import "ant-design-vue/lib/button/style/css.js";
// import "ant-design-vue/lib/layout/style/css.js";
// import "ant-design-vue/lib/auto-complete/style/css.js";
// import "ant-design-vue/lib/affix/style/css.js";
// import "ant-design-vue/lib/tooltip/style/css.js";
// import "ant-design-vue/lib/icon/style/css.js";
// import "ant-design-vue/lib/input/style/css.js";
// import "ant-design-vue/lib/dropdown/style/css.js";
// import "ant-design-vue/lib/carousel/style/css.js";
// import "ant-design-vue/lib/skeleton/style/css.js";
// import "ant-design-vue/lib/spin/style/css.js";
import "./styles/index.less";
import Schema from "async-validator";
import VueLazyload from "vue-lazyload";
// avoid async-validator warining
Schema.warning = function noop() { };

Vue.config.productionTip = false;

Vue.use(Antd);
// Vue.use(Button);
// Vue.use(Layout);
// Vue.use(Affix);
// Vue.use(Tooltip);
// Vue.use(AutoComplete);
// Vue.use(Icon);
// Vue.use(Input);
// Vue.use(Dropdown);
// Vue.use(Carousel);
// Vue.use(Skeleton);
// Vue.use(Spin);
// Vue.prototype.$message = message;

Vue.use(Router);
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: require("./assets/logo-single.png"),
  loading: require("./assets/logo-single.png"),
  attempt: 3
});

new Vue({
  router,
  store,
  render: function render(h) {
    return h(App);
  }
}).$mount("#app");

不知道为什么样式都失效了
在head标签里没有一个样式

感谢大家帮我解决问题??


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

package-lock.json还原以后css都回来了 估计是哪个包出问题了。。。。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...