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.

580 lines
16 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 = 124);
  86. /******/ })
  87. /************************************************************************/
  88. /******/ ({
  89. /***/ 124:
  90. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  91. "use strict";
  92. // ESM COMPAT FLAG
  93. __webpack_require__.r(__webpack_exports__);
  94. // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
  95. var render = function() {
  96. var _vm = this
  97. var _h = _vm.$createElement
  98. var _c = _vm._self._c || _h
  99. return _c(
  100. "div",
  101. {
  102. staticClass: "el-progress",
  103. class: [
  104. "el-progress--" + _vm.type,
  105. _vm.status ? "is-" + _vm.status : "",
  106. {
  107. "el-progress--without-text": !_vm.showText,
  108. "el-progress--text-inside": _vm.textInside
  109. }
  110. ],
  111. attrs: {
  112. role: "progressbar",
  113. "aria-valuenow": _vm.percentage,
  114. "aria-valuemin": "0",
  115. "aria-valuemax": "100"
  116. }
  117. },
  118. [
  119. _vm.type === "line"
  120. ? _c("div", { staticClass: "el-progress-bar" }, [
  121. _c(
  122. "div",
  123. {
  124. staticClass: "el-progress-bar__outer",
  125. style: { height: _vm.strokeWidth + "px" }
  126. },
  127. [
  128. _c(
  129. "div",
  130. {
  131. staticClass: "el-progress-bar__inner",
  132. style: _vm.barStyle
  133. },
  134. [
  135. _vm.showText && _vm.textInside
  136. ? _c(
  137. "div",
  138. { staticClass: "el-progress-bar__innerText" },
  139. [_vm._v(_vm._s(_vm.content))]
  140. )
  141. : _vm._e()
  142. ]
  143. )
  144. ]
  145. )
  146. ])
  147. : _c(
  148. "div",
  149. {
  150. staticClass: "el-progress-circle",
  151. style: { height: _vm.width + "px", width: _vm.width + "px" }
  152. },
  153. [
  154. _c("svg", { attrs: { viewBox: "0 0 100 100" } }, [
  155. _c("path", {
  156. staticClass: "el-progress-circle__track",
  157. style: _vm.trailPathStyle,
  158. attrs: {
  159. d: _vm.trackPath,
  160. stroke: "#e5e9f2",
  161. "stroke-width": _vm.relativeStrokeWidth,
  162. fill: "none"
  163. }
  164. }),
  165. _c("path", {
  166. staticClass: "el-progress-circle__path",
  167. style: _vm.circlePathStyle,
  168. attrs: {
  169. d: _vm.trackPath,
  170. stroke: _vm.stroke,
  171. fill: "none",
  172. "stroke-linecap": _vm.strokeLinecap,
  173. "stroke-width": _vm.percentage ? _vm.relativeStrokeWidth : 0
  174. }
  175. })
  176. ])
  177. ]
  178. ),
  179. _vm.showText && !_vm.textInside
  180. ? _c(
  181. "div",
  182. {
  183. staticClass: "el-progress__text",
  184. style: { fontSize: _vm.progressTextSize + "px" }
  185. },
  186. [
  187. !_vm.status
  188. ? [_vm._v(_vm._s(_vm.content))]
  189. : _c("i", { class: _vm.iconClass })
  190. ],
  191. 2
  192. )
  193. : _vm._e()
  194. ]
  195. )
  196. }
  197. var staticRenderFns = []
  198. render._withStripped = true
  199. // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=template&id=229ee406&
  200. // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/progress/src/progress.vue?vue&type=script&lang=js&
  201. //
  202. //
  203. //
  204. //
  205. //
  206. //
  207. //
  208. //
  209. //
  210. //
  211. //
  212. //
  213. //
  214. //
  215. //
  216. //
  217. //
  218. //
  219. //
  220. //
  221. //
  222. //
  223. //
  224. //
  225. //
  226. //
  227. //
  228. //
  229. //
  230. //
  231. //
  232. //
  233. //
  234. //
  235. //
  236. //
  237. //
  238. //
  239. //
  240. //
  241. //
  242. //
  243. //
  244. //
  245. //
  246. //
  247. //
  248. //
  249. //
  250. //
  251. //
  252. //
  253. /* harmony default export */ var progressvue_type_script_lang_js_ = ({
  254. name: 'TisProgress',
  255. props: {
  256. type: {
  257. type: String,
  258. default: 'line',
  259. validator: function validator(val) {
  260. return ['line', 'circle', 'dashboard'].indexOf(val) > -1;
  261. }
  262. },
  263. percentage: {
  264. type: Number,
  265. default: 0,
  266. required: true,
  267. validator: function validator(val) {
  268. return val >= 0 && val <= 100;
  269. }
  270. },
  271. status: {
  272. type: String,
  273. validator: function validator(val) {
  274. return ['success', 'exception', 'warning'].indexOf(val) > -1;
  275. }
  276. },
  277. strokeWidth: {
  278. type: Number,
  279. default: 6
  280. },
  281. strokeLinecap: {
  282. type: String,
  283. default: 'round'
  284. },
  285. textInside: {
  286. type: Boolean,
  287. default: false
  288. },
  289. width: {
  290. type: Number,
  291. default: 126
  292. },
  293. showText: {
  294. type: Boolean,
  295. default: true
  296. },
  297. color: {
  298. type: [String, Array, Function],
  299. default: ''
  300. },
  301. format: Function
  302. },
  303. computed: {
  304. barStyle: function barStyle() {
  305. var style = {};
  306. style.width = this.percentage + '%';
  307. style.backgroundColor = this.getCurrentColor(this.percentage);
  308. return style;
  309. },
  310. relativeStrokeWidth: function relativeStrokeWidth() {
  311. return (this.strokeWidth / this.width * 100).toFixed(1);
  312. },
  313. radius: function radius() {
  314. if (this.type === 'circle' || this.type === 'dashboard') {
  315. return parseInt(50 - parseFloat(this.relativeStrokeWidth) / 2, 10);
  316. } else {
  317. return 0;
  318. }
  319. },
  320. trackPath: function trackPath() {
  321. var radius = this.radius;
  322. var isDashboard = this.type === 'dashboard';
  323. return '\n M 50 50\n m 0 ' + (isDashboard ? '' : '-') + radius + '\n a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '-' : '') + radius * 2 + '\n a ' + radius + ' ' + radius + ' 0 1 1 0 ' + (isDashboard ? '' : '-') + radius * 2 + '\n ';
  324. },
  325. perimeter: function perimeter() {
  326. return 2 * Math.PI * this.radius;
  327. },
  328. rate: function rate() {
  329. return this.type === 'dashboard' ? 0.75 : 1;
  330. },
  331. strokeDashoffset: function strokeDashoffset() {
  332. var offset = -1 * this.perimeter * (1 - this.rate) / 2;
  333. return offset + 'px';
  334. },
  335. trailPathStyle: function trailPathStyle() {
  336. return {
  337. strokeDasharray: this.perimeter * this.rate + 'px, ' + this.perimeter + 'px',
  338. strokeDashoffset: this.strokeDashoffset
  339. };
  340. },
  341. circlePathStyle: function circlePathStyle() {
  342. return {
  343. strokeDasharray: this.perimeter * this.rate * (this.percentage / 100) + 'px, ' + this.perimeter + 'px',
  344. strokeDashoffset: this.strokeDashoffset,
  345. transition: 'stroke-dasharray 0.6s ease 0s, stroke 0.6s ease'
  346. };
  347. },
  348. stroke: function stroke() {
  349. var ret = void 0;
  350. if (this.color) {
  351. ret = this.getCurrentColor(this.percentage);
  352. } else {
  353. switch (this.status) {
  354. case 'success':
  355. ret = '#13ce66';
  356. break;
  357. case 'exception':
  358. ret = '#ff4949';
  359. break;
  360. case 'warning':
  361. ret = '#e6a23c';
  362. break;
  363. default:
  364. ret = '#20a0ff';
  365. }
  366. }
  367. return ret;
  368. },
  369. iconClass: function iconClass() {
  370. if (this.status === 'warning') {
  371. return 'el-icon-warning';
  372. }
  373. if (this.type === 'line') {
  374. return this.status === 'success' ? 'el-icon-circle-check' : 'el-icon-circle-close';
  375. } else {
  376. return this.status === 'success' ? 'el-icon-check' : 'el-icon-close';
  377. }
  378. },
  379. progressTextSize: function progressTextSize() {
  380. return this.type === 'line' ? 12 + this.strokeWidth * 0.4 : this.width * 0.111111 + 2;
  381. },
  382. content: function content() {
  383. if (typeof this.format === 'function') {
  384. return this.format(this.percentage) || '';
  385. } else {
  386. return this.percentage + '%';
  387. }
  388. }
  389. },
  390. methods: {
  391. getCurrentColor: function getCurrentColor(percentage) {
  392. if (typeof this.color === 'function') {
  393. return this.color(percentage);
  394. } else if (typeof this.color === 'string') {
  395. return this.color;
  396. } else {
  397. return this.getLevelColor(percentage);
  398. }
  399. },
  400. getLevelColor: function getLevelColor(percentage) {
  401. var colorArray = this.getColorArray().sort(function (a, b) {
  402. return a.percentage - b.percentage;
  403. });
  404. for (var i = 0; i < colorArray.length; i++) {
  405. if (colorArray[i].percentage > percentage) {
  406. return colorArray[i].color;
  407. }
  408. }
  409. return colorArray[colorArray.length - 1].color;
  410. },
  411. getColorArray: function getColorArray() {
  412. var color = this.color;
  413. var span = 100 / color.length;
  414. return color.map(function (seriesColor, index) {
  415. if (typeof seriesColor === 'string') {
  416. return {
  417. color: seriesColor,
  418. percentage: (index + 1) * span
  419. };
  420. }
  421. return seriesColor;
  422. });
  423. }
  424. }
  425. });
  426. // CONCATENATED MODULE: ./packages/progress/src/progress.vue?vue&type=script&lang=js&
  427. /* harmony default export */ var src_progressvue_type_script_lang_js_ = (progressvue_type_script_lang_js_);
  428. // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
  429. var componentNormalizer = __webpack_require__(2);
  430. // CONCATENATED MODULE: ./packages/progress/src/progress.vue
  431. /* normalize component */
  432. var component = Object(componentNormalizer["a" /* default */])(
  433. src_progressvue_type_script_lang_js_,
  434. render,
  435. staticRenderFns,
  436. false,
  437. null,
  438. null,
  439. null
  440. )
  441. /* hot reload */
  442. if (false) { var api; }
  443. component.options.__file = "packages/progress/src/progress.vue"
  444. /* harmony default export */ var progress = (component.exports);
  445. // CONCATENATED MODULE: ./packages/progress/index.js
  446. /* istanbul ignore next */
  447. progress.install = function (Vue) {
  448. Vue.component(progress.name, progress);
  449. };
  450. /* harmony default export */ var packages_progress = __webpack_exports__["default"] = (progress);
  451. /***/ }),
  452. /***/ 2:
  453. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  454. "use strict";
  455. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
  456. /* globals __VUE_SSR_CONTEXT__ */
  457. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  458. // This module is a runtime utility for cleaner component module output and will
  459. // be included in the final webpack user bundle.
  460. function normalizeComponent (
  461. scriptExports,
  462. render,
  463. staticRenderFns,
  464. functionalTemplate,
  465. injectStyles,
  466. scopeId,
  467. moduleIdentifier, /* server only */
  468. shadowMode /* vue-cli only */
  469. ) {
  470. // Vue.extend constructor export interop
  471. var options = typeof scriptExports === 'function'
  472. ? scriptExports.options
  473. : scriptExports
  474. // render functions
  475. if (render) {
  476. options.render = render
  477. options.staticRenderFns = staticRenderFns
  478. options._compiled = true
  479. }
  480. // functional template
  481. if (functionalTemplate) {
  482. options.functional = true
  483. }
  484. // scopedId
  485. if (scopeId) {
  486. options._scopeId = 'data-v-' + scopeId
  487. }
  488. var hook
  489. if (moduleIdentifier) { // server build
  490. hook = function (context) {
  491. // 2.3 injection
  492. context =
  493. context || // cached call
  494. (this.$vnode && this.$vnode.ssrContext) || // stateful
  495. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  496. // 2.2 with runInNewContext: true
  497. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  498. context = __VUE_SSR_CONTEXT__
  499. }
  500. // inject component styles
  501. if (injectStyles) {
  502. injectStyles.call(this, context)
  503. }
  504. // register component module identifier for async chunk inferrence
  505. if (context && context._registeredComponents) {
  506. context._registeredComponents.add(moduleIdentifier)
  507. }
  508. }
  509. // used by ssr in case component is cached and beforeCreate
  510. // never gets called
  511. options._ssrRegister = hook
  512. } else if (injectStyles) {
  513. hook = shadowMode
  514. ? function () {
  515. injectStyles.call(
  516. this,
  517. (options.functional ? this.parent : this).$root.$options.shadowRoot
  518. )
  519. }
  520. : injectStyles
  521. }
  522. if (hook) {
  523. if (options.functional) {
  524. // for template-only hot-reload because in that case the render fn doesn't
  525. // go through the normalizer
  526. options._injectStyles = hook
  527. // register for functional component in vue file
  528. var originalRender = options.render
  529. options.render = function renderWithStyleInjection (h, context) {
  530. hook.call(context)
  531. return originalRender(h, context)
  532. }
  533. } else {
  534. // inject component registration as beforeCreate hook
  535. var existing = options.beforeCreate
  536. options.beforeCreate = existing
  537. ? [].concat(existing, hook)
  538. : [hook]
  539. }
  540. }
  541. return {
  542. exports: scriptExports,
  543. options: options
  544. }
  545. }
  546. /***/ })
  547. /******/ });