框架源码
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.

424 lines
12 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 = 536);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 2:
  90. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91. "use strict";
  92. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  93. /* globals __VUE_SSR_CONTEXT__ */
  94. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  95. // This module is a runtime utility for cleaner component module output and will
  96. // be included in the final webpack user bundle.
  97. function normalizeComponent (
  98. scriptExports,
  99. render,
  100. staticRenderFns,
  101. functionalTemplate,
  102. injectStyles,
  103. scopeId,
  104. moduleIdentifier, /* server only */
  105. shadowMode /* vue-cli only */
  106. ) {
  107. // Vue.extend constructor export interop
  108. var options = typeof scriptExports === 'function'
  109. ? scriptExports.options
  110. : scriptExports
  111. // render functions
  112. if (render) {
  113. options.render = render
  114. options.staticRenderFns = staticRenderFns
  115. options._compiled = true
  116. }
  117. // functional template
  118. if (functionalTemplate) {
  119. options.functional = true
  120. }
  121. // scopedId
  122. if (scopeId) {
  123. options._scopeId = 'data-v-' + scopeId
  124. }
  125. var hook
  126. if (moduleIdentifier) { // server build
  127. hook = function (context) {
  128. // 2.3 injection
  129. context =
  130. context || // cached call
  131. (this.$vnode && this.$vnode.ssrContext) || // stateful
  132. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  133. // 2.2 with runInNewContext: true
  134. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  135. context = __VUE_SSR_CONTEXT__
  136. }
  137. // inject component styles
  138. if (injectStyles) {
  139. injectStyles.call(this, context)
  140. }
  141. // register component module identifier for async chunk inferrence
  142. if (context && context._registeredComponents) {
  143. context._registeredComponents.add(moduleIdentifier)
  144. }
  145. }
  146. // used by ssr in case component is cached and beforeCreate
  147. // never gets called
  148. options._ssrRegister = hook
  149. } else if (injectStyles) {
  150. hook = shadowMode
  151. ? function () {
  152. injectStyles.call(
  153. this,
  154. (options.functional ? this.parent : this).$root.$options.shadowRoot
  155. )
  156. }
  157. : injectStyles
  158. }
  159. if (hook) {
  160. if (options.functional) {
  161. // for template-only hot-reload because in that case the render fn doesn't
  162. // go through the normalizer
  163. options._injectStyles = hook
  164. // register for functional component in vue file
  165. var originalRender = options.render
  166. options.render = function renderWithStyleInjection (h, context) {
  167. hook.call(context)
  168. return originalRender(h, context)
  169. }
  170. } else {
  171. // inject component registration as beforeCreate hook
  172. var existing = options.beforeCreate
  173. options.beforeCreate = existing
  174. ? [].concat(existing, hook)
  175. : [hook]
  176. }
  177. }
  178. return {
  179. exports: scriptExports,
  180. options: options
  181. }
  182. }
  183. /***/ }),
  184. /***/ 536:
  185. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  186. "use strict";
  187. // ESM COMPAT FLAG
  188. __webpack_require__.r(__webpack_exports__);
  189. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=template&id=6e53341b&
  190. var render = function() {
  191. var _vm = this
  192. var _h = _vm.$createElement
  193. var _c = _vm._self._c || _h
  194. return _c("transition", { attrs: { name: "el-alert-fade" } }, [
  195. _c(
  196. "div",
  197. {
  198. directives: [
  199. {
  200. name: "show",
  201. rawName: "v-show",
  202. value: _vm.visible,
  203. expression: "visible"
  204. }
  205. ],
  206. staticClass: "el-alert",
  207. class: [
  208. _vm.typeClass,
  209. _vm.center ? "is-center" : "",
  210. "is-" + _vm.effect
  211. ],
  212. attrs: { role: "alert" }
  213. },
  214. [
  215. _vm.showIcon
  216. ? _c("i", {
  217. staticClass: "el-alert__icon",
  218. class: [_vm.iconClass, _vm.isBigIcon]
  219. })
  220. : _vm._e(),
  221. _c("div", { staticClass: "el-alert__content" }, [
  222. _vm.title || _vm.$slots.title
  223. ? _c(
  224. "span",
  225. { staticClass: "el-alert__title", class: [_vm.isBoldTitle] },
  226. [_vm._t("title", [_vm._v(_vm._s(_vm.title))])],
  227. 2
  228. )
  229. : _vm._e(),
  230. _vm.$slots.default && !_vm.description
  231. ? _c(
  232. "p",
  233. { staticClass: "el-alert__description" },
  234. [_vm._t("default")],
  235. 2
  236. )
  237. : _vm._e(),
  238. _vm.description && !_vm.$slots.default
  239. ? _c("p", { staticClass: "el-alert__description" }, [
  240. _vm._v(_vm._s(_vm.description))
  241. ])
  242. : _vm._e(),
  243. _c(
  244. "i",
  245. {
  246. directives: [
  247. {
  248. name: "show",
  249. rawName: "v-show",
  250. value: _vm.closable,
  251. expression: "closable"
  252. }
  253. ],
  254. staticClass: "el-alert__closebtn",
  255. class: {
  256. "is-customed": _vm.closeText !== "",
  257. "el-icon-close": _vm.closeText === ""
  258. },
  259. on: {
  260. click: function($event) {
  261. _vm.close()
  262. }
  263. }
  264. },
  265. [_vm._v(_vm._s(_vm.closeText))]
  266. )
  267. ])
  268. ]
  269. )
  270. ])
  271. }
  272. var staticRenderFns = []
  273. render._withStripped = true
  274. // CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=template&id=6e53341b&
  275. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/alert/src/main.vue?vue&type=script&lang=js&
  276. //
  277. //
  278. //
  279. //
  280. //
  281. //
  282. //
  283. //
  284. //
  285. //
  286. //
  287. //
  288. //
  289. //
  290. //
  291. //
  292. //
  293. //
  294. //
  295. //
  296. //
  297. var TYPE_CLASSES_MAP = {
  298. 'success': 'el-icon-success',
  299. 'warning': 'el-icon-warning',
  300. 'error': 'el-icon-error'
  301. };
  302. /* harmony default export */ var mainvue_type_script_lang_js_ = ({
  303. name: 'TisAlert',
  304. props: {
  305. title: {
  306. type: String,
  307. default: ''
  308. },
  309. description: {
  310. type: String,
  311. default: ''
  312. },
  313. type: {
  314. type: String,
  315. default: 'info'
  316. },
  317. closable: {
  318. type: Boolean,
  319. default: true
  320. },
  321. closeText: {
  322. type: String,
  323. default: ''
  324. },
  325. showIcon: Boolean,
  326. center: Boolean,
  327. effect: {
  328. type: String,
  329. default: 'light',
  330. validator: function validator(value) {
  331. return ['light', 'dark'].indexOf(value) !== -1;
  332. }
  333. }
  334. },
  335. data: function data() {
  336. return {
  337. visible: true
  338. };
  339. },
  340. methods: {
  341. close: function close() {
  342. this.visible = false;
  343. this.$emit('close');
  344. }
  345. },
  346. computed: {
  347. typeClass: function typeClass() {
  348. return 'el-alert--' + this.type;
  349. },
  350. iconClass: function iconClass() {
  351. return TYPE_CLASSES_MAP[this.type] || 'el-icon-info';
  352. },
  353. isBigIcon: function isBigIcon() {
  354. return this.description || this.$slots.default ? 'is-big' : '';
  355. },
  356. isBoldTitle: function isBoldTitle() {
  357. return this.description || this.$slots.default ? 'is-bold' : '';
  358. }
  359. }
  360. });
  361. // CONCATENATED MODULE: ./packages/alert/src/main.vue?vue&type=script&lang=js&
  362. /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_);
  363. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  364. var componentNormalizer = __webpack_require__(2);
  365. // CONCATENATED MODULE: ./packages/alert/src/main.vue
  366. /* normalize component */
  367. var component = Object(componentNormalizer["a" /* default */])(
  368. src_mainvue_type_script_lang_js_,
  369. render,
  370. staticRenderFns,
  371. false,
  372. null,
  373. null,
  374. null
  375. )
  376. /* hot reload */
  377. if (false) { var api; }
  378. component.options.__file = "packages/alert/src/main.vue"
  379. /* harmony default export */ var main = (component.exports);
  380. // CONCATENATED MODULE: ./packages/alert/index.js
  381. /* istanbul ignore next */
  382. main.install = function (Vue) {
  383. Vue.component(main.name, main);
  384. };
  385. /* harmony default export */ var packages_alert = __webpack_exports__["default"] = (main);
  386. /***/ })
  387. /******/ });