mirror of
https://github.com/kailong321200875/vue-element-plus-admin.git
synced 2024-11-27 01:19:56 +08:00
wip: example demo developing
This commit is contained in:
parent
ef35bde801
commit
6c57a34512
@ -2,11 +2,7 @@
|
||||
/config/
|
||||
/dist/
|
||||
/*.js
|
||||
/*.d.ts
|
||||
/test/unit/coverage/
|
||||
/node_modules/*
|
||||
/src/types/env.d.ts
|
||||
/dist*
|
||||
/src/main.ts
|
||||
/src/types/auto-imports.d.ts
|
||||
/src/types/components.d.ts
|
||||
|
18
package.json
18
package.json
@ -26,10 +26,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@iconify/iconify": "^2.1.2",
|
||||
"@vueuse/core": "^7.6.0",
|
||||
"@wangeditor/editor": "^0.14.3",
|
||||
"@vueuse/core": "^7.6.1",
|
||||
"@wangeditor/editor": "^0.15.1",
|
||||
"@wangeditor/editor-for-vue": "^5.1.8-7",
|
||||
"@zxcvbn-ts/core": "^1.2.0",
|
||||
"@zxcvbn-ts/core": "^2.0.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^0.25.0",
|
||||
"echarts": "^5.3.0",
|
||||
@ -51,19 +51,19 @@
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^16.1.0",
|
||||
"@commitlint/config-conventional": "^16.0.0",
|
||||
"@iconify/json": "^2.0.34",
|
||||
"@iconify/json": "^2.0.36",
|
||||
"@intlify/vite-plugin-vue-i18n": "^3.2.2",
|
||||
"@purge-icons/generated": "^0.7.0",
|
||||
"@types/intro.js": "^3.0.2",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@types/node": "^17.0.16",
|
||||
"@types/node": "^17.0.17",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@types/qrcode": "^1.4.2",
|
||||
"@types/qs": "^6.9.7",
|
||||
"@typescript-eslint/eslint-plugin": "^5.11.0",
|
||||
"@typescript-eslint/parser": "^5.11.0",
|
||||
"@vitejs/plugin-vue": "^2.1.0",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.3",
|
||||
"@vitejs/plugin-vue": "^2.2.0",
|
||||
"@vitejs/plugin-vue-jsx": "^1.3.4",
|
||||
"autoprefixer": "^10.4.2",
|
||||
"commitizen": "^4.2.4",
|
||||
"consola": "^2.15.3",
|
||||
@ -82,13 +82,13 @@
|
||||
"prettier": "^2.5.1",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"rimraf": "^3.0.2",
|
||||
"stylelint": "^14.4.0",
|
||||
"stylelint": "^14.5.0",
|
||||
"stylelint-config-html": "^1.0.0",
|
||||
"stylelint-config-prettier": "^9.0.3",
|
||||
"stylelint-config-standard": "^25.0.0",
|
||||
"stylelint-order": "^5.0.0",
|
||||
"typescript": "4.5.5",
|
||||
"vite": "2.7.13",
|
||||
"vite": "2.8.0",
|
||||
"vite-plugin-eslint": "^1.3.0",
|
||||
"vite-plugin-mock": "^2.9.6",
|
||||
"vite-plugin-purge-icons": "^0.7.0",
|
||||
|
1456
pnpm-lock.yaml
1456
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -47,44 +47,38 @@ const columns = reactive<TableColumn[]>([
|
||||
type: 'index'
|
||||
},
|
||||
{
|
||||
field: 'content',
|
||||
label: t('tableDemo.header'),
|
||||
children: [
|
||||
{
|
||||
field: 'title',
|
||||
label: t('tableDemo.title')
|
||||
},
|
||||
{
|
||||
field: 'author',
|
||||
label: t('tableDemo.author')
|
||||
},
|
||||
{
|
||||
field: 'display_time',
|
||||
label: t('tableDemo.displayTime')
|
||||
},
|
||||
{
|
||||
field: 'importance',
|
||||
label: t('tableDemo.importance'),
|
||||
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
|
||||
return h(
|
||||
ElTag,
|
||||
{
|
||||
type: cellValue === 1 ? 'success' : cellValue === 2 ? 'warning' : 'danger'
|
||||
},
|
||||
() =>
|
||||
cellValue === 1
|
||||
? t('tableDemo.important')
|
||||
: cellValue === 2
|
||||
? t('tableDemo.good')
|
||||
: t('tableDemo.commonly')
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'pageviews',
|
||||
label: t('tableDemo.pageviews')
|
||||
}
|
||||
]
|
||||
field: 'title',
|
||||
label: t('tableDemo.title')
|
||||
},
|
||||
{
|
||||
field: 'author',
|
||||
label: t('tableDemo.author')
|
||||
},
|
||||
{
|
||||
field: 'display_time',
|
||||
label: t('tableDemo.displayTime')
|
||||
},
|
||||
{
|
||||
field: 'importance',
|
||||
label: t('tableDemo.importance'),
|
||||
formatter: (_: Recordable, __: TableColumn, cellValue: number) => {
|
||||
return h(
|
||||
ElTag,
|
||||
{
|
||||
type: cellValue === 1 ? 'success' : cellValue === 2 ? 'warning' : 'danger'
|
||||
},
|
||||
() =>
|
||||
cellValue === 1
|
||||
? t('tableDemo.important')
|
||||
: cellValue === 2
|
||||
? t('tableDemo.good')
|
||||
: t('tableDemo.commonly')
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'pageviews',
|
||||
label: t('tableDemo.pageviews')
|
||||
},
|
||||
{
|
||||
field: 'action',
|
||||
@ -107,12 +101,11 @@ const writeRef = ref<ComponentRef<typeof Write>>()
|
||||
const loading = ref(false)
|
||||
|
||||
const save = async () => {
|
||||
loading.value = true
|
||||
const write = unref(writeRef)
|
||||
const validate = await write?.elFormRef?.validate()?.catch(() => {})
|
||||
if (validate) {
|
||||
loading.value = true
|
||||
const data = await write?.getFormData()
|
||||
|
||||
const res = await saveTableApi({
|
||||
data
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user