boka-human-cliend-v2 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ (function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define("bokaHumanV2",[],t):"object"===typeof exports?exports["bokaHumanV2"]=t():e["bokaHumanV2"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="fb15")}({"24fb":function(e,t,n){"use strict";function r(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"===typeof btoa){var a=o(r),i=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(i).concat([a]).join("\n")}return[n].join("\n")}function o(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(n," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=r(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"===typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var a=0;a<this.length;a++){var i=this[a][0];null!=i&&(o[i]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);r&&o[u[0]]||(n&&(u[2]?u[2]="".concat(n," and ").concat(u[2]):u[2]=n),t.push(u))}},t}},"499e":function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;o<t.length;o++){var a=t[o],i=a[0],s=a[1],u=a[2],c=a[3],f={id:e+":"+o,css:s,media:u,sourceMap:c};r[i]?r[i].parts.push(f):n.push(r[i]={id:i,parts:[f]})}return n}n.r(t),n.d(t,"default",(function(){return v}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},i=o&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,c=!1,f=function(){},d=null,l="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function v(e,t,n,o){c=n,d=o||{};var i=r(e,t);return h(i),function(t){for(var n=[],o=0;o<i.length;o++){var s=i[o],u=a[s.id];u.refs--,n.push(u)}t?(i=r(e,t),h(i)):i=[];for(o=0;o<n.length;o++){u=n[o];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete a[u.id]}}}}function h(e){for(var t=0;t<e.length;t++){var n=e[t],r=a[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(b(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var i=[];for(o=0;o<n.parts.length;o++)i.push(b(n.parts[o]));a[n.id]={id:n.id,refs:1,parts:i}}}}function m(){var e=document.createElement("style");return e.type="text/css",i.appendChild(e),e}function b(e){var t,n,r=document.querySelector("style["+l+'~="'+e.id+'"]');if(r){if(c)return f;r.parentNode.removeChild(r)}if(p){var o=u++;r=s||(s=m()),t=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=m(),t=_.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function y(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function _(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),d.ssrId&&e.setAttribute(l,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},"86d2":function(e,t,n){var r=n("8c99");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var o=n("499e").default;o("12fcfc72",r,!0,{sourceMap:!1,shadowMode:!1})},"8c99":function(e,t,n){var r=n("24fb");t=r(!1),t.push([e.i,".boka-human-v2[data-v-17dcc6ce]{width:320px;margin:0 auto}",""]),e.exports=t},aafc:function(e,t,n){"use strict";n("86d2")},fb15:function(e,t,n){"use strict";if(n.r(t),"undefined"!==typeof window){var r=window.document.currentScript,o=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);o&&(n.p=o[1])}var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"boka-human-v2"},[t("iframe",{staticStyle:{width:"100%",height:"100%"},attrs:{src:e.src,frameborder:"0",allowfullscreen:""}})])},i=[],s={name:"boka-human-v2",props:{src:{type:String,default:"https://m.baidu.com"}}},u=s;n("aafc");function c(e,t,n,r,o,a,i,s){var u,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),i?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(i)},c._ssrRegister=u):o&&(u=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),u)if(c.functional){c._injectStyles=u;var f=c.render;c.render=function(e,t){return u.call(t),f(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,u):[u]}return{exports:e,options:c}}var f=c(u,a,i,!1,null,"17dcc6ce",null),d=f.exports,l=d;t["default"]=l}})}));
package/dist/demo.html ADDED
@@ -0,0 +1,8 @@
1
+ <meta charset="utf-8">
2
+ <title>boka-human-v2 demo</title>
3
+ <script src="./boka-human-v2.umd.js"></script>
4
+
5
+
6
+ <script>
7
+ console.log(boka-human-v2)
8
+ </script>
package/package.json ADDED
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "boka-human-cliend-v2",
3
+ "version": "0.0.1",
4
+ "main": "dist/boka-human-v2.umd.js",
5
+ "scripts": {
6
+ "build": "vue-cli-service build --target lib --name boka-human-v2 src/index.js"
7
+ },
8
+ "peerDependencies": {
9
+ "vue": "^2.6.0"
10
+ },
11
+ "devDependencies": {
12
+ "@vue/cli-service": "^4.5.0",
13
+ "vue-template-compiler": "^2.6.0"
14
+ }
15
+ }
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <div class="boka-human-v2">
3
+ <iframe :src="src" frameborder="0" allowfullscreen style="width: 100%; height: 100%;"></iframe>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ name: 'boka-human-v2',
10
+ props: {
11
+ src: {
12
+ type: String,
13
+ default: 'https://m.baidu.com'
14
+ }
15
+ }
16
+ }
17
+ </script>
18
+
19
+ <style scoped>
20
+ /* 可根据需要添加样式 */
21
+ .boka-human-v2{
22
+ width: 320px;
23
+ margin: 0 auto;
24
+ }
25
+ </style>
package/src/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import BokaHumanV2 from './BokaHumanV2.vue'
2
+
3
+ export default BokaHumanV2
package/vue.config.js ADDED
@@ -0,0 +1,30 @@
1
+ const path = require('path')
2
+
3
+ module.exports = {
4
+ productionSourceMap: false, // 关闭 source map,减小体积
5
+
6
+ css: {
7
+ extract: false // 关闭 CSS 单独提取,内联到 JS
8
+ },
9
+
10
+ configureWebpack: {
11
+ output: {
12
+ library: 'bokaHumanV2',
13
+ libraryTarget: 'umd',
14
+ umdNamedDefine: true
15
+ },
16
+ externals: {
17
+ vue: {
18
+ commonjs: 'vue',
19
+ commonjs2: 'vue',
20
+ amd: 'vue',
21
+ root: 'Vue'
22
+ }
23
+ }
24
+ },
25
+
26
+ chainWebpack: config => {
27
+ // 修改入口文件为 src/index.js
28
+ config.entry('app').clear().add(path.resolve(__dirname, 'src/index.js'))
29
+ }
30
+ }