vue-screenfull 0.0.1 → 1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017-2025 Cheng
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # Vue Screenfull
2
+
3
+ [![NPM version][npm-image]][npm-url]
4
+ [![l][l-image]][l-url]
5
+
6
+ [npm-image]: https://img.shields.io/npm/v/vue-screenfull
7
+ [npm-url]: https://npmjs.org/package/vue-screenfull
8
+ [l-image]: https://img.shields.io/npm/l/vue-screenfull
9
+ [l-url]: https://github.com/chengchuu/vue-screenfull
10
+
11
+ A **Vue3+** component for Fullscreen.
12
+
13
+ ## Install
14
+
15
+ You can get vue-screenfull via [npm](https://www.npmjs.com/package/vue-screenfull).
16
+
17
+ ```
18
+ npm install vue-screenfull --save
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ I am Coding it...
24
+
25
+ ```
26
+ // pass
27
+ ```
28
+
29
+ ## Develop
30
+
31
+ ```
32
+ # dev
33
+ npm run dev
34
+
35
+ # build
36
+ npm run build
37
+
38
+ # documentation
39
+ npm run docs
40
+ ```
package/index.js ADDED
File without changes
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","sourceRoot":"","sources":["src/example.ts"],"names":[],"mappings":""}
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+
7
+ /* Vue Screenfull */
8
+ // https://vuejs.org/guide/typescript/overview.html#definecomponent
9
+ var com = vue.defineComponent({
10
+ // type inference enabled
11
+ template: "\n <div>\n <span>{{ FirstName }}</span>\n </div>\n ",
12
+ // props: {
13
+ // name: String,
14
+ // msg: { type: String, required: true }
15
+ // },
16
+ data: function data() {
17
+ return {
18
+ count: 1,
19
+ FirstName: 'm'
20
+ };
21
+ },
22
+ mounted: function mounted() {
23
+ // this.name; // type: string | undefined
24
+ // this.msg; // type: string
25
+ // this.count; // type: number
26
+ this.FirstName = 'Cheng';
27
+ }
28
+ });
29
+
30
+ exports.com = com;
package/lib/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ export declare const com: import("vue").DefineComponent<{}, {}, {
2
+ count: number;
3
+ FirstName: string;
4
+ }, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,GAAG;;;sOAuBd,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { defineComponent } from 'vue';
2
+
3
+ /* Vue Screenfull */
4
+ // https://vuejs.org/guide/typescript/overview.html#definecomponent
5
+ var com = defineComponent({
6
+ // type inference enabled
7
+ template: "\n <div>\n <span>{{ FirstName }}</span>\n </div>\n ",
8
+ // props: {
9
+ // name: String,
10
+ // msg: { type: String, required: true }
11
+ // },
12
+ data: function data() {
13
+ return {
14
+ count: 1,
15
+ FirstName: 'm'
16
+ };
17
+ },
18
+ mounted: function mounted() {
19
+ // this.name; // type: string | undefined
20
+ // this.msg; // type: string
21
+ // this.count; // type: number
22
+ this.FirstName = 'Cheng';
23
+ }
24
+ });
25
+
26
+ export { com };
package/package.json CHANGED
@@ -1,45 +1,82 @@
1
1
  {
2
- "name": "vue-screenfull",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "dist/vue-screenfull.min.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1",
8
- "start": "webpack-dev-server --hot --inline",
9
- "build": "webpack --display-error-details --config webpack.config.js"
10
- },
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/mazeyqian/vue-screenfull.git"
14
- },
15
- "author": "",
16
- "license": "ISC",
17
- "bugs": {
18
- "url": "https://github.com/mazeyqian/vue-screenfull/issues"
19
- },
20
- "homepage": "https://github.com/mazeyqian/vue-screenfull#readme",
21
- "devDependencies": {
22
- "babel-core": "^6.26.0",
23
- "babel-loader": "^7.1.2",
24
- "babel-plugin-transform-object-rest-spread": "^6.26.0",
25
- "babel-plugin-transform-runtime": "^6.23.0",
26
- "babel-polyfill": "^6.26.0",
27
- "babel-preset-es2015": "^6.24.1",
28
- "css-loader": "^0.28.7",
29
- "es6-promise": "^4.1.1",
30
- "less": "^2.7.3",
31
- "less-loader": "^4.0.5",
32
- "style-loader": "^0.19.0",
33
- "url-loader": "^0.6.2",
34
- "vue": "^2.5.9",
35
- "vue-hot-reload-api": "^2.2.4",
36
- "vue-html-loader": "^1.2.4",
37
- "vue-loader": "^13.5.0",
38
- "vue-router": "^3.0.1",
39
- "vue-style-loader": "^3.0.3",
40
- "vue-template-compiler": "^2.5.9",
41
- "vuex": "^3.0.1",
42
- "webpack": "^3.9.1",
43
- "webpack-dev-server": "^2.9.5"
44
- }
2
+ "name": "vue-screenfull",
3
+ "version": "1.0.1",
4
+ "description": "A Vue3 component for Fullscreen.",
5
+ "main": "lib/index.cjs.js",
6
+ "module": "lib/index.esm.js",
7
+ "typings": "lib/index.d.ts",
8
+ "mainEntryPointFilePath": "lib/index.d.ts",
9
+ "scripts": {
10
+ "dev": "webpack-dev-server --open",
11
+ "build": "npx rollup -c",
12
+ "test": "jest",
13
+ "docs": "npx typedoc --out docs/ src/",
14
+ "release": "npm run build && npm run docs && npm publish",
15
+ "lint-and-fix": "eslint ./src/index.ts --ext 'ts,tsx' --fix",
16
+ "check-health": "npm run build && npm run docs && npm run test"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/chengchuu/vue-screenfull.git"
21
+ },
22
+ "keywords": [
23
+ "JavaScript",
24
+ "Function"
25
+ ],
26
+ "author": "Cheng",
27
+ "license": "MIT",
28
+ "bugs": {
29
+ "url": "https://github.com/chengchuu/vue-screenfull/issues"
30
+ },
31
+ "homepage": "https://github.com/chengchuu/vue-screenfull",
32
+ "devDependencies": {
33
+ "@babel/core": "7.8.4",
34
+ "@babel/plugin-proposal-class-properties": "7.10.4",
35
+ "@babel/plugin-proposal-object-rest-spread": "7.11.0",
36
+ "@babel/plugin-transform-runtime": "7.11.0",
37
+ "@babel/preset-env": "7.5.5",
38
+ "@babel/preset-typescript": "7.10.4",
39
+ "@commitlint/cli": "8.3.5",
40
+ "@commitlint/config-conventional": "8.3.4",
41
+ "@typescript-eslint/eslint-plugin": "^4.22.0",
42
+ "@typescript-eslint/parser": "^4.22.0",
43
+ "@vue/tsconfig": "^0.1.3",
44
+ "babel-eslint": "10.1.0",
45
+ "clean-webpack-plugin": "1.0.1",
46
+ "eslint": "6.8.0",
47
+ "eslint-config-standard": "14.1.0",
48
+ "eslint-plugin-import": "2.20.1",
49
+ "eslint-plugin-node": "11.0.0",
50
+ "eslint-plugin-promise": "4.2.1",
51
+ "eslint-plugin-standard": "4.0.1",
52
+ "html-webpack-plugin": "3.2.0",
53
+ "http-server": "0.11.1",
54
+ "husky": "4.2.3",
55
+ "jest": "^27.5.1",
56
+ "lint-staged": "10.0.8",
57
+ "prettier": "1.19.1",
58
+ "prettier-eslint-cli": "5.0.0",
59
+ "rollup": "1.31.1",
60
+ "rollup-plugin-babel": "4.3.3",
61
+ "rollup-plugin-commonjs": "^10.1.0",
62
+ "rollup-plugin-typescript2": "0.27.2",
63
+ "ts-loader": "8.0.2",
64
+ "typedoc": "0.18.0",
65
+ "typescript": "^4.7.4",
66
+ "vue": "^3.2.36",
67
+ "webpack": "4.30.0",
68
+ "webpack-cli": "3.3.2",
69
+ "webpack-dev-server": "3.10.3"
70
+ },
71
+ "husky": {
72
+ "hooks": {
73
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
74
+ "pre-commit": "lint-staged"
75
+ }
76
+ },
77
+ "dependencies": {
78
+ "@babel/runtime-corejs3": "7.11.2",
79
+ "core-js": "3.6.5",
80
+ "mazey": "^1.4.39"
81
+ }
45
82
  }
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>vue-screenfull</title>
6
+ <style></style>
7
+ </head>
8
+ <body>
9
+ <div class="container">
10
+ <div class="box">
11
+ <span>vue-screenfull Box</span>
12
+ </div>
13
+ </div>
14
+ </body>
15
+ </html>
package/src/example.ts ADDED
@@ -0,0 +1,7 @@
1
+ import {
2
+ // pass
3
+ } from './index';
4
+
5
+ /*
6
+ pass
7
+ */
package/src/index.ts ADDED
@@ -0,0 +1,34 @@
1
+ /* Vue Screenfull */
2
+ // JS Lib https://github.com/rafgraph/fscreen
3
+ // JS Lib Demo https://fscreen.rafgraph.dev/
4
+ // React Component by fscreen↑ https://github.com/snakesilk/react-fullscreen
5
+ // JS Lib https://github.com/sindresorhus/screenfull
6
+ // Vue3 Component by screenfull.js↑ https://github.com/mirari/vue-fullscreen/tree/v3
7
+ // import { isNumber } from 'mazey';
8
+ import { defineComponent } from 'vue'; // TypeScript with Options API https://vuejs.org/guide/typescript/options-api.html
9
+
10
+ // https://vuejs.org/guide/typescript/overview.html#definecomponent
11
+ export const com = defineComponent({
12
+ // type inference enabled
13
+ template: `
14
+ <div>
15
+ <span>{{ FirstName }}</span>
16
+ </div>
17
+ `,
18
+ // props: {
19
+ // name: String,
20
+ // msg: { type: String, required: true }
21
+ // },
22
+ data() {
23
+ return {
24
+ count: 1,
25
+ FirstName: 'm',
26
+ };
27
+ },
28
+ mounted() {
29
+ // this.name; // type: string | undefined
30
+ // this.msg; // type: string
31
+ // this.count; // type: number
32
+ this.FirstName = 'Cheng';
33
+ },
34
+ });
package/tsconfig.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "$schema": "http://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ /* Visit https://aka.ms/tsconfig.json to read more about this file */
5
+
6
+ /* Basic Options */
7
+ // "incremental": true, /* Enable incremental compilation */
8
+ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
9
+ "module": "es2015", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
10
+ "lib": ["es5", "DOM", "ScriptHost", "ESNext"], /* Specify library files to be included in the compilation. */
11
+ // "allowJs": true, /* Allow javascript files to be compiled. */
12
+ // "checkJs": true, /* Report errors in .js files. */
13
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
14
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
15
+ "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
16
+ "sourceMap": true, /* Generates corresponding '.map' file. */
17
+ // "outFile": "./", /* Concatenate and emit output to single file. */
18
+ "outDir": "lib", /* Redirect output structure to the directory. */
19
+ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
20
+ // "composite": true, /* Enable project compilation */
21
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
22
+ // "removeComments": true, /* Do not emit comments to output. */
23
+ // "noEmit": true, /* Do not emit outputs. */
24
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26
+ "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27
+
28
+ /* Strict Type-Checking Options */
29
+ "strict": true, /* Enable all strict type-checking options. */
30
+ // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
31
+ // "strictNullChecks": true, /* Enable strict null checks. */
32
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
33
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
34
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
35
+ "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
36
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
37
+
38
+ /* Additional Checks */
39
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
40
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
+
44
+ /* Module Resolution Options */
45
+ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // Using Vue with TypeScript https://vuejs.org/guide/typescript/overview.html
48
+ "paths": {
49
+ "mazey": ["node_modules/mazey/lib/index.d.ts"],
50
+ "vue": ["node_modules/vue/dist/vue.d.ts"]
51
+ }, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
52
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
53
+ // "typeRoots": [], /* List of folders to include type definitions from. */
54
+ // "types": [], /* Type declaration files to be included in compilation. */
55
+ "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
56
+ "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
57
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
58
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
59
+
60
+ /* Source Map Options */
61
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
62
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
63
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
64
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
65
+
66
+ /* Experimental Options */
67
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
68
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
69
+
70
+ /* Advanced Options */
71
+ "skipLibCheck": true, /* Skip type checking of declaration files. */
72
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
73
+ },
74
+ "include": [
75
+ "src/**/*.ts",
76
+ "typing.d.ts"
77
+ ],
78
+ "extends": "@vue/tsconfig/tsconfig.json"
79
+ }
package/typing.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ // declare const navigator any;
2
+ // declare namespace navigator {
3
+ // let connection: string;
4
+ // }
5
+
@@ -1,414 +0,0 @@
1
- (function webpackUniversalModuleDefinition(root, factory) {
2
- if(typeof exports === 'object' && typeof module === 'object')
3
- module.exports = factory();
4
- else if(typeof define === 'function' && define.amd)
5
- define([], factory);
6
- else {
7
- var a = factory();
8
- for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
9
- }
10
- })(typeof self !== 'undefined' ? self : this, function() {
11
- return /******/ (function(modules) { // webpackBootstrap
12
- /******/ // The module cache
13
- /******/ var installedModules = {};
14
- /******/
15
- /******/ // The require function
16
- /******/ function __webpack_require__(moduleId) {
17
- /******/
18
- /******/ // Check if module is in cache
19
- /******/ if(installedModules[moduleId]) {
20
- /******/ return installedModules[moduleId].exports;
21
- /******/ }
22
- /******/ // Create a new module (and put it into the cache)
23
- /******/ var module = installedModules[moduleId] = {
24
- /******/ i: moduleId,
25
- /******/ l: false,
26
- /******/ exports: {}
27
- /******/ };
28
- /******/
29
- /******/ // Execute the module function
30
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
- /******/
32
- /******/ // Flag the module as loaded
33
- /******/ module.l = true;
34
- /******/
35
- /******/ // Return the exports of the module
36
- /******/ return module.exports;
37
- /******/ }
38
- /******/
39
- /******/
40
- /******/ // expose the modules object (__webpack_modules__)
41
- /******/ __webpack_require__.m = modules;
42
- /******/
43
- /******/ // expose the module cache
44
- /******/ __webpack_require__.c = installedModules;
45
- /******/
46
- /******/ // define getter function for harmony exports
47
- /******/ __webpack_require__.d = function(exports, name, getter) {
48
- /******/ if(!__webpack_require__.o(exports, name)) {
49
- /******/ Object.defineProperty(exports, name, {
50
- /******/ configurable: false,
51
- /******/ enumerable: true,
52
- /******/ get: getter
53
- /******/ });
54
- /******/ }
55
- /******/ };
56
- /******/
57
- /******/ // getDefaultExport function for compatibility with non-harmony modules
58
- /******/ __webpack_require__.n = function(module) {
59
- /******/ var getter = module && module.__esModule ?
60
- /******/ function getDefault() { return module['default']; } :
61
- /******/ function getModuleExports() { return module; };
62
- /******/ __webpack_require__.d(getter, 'a', getter);
63
- /******/ return getter;
64
- /******/ };
65
- /******/
66
- /******/ // Object.prototype.hasOwnProperty.call
67
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
68
- /******/
69
- /******/ // __webpack_public_path__
70
- /******/ __webpack_require__.p = "/dist/";
71
- /******/
72
- /******/ // Load entry module and return exports
73
- /******/ return __webpack_require__(__webpack_require__.s = 1);
74
- /******/ })
75
- /************************************************************************/
76
- /******/ ([
77
- /* 0 */
78
- /***/ (function(module, exports, __webpack_require__) {
79
-
80
- "use strict";
81
-
82
-
83
- Object.defineProperty(exports, "__esModule", {
84
- value: true
85
- });
86
- //
87
- //
88
- //
89
- //
90
- //
91
- //
92
- //
93
-
94
- exports.default = {
95
- name: 'vue-screenfull',
96
- data: function data() {
97
- return {
98
- prefixArr: ['', 'webkit', 'moz', 'ms'], // 浏览器前缀
99
- requestSuffixArr: ['RequestFullscreen', 'RequestFullScreen'], // 请求全屏后缀
100
- exitSuffixArr: ['ExitFullscreen', 'CancelFullScreen'], // 退出全屏后缀
101
- request: null,
102
- exit: null,
103
- fullStatus: false
104
- };
105
- },
106
- created: function created() {
107
- var _this = this;
108
-
109
- var isRightRequest = null; // 是否找到适配的方法
110
- var isRightExit = null;
111
- var requestMethod = null; // 全屏方法
112
- var exitMethod = null; // 退出全屏方法
113
- this.prefixArr.forEach(function (prefix) {
114
- if (isRightRequest && isRightExit) {
115
- return;
116
- }
117
- // 查找请求
118
- requestMethod = _this.searchRightMethod(prefix, _this.requestSuffixArr, document.documentElement);
119
- isRightRequest = Boolean(requestMethod);
120
- // 查找退出
121
- exitMethod = _this.searchRightMethod(prefix, _this.exitSuffixArr, document);
122
- isRightExit = Boolean(exitMethod);
123
- });
124
- this.request = function (element) {
125
- var domEle = document.querySelector(element) || document.documentElement;
126
- domEle[requestMethod]();
127
- this.fullStatus = true;
128
- };
129
- this.exit = function () {
130
- document[exitMethod]();
131
- this.fullStatus = false;
132
- };
133
- },
134
-
135
- methods: {
136
- lowerFirst: function lowerFirst(str) {
137
- return str.slice(0, 1).toLowerCase() + str.slice(1);
138
- },
139
- searchRightMethod: function searchRightMethod(prefix, suffixArr, documentParent) {
140
- var _this2 = this;
141
-
142
- var methodArr = suffixArr.map(function (suffix) {
143
- return prefix + suffix;
144
- });
145
- var method = null;
146
- var isRight = null;
147
- methodArr.forEach(function (wholePrefix) {
148
- if (isRight) {
149
- return;
150
- }
151
- if (prefix.length === 0) {
152
- wholePrefix = _this2.lowerFirst(wholePrefix);
153
- }
154
- if (wholePrefix in documentParent) {
155
- method = wholePrefix;
156
- isRight = true;
157
- // console.log(method);
158
- }
159
- });
160
- return method;
161
- }
162
- }
163
- };
164
-
165
- /***/ }),
166
- /* 1 */
167
- /***/ (function(module, exports, __webpack_require__) {
168
-
169
- "use strict";
170
-
171
-
172
- Object.defineProperty(exports, "__esModule", {
173
- value: true
174
- });
175
-
176
- var _app = __webpack_require__(2);
177
-
178
- var _app2 = _interopRequireDefault(_app);
179
-
180
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
181
-
182
- exports.default = _app2.default;
183
-
184
- /***/ }),
185
- /* 2 */
186
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
187
-
188
- "use strict";
189
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
190
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_app_vue__ = __webpack_require__(0);
191
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_app_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_app_vue__);
192
- /* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_app_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_app_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
193
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_5ef48958_hasScoped_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_app_vue__ = __webpack_require__(4);
194
- var disposed = false
195
- var normalizeComponent = __webpack_require__(3)
196
- /* script */
197
-
198
-
199
- /* template */
200
-
201
- /* template functional */
202
- var __vue_template_functional__ = false
203
- /* styles */
204
- var __vue_styles__ = null
205
- /* scopeId */
206
- var __vue_scopeId__ = null
207
- /* moduleIdentifier (server only) */
208
- var __vue_module_identifier__ = null
209
- var Component = normalizeComponent(
210
- __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_script_index_0_app_vue___default.a,
211
- __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_13_7_3_vue_loader_lib_template_compiler_index_id_data_v_5ef48958_hasScoped_false_buble_transforms_node_modules_vue_loader_13_7_3_vue_loader_lib_selector_type_template_index_0_app_vue__["a" /* default */],
212
- __vue_template_functional__,
213
- __vue_styles__,
214
- __vue_scopeId__,
215
- __vue_module_identifier__
216
- )
217
- Component.options.__file = "src/app.vue"
218
-
219
- /* hot reload */
220
- if (false) {(function () {
221
- var hotAPI = require("vue-loader/node_modules/vue-hot-reload-api")
222
- hotAPI.install(require("vue"), false)
223
- if (!hotAPI.compatible) return
224
- module.hot.accept()
225
- if (!module.hot.data) {
226
- hotAPI.createRecord("data-v-5ef48958", Component.options)
227
- } else {
228
- hotAPI.reload("data-v-5ef48958", Component.options)
229
- }
230
- module.hot.dispose(function (data) {
231
- disposed = true
232
- })
233
- })()}
234
-
235
- /* harmony default export */ __webpack_exports__["default"] = (Component.exports);
236
-
237
-
238
- /***/ }),
239
- /* 3 */
240
- /***/ (function(module, exports) {
241
-
242
- /* globals __VUE_SSR_CONTEXT__ */
243
-
244
- // IMPORTANT: Do NOT use ES2015 features in this file.
245
- // This module is a runtime utility for cleaner component module output and will
246
- // be included in the final webpack user bundle.
247
-
248
- module.exports = function normalizeComponent (
249
- rawScriptExports,
250
- compiledTemplate,
251
- functionalTemplate,
252
- injectStyles,
253
- scopeId,
254
- moduleIdentifier /* server only */
255
- ) {
256
- var esModule
257
- var scriptExports = rawScriptExports = rawScriptExports || {}
258
-
259
- // ES6 modules interop
260
- var type = typeof rawScriptExports.default
261
- if (type === 'object' || type === 'function') {
262
- esModule = rawScriptExports
263
- scriptExports = rawScriptExports.default
264
- }
265
-
266
- // Vue.extend constructor export interop
267
- var options = typeof scriptExports === 'function'
268
- ? scriptExports.options
269
- : scriptExports
270
-
271
- // render functions
272
- if (compiledTemplate) {
273
- options.render = compiledTemplate.render
274
- options.staticRenderFns = compiledTemplate.staticRenderFns
275
- options._compiled = true
276
- }
277
-
278
- // functional template
279
- if (functionalTemplate) {
280
- options.functional = true
281
- }
282
-
283
- // scopedId
284
- if (scopeId) {
285
- options._scopeId = scopeId
286
- }
287
-
288
- var hook
289
- if (moduleIdentifier) { // server build
290
- hook = function (context) {
291
- // 2.3 injection
292
- context =
293
- context || // cached call
294
- (this.$vnode && this.$vnode.ssrContext) || // stateful
295
- (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
296
- // 2.2 with runInNewContext: true
297
- if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
298
- context = __VUE_SSR_CONTEXT__
299
- }
300
- // inject component styles
301
- if (injectStyles) {
302
- injectStyles.call(this, context)
303
- }
304
- // register component module identifier for async chunk inferrence
305
- if (context && context._registeredComponents) {
306
- context._registeredComponents.add(moduleIdentifier)
307
- }
308
- }
309
- // used by ssr in case component is cached and beforeCreate
310
- // never gets called
311
- options._ssrRegister = hook
312
- } else if (injectStyles) {
313
- hook = injectStyles
314
- }
315
-
316
- if (hook) {
317
- var functional = options.functional
318
- var existing = functional
319
- ? options.render
320
- : options.beforeCreate
321
-
322
- if (!functional) {
323
- // inject component registration as beforeCreate hook
324
- options.beforeCreate = existing
325
- ? [].concat(existing, hook)
326
- : [hook]
327
- } else {
328
- // for template-only hot-reload because in that case the render fn doesn't
329
- // go through the normalizer
330
- options._injectStyles = hook
331
- // register for functioal component in vue file
332
- options.render = function renderWithStyleInjection (h, context) {
333
- hook.call(context)
334
- return existing(h, context)
335
- }
336
- }
337
- }
338
-
339
- return {
340
- esModule: esModule,
341
- exports: scriptExports,
342
- options: options
343
- }
344
- }
345
-
346
-
347
- /***/ }),
348
- /* 4 */
349
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
350
-
351
- "use strict";
352
- var render = function() {
353
- var _vm = this
354
- var _h = _vm.$createElement
355
- var _c = _vm._self._c || _h
356
- return _c("div", { staticClass: "vue-screenfull" }, [
357
- _c(
358
- "button",
359
- {
360
- directives: [
361
- {
362
- name: "show",
363
- rawName: "v-show",
364
- value: !_vm.fullStatus,
365
- expression: "!fullStatus"
366
- }
367
- ],
368
- attrs: { type: "button" },
369
- on: {
370
- click: function($event) {
371
- _vm.request()
372
- }
373
- }
374
- },
375
- [_vm._v("全屏")]
376
- ),
377
- _vm._v(" "),
378
- _c(
379
- "button",
380
- {
381
- directives: [
382
- {
383
- name: "show",
384
- rawName: "v-show",
385
- value: _vm.fullStatus,
386
- expression: "fullStatus"
387
- }
388
- ],
389
- attrs: { type: "button" },
390
- on: {
391
- click: function($event) {
392
- _vm.exit()
393
- }
394
- }
395
- },
396
- [_vm._v("退出全屏")]
397
- )
398
- ])
399
- }
400
- var staticRenderFns = []
401
- render._withStripped = true
402
- var esExports = { render: render, staticRenderFns: staticRenderFns }
403
- /* harmony default export */ __webpack_exports__["a"] = (esExports);
404
- if (false) {
405
- module.hot.accept()
406
- if (module.hot.data) {
407
- require("vue-loader/node_modules/vue-hot-reload-api") .rerender("data-v-5ef48958", esExports)
408
- }
409
- }
410
-
411
- /***/ })
412
- /******/ ]);
413
- });
414
- //# sourceMappingURL=vue-screenfull.min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 79ca45656f45d812e1d6","webpack:///src/app.vue","webpack:///./src/index.js","webpack:///./src/app.vue","webpack:///./node_modules/_vue-loader@13.7.3@vue-loader/lib/component-normalizer.js","webpack:///./src/app.vue?48d2"],"names":["VueScreenfull"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;kBCrDA;AACA,0BADA;AAEA,QAFA,kBAEA;AACA;AACA,kDADA,EACA;AACA,wEAFA,EAEA;AACA,iEAHA,EAGA;AACA,yBAJA;AAKA,sBALA;AAMA;AANA;AAQA,KAXA;AAYA,WAZA,qBAYA;AAAA;;AACA,kCADA,CACA;AACA;AACA,iCAHA,CAGA;AACA,8BAJA,CAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAVA;AAWA;AACA;AACA;AACA;AACA,SAJA;AAKA;AACA;AACA;AACA,SAHA;AAIA,KArCA;;AAsCA;AACA,kBADA,sBACA,GADA,EACA;AACA;AACA,SAHA;AAIA,yBAJA,6BAIA,MAJA,EAIA,SAJA,EAIA,cAJA,EAIA;AAAA;;AACA;AACA;AACA,aAFA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAZA;AAaA;AACA;AAxBA;AAtCA,C;;;;;;;;;;;;;ACRA;;;;;;kBACeA,a;;;;;;;;;;;ACDf;AAAA;AACA;AACA;AACA;AACA;AACA;AACwL;AACxL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;;AAED;;;;;;;ACzCA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtGA;AACA;AACA;AACA;AACA,oBAAoB,gCAAgC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,C","file":"vue-screenfull.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 79ca45656f45d812e1d6","<template>\n <div class=\"vue-screenfull\">\n <button type=\"button\" @click=\"request()\" v-show=\"!fullStatus\">全屏</button>\n <button type=\"button\" @click=\"exit()\" v-show=\"fullStatus\">退出全屏</button>\n </div>\n</template>\n\n<script>\n export default {\n name: 'vue-screenfull',\n data () {\n return {\n prefixArr: ['', 'webkit', 'moz', 'ms'], // 浏览器前缀\n requestSuffixArr: ['RequestFullscreen', 'RequestFullScreen'], // 请求全屏后缀\n exitSuffixArr: ['ExitFullscreen', 'CancelFullScreen'], // 退出全屏后缀\n request: null,\n exit: null,\n fullStatus: false\n }\n },\n created () {\n let isRightRequest = null // 是否找到适配的方法\n let isRightExit = null\n let requestMethod = null // 全屏方法\n let exitMethod = null // 退出全屏方法\n this.prefixArr.forEach(prefix => {\n if (isRightRequest && isRightExit) {\n return\n }\n // 查找请求\n requestMethod = this.searchRightMethod(prefix, this.requestSuffixArr, document.documentElement)\n isRightRequest = Boolean(requestMethod)\n // 查找退出\n exitMethod = this.searchRightMethod(prefix, this.exitSuffixArr, document)\n isRightExit = Boolean(exitMethod)\n })\n this.request = function (element) {\n let domEle = document.querySelector(element) || document.documentElement\n domEle[requestMethod]()\n this.fullStatus = true\n }\n this.exit = function () {\n document[exitMethod]()\n this.fullStatus = false\n }\n },\n methods: {\n lowerFirst (str) {\n return str.slice(0, 1).toLowerCase() + str.slice(1)\n },\n searchRightMethod (prefix, suffixArr, documentParent) {\n let methodArr = suffixArr.map((suffix) => {\n return prefix + suffix\n })\n let method = null\n let isRight = null\n methodArr.forEach(wholePrefix => {\n if (isRight) {\n return\n }\n if (prefix.length === 0) {\n wholePrefix = this.lowerFirst(wholePrefix)\n }\n if (wholePrefix in documentParent) {\n method = wholePrefix\n isRight = true\n // console.log(method);\n }\n })\n return method\n }\n }\n }\n</script>\n\n\n\n// WEBPACK FOOTER //\n// src/app.vue","import VueScreenfull from './app.vue'\nexport default VueScreenfull\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","var disposed = false\nvar normalizeComponent = require(\"!../node_modules/_vue-loader@13.7.3@vue-loader/lib/component-normalizer\")\n/* script */\nexport * from \"!!babel-loader!../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=script&index=0!./app.vue\"\nimport __vue_script__ from \"!!babel-loader!../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=script&index=0!./app.vue\"\n/* template */\nimport __vue_template__ from \"!!../node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5ef48958\\\",\\\"hasScoped\\\":false,\\\"buble\\\":{\\\"transforms\\\":{}}}!../node_modules/_vue-loader@13.7.3@vue-loader/lib/selector?type=template&index=0!./app.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\nComponent.options.__file = \"src/app.vue\"\n\n/* hot reload */\nif (module.hot) {(function () {\n var hotAPI = require(\"vue-loader/node_modules/vue-hot-reload-api\")\n hotAPI.install(require(\"vue\"), false)\n if (!hotAPI.compatible) return\n module.hot.accept()\n if (!module.hot.data) {\n hotAPI.createRecord(\"data-v-5ef48958\", Component.options)\n } else {\n hotAPI.reload(\"data-v-5ef48958\", Component.options)\n }\n module.hot.dispose(function (data) {\n disposed = true\n })\n})()}\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/app.vue\n// module id = 2\n// module chunks = 0","/* globals __VUE_SSR_CONTEXT__ */\n\n// IMPORTANT: Do NOT use ES2015 features in this file.\n// This module is a runtime utility for cleaner component module output and will\n// be included in the final webpack user bundle.\n\nmodule.exports = function normalizeComponent (\n rawScriptExports,\n compiledTemplate,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier /* server only */\n) {\n var esModule\n var scriptExports = rawScriptExports = rawScriptExports || {}\n\n // ES6 modules interop\n var type = typeof rawScriptExports.default\n if (type === 'object' || type === 'function') {\n esModule = rawScriptExports\n scriptExports = rawScriptExports.default\n }\n\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // render functions\n if (compiledTemplate) {\n options.render = compiledTemplate.render\n options.staticRenderFns = compiledTemplate.staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = injectStyles\n }\n\n if (hook) {\n var functional = options.functional\n var existing = functional\n ? options.render\n : options.beforeCreate\n\n if (!functional) {\n // inject component registration as beforeCreate hook\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n } else {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return existing(h, context)\n }\n }\n }\n\n return {\n esModule: esModule,\n exports: scriptExports,\n options: options\n }\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/_vue-loader@13.7.3@vue-loader/lib/component-normalizer.js\n// module id = 3\n// module chunks = 0","var render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", { staticClass: \"vue-screenfull\" }, [\n _c(\n \"button\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: !_vm.fullStatus,\n expression: \"!fullStatus\"\n }\n ],\n attrs: { type: \"button\" },\n on: {\n click: function($event) {\n _vm.request()\n }\n }\n },\n [_vm._v(\"全屏\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.fullStatus,\n expression: \"fullStatus\"\n }\n ],\n attrs: { type: \"button\" },\n on: {\n click: function($event) {\n _vm.exit()\n }\n }\n },\n [_vm._v(\"退出全屏\")]\n )\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\nif (module.hot) {\n module.hot.accept()\n if (module.hot.data) {\n require(\"vue-loader/node_modules/vue-hot-reload-api\") .rerender(\"data-v-5ef48958\", esExports)\n }\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler?{\"id\":\"data-v-5ef48958\",\"hasScoped\":false,\"buble\":{\"transforms\":{}}}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=template&index=0!./src/app.vue\n// module id = 4\n// module chunks = 0"],"sourceRoot":""}
package/webpack.config.js DELETED
@@ -1,53 +0,0 @@
1
- /**
2
- * Created by 879372858@qq.com on 2018/2/10.
3
- */
4
- const path = require("path");
5
- const webpack = require("webpack");
6
- const uglify = require("uglifyjs-webpack-plugin");
7
-
8
- module.exports = {
9
- devtool: 'source-map',
10
- entry: "./src/index.js",
11
- output: {
12
- path: path.resolve(__dirname, './dist'),
13
- publicPath: '/dist/',
14
- filename: 'vue-screenfull.min.js',
15
- libraryTarget: 'umd',
16
- umdNamedDefine: true
17
- },
18
- module: {
19
- rules: [{
20
- test: /\.vue$/,
21
- loader: 'vue-loader'
22
- },
23
- {
24
- test: /\.less$/,
25
- use: [
26
- { loader: "style-loader" },
27
- { loader: "css-loader" },
28
- { loader: "less-loader" }
29
- ]
30
- },
31
- {
32
- test: /\.js$/,
33
- exclude: /node_modules|vue\/dist|vue-router\/|vue-loader\/|vue-hot-reload-api\//,
34
- loader: 'babel-loader'
35
- },
36
- {
37
- test: /\.(png|jpg|gif|ttf|svg|woff|eot)$/,
38
- loader: 'url-loader',
39
- query: {
40
- limit: 30000,
41
- name: '[name].[ext]?[hash]'
42
- }
43
- }
44
- ]
45
- },
46
- plugins: [
47
- new webpack.DefinePlugin({
48
- "process.env": {
49
- NODE_ENV: JSON.stringify("production")
50
- }
51
- })
52
- ]
53
- };