diff --git a/examples/package-lock.json b/examples/package-lock.json index f4054c6..d4bbb47 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -30,7 +30,7 @@ }, "..": { "name": "@zhicheng1012/zhicheng-components", - "version": "1.0.18", + "version": "1.0.21", "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.18", - "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.18.tgz", - "integrity": "sha512-bBbonkmlYC3JgPq0fCI8xJxG5NyhGiBjzl2hTADlPy3g/GySDtHFGITQPJUYtjT5RXdw13BHiFSEPv1R2XrArg==", + "version": "1.0.21", + "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.21.tgz", + "integrity": "sha512-cVW6uTEySEGF42k/Jd3kTNr4doGRkutLsnqAbyNx7ych/TOM6ovgSlpR8p3j6RS3NQGuVm2WmihSpEk9oCohGg==", "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.18", - "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.18.tgz", - "integrity": "sha512-bBbonkmlYC3JgPq0fCI8xJxG5NyhGiBjzl2hTADlPy3g/GySDtHFGITQPJUYtjT5RXdw13BHiFSEPv1R2XrArg==", + "version": "1.0.21", + "resolved": "https://registry.npmjs.org/@zhicheng1012/zhicheng-components/-/zhicheng-components-1.0.21.tgz", + "integrity": "sha512-cVW6uTEySEGF42k/Jd3kTNr4doGRkutLsnqAbyNx7ych/TOM6ovgSlpR8p3j6RS3NQGuVm2WmihSpEk9oCohGg==", "requires": { "async-validator": "^1.11.5", "core-js": "^3.40.0" diff --git a/examples/src/App.vue b/examples/src/App.vue index ba6ae2d..375e998 100644 --- a/examples/src/App.vue +++ b/examples/src/App.vue @@ -243,17 +243,61 @@ - 开关组件 + 图标组件相关 - + + + 弹出框组件相关 + + 打开弹框(标题巨左、按钮居右) + + 打开弹框(标题巨中、按钮居中) + + 打开弹框-放弃原按钮,自定义 + + + + + + + + + 这是一个自定义内容的弹框。 + + + + + + 这是一个自定义内容的弹框。 + + + + + + 这是一个自定义内容的弹框。 + 这是一个自定义内容的弹框。 + 这是一个自定义内容的弹框。 + 这是一个自定义内容的弹框。 + + + 取消 + ⚡️咖啡不加糖喔 + + + + + @@ -263,629 +307,664 @@ - \ No newline at end of file diff --git a/packages/Breadcrumb/src/index.vue b/packages/Breadcrumb/src/index.vue index 33ed0a9..a945bca 100644 --- a/packages/Breadcrumb/src/index.vue +++ b/packages/Breadcrumb/src/index.vue @@ -10,7 +10,7 @@ > - + {{ item.title }} @@ -37,67 +37,67 @@ export default { }, computed: { breadcrumbs() { - if (this.$route.meta.hideBreadcrumb) return []; + // if (this.$route.meta.hideBreadcrumb) return []; const crumbs = [ - // { - // path:{ - // path:'/', - // query:{uid: "2300"}, - // params:{} - // }, - // title:'首页' - // }, - // { - // path:{ - // path: "/agent/siteList", - // query:{uid: "2300"}, - // params:{} - // }, - // title:"站点列表" - // }, + { + path:{ + path:'/', + query:{uid: "2300"}, + params:{} + }, + title:'首页' + }, + { + path:{ + path: "/agent/siteList", + query:{uid: "2300"}, + params:{} + }, + title:"站点列表" + }, ]; - let currentRoute = this.$route; + // let currentRoute = this.$route; // 递归查找所有父级路由 - while (currentRoute) { - // 获取匹配的路由记录 - // const matchedRoute = this.$router.options.routes.find( - // r => r.name === currentRoute.name - // ); + // while (currentRoute) { + // // 获取匹配的路由记录 + // // const matchedRoute = this.$router.options.routes.find( + // // r => r.name === currentRoute.name + // // ); - // 构建包含完整参数的对象 - const routeWithParams = { - path: currentRoute.path, - query: currentRoute.query, - params: currentRoute.params - }; + // // 构建包含完整参数的对象 + // const routeWithParams = { + // path: currentRoute.path, + // query: currentRoute.query, + // params: currentRoute.params + // }; - crumbs.unshift({ - path: routeWithParams, - title: this.getTitle(currentRoute) - }); + // crumbs.unshift({ + // path: routeWithParams, + // title: this.getTitle(currentRoute) + // }); - // 通过 meta.breadcrumbParent 查找父级路由 - if (currentRoute.meta.breadcrumbParent) { - currentRoute = this.$router.options.routes.find( - r => r.name === currentRoute.meta.breadcrumbParent - ); + // // 通过 meta.breadcrumbParent 查找父级路由 + // if (currentRoute.meta.breadcrumbParent) { + // currentRoute = this.$router.options.routes.find( + // r => r.name === currentRoute.meta.breadcrumbParent + // ); - // 如果找到了父路由,创建一个模拟的$route对象 - if (currentRoute) { - currentRoute = { - ...currentRoute, - path: currentRoute.path, - query: this.$route.query, // 保留当前查询参数 - params: this.$route.params, // 保留当前路由参数 - meta: currentRoute.meta || {} - }; - } - } else { - currentRoute = null; - } - } + // // 如果找到了父路由,创建一个模拟的$route对象 + // if (currentRoute) { + // currentRoute = { + // ...currentRoute, + // path: currentRoute.path, + // query: this.$route.query, // 保留当前查询参数 + // params: this.$route.params, // 保留当前路由参数 + // meta: currentRoute.meta || {} + // }; + // } + // } else { + // currentRoute = null; + // } + // } return crumbs; }, diff --git a/packages/GuipDialog/index.js b/packages/GuipDialog/index.js new file mode 100644 index 0000000..639d4f1 --- /dev/null +++ b/packages/GuipDialog/index.js @@ -0,0 +1,7 @@ +import GuipDialog from './src/index.vue' + +GuipDialog.install = function(Vue) { + Vue.component(GuipDialog.name || 'GuipDialog', GuipDialog) +} + +export default GuipDialog \ No newline at end of file diff --git a/packages/GuipDialog/src/index.vue b/packages/GuipDialog/src/index.vue new file mode 100644 index 0000000..f335b09 --- /dev/null +++ b/packages/GuipDialog/src/index.vue @@ -0,0 +1,124 @@ + + + + + + + {{ cancelText }} + {{ confirmText }} + + + + + diff --git a/packages/assets/drop-selected.svg b/packages/assets/drop-selected.svg new file mode 100644 index 0000000..e3faa11 --- /dev/null +++ b/packages/assets/drop-selected.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/assets/dropDown_expand.png b/packages/assets/dropDown_expand.png new file mode 100644 index 0000000..ec5192d Binary files /dev/null and b/packages/assets/dropDown_expand.png differ diff --git a/packages/assets/dropDown_open.png b/packages/assets/dropDown_open.png new file mode 100644 index 0000000..841f405 Binary files /dev/null and b/packages/assets/dropDown_open.png differ diff --git a/packages/assets/table_empty.png b/packages/assets/table_empty.png index 3f2c44c..58da086 100644 Binary files a/packages/assets/table_empty.png and b/packages/assets/table_empty.png differ diff --git a/packages/index.js b/packages/index.js index 05a632c..f9ed3b1 100644 --- a/packages/index.js +++ b/packages/index.js @@ -12,6 +12,7 @@ import SvgIcon from './SvgIcon'; import GuipTable from './GuipTable'; import GuipSwitch from './GuipSwitch'; import GuipTooltip from './GuipToolTip'; +import GuipDialog from './GuipDialog'; import 'core-js/stable' import 'element-ui/lib/theme-chalk/index.css'; // 如果依赖Element import './styles/index.css'; // 全局引入 @@ -32,7 +33,8 @@ const components = [ SvgIcon, GuipTable, GuipTooltip, - GuipSwitch + GuipSwitch, + GuipDialog ] const install = function (Vue) { @@ -59,5 +61,6 @@ export default { SvgIcon, GuipTable, GuipTooltip, - GuipSwitch + GuipSwitch, + GuipDialog } \ No newline at end of file diff --git a/packages/styles/index.css b/packages/styles/index.css index 9d5e7dc..b7737cc 100644 --- a/packages/styles/index.css +++ b/packages/styles/index.css @@ -4120,7 +4120,7 @@ border-color:#006AFF !important; } .el-menu { - border-right: solid 1px #e6e6e6; + border: none; list-style: none; position: relative; margin: 0;
这是一个自定义内容的弹框。