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

501 lines
13 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 = 559);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 10:
  90. /***/ (function(module, exports) {
  91. module.exports = require("tis-ui/lib/utils/util");
  92. /***/ }),
  93. /***/ 13:
  94. /***/ (function(module, exports) {
  95. module.exports = require("tis-ui/lib/mixins/emitter");
  96. /***/ }),
  97. /***/ 2:
  98. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  99. "use strict";
  100. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  101. /* globals __VUE_SSR_CONTEXT__ */
  102. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  103. // This module is a runtime utility for cleaner component module output and will
  104. // be included in the final webpack user bundle.
  105. function normalizeComponent (
  106. scriptExports,
  107. render,
  108. staticRenderFns,
  109. functionalTemplate,
  110. injectStyles,
  111. scopeId,
  112. moduleIdentifier, /* server only */
  113. shadowMode /* vue-cli only */
  114. ) {
  115. // Vue.extend constructor export interop
  116. var options = typeof scriptExports === 'function'
  117. ? scriptExports.options
  118. : scriptExports
  119. // render functions
  120. if (render) {
  121. options.render = render
  122. options.staticRenderFns = staticRenderFns
  123. options._compiled = true
  124. }
  125. // functional template
  126. if (functionalTemplate) {
  127. options.functional = true
  128. }
  129. // scopedId
  130. if (scopeId) {
  131. options._scopeId = 'data-v-' + scopeId
  132. }
  133. var hook
  134. if (moduleIdentifier) { // server build
  135. hook = function (context) {
  136. // 2.3 injection
  137. context =
  138. context || // cached call
  139. (this.$vnode && this.$vnode.ssrContext) || // stateful
  140. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  141. // 2.2 with runInNewContext: true
  142. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  143. context = __VUE_SSR_CONTEXT__
  144. }
  145. // inject component styles
  146. if (injectStyles) {
  147. injectStyles.call(this, context)
  148. }
  149. // register component module identifier for async chunk inferrence
  150. if (context && context._registeredComponents) {
  151. context._registeredComponents.add(moduleIdentifier)
  152. }
  153. }
  154. // used by ssr in case component is cached and beforeCreate
  155. // never gets called
  156. options._ssrRegister = hook
  157. } else if (injectStyles) {
  158. hook = shadowMode
  159. ? function () {
  160. injectStyles.call(
  161. this,
  162. (options.functional ? this.parent : this).$root.$options.shadowRoot
  163. )
  164. }
  165. : injectStyles
  166. }
  167. if (hook) {
  168. if (options.functional) {
  169. // for template-only hot-reload because in that case the render fn doesn't
  170. // go through the normalizer
  171. options._injectStyles = hook
  172. // register for functional component in vue file
  173. var originalRender = options.render
  174. options.render = function renderWithStyleInjection (h, context) {
  175. hook.call(context)
  176. return originalRender(h, context)
  177. }
  178. } else {
  179. // inject component registration as beforeCreate hook
  180. var existing = options.beforeCreate
  181. options.beforeCreate = existing
  182. ? [].concat(existing, hook)
  183. : [hook]
  184. }
  185. }
  186. return {
  187. exports: scriptExports,
  188. options: options
  189. }
  190. }
  191. /***/ }),
  192. /***/ 559:
  193. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  194. "use strict";
  195. // ESM COMPAT FLAG
  196. __webpack_require__.r(__webpack_exports__);
  197. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
  198. var render = function() {
  199. var _vm = this
  200. var _h = _vm.$createElement
  201. var _c = _vm._self._c || _h
  202. return _c(
  203. "div",
  204. {
  205. staticClass: "el-collapse-item",
  206. class: { "is-active": _vm.isActive, "is-disabled": _vm.disabled }
  207. },
  208. [
  209. _c(
  210. "div",
  211. {
  212. attrs: {
  213. role: "tab",
  214. "aria-expanded": _vm.isActive,
  215. "aria-controls": "el-collapse-content-" + _vm.id,
  216. "aria-describedby": "el-collapse-content-" + _vm.id
  217. }
  218. },
  219. [
  220. _c(
  221. "div",
  222. {
  223. staticClass: "el-collapse-item__header",
  224. class: {
  225. focusing: _vm.focusing,
  226. "is-active": _vm.isActive
  227. },
  228. attrs: {
  229. role: "button",
  230. id: "el-collapse-head-" + _vm.id,
  231. tabindex: _vm.disabled ? undefined : 0
  232. },
  233. on: {
  234. click: _vm.handleHeaderClick,
  235. keyup: function($event) {
  236. if (
  237. !("button" in $event) &&
  238. _vm._k($event.keyCode, "space", 32, $event.key, [
  239. " ",
  240. "Spacebar"
  241. ]) &&
  242. _vm._k($event.keyCode, "enter", 13, $event.key, "Enter")
  243. ) {
  244. return null
  245. }
  246. $event.stopPropagation()
  247. return _vm.handleEnterClick($event)
  248. },
  249. focus: _vm.handleFocus,
  250. blur: function($event) {
  251. _vm.focusing = false
  252. }
  253. }
  254. },
  255. [
  256. _vm._t("title", [_vm._v(_vm._s(_vm.title))]),
  257. _c("i", {
  258. staticClass: "el-collapse-item__arrow el-icon-arrow-right",
  259. class: { "is-active": _vm.isActive }
  260. })
  261. ],
  262. 2
  263. )
  264. ]
  265. ),
  266. _c("tis-collapse-transition", [
  267. _c(
  268. "div",
  269. {
  270. directives: [
  271. {
  272. name: "show",
  273. rawName: "v-show",
  274. value: _vm.isActive,
  275. expression: "isActive"
  276. }
  277. ],
  278. staticClass: "el-collapse-item__wrap",
  279. attrs: {
  280. role: "tabpanel",
  281. "aria-hidden": !_vm.isActive,
  282. "aria-labelledby": "el-collapse-head-" + _vm.id,
  283. id: "el-collapse-content-" + _vm.id
  284. }
  285. },
  286. [
  287. _c(
  288. "div",
  289. { staticClass: "el-collapse-item__content" },
  290. [_vm._t("default")],
  291. 2
  292. )
  293. ]
  294. )
  295. ])
  296. ],
  297. 1
  298. )
  299. }
  300. var staticRenderFns = []
  301. render._withStripped = true
  302. // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=template&id=2d05faac&
  303. // EXTERNAL MODULE: external "tis-ui/lib/transitions/collapse-transition"
  304. var collapse_transition_ = __webpack_require__(98);
  305. var collapse_transition_default = /*#__PURE__*/__webpack_require__.n(collapse_transition_);
  306. // EXTERNAL MODULE: external "tis-ui/lib/mixins/emitter"
  307. var emitter_ = __webpack_require__(13);
  308. var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);
  309. // EXTERNAL MODULE: external "tis-ui/lib/utils/util"
  310. var util_ = __webpack_require__(10);
  311. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
  312. //
  313. //
  314. //
  315. //
  316. //
  317. //
  318. //
  319. //
  320. //
  321. //
  322. //
  323. //
  324. //
  325. //
  326. //
  327. //
  328. //
  329. //
  330. //
  331. //
  332. //
  333. //
  334. //
  335. //
  336. //
  337. //
  338. //
  339. //
  340. //
  341. //
  342. //
  343. //
  344. //
  345. //
  346. //
  347. //
  348. //
  349. //
  350. //
  351. //
  352. //
  353. //
  354. //
  355. //
  356. //
  357. //
  358. /* harmony default export */ var collapse_itemvue_type_script_lang_js_ = ({
  359. name: 'TisCollapseItem',
  360. componentName: 'TisCollapseItem',
  361. mixins: [emitter_default.a],
  362. components: { TisCollapseTransition: collapse_transition_default.a },
  363. data: function data() {
  364. return {
  365. contentWrapStyle: {
  366. height: 'auto',
  367. display: 'block'
  368. },
  369. contentHeight: 0,
  370. focusing: false,
  371. isClick: false,
  372. id: Object(util_["generateId"])()
  373. };
  374. },
  375. inject: ['collapse'],
  376. props: {
  377. title: String,
  378. name: {
  379. type: [String, Number],
  380. default: function _default() {
  381. return this._uid;
  382. }
  383. },
  384. disabled: Boolean
  385. },
  386. computed: {
  387. isActive: function isActive() {
  388. return this.collapse.activeNames.indexOf(this.name) > -1;
  389. }
  390. },
  391. methods: {
  392. handleFocus: function handleFocus() {
  393. var _this = this;
  394. setTimeout(function () {
  395. if (!_this.isClick) {
  396. _this.focusing = true;
  397. } else {
  398. _this.isClick = false;
  399. }
  400. }, 50);
  401. },
  402. handleHeaderClick: function handleHeaderClick() {
  403. if (this.disabled) return;
  404. this.dispatch('TisCollapse', 'item-click', this);
  405. this.focusing = false;
  406. this.isClick = true;
  407. },
  408. handleEnterClick: function handleEnterClick() {
  409. this.dispatch('TisCollapse', 'item-click', this);
  410. }
  411. }
  412. });
  413. // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue?vue&type=script&lang=js&
  414. /* harmony default export */ var src_collapse_itemvue_type_script_lang_js_ = (collapse_itemvue_type_script_lang_js_);
  415. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  416. var componentNormalizer = __webpack_require__(2);
  417. // CONCATENATED MODULE: ./packages/collapse/src/collapse-item.vue
  418. /* normalize component */
  419. var component = Object(componentNormalizer["a" /* default */])(
  420. src_collapse_itemvue_type_script_lang_js_,
  421. render,
  422. staticRenderFns,
  423. false,
  424. null,
  425. null,
  426. null
  427. )
  428. /* hot reload */
  429. if (false) { var api; }
  430. component.options.__file = "packages/collapse/src/collapse-item.vue"
  431. /* harmony default export */ var collapse_item = (component.exports);
  432. // CONCATENATED MODULE: ./packages/collapse-item/index.js
  433. /* istanbul ignore next */
  434. collapse_item.install = function (Vue) {
  435. Vue.component(collapse_item.name, collapse_item);
  436. };
  437. /* harmony default export */ var packages_collapse_item = __webpack_exports__["default"] = (collapse_item);
  438. /***/ }),
  439. /***/ 98:
  440. /***/ (function(module, exports) {
  441. module.exports = require("tis-ui/lib/transitions/collapse-transition");
  442. /***/ })
  443. /******/ });