diff --git a/package.json b/package.json
index b2dee52a..95c5d81e 100644
--- a/package.json
+++ b/package.json
@@ -27,13 +27,14 @@
"nprogress": "0.2.0",
"showdown": "1.6.4",
"simplemde": "1.11.2",
+ "sortablejs": "^1.5.1",
"vue": "2.2.6",
+ "vue-count-to": "1.0.5",
"vue-multiselect": "2.0.0-beta.14",
"vue-router": "2.3.0",
"vuedraggable": "2.8.4",
"vuex": "2.2.1",
- "xlsx": "0.8.1",
- "vue-count-to":"1.0.5"
+ "xlsx": "0.8.1"
},
"devDependencies": {
"autoprefixer": "6.7.2",
diff --git a/src/assets/iconfont/iconfont.js b/src/assets/iconfont/iconfont.js
index 31cb15a4..6b10563b 100644
--- a/src/assets/iconfont/iconfont.js
+++ b/src/assets/iconfont/iconfont.js
@@ -1,216 +1 @@
-;(function(window) {
-
- var svgSprite = ''
- var script = function() {
- var scripts = document.getElementsByTagName('script')
- return scripts[scripts.length - 1]
- }()
- var shouldInjectCss = script.getAttribute("data-injectcss")
-
- /**
- * document ready
- */
- var ready = function(fn) {
- if (document.addEventListener) {
- if (~["complete", "loaded", "interactive"].indexOf(document.readyState)) {
- setTimeout(fn, 0)
- } else {
- var loadFn = function() {
- document.removeEventListener("DOMContentLoaded", loadFn, false)
- fn()
- }
- document.addEventListener("DOMContentLoaded", loadFn, false)
- }
- } else if (document.attachEvent) {
- IEContentLoaded(window, fn)
- }
-
- function IEContentLoaded(w, fn) {
- var d = w.document,
- done = false,
- // only fire once
- init = function() {
- if (!done) {
- done = true
- fn()
- }
- }
- // polling for no errors
- var polling = function() {
- try {
- // throws errors until after ondocumentready
- d.documentElement.doScroll('left')
- } catch (e) {
- setTimeout(polling, 50)
- return
- }
- // no errors, fire
-
- init()
- };
-
- polling()
- // trying to always fire before onload
- d.onreadystatechange = function() {
- if (d.readyState == 'complete') {
- d.onreadystatechange = null
- init()
- }
- }
- }
- }
-
- /**
- * Insert el before target
- *
- * @param {Element} el
- * @param {Element} target
- */
-
- var before = function(el, target) {
- target.parentNode.insertBefore(el, target)
- }
-
- /**
- * Prepend el to target
- *
- * @param {Element} el
- * @param {Element} target
- */
-
- var prepend = function(el, target) {
- if (target.firstChild) {
- before(el, target.firstChild)
- } else {
- target.appendChild(el)
- }
- }
-
- function appendSvg() {
- var div, svg
-
- div = document.createElement('div')
- div.innerHTML = svgSprite
- svgSprite = null
- svg = div.getElementsByTagName('svg')[0]
- if (svg) {
- svg.setAttribute('aria-hidden', 'true')
- svg.style.position = 'absolute'
- svg.style.width = 0
- svg.style.height = 0
- svg.style.overflow = 'hidden'
- prepend(svg, document.body)
- }
- }
-
- if (shouldInjectCss && !window.__iconfont__svg__cssinject__) {
- window.__iconfont__svg__cssinject__ = true
- try {
- document.write("");
- } catch (e) {
- console && console.log(e)
- }
- }
-
- ready(appendSvg)
-
-
-})(window)
\ No newline at end of file
+(function(window){var svgSprite="";var script=function(){var scripts=document.getElementsByTagName("script");return scripts[scripts.length-1]}();var shouldInjectCss=script.getAttribute("data-injectcss");var ready=function(fn){if(document.addEventListener){if(~["complete","loaded","interactive"].indexOf(document.readyState)){setTimeout(fn,0)}else{var loadFn=function(){document.removeEventListener("DOMContentLoaded",loadFn,false);fn()};document.addEventListener("DOMContentLoaded",loadFn,false)}}else if(document.attachEvent){IEContentLoaded(window,fn)}function IEContentLoaded(w,fn){var d=w.document,done=false,init=function(){if(!done){done=true;fn()}};var polling=function(){try{d.documentElement.doScroll("left")}catch(e){setTimeout(polling,50);return}init()};polling();d.onreadystatechange=function(){if(d.readyState=="complete"){d.onreadystatechange=null;init()}}}};var before=function(el,target){target.parentNode.insertBefore(el,target)};var prepend=function(el,target){if(target.firstChild){before(el,target.firstChild)}else{target.appendChild(el)}};function appendSvg(){var div,svg;div=document.createElement("div");div.innerHTML=svgSprite;svgSprite=null;svg=div.getElementsByTagName("svg")[0];if(svg){svg.setAttribute("aria-hidden","true");svg.style.position="absolute";svg.style.width=0;svg.style.height=0;svg.style.overflow="hidden";prepend(svg,document.body)}}if(shouldInjectCss&&!window.__iconfont__svg__cssinject__){window.__iconfont__svg__cssinject__=true;try{document.write("")}catch(e){console&&console.log(e)}}ready(appendSvg)})(window)
\ No newline at end of file
diff --git a/src/router/index.js b/src/router/index.js
index 267d3354..a79fa43a 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -53,6 +53,7 @@ const Theme = resolve => require(['../views/theme/index'], resolve);
/* example*/
const DynamicTable = resolve => require(['../views/example/dynamictable'], resolve);
const Table = resolve => require(['../views/example/table'], resolve);
+const DragTable = resolve => require(['../views/example/dragTable'], resolve);
const Form1 = resolve => require(['../views/example/form1'], resolve);
// const Form2 = resolve => require(['../views/example/form2'], resolve);
@@ -178,6 +179,7 @@ export default new Router({
icon: 'zonghe',
children: [
{ path: 'dynamictable', component: DynamicTable, name: '动态table' },
+ { path: 'dragtable', component: DragTable, name: '拖拽table' },
{ path: 'table', component: Table, name: '综合table' },
{ path: 'form1', component: Form1, name: '综合form1' }
// { path: 'form2', component: Form2, name: '综合form2' }
diff --git a/src/views/example/dragTable.vue b/src/views/example/dragTable.vue
new file mode 100644
index 00000000..04cd4e63
--- /dev/null
+++ b/src/views/example/dragTable.vue
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+ {{scope.row.id}}
+
+
+
+
+
+ {{scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}')}}
+
+
+
+
+
+ {{scope.row.title}}
+
+
+
+
+
+ {{scope.row.author}}
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row.pageviews}}
+
+
+
+
+
+ {{scope.row.status}}
+
+
+
+
+
+
+
+
+
+
+
+
默认顺序{{olderList}}
+
拖拽后顺序{{newList}}
+
+
+
+
+
+
+