优化插件

This commit is contained in:
icssoa 2022-04-21 12:54:31 +08:00
parent 644bce8cfe
commit c14fccd7d9
8 changed files with 457 additions and 7282 deletions

View File

@ -1,6 +1,6 @@
{
"name": "front-next",
"version": "5.1.1",
"version": "5.1.2",
"scripts": {
"dev": "vite --host",
"build": "vite build",
@ -28,7 +28,7 @@
"store": "^2.0.12",
"unocss": "^0.31.0",
"uuid": "^8.3.2",
"vue": "^3.2.31",
"vue": "^3.2.32",
"vue-echarts": "^6.0.2",
"vue-router": "^4.0.14",
"vuedraggable": "^4.1.0",
@ -44,12 +44,12 @@
"@typescript-eslint/eslint-plugin": "^4.20.0",
"@typescript-eslint/parser": "^4.20.0",
"@unocss/preset-uno": "^0.31.0",
"@vitejs/plugin-vue": "^2.2.4",
"@vitejs/plugin-vue-jsx": "^1.3.8",
"@vitejs/plugin-vue": "^2.3.1",
"@vitejs/plugin-vue-jsx": "^1.3.9",
"@vue/cli-plugin-babel": "^5.0.1",
"@vue/cli-plugin-typescript": "^5.0.1",
"@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-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.3.1",
@ -61,7 +61,7 @@
"svg-sprite-loader": "^6.0.2",
"typescript": "^4.6.2",
"unplugin-vue-components": "^0.17.21",
"vite": "^2.8.6",
"vite": "^2.9.1",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-dts": "^0.9.9",
"vite-plugin-mock": "^2.9.6",

View File

@ -53,7 +53,7 @@ export function useEps(service: Service) {
// 本地服务
return service.request({
url: `http://localhost:${__SERVER_PORT__}/__cool_eps`,
url: `${location.origin}/__cool_eps`,
method: "POST",
data: {
service,

View File

@ -25,7 +25,7 @@ export default defineComponent({
async function create() {
//
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();
service.request({
url: `http://localhost:${__SERVER_PORT__}/__cool_createMenu`,
url: `${location.origin}/__cool_createMenu`,
method: "POST",
data: {
...item,

View File

@ -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
View File

@ -10,5 +10,4 @@ declare module "*.vue" {
declare const __PROXY_LIST__: any[];
declare const __EPS__: string;
declare const __SERVER_PORT__: string;
declare const __modules__: any[];

View File

@ -66,8 +66,7 @@ export default (): UserConfig => {
}
},
define: {
__PROXY_LIST__: JSON.stringify(proxy),
__SERVER_PORT__: 9000
__PROXY_LIST__: JSON.stringify(proxy)
},
build: {
sourcemap: false,

File diff suppressed because it is too large Load Diff

914
yarn.lock

File diff suppressed because it is too large Load Diff