diff --git a/examples/package-lock.json b/examples/package-lock.json index c630a2b..4bcad8a 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -30,7 +30,7 @@ }, "..": { "name": "@zhicheng1012/zhicheng-components", - "version": "1.0.23", + "version": "1.0.25", "license": "MIT", "dependencies": { "async-validator": "^1.11.5", @@ -3218,9 +3218,9 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "node_modules/@zhicheng1012/zhicheng-components": { - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.23.tgz", - "integrity": "sha512-n9hEoGUDfVo1quAForqlJJOAAo9u7Pab0Q6ouYT46OEaDMLIrp2B7pB6UnT9NYaLDMFkfLQl5zoxuYJZIl94sw==", + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.25.tgz", + "integrity": "sha512-oo6QqLy71T2Ak9NWGjzl8r1TVCCL3PNgvTUtWKrD4i3edtlv/3cFMrTAbZEjC3kJ6Despupj7YvgjXLaGKX0hw==", "dependencies": { "async-validator": "^1.11.5", "core-js": "^3.40.0" @@ -19478,9 +19478,9 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "@zhicheng1012/zhicheng-components": { - "version": "1.0.23", - "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.23.tgz", - "integrity": "sha512-n9hEoGUDfVo1quAForqlJJOAAo9u7Pab0Q6ouYT46OEaDMLIrp2B7pB6UnT9NYaLDMFkfLQl5zoxuYJZIl94sw==", + "version": "1.0.25", + "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.25.tgz", + "integrity": "sha512-oo6QqLy71T2Ak9NWGjzl8r1TVCCL3PNgvTUtWKrD4i3edtlv/3cFMrTAbZEjC3kJ6Despupj7YvgjXLaGKX0hw==", "requires": { "async-validator": "^1.11.5", "core-js": "^3.40.0" diff --git a/examples/src/main.js b/examples/src/main.js index 9d1fecd..5977fc2 100644 --- a/examples/src/main.js +++ b/examples/src/main.js @@ -5,6 +5,7 @@ import ElementUI from 'element-ui'; // import '@zhicheng1012/zhicheng-components/dist/css/zhicheng-components.css'; import 'element-ui/lib/theme-chalk/index.css' // 如果依赖Element + import MyComponents from '../../packages' // 本地引用组件库 // main.js import 'core-js/stable' @@ -15,6 +16,7 @@ Vue.use(MyComponents) Vue.use(ElementUI); + // Vue.use(ZhichengUI) Vue.config.productionTip = false diff --git a/package-lock.json b/package-lock.json index 83949e7..86f1ff9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,8 @@ "license": "MIT", "dependencies": { "async-validator": "^1.11.5", - "core-js": "^3.40.0" + "core-js": "^3.40.0", + "vue-clickaway": "^2.2.2" }, "devDependencies": { "babel-eslint": "~10.1.0", @@ -4595,8 +4596,7 @@ "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -4717,6 +4717,17 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, "node_modules/lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -7804,6 +7815,17 @@ "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==", "deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details." }, + "node_modules/vue-clickaway": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/vue-clickaway/-/vue-clickaway-2.2.2.tgz", + "integrity": "sha512-25SpjXKetL06GLYoLoC8pqAV6Cur9cQ//2g35GRFBV4FgoljbZZjTINR8g2NuVXXDMLSUXaKx5dutgO4PaDE7A==", + "dependencies": { + "loose-envify": "^1.2.0" + }, + "peerDependencies": { + "vue": "^2.0.0" + } + }, "node_modules/vue-eslint-parser": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.11.0.tgz", @@ -12313,8 +12335,7 @@ "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", @@ -12405,6 +12426,14 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -14796,6 +14825,14 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" }, + "vue-clickaway": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/vue-clickaway/-/vue-clickaway-2.2.2.tgz", + "integrity": "sha512-25SpjXKetL06GLYoLoC8pqAV6Cur9cQ//2g35GRFBV4FgoljbZZjTINR8g2NuVXXDMLSUXaKx5dutgO4PaDE7A==", + "requires": { + "loose-envify": "^1.2.0" + } + }, "vue-eslint-parser": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.11.0.tgz", diff --git a/package.json b/package.json index 915e23e..36c9bca 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,8 @@ "license": "MIT", "dependencies": { "async-validator": "^1.11.5", - "core-js": "^3.40.0" + "core-js": "^3.40.0", + "vue-clickaway": "^2.2.2" }, "resolutions": { "core-js": "3.40.0", diff --git a/packages/Breadcrumb/src/index.vue b/packages/Breadcrumb/src/index.vue index 3f5dbaa..e523d89 100644 --- a/packages/Breadcrumb/src/index.vue +++ b/packages/Breadcrumb/src/index.vue @@ -37,7 +37,7 @@ export default { }, computed: { breadcrumbs() { - // if (this.$route.meta.hideBreadcrumb) return []; + if (this.$route.meta.hideBreadcrumb) return []; const crumbs = [ // { diff --git a/packages/index.js b/packages/index.js index c458749..f2cbac1 100644 --- a/packages/index.js +++ b/packages/index.js @@ -17,6 +17,9 @@ import GuipMessage from './GuipMessage'; import GuipFormItem from './GuipFormItem'; +import { directive as clickaway } from 'vue-clickaway'; + + // 表格头部 添加自定义小图标 * // import HeaderIcon from './utils/headerIcon' // Vue.mixin(HeaderIcon) @@ -71,6 +74,7 @@ const install = function (Vue,options={}) { // 复制 Vue.prototype.$copy = modernCopyToClipboard; Vue.use(clipboard); + Vue.directive('clickaway', clickaway); components.forEach(component => { if (!component.name) { diff --git a/packages/styles/common.scss b/packages/styles/common.scss index 59b5376..eff6859 100644 --- a/packages/styles/common.scss +++ b/packages/styles/common.scss @@ -41,33 +41,33 @@ body { } /* 隐藏全局滚动条 */ /* 全局隐藏滚动条但排除el-table */ -*:not(.el-table)::-webkit-scrollbar { - display: none; - } +// *:not(.el-table)::-webkit-scrollbar { +// display: none; +// } - body { - scrollbar-width: none; - -ms-overflow-style: none; - } -.element { - overflow: hidden; /* 通用方法 */ - scrollbar-width: none; /* Firefox */ -} +// body { +// scrollbar-width: none; +// -ms-overflow-style: none; +// } +// .element { +// overflow: hidden; /* 通用方法 */ +// scrollbar-width: none; /* Firefox */ +// } /* 对于WebKit浏览器 */ -.element::-webkit-scrollbar { - display: none; /* Chrome, Safari, Edge */ -} +// .element::-webkit-scrollbar { +// display: none; /* Chrome, Safari, Edge */ +// } -.el-table__body-wrapper::-webkit-scrollbar { - display: block !important; - width: 6px; - height: 6px; - } - .el-table__body-wrapper::-webkit-scrollbar-thumb { - background: #c1c1c1; - border-radius: 3px; - } +// .el-table__body-wrapper::-webkit-scrollbar { +// display: block !important; +// width: 6px; +// height: 6px; +// } +// .el-table__body-wrapper::-webkit-scrollbar-thumb { +// background: #c1c1c1; +// border-radius: 3px; +// } .common_title{ font-weight: bold;