Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
|
bdea37649d |
|
@ -1,39 +1,9 @@
|
||||||
// @see: https://www.prettier.cn
|
// @ts-check
|
||||||
|
|
||||||
|
/** @type {import("prettier").Config} */
|
||||||
export default {
|
export default {
|
||||||
// 超过最大值换行
|
bracketSpacing: true,
|
||||||
printWidth: 200,
|
singleQuote: false,
|
||||||
// 缩进字节数
|
arrowParens: "avoid",
|
||||||
tabWidth: 1,
|
trailingComma: "none"
|
||||||
// 使用制表符而不是空格缩进行
|
|
||||||
useTabs: true,
|
|
||||||
// 结尾不用分号(true有,false没有)
|
|
||||||
semi: true,
|
|
||||||
// 使用单引号(true单引号,false双引号)
|
|
||||||
singleQuote: true,
|
|
||||||
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
|
|
||||||
quoteProps: 'as-needed',
|
|
||||||
// 在对象,数组括号与文字之间加空格 "{ foo: bar }"
|
|
||||||
bracketSpacing: true,
|
|
||||||
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>",默认none
|
|
||||||
trailingComma: 'all',
|
|
||||||
// 在JSX中使用单引号而不是双引号
|
|
||||||
jsxSingleQuote: true,
|
|
||||||
// (x) => {} 箭头函数参数只有一个时是否要有小括号。avoid:省略括号 ,always:不省略括号
|
|
||||||
arrowParens: 'avoid',
|
|
||||||
// 如果文件顶部已经有一个 doclock,这个选项将新建一行注释,并打上@format标记。
|
|
||||||
insertPragma: false,
|
|
||||||
// 指定要使用的解析器,不需要写文件开头的 @prettier
|
|
||||||
requirePragma: false,
|
|
||||||
// 默认值。因为使用了一些折行敏感型的渲染器(如GitHub comment)而按照markdown文本样式进行折行
|
|
||||||
proseWrap: 'preserve',
|
|
||||||
// 在html中空格是否是敏感的 "css" - 遵守CSS显示属性的默认值, "strict" - 空格被认为是敏感的 ,"ignore" - 空格被认为是不敏感的
|
|
||||||
htmlWhitespaceSensitivity: 'css',
|
|
||||||
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
|
|
||||||
endOfLine: 'auto',
|
|
||||||
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
|
|
||||||
rangeStart: 0,
|
|
||||||
rangeEnd: Infinity,
|
|
||||||
|
|
||||||
vueIndentScriptAndStyle: false, // Vue文件脚本和样式标签缩进
|
|
||||||
};
|
};
|
||||||
|
|
404
package.json
404
package.json
|
@ -1,204 +1,204 @@
|
||||||
{
|
{
|
||||||
"name": "bunny-admin-element-i18n",
|
"name": "bunny-admin-element",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"bunny-admin-element",
|
"bunny-admin-element",
|
||||||
"bunny-cli",
|
"bunny-cli",
|
||||||
"element-plus",
|
"element-plus",
|
||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
"typescript",
|
"typescript",
|
||||||
"pinia",
|
"pinia",
|
||||||
"vue3",
|
"vue3",
|
||||||
"vite",
|
"vite",
|
||||||
"esm"
|
"esm"
|
||||||
],
|
],
|
||||||
"homepage": "https://gitee.com/BunnyBoss/bunny-admin-element-thin-i18n",
|
"homepage": "https://gitee.com/BunnyBoss/bunny-admin-element.git",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitee.com/BunnyBoss/bunny-admin-element-thin-i18n"
|
"url": "https://gitee.com/BunnyBoss/bunny-admin-element.git"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://gitee.com/BunnyBoss/bunny-admin-element-thin-i18n/issues"
|
"url": "https://gitee.com/BunnyBoss/bunny-admin-element.git/issues"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Bunny0212",
|
"name": "Bunny0212",
|
||||||
"email": "1319900154@qq.com",
|
"email": "1319900154@qq.com",
|
||||||
"url": "https://github.com/xiaoxian521"
|
"url": "https://github.com/xiaoxian521"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
|
||||||
"serve": "pnpm vite",
|
"serve": "pnpm vite",
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build && generate-version-file",
|
"build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build && generate-version-file",
|
||||||
"build:staging": "rimraf dist && vite build --mode staging",
|
"build:staging": "rimraf dist && vite build --mode staging",
|
||||||
"report": "rimraf dist && vite build",
|
"report": "rimraf dist && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"preview:build": "pnpm build && vite preview",
|
"preview:build": "pnpm build && vite preview",
|
||||||
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
|
"typecheck": "tsc --noEmit && vue-tsc --noEmit --skipLibCheck",
|
||||||
"svgo": "svgo -f . -r",
|
"svgo": "svgo -f . -r",
|
||||||
"clean:cache": "rimraf .eslintcache && rimraf pnpm-lock.yaml && rimraf node_modules && pnpm store prune && pnpm install",
|
"clean:cache": "rimraf .eslintcache && rimraf pnpm-lock.yaml && rimraf node_modules && pnpm store prune && pnpm install",
|
||||||
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
|
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock,build}/**/*.{vue,js,ts,tsx}\" --fix",
|
||||||
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
|
"lint:prettier": "prettier --write \"src/**/*.{js,ts,json,tsx,css,scss,vue,html,md}\"",
|
||||||
"lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache-location node_modules/.cache/stylelint/",
|
"lint:stylelint": "stylelint --cache --fix \"**/*.{html,vue,css,scss}\" --cache-location node_modules/.cache/stylelint/",
|
||||||
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
|
"lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"commit": "git pull && git add -A && git-cz && git push"
|
"commit": "git pull && git add -A && git-cz && git push"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||||
"@howdyjs/mouse-menu": "^2.1.3",
|
"@howdyjs/mouse-menu": "^2.1.3",
|
||||||
"@infectoone/vue-ganttastic": "^2.3.2",
|
"@infectoone/vue-ganttastic": "^2.3.2",
|
||||||
"@logicflow/core": "^1.2.27",
|
"@logicflow/core": "^1.2.27",
|
||||||
"@logicflow/extension": "^1.2.27",
|
"@logicflow/extension": "^1.2.27",
|
||||||
"@pureadmin/descriptions": "^1.2.1",
|
"@pureadmin/descriptions": "^1.2.1",
|
||||||
"@pureadmin/table": "^3.1.2",
|
"@pureadmin/table": "^3.1.2",
|
||||||
"@pureadmin/utils": "^2.4.7",
|
"@pureadmin/utils": "^2.4.7",
|
||||||
"@vue-flow/background": "^1.3.0",
|
"@vue-flow/background": "^1.3.0",
|
||||||
"@vue-flow/core": "^1.33.6",
|
"@vue-flow/core": "^1.33.6",
|
||||||
"@vueuse/core": "^10.9.0",
|
"@vueuse/core": "^10.9.0",
|
||||||
"@vueuse/motion": "^2.1.0",
|
"@vueuse/motion": "^2.1.0",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"@zxcvbn-ts/core": "^3.0.4",
|
"@zxcvbn-ts/core": "^3.0.4",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
"china-area-data": "^5.0.1",
|
"china-area-data": "^5.0.1",
|
||||||
"cropperjs": "^1.6.2",
|
"cropperjs": "^1.6.2",
|
||||||
"dayjs": "^1.11.11",
|
"dayjs": "^1.11.11",
|
||||||
"echarts": "^5.5.0",
|
"echarts": "^5.5.0",
|
||||||
"el-table-infinite-scroll": "^3.0.3",
|
"el-table-infinite-scroll": "^3.0.3",
|
||||||
"element-plus": "2.7.1",
|
"element-plus": "2.7.1",
|
||||||
"intro.js": "^7.2.0",
|
"intro.js": "^7.2.0",
|
||||||
"js-cookie": "^3.0.5",
|
"js-cookie": "^3.0.5",
|
||||||
"jsbarcode": "^3.11.6",
|
"jsbarcode": "^3.11.6",
|
||||||
"localforage": "^1.10.0",
|
"localforage": "^1.10.0",
|
||||||
"mint-filter": "^4.0.3",
|
"mint-filter": "^4.0.3",
|
||||||
"mitt": "^3.0.1",
|
"mitt": "^3.0.1",
|
||||||
"mqtt": "4.3.7",
|
"mqtt": "4.3.7",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"path": "^0.12.7",
|
"path": "^0.12.7",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"pinia-plugin-persistedstate": "^3.2.1",
|
"pinia-plugin-persistedstate": "^3.2.1",
|
||||||
"pinyin-pro": "^3.20.4",
|
"pinyin-pro": "^3.20.4",
|
||||||
"plus-pro-components": "^0.1.1",
|
"plus-pro-components": "^0.1.1",
|
||||||
"qrcode": "^1.5.3",
|
"qrcode": "^1.5.3",
|
||||||
"qs": "^6.12.1",
|
"qs": "^6.12.1",
|
||||||
"responsive-storage": "^2.2.0",
|
"responsive-storage": "^2.2.0",
|
||||||
"sortablejs": "^1.15.2",
|
"sortablejs": "^1.15.2",
|
||||||
"swiper": "^11.1.1",
|
"swiper": "^11.1.1",
|
||||||
"terser": "^5.31.0",
|
"terser": "^5.31.0",
|
||||||
"typeit": "^8.8.3",
|
"typeit": "^8.8.3",
|
||||||
"v-contextmenu": "^3.2.0",
|
"v-contextmenu": "^3.2.0",
|
||||||
"v3-infinite-loading": "^1.3.1",
|
"v3-infinite-loading": "^1.3.1",
|
||||||
"version-rocket": "^1.7.1",
|
"version-rocket": "^1.7.1",
|
||||||
"vite-plugin-vue-inspector": "^5.1.3",
|
"vite-plugin-vue-inspector": "^5.1.3",
|
||||||
"vue": "^3.4.27",
|
"vue": "^3.4.27",
|
||||||
"vue-i18n": "^9.13.1",
|
"vue-i18n": "^9.13.1",
|
||||||
"vue-json-pretty": "^2.4.0",
|
"vue-json-pretty": "^2.4.0",
|
||||||
"vue-pdf-embed": "^2.0.3",
|
"vue-pdf-embed": "^2.0.3",
|
||||||
"vue-router": "^4.3.2",
|
"vue-router": "^4.3.2",
|
||||||
"vue-tippy": "^6.4.1",
|
"vue-tippy": "^6.4.1",
|
||||||
"vue-types": "^5.1.2",
|
"vue-types": "^5.1.2",
|
||||||
"vue-virtual-scroller": "2.0.0-beta.8",
|
"vue-virtual-scroller": "2.0.0-beta.8",
|
||||||
"vue-waterfall-plugin-next": "^2.4.3",
|
"vue-waterfall-plugin-next": "^2.4.3",
|
||||||
"vue3-danmaku": "^1.6.0",
|
"vue3-danmaku": "^1.6.0",
|
||||||
"vue3-puzzle-vcode": "^1.1.7",
|
"vue3-puzzle-vcode": "^1.1.7",
|
||||||
"vuedraggable": "^4.1.0",
|
"vuedraggable": "^4.1.0",
|
||||||
"vxe-table": "^4.6.9",
|
"vxe-table": "^4.6.9",
|
||||||
"wavesurfer.js": "^7.7.13",
|
"wavesurfer.js": "^7.7.13",
|
||||||
"xgplayer": "^3.0.17",
|
"xgplayer": "^3.0.17",
|
||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^19.3.0",
|
"@commitlint/cli": "^19.3.0",
|
||||||
"@commitlint/config-conventional": "^19.2.2",
|
"@commitlint/config-conventional": "^19.2.2",
|
||||||
"@commitlint/types": "^19.0.3",
|
"@commitlint/types": "^19.0.3",
|
||||||
"@eslint/js": "^9.2.0",
|
"@eslint/js": "^9.2.0",
|
||||||
"@faker-js/faker": "^8.4.1",
|
"@faker-js/faker": "^8.4.1",
|
||||||
"@iconify-icons/ep": "^1.2.12",
|
"@iconify-icons/ep": "^1.2.12",
|
||||||
"@iconify-icons/ri": "^1.2.10",
|
"@iconify-icons/ri": "^1.2.10",
|
||||||
"@iconify/vue": "^4.1.2",
|
"@iconify/vue": "^4.1.2",
|
||||||
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
"@intlify/unplugin-vue-i18n": "^4.0.0",
|
||||||
"@pureadmin/theme": "^3.2.0",
|
"@pureadmin/theme": "^3.2.0",
|
||||||
"@types/dagre": "^0.7.52",
|
"@types/dagre": "^0.7.52",
|
||||||
"@types/gradient-string": "^1.1.6",
|
"@types/gradient-string": "^1.1.6",
|
||||||
"@types/intro.js": "^5.1.5",
|
"@types/intro.js": "^5.1.5",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/node": "^20.12.11",
|
"@types/node": "^20.12.11",
|
||||||
"@types/nprogress": "^0.2.3",
|
"@types/nprogress": "^0.2.3",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"@types/qs": "^6.9.15",
|
"@types/qs": "^6.9.15",
|
||||||
"@types/sortablejs": "^1.15.8",
|
"@types/sortablejs": "^1.15.8",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
"@typescript-eslint/eslint-plugin": "^7.8.0",
|
||||||
"@typescript-eslint/parser": "^7.8.0",
|
"@typescript-eslint/parser": "^7.8.0",
|
||||||
"@vitejs/plugin-vue": "^5.0.4",
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||||
"autoprefixer": "^10.4.19",
|
"autoprefixer": "^10.4.19",
|
||||||
"boxen": "^7.1.1",
|
"boxen": "^7.1.1",
|
||||||
"commitizen": "^4.2.4",
|
"commitizen": "^4.2.4",
|
||||||
"commitlint": "^17.0.1",
|
"commitlint": "^17.0.1",
|
||||||
"cssnano": "^7.0.1",
|
"cssnano": "^7.0.1",
|
||||||
"cz-git": "^1.3.2",
|
"cz-git": "^1.3.2",
|
||||||
"dagre": "^0.8.5",
|
"dagre": "^0.8.5",
|
||||||
"eslint": "^9.2.0",
|
"eslint": "^9.2.0",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"eslint-config-prettier": "^9.1.0",
|
||||||
"eslint-define-config": "^2.1.0",
|
"eslint-define-config": "^2.1.0",
|
||||||
"eslint-plugin-prettier": "^5.1.3",
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
"eslint-plugin-vue": "^9.25.0",
|
"eslint-plugin-vue": "^9.25.0",
|
||||||
"gradient-string": "^2.0.2",
|
"gradient-string": "^2.0.2",
|
||||||
"husky": "^8.0.1",
|
"husky": "^8.0.1",
|
||||||
"lint-staged": "^15.2.2",
|
"lint-staged": "^15.2.2",
|
||||||
"postcss": "^8.4.38",
|
"postcss": "^8.4.38",
|
||||||
"postcss-html": "^1.7.0",
|
"postcss-html": "^1.7.0",
|
||||||
"postcss-import": "^16.1.0",
|
"postcss-import": "^16.1.0",
|
||||||
"postcss-scss": "^4.0.9",
|
"postcss-scss": "^4.0.9",
|
||||||
"prettier": "^3.2.5",
|
"prettier": "^3.2.5",
|
||||||
"rimraf": "^5.0.5",
|
"rimraf": "^5.0.5",
|
||||||
"rollup-plugin-visualizer": "^5.12.0",
|
"rollup-plugin-visualizer": "^5.12.0",
|
||||||
"sass": "^1.77.0",
|
"sass": "^1.77.0",
|
||||||
"stylelint": "^16.5.0",
|
"stylelint": "^16.5.0",
|
||||||
"stylelint-config-recess-order": "^5.0.1",
|
"stylelint-config-recess-order": "^5.0.1",
|
||||||
"stylelint-config-recommended-vue": "^1.5.0",
|
"stylelint-config-recommended-vue": "^1.5.0",
|
||||||
"stylelint-config-standard-scss": "^13.1.0",
|
"stylelint-config-standard-scss": "^13.1.0",
|
||||||
"stylelint-prettier": "^5.0.0",
|
"stylelint-prettier": "^5.0.0",
|
||||||
"svgo": "^3.3.0",
|
"svgo": "^3.3.0",
|
||||||
"tailwindcss": "^3.4.3",
|
"tailwindcss": "^3.4.3",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.4.5",
|
||||||
"vite": "^5.2.11",
|
"vite": "^5.2.11",
|
||||||
"vite-plugin-cdn-import": "^0.3.5",
|
"vite-plugin-cdn-import": "^0.3.5",
|
||||||
"vite-plugin-compression": "^0.5.1",
|
"vite-plugin-compression": "^0.5.1",
|
||||||
"vite-plugin-fake-server": "^2.1.1",
|
"vite-plugin-fake-server": "^2.1.1",
|
||||||
"vite-plugin-remove-console": "^2.2.0",
|
"vite-plugin-remove-console": "^2.2.0",
|
||||||
"vite-plugin-router-warn": "^1.0.0",
|
"vite-plugin-router-warn": "^1.0.0",
|
||||||
"vite-svg-loader": "^5.1.0",
|
"vite-svg-loader": "^5.1.0",
|
||||||
"vue-eslint-parser": "^9.4.2",
|
"vue-eslint-parser": "^9.4.2",
|
||||||
"vue-tsc": "^1.8.27"
|
"vue-tsc": "^1.8.27"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0",
|
"node": "^18.18.0 || ^20.9.0 || >=21.1.0",
|
||||||
"pnpm": ">=8.6.10"
|
"pnpm": ">=8.6.10"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"allowedDeprecatedVersions": {
|
"allowedDeprecatedVersions": {
|
||||||
"sourcemap-codec": "*",
|
"sourcemap-codec": "*",
|
||||||
"domexception": "*",
|
"domexception": "*",
|
||||||
"w3c-hr-time": "*",
|
"w3c-hr-time": "*",
|
||||||
"stable": "*",
|
"stable": "*",
|
||||||
"abab": "*"
|
"abab": "*"
|
||||||
},
|
},
|
||||||
"peerDependencyRules": {
|
"peerDependencyRules": {
|
||||||
"allowedVersions": {
|
"allowedVersions": {
|
||||||
"eslint": "9"
|
"eslint": "9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"commitizen": {
|
"commitizen": {
|
||||||
"path": "node_modules/cz-git"
|
"path": "node_modules/cz-git"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
14214
pnpm-lock.yaml
14214
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,48 @@
|
||||||
|
<template>
|
||||||
|
<div class="main">
|
||||||
|
<pure-table
|
||||||
|
ref="tableRef"
|
||||||
|
:adaptiveConfig="{ offsetBottom: 108 }"
|
||||||
|
:columns="column"
|
||||||
|
:data="dataList"
|
||||||
|
:header-cell-style="cellHeaderStyle"
|
||||||
|
:loading="loading"
|
||||||
|
:size="size"
|
||||||
|
adaptive
|
||||||
|
align-whole="center"
|
||||||
|
border
|
||||||
|
row-key="id"
|
||||||
|
table-layout="auto"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { cellHeaderStyle } from '@/components/TableBar/utils/tableStyle';
|
||||||
|
import PureTable from '@pureadmin/table';
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
|
||||||
|
// * 传入数据
|
||||||
|
defineProps({
|
||||||
|
// 表格数据
|
||||||
|
dataList: {
|
||||||
|
type: Array<any>,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
// 表格列字段
|
||||||
|
column: {
|
||||||
|
type: Array<any>,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
size: {
|
||||||
|
type: String as PropType<any>,
|
||||||
|
default: 'default',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,75 @@
|
||||||
|
<template>
|
||||||
|
<div class="main mt-2 p-2 bg-bg_color">
|
||||||
|
<pure-table
|
||||||
|
ref="tableRef"
|
||||||
|
:adaptiveConfig="{ offsetBottom: 108 }"
|
||||||
|
:columns="column"
|
||||||
|
:data="dataList"
|
||||||
|
:header-cell-style="cellHeaderStyle"
|
||||||
|
:loading="loading"
|
||||||
|
:pagination="pagination"
|
||||||
|
:paginationSmall="size === 'small'"
|
||||||
|
:size="size"
|
||||||
|
adaptive
|
||||||
|
align-whole="center"
|
||||||
|
border
|
||||||
|
row-key="id"
|
||||||
|
table-layout="auto"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@page-size-change="handleSizeChange"
|
||||||
|
@page-current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { cellHeaderStyle } from '@/components/TableBar/utils/tableStyle';
|
||||||
|
import PureTable from '@pureadmin/table';
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
|
||||||
|
// * 传入数据
|
||||||
|
defineProps({
|
||||||
|
// 表格数据
|
||||||
|
dataList: {
|
||||||
|
type: Array<any>,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
// 表格列字段
|
||||||
|
column: {
|
||||||
|
type: Array<any>,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
// 是否加载
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
// 页面字体大小,small | default | large
|
||||||
|
size: {
|
||||||
|
type: String as PropType<any>,
|
||||||
|
default: 'default',
|
||||||
|
},
|
||||||
|
// 分页器参数
|
||||||
|
pagination: {
|
||||||
|
type: Object,
|
||||||
|
default: Object,
|
||||||
|
},
|
||||||
|
// 一页大小变化
|
||||||
|
handleSelectionChange: {
|
||||||
|
type: Function as PropType<Function>,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
// 分页大小变化
|
||||||
|
handleSizeChange: {
|
||||||
|
type: Function as PropType<Function>,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
// 当前页变化
|
||||||
|
handleCurrentChange: {
|
||||||
|
type: Function as PropType<Function>,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,100 @@
|
||||||
|
<template>
|
||||||
|
<div class="main">
|
||||||
|
<el-form ref="formRef" :inline="true" :model="form" class="search-form bg-bg_color w-[99/100] pl-8 pt-[12px] overflow-auto">
|
||||||
|
<slot name="tableForm" />
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<div class="mt-2 p-2 bg-bg_color">
|
||||||
|
<pure-table
|
||||||
|
ref="tableRef"
|
||||||
|
:adaptiveConfig="{ offsetBottom: 108 }"
|
||||||
|
:columns="column"
|
||||||
|
:data="dataList"
|
||||||
|
:header-cell-style="cellHeaderStyle"
|
||||||
|
:loading="loading"
|
||||||
|
:pagination="pagination"
|
||||||
|
:paginationSmall="size === 'small'"
|
||||||
|
:size="size"
|
||||||
|
adaptive
|
||||||
|
align-whole="center"
|
||||||
|
border
|
||||||
|
row-key="id"
|
||||||
|
table-layout="auto"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@page-size-change="handleSizeChange"
|
||||||
|
@page-current-change="handleCurrentChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type { PropType } from 'vue';
|
||||||
|
import { cellHeaderStyle } from '@/components/TableBar/utils/tableStyle';
|
||||||
|
import PureTable from '@pureadmin/table';
|
||||||
|
|
||||||
|
// * 传入数据
|
||||||
|
defineProps({
|
||||||
|
// 表格数据
|
||||||
|
dataList: {
|
||||||
|
type: Array<any>,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
// 表格列字段
|
||||||
|
column: {
|
||||||
|
type: Array<any>,
|
||||||
|
default: [],
|
||||||
|
},
|
||||||
|
// 是否加载
|
||||||
|
loading: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
// 页面字体大小,small | default | large
|
||||||
|
size: {
|
||||||
|
type: String as PropType<any>,
|
||||||
|
default: 'default',
|
||||||
|
},
|
||||||
|
// 分页器参数
|
||||||
|
pagination: {
|
||||||
|
type: Object,
|
||||||
|
default: Object,
|
||||||
|
},
|
||||||
|
// 一页大小变化
|
||||||
|
handleSelectionChange: {
|
||||||
|
type: Function as PropType<Function>,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
// 分页大小变化
|
||||||
|
handleSizeChange: {
|
||||||
|
type: Function as PropType<Function>,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
// 当前页变化
|
||||||
|
handleCurrentChange: {
|
||||||
|
type: Function as PropType<Function>,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {
|
||||||
|
type: Object as PropType<any>,
|
||||||
|
default: Object,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-dropdown-menu__item i) {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
margin: 24px 24px 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-form {
|
||||||
|
:deep(.el-form-item) {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -1,7 +0,0 @@
|
||||||
// 分页参数接口
|
|
||||||
export interface Pagination {
|
|
||||||
currentPage: number;
|
|
||||||
pageSize: number;
|
|
||||||
total: number;
|
|
||||||
pageSizes: number[];
|
|
||||||
}
|
|
Loading…
Reference in New Issue