diff --git a/package-lock.json b/package-lock.json index 7ce974b..98fb812 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11394,9 +11394,9 @@ } }, "sortablejs": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.10.1.tgz", - "integrity": "sha512-N6r7GrVmO8RW1rn0cTdvK3JR0BcqecAJ0PmYMCL3ZuqTH3pY+9QyqkmJSkkLyyDvd+AJnwaxTP22Ybr/83V9hQ==" + "version": "1.14.0", + "resolved": "https://registry.nlark.com/sortablejs/download/sortablejs-1.14.0.tgz", + "integrity": "sha1-bS4XzL2yX0ZHNN9iHU811Ks1s9g=" }, "source-list-map": { "version": "2.0.1", diff --git a/package.json b/package.json index b47557d..eb0a836 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "mavon-editor": "^2.6.17", "postcss-px2rem": "^0.3.0", "px2rem-loader": "^0.1.9", + "sortablejs": "^1.14.0", "vue": "^2.6.10", "vue-cropperjs": "^3.0.0", "vue-i18n": "^8.10.0", diff --git a/src/assets/img/cash-sm.png b/src/assets/img/cash-sm.png deleted file mode 100644 index 55fc319..0000000 Binary files a/src/assets/img/cash-sm.png and /dev/null differ diff --git a/src/components/case/index.vue b/src/components/case/index.vue index 10856e3..d0cf833 100644 --- a/src/components/case/index.vue +++ b/src/components/case/index.vue @@ -150,7 +150,9 @@ export default { createTime: "", //开始时间 actEndTime: "", //倒计时结束时间 projectId: "", //选中后绑定的对象 - value: [], + value: [ + {projectName:'项目1',projectId:1} + ], experimentalGoal: "", //实验目标 caseDescription: "", //案例描述 experimentSuggests: "", //实验提示 diff --git a/src/main.js b/src/main.js index 5a63a36..785564f 100644 --- a/src/main.js +++ b/src/main.js @@ -18,6 +18,27 @@ import permission from '@/router/permission'; import plugins from '@/plugins'; import filters from '@/plugins/filters' +Vue.directive('focus', {/* 聚焦事件 */ + inserted: function (el, binding) { + if (el.parentNode.querySelector('input').disabled === false) { + el.parentNode.querySelector('input').focus() + } + } +}) +Vue.directive('throttle', {/* 节流 */ + inserted: function (el, binding) { + el.addEventListener('click', () => { + if (!el.disabled) { + el.disabled = true + setTimeout(() => { + el.disabled = false + }, binding.value || 3000) + } + }) + } +}); + + Vue.use(plugins); Object.keys(filters).forEach(item => Vue.filter(item,filters[item])) @@ -43,3 +64,4 @@ new Vue({ store, render: h => h(App) }).$mount('#app'); + diff --git a/src/pages/counter/list/index.vue b/src/pages/counter/list/index.vue index d8afced..d6f38a9 100644 --- a/src/pages/counter/list/index.vue +++ b/src/pages/counter/list/index.vue @@ -1,7 +1,7 @@