zoukankan      html  css  js  c++  java
  • 使用SAP BSP应用运行Vue

    As I mentioned in my blog Is jQuery based UI Framework Obsolete, during one of my onsite support to a local Chinese customer, I discuss SAP UX strategy with their IT team. The team architect is a fan of Vue, who prefers to use Vue in their UI custom development instead of Fiori. Then I am curious about the advantage of Vue and plan to learn it in my spare time. As always a Vue Hello World must be finished before advantaged content is touched.

    What is Vue

    Vue is another UI framework based on MVVM which has more than 48000 stars ( till 2017 March ) in Github and now has 77000 + stars ( 2017 December ).


    I will first finish development locally and finally upload the tested application to Netweaver running it as a BSP application. You should have some basic knowledge on nodejs, npm and webpack to follow this blog.

    Detail steps for hello world tutorial

    (1) create a folder in your laptop, type “npm init” in command line to trigger the generation of dummy package.json. Just directly press enter key to finish the creation wizard, so that all default settings are used for package.json.
    Type “npm install –save-dev webpack-dev-server” in command to install a light weight server which could be used for your local testing.

    Repeat the command to install other necessary module:

    • css-loader
    • vue-template-compiler
    • webpack
    • vue-loader
    • vue-router

    So far all such installed modules are just required for development. Install runtime dependent modules vue and vuex with command:

    npm install –save vue vuex

    Once done, your package.json should look like below:

    The highlighted script is manually added to ease the local testing, which will be illustrated later.

    (2) Create a folder src under the root folder. Create a new file “index.vue” and paste the following source code:

    <style>
        h2{
            color: red;
        }
    </style>
    <template>
        <h2>Jerry: Hello, World!</h2>
    </template>
    <script>
        module.exports = {
            data: function(){
                return {};
            }
        }
    </script>
    

    The HTML source code

    Jerry: Hello, World!

    under
  • 相关阅读:
    maven 阿里镜像
    红黑树数据结构剖析
    一个简单的通用Makefile实现
    如何取消开机硬盘自检
    用友u8采购发票如何取消审核
    应付帐款—制单处理,出现“供应商被锁定”的解决方法
    用友系统管理员密码清除
    用友软件系统管理员账号admin密码忘记了,如何解决?
    用友 提示“尚有已全部暂估报销的单据未进行处理,不能进行12月的期末处理!”
    MySQL Windows版安装详解
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/13586193.html
Copyright © 2011-2022 走看看