12.js 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. webpackJsonp([12],{
  2. /***/ 327:
  3. /***/ (function(module, exports, __webpack_require__) {
  4. var disposed = false
  5. function injectStyle (ssrContext) {
  6. if (disposed) return
  7. __webpack_require__(361)
  8. }
  9. var normalizeComponent = __webpack_require__(2)
  10. /* script */
  11. var __vue_script__ = __webpack_require__(363)
  12. /* template */
  13. var __vue_template__ = __webpack_require__(364)
  14. /* template functional */
  15. var __vue_template_functional__ = false
  16. /* styles */
  17. var __vue_styles__ = injectStyle
  18. /* scopeId */
  19. var __vue_scopeId__ = "data-v-455d3017"
  20. /* moduleIdentifier (server only) */
  21. var __vue_module_identifier__ = null
  22. var Component = normalizeComponent(
  23. __vue_script__,
  24. __vue_template__,
  25. __vue_template_functional__,
  26. __vue_styles__,
  27. __vue_scopeId__,
  28. __vue_module_identifier__
  29. )
  30. Component.options.__file = "resources/assets/js/main/components/docs/NestedDraggable.vue"
  31. /* hot reload */
  32. if (false) {(function () {
  33. var hotAPI = require("vue-hot-reload-api")
  34. hotAPI.install(require("vue"), false)
  35. if (!hotAPI.compatible) return
  36. module.hot.accept()
  37. if (!module.hot.data) {
  38. hotAPI.createRecord("data-v-455d3017", Component.options)
  39. } else {
  40. hotAPI.reload("data-v-455d3017", Component.options)
  41. }
  42. module.hot.dispose(function (data) {
  43. disposed = true
  44. })
  45. })()}
  46. module.exports = Component.exports
  47. /***/ }),
  48. /***/ 361:
  49. /***/ (function(module, exports, __webpack_require__) {
  50. // style-loader: Adds some css to the DOM by adding a <style> tag
  51. // load the styles
  52. var content = __webpack_require__(362);
  53. if(typeof content === 'string') content = [[module.i, content, '']];
  54. if(content.locals) module.exports = content.locals;
  55. // add the styles to the DOM
  56. var update = __webpack_require__(1)("02b85fe6", content, false, {});
  57. // Hot Module Replacement
  58. if(false) {
  59. // When the styles change, update the <style> tags
  60. if(!content.locals) {
  61. module.hot.accept("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-455d3017\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./NestedDraggable.vue", function() {
  62. var newContent = require("!!../../../../../../node_modules/css-loader/index.js!../../../../../../node_modules/vue-loader/lib/style-compiler/index.js?{\"vue\":true,\"id\":\"data-v-455d3017\",\"scoped\":true,\"hasInlineConfig\":true}!../../../../../../node_modules/sass-loader/lib/loader.js!../../../../../../node_modules/vue-loader/lib/selector.js?type=styles&index=0!./NestedDraggable.vue");
  63. if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
  64. update(newContent);
  65. });
  66. }
  67. // When the module is disposed, remove the <style> tags
  68. module.hot.dispose(function() { update(); });
  69. }
  70. /***/ }),
  71. /***/ 362:
  72. /***/ (function(module, exports, __webpack_require__) {
  73. exports = module.exports = __webpack_require__(0)(false);
  74. // imports
  75. // module
  76. exports.push([module.i, "\n.docs-group[data-v-455d3017] {\n cursor: move;\n}\n.docs-group.readonly[data-v-455d3017] {\n cursor: default;\n}\n.docs-group.hidden-children .docs-group[data-v-455d3017] {\n display: none;\n}\n.docs-group.hidden-children .item .together[data-v-455d3017] {\n display: block;\n}\n.docs-group .docs-group[data-v-455d3017] {\n padding-left: 14px;\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABS2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIi8+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgo8P3hwYWNrZXQgZW5kPSJyIj8+LUNEtwAAAEtJREFUSIntzzEVwAAMQkFSKfi3FKzQqQ5oJm5h5P3ZXQMYkrgwtk+OPo8kSzo7bGFcC+NaGNfCuBbGtTCuhXEtzB+SHAAGAEm/7wv2LKvDNoBjfgAAAABJRU5ErkJggg==) no-repeat -2px -9px;\n margin-left: 18px;\n border-left: 1px dotted #ddd;\n}\n.docs-group .item[data-v-455d3017] {\n padding: 4px 0 0 4px;\n background-color: #ffffff;\n border: solid 1px #ffffff;\n line-height: 24px;\n position: relative;\n}\n.docs-group .item .together[data-v-455d3017] {\n display: none;\n cursor: pointer;\n position: absolute;\n font-size: 12px;\n color: #ffb519;\n top: 50%;\n left: -2px;\n margin-top: 1px;\n -webkit-transform: translate(0, -50%);\n transform: translate(0, -50%);\n z-index: 1;\n}\n.docs-group .item .dashed[data-v-455d3017] {\n position: absolute;\n margin: 0;\n padding: 0;\n top: 16px;\n right: 0;\n left: 20px;\n height: 2px;\n border-width: 0 0 1px 0;\n border-bottom: dashed 1px #eee;\n}\n.docs-group .item .header[data-v-455d3017] {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: start;\n -ms-flex-align: start;\n align-items: flex-start;\n position: relative;\n background: #fff;\n padding: 0 8px;\n cursor: pointer;\n}\n.docs-group .item .header .tip[data-v-455d3017] {\n display: inline-block;\n position: relative;\n}\n.docs-group .item .header .tip > img[data-v-455d3017] {\n display: inline-block;\n width: 14px;\n height: 14px;\n margin-top: 5px;\n vertical-align: top;\n}\n.docs-group .item .header .title[data-v-455d3017] {\n display: inline-block;\n border-bottom: 1px solid transparent;\n cursor: pointer;\n padding: 0 3px 0 7px;\n color: #555555;\n word-break: break-all;\n}\n.docs-group .item .header .title.active[data-v-455d3017] {\n color: #0396f2;\n}\n.docs-group .item .info[data-v-455d3017] {\n position: absolute;\n background: #fff;\n padding-left: 12px;\n color: #666;\n right: 3px;\n top: 5px;\n}\n.docs-group .item .info > i[data-v-455d3017] {\n padding: 0 2px;\n -webkit-transition: all 0.2s;\n transition: all 0.2s;\n cursor: pointer;\n}\n.docs-group .item .info > i[data-v-455d3017]:hover {\n -webkit-transform: scale(1.2);\n transform: scale(1.2);\n}\n", ""]);
  77. // exports
  78. /***/ }),
  79. /***/ 363:
  80. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  81. "use strict";
  82. Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
  83. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vuedraggable__ = __webpack_require__(51);
  84. /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vuedraggable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vuedraggable__);
  85. //
  86. //
  87. //
  88. //
  89. //
  90. //
  91. //
  92. //
  93. //
  94. //
  95. //
  96. //
  97. //
  98. //
  99. //
  100. //
  101. //
  102. //
  103. //
  104. //
  105. //
  106. //
  107. //
  108. //
  109. //
  110. //
  111. //
  112. //
  113. //
  114. //
  115. //
  116. //
  117. //
  118. //
  119. //
  120. //
  121. //
  122. //
  123. //
  124. //
  125. //
  126. //
  127. //
  128. //
  129. //
  130. //
  131. //
  132. //
  133. //
  134. //
  135. //
  136. //
  137. //
  138. //
  139. //
  140. //
  141. //
  142. //
  143. //
  144. //
  145. //
  146. //
  147. //
  148. //
  149. //
  150. //
  151. //
  152. //
  153. //
  154. //
  155. //
  156. //
  157. //
  158. //
  159. //
  160. //
  161. //
  162. //
  163. //
  164. //
  165. //
  166. //
  167. //
  168. //
  169. //
  170. //
  171. //
  172. //
  173. //
  174. //
  175. //
  176. //
  177. //
  178. //
  179. //
  180. //
  181. //
  182. //
  183. //
  184. //
  185. //
  186. //
  187. //
  188. //
  189. //
  190. //
  191. //
  192. //
  193. //
  194. //
  195. //
  196. //
  197. //
  198. //
  199. //
  200. //
  201. //
  202. //
  203. //
  204. //
  205. //
  206. //
  207. //
  208. //
  209. //
  210. //
  211. //
  212. //
  213. //
  214. //
  215. //
  216. //
  217. //
  218. /* harmony default export */ __webpack_exports__["default"] = ({
  219. name: "NestedDraggable",
  220. props: {
  221. lists: {
  222. required: true,
  223. type: Array
  224. },
  225. isChildren: {
  226. type: Boolean,
  227. default: false
  228. },
  229. disabled: {
  230. type: Boolean,
  231. default: false
  232. },
  233. readonly: {
  234. type: Boolean,
  235. default: false
  236. },
  237. activeid: {
  238. default: ''
  239. }
  240. },
  241. data: function data() {
  242. return {
  243. listSortData: '',
  244. childrenHidden: false
  245. };
  246. },
  247. components: {
  248. draggable: __WEBPACK_IMPORTED_MODULE_0_vuedraggable___default.a
  249. },
  250. mounted: function mounted() {
  251. this.listSortData = this.getSort(this.lists);
  252. },
  253. methods: {
  254. getSort: function getSort(lists) {
  255. var _this = this;
  256. var parentid = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  257. var sortData = "";
  258. lists.forEach(function (item) {
  259. sortData += item.id + ":" + parentid + ";" + _this.getSort(item.children, item.id);
  260. });
  261. return sortData;
  262. },
  263. handleClick: function handleClick(act, detail) {
  264. if (act == 'open') {
  265. if (detail.type == 'folder') {
  266. this.$set(detail, 'hiddenChildren', !detail.hiddenChildren);
  267. return;
  268. }
  269. }
  270. if (act == 'sort') {
  271. if (this.isChildren) {
  272. this.$emit("change", act, detail);
  273. } else {
  274. var tempSortData = this.getSort(this.lists);
  275. if (tempSortData != this.listSortData) {
  276. this.listSortData = tempSortData;
  277. this.$emit("change", act, tempSortData);
  278. }
  279. }
  280. return;
  281. }
  282. this.$emit("change", act, detail);
  283. }
  284. }
  285. });
  286. /***/ }),
  287. /***/ 364:
  288. /***/ (function(module, exports, __webpack_require__) {
  289. var render = function() {
  290. var _vm = this
  291. var _h = _vm.$createElement
  292. var _c = _vm._self._c || _h
  293. return _c(
  294. "draggable",
  295. {
  296. attrs: {
  297. tag: "div",
  298. list: _vm.lists,
  299. group: { name: "docs-nested" },
  300. animation: 150,
  301. disabled: _vm.disabled || _vm.readonly
  302. },
  303. on: {
  304. sort: function($event) {
  305. return _vm.handleClick("sort")
  306. }
  307. }
  308. },
  309. _vm._l(_vm.lists, function(detail) {
  310. return _c(
  311. "div",
  312. {
  313. key: detail.id,
  314. staticClass: "docs-group",
  315. class: {
  316. readonly: _vm.readonly,
  317. "hidden-children": detail.hiddenChildren === true
  318. }
  319. },
  320. [
  321. _c(
  322. "div",
  323. { staticClass: "item" },
  324. [
  325. _c("Icon", {
  326. staticClass: "together",
  327. attrs: { type: "md-add" },
  328. on: {
  329. click: function($event) {
  330. return _vm.handleClick("open", detail)
  331. }
  332. }
  333. }),
  334. _vm._v(" "),
  335. _c("div", { staticClass: "dashed" }),
  336. _vm._v(" "),
  337. _c("div", { staticClass: "header" }, [
  338. _c("div", { staticClass: "tip" }, [
  339. _c("img", { attrs: { src: detail.icon } })
  340. ]),
  341. _vm._v(" "),
  342. _c(
  343. "div",
  344. {
  345. staticClass: "title",
  346. class: { active: _vm.activeid == detail.id },
  347. on: {
  348. click: function($event) {
  349. return _vm.handleClick("open", detail)
  350. }
  351. }
  352. },
  353. [_vm._v(_vm._s(detail.title))]
  354. )
  355. ]),
  356. _vm._v(" "),
  357. !_vm.readonly
  358. ? _c(
  359. "div",
  360. { staticClass: "info" },
  361. [
  362. _c("Icon", {
  363. attrs: { type: "md-create" },
  364. on: {
  365. click: function($event) {
  366. return _vm.handleClick("edit", detail)
  367. }
  368. }
  369. }),
  370. _vm._v(" "),
  371. _c("Icon", {
  372. attrs: { type: "md-add" },
  373. on: {
  374. click: function($event) {
  375. return _vm.handleClick("add", detail)
  376. }
  377. }
  378. }),
  379. _vm._v(" "),
  380. _c("Icon", {
  381. attrs: { type: "md-trash" },
  382. on: {
  383. click: function($event) {
  384. return _vm.handleClick("delete", detail)
  385. }
  386. }
  387. })
  388. ],
  389. 1
  390. )
  391. : _vm._e()
  392. ],
  393. 1
  394. ),
  395. _vm._v(" "),
  396. typeof detail.children === "object" && detail.children !== null
  397. ? _c("nested-draggable", {
  398. attrs: {
  399. lists: detail.children,
  400. isChildren: true,
  401. disabled: _vm.disabled,
  402. readonly: _vm.readonly,
  403. activeid: _vm.activeid
  404. },
  405. on: { change: _vm.handleClick }
  406. })
  407. : _vm._e()
  408. ],
  409. 1
  410. )
  411. }),
  412. 0
  413. )
  414. }
  415. var staticRenderFns = []
  416. render._withStripped = true
  417. module.exports = { render: render, staticRenderFns: staticRenderFns }
  418. if (false) {
  419. module.hot.accept()
  420. if (module.hot.data) {
  421. require("vue-hot-reload-api") .rerender("data-v-455d3017", module.exports)
  422. }
  423. }
  424. /***/ })
  425. });