Commit fad25b881b62c1437000a885650553370e581cf3

Authored by ly525
1 parent 230d5bbc

fix(engine): add $message function to display message

front-end/h5/src/engine-entry.js
1 -/**  
2 - * #!zh:  
3 - * engine 页面是 webpack 构建多页面中的其中的一个页面  
4 - * entry-entry 是 构建 engine 页面的入口,类似于 src/main.js 的作用  
5 - * 作用:作品预览的渲染引擎,其实就是简单遍历 work(作品) 的 pages 以及 elements,显示即可  
6 - * 主要在预览弹窗中预览 和 用户在手机上查看作品使用  
7 - * 1 +/*
  2 + * @Author: ly525
  3 + * @Date: 2019-11-24 18:51:58
  4 + * @LastEditors: ly525
  5 + * @LastEditTime: 2019-12-15 17:09:51
  6 + * @FilePath: /luban-h5/front-end/h5/src/engine-entry.js
  7 + * @Github: https://github.com/ly525/luban-h5
  8 + * @Description:
  9 + #!zh: 页面预览引擎入口
  10 + 构建 engine 页面的入口,作用与 src/main.js 类似,都是页面入口
  11 + 作用:作品预览的渲染引擎,原理:遍历 work(作品) 的 pages 以及 elements,显示即可
  12 + 使用场景:预览弹窗中预览 和 在手机上查看作品使用
  13 + * @Copyright 2018 - 2019 luban-h5. All Rights Reserved
8 */ 14 */
  15 +
9 import Vue from 'vue' 16 import Vue from 'vue'
10 // import 'font-awesome/css/font-awesome.min.css' 17 // import 'font-awesome/css/font-awesome.min.css'
  18 +import message from 'ant-design-vue/lib/message' // 加载 JS
  19 +import 'ant-design-vue/lib/message/style/css' // 加载 CSS
  20 +
11 import { pluginsList } from './mixins/load-plugins.js' 21 import { pluginsList } from './mixins/load-plugins.js'
12 import Element from './components/core/models/element' 22 import Element from './components/core/models/element'
13 import NodeWrapper from '@/components/preview/node-wrapper.js' 23 import NodeWrapper from '@/components/preview/node-wrapper.js'
14 24
15 Vue.config.productionTip = true 25 Vue.config.productionTip = true
  26 +Vue.prototype.$message = message
16 27
17 const Engine = { 28 const Engine = {
18 name: 'engine', 29 name: 'engine',