mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
优化插件
This commit is contained in:
parent
644bce8cfe
commit
c14fccd7d9
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front-next",
|
"name": "front-next",
|
||||||
"version": "5.1.1",
|
"version": "5.1.2",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
@ -28,7 +28,7 @@
|
|||||||
"store": "^2.0.12",
|
"store": "^2.0.12",
|
||||||
"unocss": "^0.31.0",
|
"unocss": "^0.31.0",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"vue": "^3.2.31",
|
"vue": "^3.2.32",
|
||||||
"vue-echarts": "^6.0.2",
|
"vue-echarts": "^6.0.2",
|
||||||
"vue-router": "^4.0.14",
|
"vue-router": "^4.0.14",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
@ -44,12 +44,12 @@
|
|||||||
"@typescript-eslint/eslint-plugin": "^4.20.0",
|
"@typescript-eslint/eslint-plugin": "^4.20.0",
|
||||||
"@typescript-eslint/parser": "^4.20.0",
|
"@typescript-eslint/parser": "^4.20.0",
|
||||||
"@unocss/preset-uno": "^0.31.0",
|
"@unocss/preset-uno": "^0.31.0",
|
||||||
"@vitejs/plugin-vue": "^2.2.4",
|
"@vitejs/plugin-vue": "^2.3.1",
|
||||||
"@vitejs/plugin-vue-jsx": "^1.3.8",
|
"@vitejs/plugin-vue-jsx": "^1.3.9",
|
||||||
"@vue/cli-plugin-babel": "^5.0.1",
|
"@vue/cli-plugin-babel": "^5.0.1",
|
||||||
"@vue/cli-plugin-typescript": "^5.0.1",
|
"@vue/cli-plugin-typescript": "^5.0.1",
|
||||||
"@vue/compiler-sfc": "^3.2.31",
|
"@vue/compiler-sfc": "^3.2.31",
|
||||||
"@vue/composition-api": "^1.0.0-rc.13",
|
"@vue/composition-api": "^1.4.9",
|
||||||
"eslint": "^7.23.0",
|
"eslint": "^7.23.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-plugin-prettier": "^3.3.1",
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
@ -61,7 +61,7 @@
|
|||||||
"svg-sprite-loader": "^6.0.2",
|
"svg-sprite-loader": "^6.0.2",
|
||||||
"typescript": "^4.6.2",
|
"typescript": "^4.6.2",
|
||||||
"unplugin-vue-components": "^0.17.21",
|
"unplugin-vue-components": "^0.17.21",
|
||||||
"vite": "^2.8.6",
|
"vite": "^2.9.1",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-dts": "^0.9.9",
|
"vite-plugin-dts": "^0.9.9",
|
||||||
"vite-plugin-mock": "^2.9.6",
|
"vite-plugin-mock": "^2.9.6",
|
||||||
|
@ -53,7 +53,7 @@ export function useEps(service: Service) {
|
|||||||
|
|
||||||
// 本地服务
|
// 本地服务
|
||||||
return service.request({
|
return service.request({
|
||||||
url: `http://localhost:${__SERVER_PORT__}/__cool_eps`,
|
url: `${location.origin}/__cool_eps`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
service,
|
service,
|
||||||
|
@ -25,7 +25,7 @@ export default defineComponent({
|
|||||||
async function create() {
|
async function create() {
|
||||||
// 模块列表
|
// 模块列表
|
||||||
const modules = await service.request({
|
const modules = await service.request({
|
||||||
url: `http://localhost:${__SERVER_PORT__}/__cool_modules`
|
url: `${location.origin}/__cool_modules`
|
||||||
});
|
});
|
||||||
|
|
||||||
// 数据结构列表
|
// 数据结构列表
|
||||||
@ -211,7 +211,7 @@ export default defineComponent({
|
|||||||
close();
|
close();
|
||||||
|
|
||||||
service.request({
|
service.request({
|
||||||
url: `http://localhost:${__SERVER_PORT__}/__cool_createMenu`,
|
url: `${location.origin}/__cool_createMenu`,
|
||||||
method: "POST",
|
method: "POST",
|
||||||
data: {
|
data: {
|
||||||
...item,
|
...item,
|
||||||
|
@ -1,82 +0,0 @@
|
|||||||
<template>
|
|
||||||
<cl-crud ref="Crud">
|
|
||||||
<el-row>
|
|
||||||
<!-- 刷新按钮 -->
|
|
||||||
<cl-refresh-btn />
|
|
||||||
<!-- 新增按钮 -->
|
|
||||||
<cl-add-btn />
|
|
||||||
<!-- 删除按钮 -->
|
|
||||||
<cl-multi-delete-btn />
|
|
||||||
<cl-flex1 />
|
|
||||||
<!-- 关键字搜索 -->
|
|
||||||
<cl-search-key />
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<!-- 数据表格 -->
|
|
||||||
<cl-table ref="Table" />
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<cl-flex1 />
|
|
||||||
<!-- 分页控件 -->
|
|
||||||
<cl-pagination />
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- 新增、编辑 -->
|
|
||||||
<cl-upsert ref="Upsert" />
|
|
||||||
</cl-crud>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup>
|
|
||||||
import { useCrud, useTable, useUpsert } from "@cool-vue/crud";
|
|
||||||
import { useCool } from "/@/cool";
|
|
||||||
|
|
||||||
const { service, named } = useCool();
|
|
||||||
|
|
||||||
named("demo-goods");
|
|
||||||
|
|
||||||
// cl-upsert 配置
|
|
||||||
const Upsert = useUpsert({
|
|
||||||
items: [
|
|
||||||
{ label: "标题", prop: "title", required: true, component: { name: "el-input" } },
|
|
||||||
{ label: "图片", prop: "pic", component: { name: "cl-upload" }, required: true },
|
|
||||||
{
|
|
||||||
label: "价格",
|
|
||||||
prop: "price",
|
|
||||||
component: { name: "el-input-number", props: { min: 0 } },
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "分类",
|
|
||||||
prop: "type",
|
|
||||||
component: { name: "el-radio-group", options: [] }
|
|
||||||
}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
// cl-table 配置
|
|
||||||
const Table = useTable({
|
|
||||||
columns: [
|
|
||||||
{ type: "selection" },
|
|
||||||
{ label: "ID", prop: "id" },
|
|
||||||
{ label: "标题", prop: "title" },
|
|
||||||
{ label: "图片", prop: "pic", component: { name: "cl-image", props: { size: 60 } } },
|
|
||||||
{ label: "价格", prop: "price" },
|
|
||||||
{ label: "分类", prop: "type", dict: [] },
|
|
||||||
{ label: "创建时间", prop: "createTime" },
|
|
||||||
{ label: "更新时间", prop: "updateTime" },
|
|
||||||
{ type: "op", buttons: ["edit", "delete"] }
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
// cl-crud 配置
|
|
||||||
const Crud = useCrud(
|
|
||||||
{
|
|
||||||
service: service.demo.goods
|
|
||||||
},
|
|
||||||
(app) => {
|
|
||||||
app.refresh();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
1
src/shims-vue.d.ts
vendored
1
src/shims-vue.d.ts
vendored
@ -10,5 +10,4 @@ declare module "*.vue" {
|
|||||||
|
|
||||||
declare const __PROXY_LIST__: any[];
|
declare const __PROXY_LIST__: any[];
|
||||||
declare const __EPS__: string;
|
declare const __EPS__: string;
|
||||||
declare const __SERVER_PORT__: string;
|
|
||||||
declare const __modules__: any[];
|
declare const __modules__: any[];
|
||||||
|
@ -66,8 +66,7 @@ export default (): UserConfig => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
define: {
|
define: {
|
||||||
__PROXY_LIST__: JSON.stringify(proxy),
|
__PROXY_LIST__: JSON.stringify(proxy)
|
||||||
__SERVER_PORT__: 9000
|
|
||||||
},
|
},
|
||||||
build: {
|
build: {
|
||||||
sourcemap: false,
|
sourcemap: false,
|
||||||
|
6721
yarn-error.log
6721
yarn-error.log
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user