当前位置: 首页 > news >正文

做网站平台接单wordpress显示时间插件

做网站平台接单,wordpress显示时间插件,展馆设计的主题有哪些,中国寰球工程公司主项目使用history#xff0c;子项目使用hash模式 1. 下载安装qiankun: ^2.10.132. 手动调用qiankun,使用vue脚手架搭建的项目1. 主项目配置#xff08;我使用的是手动调用乾坤#xff0c;在指定页面显示内容#xff09;1. 要使用的页面中引入乾坤… 主项目使用history子项目使用hash模式 1. 下载安装qiankun: ^2.10.132. 手动调用qiankun,使用vue脚手架搭建的项目1. 主项目配置我使用的是手动调用乾坤在指定页面显示内容1. 要使用的页面中引入乾坤2. router设置 2. 子项目配置我用的hash模式1. 在src目录下新建public-path.js文件1. main.js 配置2. vue.config.js 配置 3. 运行后使用 3. 手动调用qiankun,子项目是存在的旧项目修改1. main.js 配置修改添加一下2. router.js 配置修改添加一下3. 添加vue.config.js 配置4. 运行后使用 4 报错1.报错一static/fonts/element-icons.535877f.woff:1 GET http://localhost:8080/static/fonts/element-icons.535877f.woff net::ERR_ABORTED 404 (Not Found) 该项目未上线使用因此不知道打包后会不会有问题 1. 下载安装qiankun: “^2.10.13” 参考官网地址 2. 手动调用qiankun,使用vue脚手架搭建的项目 1. 主项目配置我使用的是手动调用乾坤在指定页面显示内容 1. 要使用的页面中引入乾坤 templatediv classxinp 个人项目/pkeep-alivediv idbaixianHome/div/keep-alive!--xinHome 为放置子项目的盒子 --/div /templatescript import { loadMicroApp, start } from qiankun;//引入手动调用方法export default {name: XinVue2,data() {return {}},created() {this.$nextTick(() {// hash模式下配置const getActiveRule (hash) (location) location.hash.startsWith(hash);this.vueApp loadMicroApp({name: qiankun-children,entry: //localhost:8081/,container: #xinHome,activeRule: getActiveRule(#/),});//启动乾坤函数start({ singular: false });})},beforeDestroy(){console.log( this.vueApp.unmount({ name: qiankun-children }))this.vueApp.unmount({ name: qiankun-children });},methods: {} }2. router设置 router/index.js文件配置 import Vue from vue import VueRouter from vue-router; Vue.use(VueRouter)const router new VueRouter({base: window.__POWERED_BY_QIANKUN__ ? /qiankun-children/ : /, //使用 history模式必须配置mode: history,routes: [{path: /xin,name: xin,component: () import(/views/xin-vue2/home),}, {path: /mq,name: mq,component: () import(/views/mq-vue2/home),}], }); export default routermain.js配置 引入并使用VueRouter import VueRouter from vue-router; import router from ./router/index Vue.config.productionTip false Vue.use(VueRouter) new Vue({router,render: h h(App), }).$mount(#appAdmin) 文件目录结构 2. 子项目配置我用的hash模式 1. 在src目录下新建public-path.js文件 __webpack_public_path__ window.__POWERED_BY_QIANKUN__? window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__: http://localhost:8081/; // 填写你当前子项目的实际部署地址1. main.js 配置 import ./public-path;//要放最上边 import Vue from vue; import VueRouter from vue-router; import ElementUI from element-ui; import element-ui/lib/theme-chalk/index.css; import App from ./App.vue; import store from ./store; import Home from ./views/home/index.vueVue.config.productionTip false; Vue.use(ElementUI); Vue.use(VueRouter) let router null; let instance null; function render(props {}) {const { container } props;router new VueRouter({scrollBehavior: () ({ y: 0 }),routes:[{path: /home,name: Home,component: Home}],});instance new Vue({router,store,render: (h) h(App),}).$mount(container ? container.querySelector(#app) : #app); }// 独立运行时 if (!window.__POWERED_BY_QIANKUN__) {render(); }export async function bootstrap() {console.log([vue] vue app bootstraped); } export async function mount(props) {console.log([vue] props from main framework, props);render(props); } export async function unmount() {instance.$destroy();instance.$el.innerHTML ;instance null;router null; }2. vue.config.js 配置 const { defineConfig } require(vue/cli-service) const packageName require(./package.json).name; module.exports defineConfig({transpileDependencies: true,devServer: {headers: {Access-Control-Allow-Origin: *,},},configureWebpack: {output: {library: ${packageName}-[name],libraryTarget: umd,chunkLoadingGlobal: webpackJsonp_${packageName},publicPath: /},}, }) 3. 运行后使用 先运行主项目在运行子项目 首页效果 进入调用乾坤页面 地址http://localhost:8081/xin#/ 使用子项目路由进入子项目home页面 地址http://localhost:8081/xin#/home 3. 手动调用qiankun,子项目是存在的旧项目修改 1. main.js 配置修改添加一下 let router null; let instance null; function render(props {}) {const { container } props;router homeRoutesinstance new Vue({router,render: (h) h(App),}).$mount(container ? container.querySelector(#app) : #app); }// // 独立运行时 if (!window.__POWERED_BY_QIANKUN__) {render(); }export async function bootstrap() {console.log([vue] vue app bootstraped); } export async function mount(props) {console.log([vue] props from main framework, props);render(props); } export async function unmount() {instance.$destroy();instance.$el.innerHTML ;instance null;router null; } // 微应用中增加 update 钩子以便主应用手动更新微应用 export async function update(props) {render(props); }2. router.js 配置修改添加一下 3. 添加vue.config.js 配置 4. 运行后使用 4 报错 1.报错一static/fonts/element-icons.535877f.woff:1 GET http://localhost:8080/static/fonts/element-icons.535877f.woff net::ERR_ABORTED 404 (Not Found) static/fonts/element-icons.732389d.ttf:1 GET http://localhost:8080/static/fonts/element-icons.732389d.ttf net::ERR_ABORTED 404 (Not Found) 官网地址跳转 默认情况下沙箱可以确保单实例场景子应用之间的样式隔离但是无法确保主应用跟子应用、或者多实例场景的子应用样式隔离。当配置为 { strictStyleIsolation: true } 时表示开启严格的样式隔离模式。这种模式下 qiankun 会为每个微应用的容器包裹上一个 shadow dom 节点从而确保微应用的样式不会对全局造成影响。 该项目未上线使用因此不知道打包后会不会有问题
http://www.w-s-a.com/news/242626/

