0.0.26 • Published 3 years ago

@gpdi_ds_platform/plugin-vue2 v0.0.26

Weekly downloads
-
License
-
Repository
-
Last release
3 years ago

插件配置接入简要说明

本插件适用于 Vue2.x 构建的应用,主要用于应用外挂插件。

preivew

接入说明

  • 前端
  1. 安装依赖
npm install @gpdi_ds_platform/plugin-vue2
  1. 引入
// main.js
import DSPlatformPlugin from '@gpdi_ds_platform/plugin-vue2'
import '@gpdi_ds_platform/plugin-vue2/lib/ds_platform_plugin.css'
Vue.use(DSPlatformPlugin)
  1. 使用
<!-- Layout/index.vue2 -->
<template>
  <div id="Layout">
    <!-- ... -->
    <index-interpretation :token="token"  :baseUrl="baseUrl" />
  </div>
</template>

<script>
// token 及 baseUrl 请自行获取传入
import { getToken } from '@/utils/auth'
export default {
  name: 'Layout',
  data() {
    return {
      token: getToken(),
      baseUrl: '/toPlugin'
    }
  }
}
</script>
  • 后端

需要修改 nginx 配置,解析 baseUrl 到插件中心,如:

  location ^~/toPlugin {
       proxy_pass http://172.16.1.98:9999/dev-api;
       proxy_set_header Host                $host:$server_port;
       proxy_set_header X-Forwarded-For     $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto   $scheme;
       proxy_set_header X-Forwarded-Port    $server_port;
    }
0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.21

3 years ago

0.0.20

3 years ago

0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago