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.
1 lines
6.8 KiB
1 lines
6.8 KiB
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/index.js"],"names":["Component","externalClasses","options","styleIsolation","multipleSlots","properties","data","type","Array","value","headers","height","String","width","Number","tdWidth","offsetTop","stripe","Boolean","border","msg","scrolWidth","observers","reducer","accumulator","currentValue","reduce","setData","methods","onRowClick","e","triggerEvent","currentTarget","dataset","it"],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;AClFAA,UAAU;AACR;;;AAGAC,mBAAiB,CAAC,uBAAD,EAA0B,gBAA1B,EAA4C,iBAA5C,CAJT;;AAMR;;;AAGAC,WAAS;AACPC,oBAAgB,UADT;AAEPC,mBAAe,IAFR,CAEc;AAFd,GATD;;AAcR;;;AAGAC,cAAY;AACVC,UAAM;AACJC,YAAMC,KADF;AAEJC,aAAO;AAFH,KADI;AAKVC,aAAS;AACPH,YAAMC,KADC;AAEPC,aAAO;AAFA,KALC;AASV;AACAE,YAAQ;AACNJ,YAAMK,MADA;AAENH,aAAO;AAFD,KAVE;AAcVI,WAAO;AACLN,YAAMO,UAAUF,MADX;AAELH,aAAO;AAFF,KAdG;AAkBV;AACAM,aAAS;AACPR,YAAMO,MADC;AAEPL,aAAO;AAFA,KAnBC;AAuBV;AACAO,eAAW;AACTT,YAAMO,MADG;AAETL,aAAO;AAFE,KAxBD;AA4BV;AACAQ,YAAQ;AACNV,YAAMW,OADA;AAENT,aAAO;AAFD,KA7BE;AAiCV;AACAU,YAAQ;AACNZ,YAAMW,OADA;AAENT,aAAO;AAFD,KAlCE;AAsCVW,SAAK;AACHb,YAAMK,MADH;AAEHH,aAAO;AAFJ;AAtCK,GAjBJ;;AA6DR;;;AAGAH,QAAM;AACJe,gBAAY;AADR,GAhEE;;AAoER;;;AAGAC,aAAW;AACT;AACA,eAAW,iBAAUZ,QAAV,EAAmB;AAC5B,UAAMa,UAAU,SAAVA,OAAU,CAACC,WAAD,EAAcC,YAAd,EAA+B;AAC7C,eAAOD,cAAcV,OAAOW,aAAaZ,KAApB,CAArB;AACD,OAFD;AAGA,UAAMQ,aAAaX,SAAQgB,MAAR,CAAeH,OAAf,EAAwB,CAAxB,CAAnB;;AAEA,WAAKI,OAAL,CAAa;AACXN,oBAAYA;AADD,OAAb;AAGD;AAXQ,GAvEH;;AAqFR;;;AAGAO,WAAS;AACPC,cADO,sBACIC,CADJ,EACO;AACZ,WAAKC,YAAL,CAAkB,UAAlB,EAA8BD,CAA9B,EAAiCA,EAAEE,aAAF,CAAgBC,OAAhB,CAAwBC,EAAzD;AACD;AAHM;AAxFD,CAAV,E","file":"index.js","sourcesContent":[" \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, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\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 = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","Component({\n /**\n * 外部样式类\n */\n externalClasses: ['header-row-class-name', 'row-class-name', 'cell-class-name'], \n\n /**\n * 组件样式隔离\n */\n options: {\n styleIsolation: \"isolated\", \n multipleSlots: true, // 支持多个slot\n },\n\n /**\n * 组件的属性列表\n */\n properties: {\n data: {\n type: Array,\n value: []\n },\n headers: {\n type: Array,\n value: []\n },\n // table的高度, 溢出可滚动\n height: { \n type: String,\n value: 'auto'\n },\n width: {\n type: Number || String,\n value: '100%'\n },\n // 单元格的宽度\n tdWidth: {\n type: Number,\n value: 35\n },\n // 固定表头 thead达到Header的位置时就应该被fixed了\n offsetTop: {\n type: Number,\n value: 150\n },\n // 是否带有纵向边框\n stripe: {\n type: Boolean,\n value: false\n },\n // 是否带有纵向边框\n border: {\n type: Boolean,\n value: false\n }, \n msg: {\n type: String,\n value: '暂无数据~'\n }\n },\n\n /**\n * 组件的初始数据\n */\n data: {\n scrolWidth: '100%'\n },\n\n /**\n * 组件的监听属性\n */\n observers: {\n // 在 numberA 或者 numberB 被设置时,执行这个函数\n 'headers': function (headers) {\n const reducer = (accumulator, currentValue) => {\n return accumulator + Number(currentValue.width)\n };\n const scrolWidth = headers.reduce(reducer, 0)\n\n this.setData({\n scrolWidth: scrolWidth\n })\n }\n },\n\n /**\n * 组件的方法列表\n */\n methods: {\n onRowClick(e) {\n this.triggerEvent('rowClick', e, e.currentTarget.dataset.it)\n },\n }\n})"],"sourceRoot":""} |