相关文章:

  • 怎么做外贸网站推广劳务公司网站怎么做
  • 滴答手表网站中铁建设集团有限公司招聘信息2021
  • 重庆富通科技有限公司网站新闻头条最新消息国家大事
  • 四字母net做网站怎么样企业代运营公司
  • 纪检网站建设方案wordpress首页静态页面
  • 网站右下角浮动效果如何做网站logo设计在线生成
  • 西宁哪里做网站婚纱摄影网站设计思路
  • 凡科用模板做网站网站导入页欣赏
  • 北京响应式网站建设公司十大小程序开发公司
  • dw网站开发删除wordpress主题底部
  • 织梦网站怎样做子域名高德导航怎么看街景地图
  • 宿州专业网站建设株洲网站建设优化
  • 自动生成海报的网站常州建网站公司
  • 网站刷流量对网站有影响吗站长工具欧美高清
  • 百度做网站优化多少钱一年罗庄网站建设
  • 手机网站 自适应屏幕h5网站有哪些
  • 北京企业建站技术临沂网站公众号建设
  • 域名和网站备案一样吗wordpress 封装 app
  • 婚纱摄影网站开题报告c2c模式是什么意思
  • 网站几种颜色wordpress水平菜单
  • php做网站的分站wordpress边下边看
  • 杭州建设实名制报备网站Wordpress外贸网站搭建公司
  • 山西云起时网站建设计算机网站开发实现总结
  • 一个网站做两个优化可以做吗永清网站建设
  • wordpress英文采集wordpress seo 链接
  • 进入建设银行的网站就打不了字工程建设标准化网站
  • 杭州网站推广大全网站建设演讲稿
  • 厦门网站的制作太仓专业网站建设
  • 天津公司网站建设公司哪家好在阿里巴巴国际网站上需要怎么做
  • 网站关键词seo推广公司哪家好无锡市无锡市住房和城乡建设局网站