app模板、应用模板、组件模板、widget模板
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

619 lines
17 KiB

4 years ago
  1. module.exports =
  2. /******/ (function(modules) { // webpackBootstrap
  3. /******/ // The module cache
  4. /******/ var installedModules = {};
  5. /******/
  6. /******/ // The require function
  7. /******/ function __webpack_require__(moduleId) {
  8. /******/
  9. /******/ // Check if module is in cache
  10. /******/ if(installedModules[moduleId]) {
  11. /******/ return installedModules[moduleId].exports;
  12. /******/ }
  13. /******/ // Create a new module (and put it into the cache)
  14. /******/ var module = installedModules[moduleId] = {
  15. /******/ i: moduleId,
  16. /******/ l: false,
  17. /******/ exports: {}
  18. /******/ };
  19. /******/
  20. /******/ // Execute the module function
  21. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  22. /******/
  23. /******/ // Flag the module as loaded
  24. /******/ module.l = true;
  25. /******/
  26. /******/ // Return the exports of the module
  27. /******/ return module.exports;
  28. /******/ }
  29. /******/
  30. /******/
  31. /******/ // expose the modules object (__webpack_modules__)
  32. /******/ __webpack_require__.m = modules;
  33. /******/
  34. /******/ // expose the module cache
  35. /******/ __webpack_require__.c = installedModules;
  36. /******/
  37. /******/ // define getter function for harmony exports
  38. /******/ __webpack_require__.d = function(exports, name, getter) {
  39. /******/ if(!__webpack_require__.o(exports, name)) {
  40. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  41. /******/ }
  42. /******/ };
  43. /******/
  44. /******/ // define __esModule on exports
  45. /******/ __webpack_require__.r = function(exports) {
  46. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  47. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  48. /******/ }
  49. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  50. /******/ };
  51. /******/
  52. /******/ // create a fake namespace object
  53. /******/ // mode & 1: value is a module id, require it
  54. /******/ // mode & 2: merge all properties of value into the ns
  55. /******/ // mode & 4: return value when already ns object
  56. /******/ // mode & 8|1: behave like require
  57. /******/ __webpack_require__.t = function(value, mode) {
  58. /******/ if(mode & 1) value = __webpack_require__(value);
  59. /******/ if(mode & 8) return value;
  60. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  61. /******/ var ns = Object.create(null);
  62. /******/ __webpack_require__.r(ns);
  63. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  64. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  65. /******/ return ns;
  66. /******/ };
  67. /******/
  68. /******/ // getDefaultExport function for compatibility with non-harmony modules
  69. /******/ __webpack_require__.n = function(module) {
  70. /******/ var getter = module && module.__esModule ?
  71. /******/ function getDefault() { return module['default']; } :
  72. /******/ function getModuleExports() { return module; };
  73. /******/ __webpack_require__.d(getter, 'a', getter);
  74. /******/ return getter;
  75. /******/ };
  76. /******/
  77. /******/ // Object.prototype.hasOwnProperty.call
  78. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  79. /******/
  80. /******/ // __webpack_public_path__
  81. /******/ __webpack_require__.p = "/dist/";
  82. /******/
  83. /******/
  84. /******/ // Load entry module and return exports
  85. /******/ return __webpack_require__(__webpack_require__.s = 530);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 104:
  90. /***/ (function(module, exports) {
  91. module.exports = require("tis-ui/lib/utils/vdom");
  92. /***/ }),
  93. /***/ 2:
  94. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  95. "use strict";
  96. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  97. /* globals __VUE_SSR_CONTEXT__ */
  98. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  99. // This module is a runtime utility for cleaner component module output and will
  100. // be included in the final webpack user bundle.
  101. function normalizeComponent (
  102. scriptExports,
  103. render,
  104. staticRenderFns,
  105. functionalTemplate,
  106. injectStyles,
  107. scopeId,
  108. moduleIdentifier, /* server only */
  109. shadowMode /* vue-cli only */
  110. ) {
  111. // Vue.extend constructor export interop
  112. var options = typeof scriptExports === 'function'
  113. ? scriptExports.options
  114. : scriptExports
  115. // render functions
  116. if (render) {
  117. options.render = render
  118. options.staticRenderFns = staticRenderFns
  119. options._compiled = true
  120. }
  121. // functional template
  122. if (functionalTemplate) {
  123. options.functional = true
  124. }
  125. // scopedId
  126. if (scopeId) {
  127. options._scopeId = 'data-v-' + scopeId
  128. }
  129. var hook
  130. if (moduleIdentifier) { // server build
  131. hook = function (context) {
  132. // 2.3 injection
  133. context =
  134. context || // cached call
  135. (this.$vnode && this.$vnode.ssrContext) || // stateful
  136. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  137. // 2.2 with runInNewContext: true
  138. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  139. context = __VUE_SSR_CONTEXT__
  140. }
  141. // inject component styles
  142. if (injectStyles) {
  143. injectStyles.call(this, context)
  144. }
  145. // register component module identifier for async chunk inferrence
  146. if (context && context._registeredComponents) {
  147. context._registeredComponents.add(moduleIdentifier)
  148. }
  149. }
  150. // used by ssr in case component is cached and beforeCreate
  151. // never gets called
  152. options._ssrRegister = hook
  153. } else if (injectStyles) {
  154. hook = shadowMode
  155. ? function () {
  156. injectStyles.call(
  157. this,
  158. (options.functional ? this.parent : this).$root.$options.shadowRoot
  159. )
  160. }
  161. : injectStyles
  162. }
  163. if (hook) {
  164. if (options.functional) {
  165. // for template-only hot-reload because in that case the render fn doesn't
  166. // go through the normalizer
  167. options._injectStyles = hook
  168. // register for functional component in vue file
  169. var originalRender = options.render
  170. options.render = function renderWithStyleInjection (h, context) {
  171. hook.call(context)
  172. return originalRender(h, context)
  173. }
  174. } else {
  175. // inject component registration as beforeCreate hook
  176. var existing = options.beforeCreate
  177. options.beforeCreate = existing
  178. ? [].concat(existing, hook)
  179. : [hook]
  180. }
  181. }
  182. return {
  183. exports: scriptExports,
  184. options: options
  185. }
  186. }
  187. /***/ }),
  188. /***/ 33:
  189. /***/ (function(module, exports) {
  190. module.exports = require("tis-ui/lib/utils/merge");
  191. /***/ }),
  192. /***/ 4:
  193. /***/ (function(module, exports) {
  194. module.exports = require("vue");
  195. /***/ }),
  196. /***/ 530:
  197. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  198. "use strict";
  199. // ESM COMPAT FLAG
  200. __webpack_require__.r(__webpack_exports__);
  201. // EXTERNAL MODULE: external "vue"
  202. var external_vue_ = __webpack_require__(4);
  203. var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_);
  204. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=template&id=43dbc3d8&
  205. var render = function() {
  206. var _vm = this
  207. var _h = _vm.$createElement
  208. var _c = _vm._self._c || _h
  209. return _c("transition", { attrs: { name: "el-notification-fade" } }, [
  210. _c(
  211. "div",
  212. {
  213. directives: [
  214. {
  215. name: "show",
  216. rawName: "v-show",
  217. value: _vm.visible,
  218. expression: "visible"
  219. }
  220. ],
  221. class: ["el-notification", _vm.customClass, _vm.horizontalClass],
  222. style: _vm.positionStyle,
  223. attrs: { role: "alert" },
  224. on: {
  225. mouseenter: function($event) {
  226. _vm.clearTimer()
  227. },
  228. mouseleave: function($event) {
  229. _vm.startTimer()
  230. },
  231. click: _vm.click
  232. }
  233. },
  234. [
  235. _vm.type || _vm.iconClass
  236. ? _c("i", {
  237. staticClass: "el-notification__icon",
  238. class: [_vm.typeClass, _vm.iconClass]
  239. })
  240. : _vm._e(),
  241. _c(
  242. "div",
  243. {
  244. staticClass: "el-notification__group",
  245. class: { "is-with-icon": _vm.typeClass || _vm.iconClass }
  246. },
  247. [
  248. _c("h2", {
  249. staticClass: "el-notification__title",
  250. domProps: { textContent: _vm._s(_vm.title) }
  251. }),
  252. _c(
  253. "div",
  254. {
  255. directives: [
  256. {
  257. name: "show",
  258. rawName: "v-show",
  259. value: _vm.message,
  260. expression: "message"
  261. }
  262. ],
  263. staticClass: "el-notification__content"
  264. },
  265. [
  266. _vm._t("default", [
  267. !_vm.dangerouslyUseHTMLString
  268. ? _c("p", [_vm._v(_vm._s(_vm.message))])
  269. : _c("p", { domProps: { innerHTML: _vm._s(_vm.message) } })
  270. ])
  271. ],
  272. 2
  273. ),
  274. _vm.showClose
  275. ? _c("div", {
  276. staticClass: "el-notification__closeBtn el-icon-close",
  277. on: {
  278. click: function($event) {
  279. $event.stopPropagation()
  280. return _vm.close($event)
  281. }
  282. }
  283. })
  284. : _vm._e()
  285. ]
  286. )
  287. ]
  288. )
  289. ])
  290. }
  291. var staticRenderFns = []
  292. render._withStripped = true
  293. // CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=template&id=43dbc3d8&
  294. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/notification/src/main.vue?vue&type=script&lang=js&
  295. //
  296. //
  297. //
  298. //
  299. //
  300. //
  301. //
  302. //
  303. //
  304. //
  305. //
  306. //
  307. //
  308. //
  309. //
  310. //
  311. //
  312. //
  313. //
  314. //
  315. //
  316. //
  317. //
  318. //
  319. //
  320. //
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. var typeMap = {
  329. success: 'success',
  330. info: 'info',
  331. warning: 'warning',
  332. error: 'error'
  333. };
  334. /* harmony default export */ var mainvue_type_script_lang_js_ = ({
  335. data: function data() {
  336. return {
  337. visible: false,
  338. title: '',
  339. message: '',
  340. duration: 4500,
  341. type: '',
  342. showClose: true,
  343. customClass: '',
  344. iconClass: '',
  345. onClose: null,
  346. onClick: null,
  347. closed: false,
  348. verticalOffset: 0,
  349. timer: null,
  350. dangerouslyUseHTMLString: false,
  351. position: 'top-right'
  352. };
  353. },
  354. computed: {
  355. typeClass: function typeClass() {
  356. return this.type && typeMap[this.type] ? 'el-icon-' + typeMap[this.type] : '';
  357. },
  358. horizontalClass: function horizontalClass() {
  359. return this.position.indexOf('right') > -1 ? 'right' : 'left';
  360. },
  361. verticalProperty: function verticalProperty() {
  362. return (/^top-/.test(this.position) ? 'top' : 'bottom'
  363. );
  364. },
  365. positionStyle: function positionStyle() {
  366. var _ref;
  367. return _ref = {}, _ref[this.verticalProperty] = this.verticalOffset + 'px', _ref;
  368. }
  369. },
  370. watch: {
  371. closed: function closed(newVal) {
  372. if (newVal) {
  373. this.visible = false;
  374. this.$el.addEventListener('transitionend', this.destroyElement);
  375. }
  376. }
  377. },
  378. methods: {
  379. destroyElement: function destroyElement() {
  380. this.$el.removeEventListener('transitionend', this.destroyElement);
  381. this.$destroy(true);
  382. this.$el.parentNode.removeChild(this.$el);
  383. },
  384. click: function click() {
  385. if (typeof this.onClick === 'function') {
  386. this.onClick();
  387. }
  388. },
  389. close: function close() {
  390. this.closed = true;
  391. if (typeof this.onClose === 'function') {
  392. this.onClose();
  393. }
  394. },
  395. clearTimer: function clearTimer() {
  396. clearTimeout(this.timer);
  397. },
  398. startTimer: function startTimer() {
  399. var _this = this;
  400. if (this.duration > 0) {
  401. this.timer = setTimeout(function () {
  402. if (!_this.closed) {
  403. _this.close();
  404. }
  405. }, this.duration);
  406. }
  407. },
  408. keydown: function keydown(e) {
  409. if (e.keyCode === 46 || e.keyCode === 8) {
  410. this.clearTimer(); // detele 取消倒计时
  411. } else if (e.keyCode === 27) {
  412. // esc关闭消息
  413. if (!this.closed) {
  414. this.close();
  415. }
  416. } else {
  417. this.startTimer(); // 恢复倒计时
  418. }
  419. }
  420. },
  421. mounted: function mounted() {
  422. var _this2 = this;
  423. if (this.duration > 0) {
  424. this.timer = setTimeout(function () {
  425. if (!_this2.closed) {
  426. _this2.close();
  427. }
  428. }, this.duration);
  429. }
  430. document.addEventListener('keydown', this.keydown);
  431. },
  432. beforeDestroy: function beforeDestroy() {
  433. document.removeEventListener('keydown', this.keydown);
  434. }
  435. });
  436. // CONCATENATED MODULE: ./packages/notification/src/main.vue?vue&type=script&lang=js&
  437. /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
  438. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  439. var componentNormalizer = __webpack_require__(2);
  440. // CONCATENATED MODULE: ./packages/notification/src/main.vue
  441. /* normalize component */
  442. var component = Object(componentNormalizer["a" /* default */])(
  443. src_mainvue_type_script_lang_js_,
  444. render,
  445. staticRenderFns,
  446. false,
  447. null,
  448. null,
  449. null
  450. )
  451. /* hot reload */
  452. if (false) { var api; }
  453. component.options.__file = "packages/notification/src/main.vue"
  454. /* harmony default export */ var main = (component.exports);
  455. // EXTERNAL MODULE: external "tis-ui/lib/utils/merge"
  456. var merge_ = __webpack_require__(33);
  457. var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
  458. // EXTERNAL MODULE: external "tis-ui/lib/utils/popup"
  459. var popup_ = __webpack_require__(77);
  460. // EXTERNAL MODULE: external "tis-ui/lib/utils/vdom"
  461. var vdom_ = __webpack_require__(104);
  462. // CONCATENATED MODULE: ./packages/notification/src/main.js
  463. var NotificationConstructor = external_vue_default.a.extend(main);
  464. var instance = void 0;
  465. var instances = [];
  466. var seed = 1;
  467. var main_Notification = function Notification(options) {
  468. if (external_vue_default.a.prototype.$isServer) return;
  469. options = merge_default()({}, options);
  470. var userOnClose = options.onClose;
  471. var id = 'notification_' + seed++;
  472. var position = options.position || 'top-right';
  473. options.onClose = function () {
  474. Notification.close(id, userOnClose);
  475. };
  476. instance = new NotificationConstructor({
  477. data: options
  478. });
  479. if (Object(vdom_["isVNode"])(options.message)) {
  480. instance.$slots.default = [options.message];
  481. options.message = 'REPLACED_BY_VNODE';
  482. }
  483. instance.id = id;
  484. instance.$mount();
  485. document.body.appendChild(instance.$el);
  486. instance.visible = true;
  487. instance.dom = instance.$el;
  488. instance.dom.style.zIndex = popup_["PopupManager"].nextZIndex();
  489. var verticalOffset = options.offset || 0;
  490. instances.filter(function (item) {
  491. return item.position === position;
  492. }).forEach(function (item) {
  493. verticalOffset += item.$el.offsetHeight + 16;
  494. });
  495. verticalOffset += 16;
  496. instance.verticalOffset = verticalOffset;
  497. instances.push(instance);
  498. return instance;
  499. };
  500. ['success', 'warning', 'info', 'error'].forEach(function (type) {
  501. main_Notification[type] = function (options) {
  502. if (typeof options === 'string' || Object(vdom_["isVNode"])(options)) {
  503. options = {
  504. message: options
  505. };
  506. }
  507. options.type = type;
  508. return main_Notification(options);
  509. };
  510. });
  511. main_Notification.close = function (id, userOnClose) {
  512. var index = -1;
  513. var len = instances.length;
  514. var instance = instances.filter(function (instance, i) {
  515. if (instance.id === id) {
  516. index = i;
  517. return true;
  518. }
  519. return false;
  520. })[0];
  521. if (!instance) return;
  522. if (typeof userOnClose === 'function') {
  523. userOnClose(instance);
  524. }
  525. instances.splice(index, 1);
  526. if (len <= 1) return;
  527. var position = instance.position;
  528. var removedHeight = instance.dom.offsetHeight;
  529. for (var i = index; i < len - 1; i++) {
  530. if (instances[i].position === position) {
  531. instances[i].dom.style[instance.verticalProperty] = parseInt(instances[i].dom.style[instance.verticalProperty], 10) - removedHeight - 16 + 'px';
  532. }
  533. }
  534. };
  535. main_Notification.closeAll = function () {
  536. for (var i = instances.length - 1; i >= 0; i--) {
  537. instances[i].close();
  538. }
  539. };
  540. /* harmony default export */ var src_main = (main_Notification);
  541. // CONCATENATED MODULE: ./packages/notification/index.js
  542. /* harmony default export */ var notification = __webpack_exports__["default"] = (src_main);
  543. /***/ }),
  544. /***/ 77:
  545. /***/ (function(module, exports) {
  546. module.exports = require("tis-ui/lib/utils/popup");
  547. /***/ })
  548. /******/ });