Skip to content

Commit

Permalink
releases 4.2.11
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Sep 30, 2024
1 parent b11782f commit 29aced5
Show file tree
Hide file tree
Showing 59 changed files with 1,468 additions and 10 deletions.
4 changes: 3 additions & 1 deletion examples/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ const navList = ref<VxeMenuPropTypes.Options>([
{ name: 'CountdownTest', routerLink: { name: 'CountdownTest' } },
{ name: 'NoticeBarTest', routerLink: { name: 'NoticeBarTest' } },
{ name: 'CollapseTest', routerLink: { name: 'CollapseTest' } },
{ name: 'TextEllipsisTest', routerLink: { name: 'TextEllipsisTest' } }
{ name: 'TextEllipsisTest', routerLink: { name: 'TextEllipsisTest' } },
{ name: 'EmptyTest', routerLink: { name: 'EmptyTest' } },
{ name: 'ResultTest', routerLink: { name: 'ResultTest' } }
])
const theme = ref((localStorage.getItem('VXE_THEME') as 'light' | 'dark') || 'light')
Expand Down
10 changes: 10 additions & 0 deletions examples/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ const routes: Array<RouteRecordRaw> = [
path: '/component/text-ellipsis',
name: 'TextEllipsisTest',
component: () => import('../views/text-ellipsis/TextEllipsisTest.vue')
},
{
path: '/component/empty',
name: 'EmptyTest',
component: () => import('../views/empty/EmptyTest.vue')
},
{
path: '/component/result',
name: 'ResultTest',
component: () => import('../views/result/ResultTest.vue')
}
]

Expand Down
13 changes: 13 additions & 0 deletions examples/views/empty/EmptyTest.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div>
<p>
<vxe-empty></vxe-empty>
</p>
<p>
<vxe-empty image-url="https://vxeui.com/resource/img/fj577.jpg"></vxe-empty>
</p>
</div>
</template>

<script lang="ts" setup>
</script>
2 changes: 1 addition & 1 deletion examples/views/icon/IconTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { ref } from 'vue'
import { VxeIconPropTypes } from '../../../types'
const iconList = ref<VxeIconPropTypes.Name[]>([
'add', 'add-sub', 'add-user', 'add-users', 'align-center', 'align-left', 'align-right', 'alipay', 'arrow-double-left', 'arrow-double-right', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'arrows-down', 'arrows-left', 'arrows-right', 'arrows-up', 'association-form', 'bell', 'bell-fill', 'calendar', 'caret-down', 'caret-left', 'caret-right', 'caret-up', 'carousel', 'chart-bar-x', 'chart-bar-y', 'chart-line', 'chart-pie', 'chart-radar', 'chat', 'chat-fill', 'check', 'checkbox-checked', 'checkbox-checked-fill', 'checkbox-indeterminate-fill', 'checkbox-unchecked', 'click-button', 'close', 'cloud-download', 'cloud-upload', 'cloudy', 'comment', 'company', 'copy', 'custom-column', 'cut', 'delete', 'delete-fill', 'dot', 'download', 'drag-handle', 'edit', 'ellipsis-h', 'ellipsis-v', 'end-page', 'envelope', 'envelope-fill', 'envelope-open', 'envelope-open-fill', 'error-circle', 'error-circle-fill', 'exclamation', 'eye-fill', 'eye-fill-close', 'feedback', 'file', 'file-excel', 'file-image', 'file-markdown', 'file-pdf', 'file-ppt', 'file-txt', 'file-word', 'file-zip', 'fixed-left', 'fixed-left-fill', 'fixed-right', 'fixed-right-fill', 'flag', 'flag-fill', 'flow-branch', 'folder', 'folder-open', 'fullscreen', 'funnel', 'funnel-clear', 'gitee-fill', 'github-fill', 'goods', 'goods-fill', 'heavy-rain', 'home', 'home-fill', 'home-page', 'indicator', 'info-circle', 'info-circle-fill', 'information', 'input', 'language-switch', 'layout', 'lightning', 'link', 'location', 'location-fill', 'lock', 'lock-fill', 'maximize', 'menu', 'menu-fold', 'menu-unfold', 'merge-cells', 'message-fill', 'microphone', 'microphone-fill', 'minimize', 'minus', 'mobile', 'moon', 'notice-left-fill', 'notice-right-fill', 'num-list', 'number', 'paste', 'pc', 'pct-1-1', 'pct-full', 'picture', 'picture-fill', 'platform', 'print', 'print-batch', 'question', 'question-circle', 'question-circle-fill', 'radio-checked', 'radio-checked-fill', 'radio-unchecked', 'recover', 'refresh', 'repeat', 'rmb', 'rotate-left', 'rotate-right', 'row-col', 'save', 'search', 'search-zoom-in', 'search-zoom-out', 'select', 'send', 'send-fill', 'setting', 'setting-fill', 'share', 'share-fill', 'signature', 'sort', 'sort-alpha-asc', 'sort-alpha-desc', 'sort-asc', 'sort-desc', 'sort-numeric-asc', 'sort-numeric-desc', 'spinner', 'square', 'square-caret-right', 'square-caret-right-fill', 'square-checked', 'square-checked-fill', 'square-close', 'square-close-fill', 'square-down', 'square-down-fill', 'square-fill', 'square-left', 'square-left-fill', 'square-minus', 'square-minus-fill', 'square-plus', 'square-plus-fill', 'square-plus-square', 'square-right', 'square-right-fill', 'square-square', 'square-up', 'square-up-fill', 'star', 'star-fill', 'star-half', 'subtable', 'success-circle', 'success-circle-fill', 'sunny', 'swap', 'swap-down', 'swap-left', 'swap-right', 'swap-up', 'switch', 'table', 'tabs', 'text', 'textarea', 'time', 'tree-select', 'undo', 'unlock', 'unlock-fill', 'upload', 'usd', 'user', 'user-fill', 'voice', 'voice-fill', 'warning-circle', 'warning-circle-fill', 'warning-triangle', 'warning-triangle-fill', 'wechat', 'zoom-in', 'zoom-out'
'add', 'add-sub', 'add-user', 'add-users', 'align-center', 'align-left', 'align-right', 'alipay', 'arrow-double-left', 'arrow-double-right', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up', 'arrows-down', 'arrows-left', 'arrows-right', 'arrows-up', 'association-form', 'bell', 'bell-fill', 'calendar', 'caret-down', 'caret-left', 'caret-right', 'caret-up', 'carousel', 'chart-bar-x', 'chart-bar-y', 'chart-line', 'chart-pie', 'chart-radar', 'chat', 'chat-fill', 'check', 'checkbox-checked', 'checkbox-checked-fill', 'checkbox-indeterminate-fill', 'checkbox-unchecked', 'click-button', 'close', 'cloud-download', 'cloud-upload', 'cloudy', 'comment', 'company', 'copy', 'custom-column', 'cut', 'delete', 'delete-fill', 'dot', 'download', 'drag-handle', 'edit', 'ellipsis-h', 'ellipsis-v', 'empty', 'end-page', 'envelope', 'envelope-fill', 'envelope-open', 'envelope-open-fill', 'error-circle', 'error-circle-fill', 'exclamation', 'eye-fill', 'eye-fill-close', 'feedback', 'file', 'file-excel', 'file-image', 'file-markdown', 'file-pdf', 'file-ppt', 'file-txt', 'file-word', 'file-zip', 'fixed-left', 'fixed-left-fill', 'fixed-right', 'fixed-right-fill', 'flag', 'flag-fill', 'flow-branch', 'folder', 'folder-open', 'fullscreen', 'funnel', 'funnel-clear', 'gitee-fill', 'github-fill', 'goods', 'goods-fill', 'heavy-rain', 'home', 'home-fill', 'home-page', 'indicator', 'info-circle', 'info-circle-fill', 'information', 'input', 'language-switch', 'layout', 'lightning', 'link', 'location', 'location-fill', 'lock', 'lock-fill', 'maximize', 'menu', 'menu-fold', 'menu-unfold', 'merge-cells', 'message-fill', 'microphone', 'microphone-fill', 'minimize', 'minus', 'mobile', 'moon', 'notice-left-fill', 'notice-right-fill', 'num-list', 'number', 'paste', 'pc', 'pct-1-1', 'pct-full', 'picture', 'picture-fill', 'platform', 'print', 'print-batch', 'question', 'question-circle', 'question-circle-fill', 'radio-checked', 'radio-checked-fill', 'radio-unchecked', 'recover', 'refresh', 'repeat', 'rmb', 'rotate-left', 'rotate-right', 'row-col', 'save', 'search', 'search-zoom-in', 'search-zoom-out', 'select', 'send', 'send-fill', 'setting', 'setting-fill', 'share', 'share-fill', 'signature', 'sort', 'sort-alpha-asc', 'sort-alpha-desc', 'sort-asc', 'sort-desc', 'sort-numeric-asc', 'sort-numeric-desc', 'spinner', 'square', 'square-caret-right', 'square-caret-right-fill', 'square-checked', 'square-checked-fill', 'square-close', 'square-close-fill', 'square-down', 'square-down-fill', 'square-fill', 'square-left', 'square-left-fill', 'square-minus', 'square-minus-fill', 'square-plus', 'square-plus-fill', 'square-plus-square', 'square-right', 'square-right-fill', 'square-square', 'square-up', 'square-up-fill', 'star', 'star-fill', 'star-half', 'subtable', 'success-circle', 'success-circle-fill', 'sunny', 'swap', 'swap-down', 'swap-left', 'swap-right', 'swap-up', 'switch', 'table', 'tabs', 'text', 'textarea', 'time', 'tree-select', 'undo', 'unlock', 'unlock-fill', 'upload', 'usd', 'user', 'user-fill', 'voice', 'voice-fill', 'warning-circle', 'warning-circle-fill', 'warning-triangle', 'warning-triangle-fill', 'wechat', 'zoom-in', 'zoom-out'
])
</script>

Expand Down
21 changes: 21 additions & 0 deletions examples/views/result/ResultTest.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<div>
<p>
<vxe-result title="成功" type="success" content="操作成功"></vxe-result>
</p>
<p>
<vxe-result title="失败" type="error" content="操作失败"></vxe-result>
</p>
<p>
<vxe-result title="警告" type="warning" content="请确认是否操作">
<template #extra>
<vxe-button status="primary">返回</vxe-button>
<vxe-button status="error">刷新</vxe-button>
</template>
</vxe-result>
</p>
</div>
</template>

<script lang="ts" setup>
</script>
9 changes: 8 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const componentList = [
'alert',
'anchor',
'anchor-link',
'avatar',
'badge',
'breadcrumb',
'breadcrumb-item',
'button',
Expand All @@ -49,6 +51,7 @@ const componentList = [
'countdown',
'date-picker',
'drawer',
'empty',
'flow-design',
'flow-view',
'form',
Expand Down Expand Up @@ -87,8 +90,11 @@ const componentList = [
'radio',
'radio-button',
'radio-group',
'result',
'row',
'select',
'slider',
'steps',
'switch',
'tab-pane',
'tabs',
Expand All @@ -100,7 +106,8 @@ const componentList = [
'tooltip',
'tree',
'tree-select',
'upload'
'upload',
'watermark'
]

const languages = [
Expand Down
2 changes: 1 addition & 1 deletion helper/vetur/attributes.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion helper/vetur/tags.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-pc-ui",
"version": "4.2.10",
"version": "4.2.11",
"description": "A vue based PC component library",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down
16 changes: 16 additions & 0 deletions packages/avatar/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { App } from 'vue'
import { VxeUI } from '@vxe-ui/core'
import VxeAvatarComponent from './src/avatar'
import { dynamicApp } from '../dynamics'

export const VxeAvatar = Object.assign({}, VxeAvatarComponent, {
install (app: App) {
app.component(VxeAvatarComponent.name as string, VxeAvatarComponent)
}
})

dynamicApp.use(VxeAvatar)
VxeUI.component(VxeAvatarComponent)

export const Avatar = VxeAvatar
export default VxeAvatar
67 changes: 67 additions & 0 deletions packages/avatar/src/avatar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { defineComponent, ref, h, reactive } from 'vue'
import XEUtils from 'xe-utils'
import { createEvent } from '../../ui'

import type { AvatarReactData, VxeAvatarEmits, AvatarMethods, AvatarPrivateMethods, ValueOf, AvatarPrivateRef, VxeAvatarPrivateComputed, VxeAvatarConstructor, VxeAvatarPrivateMethods } from '../../../types'

export default defineComponent({
name: 'VxeAvatar',
props: {
},
emits: [
] as VxeAvatarEmits,
setup (props, context) {
const { emit } = context

const xID = XEUtils.uniqueId()

const refElem = ref<HTMLDivElement>()

const reactData = reactive<AvatarReactData>({
})

const refMaps: AvatarPrivateRef = {
refElem
}

const computeMaps: VxeAvatarPrivateComputed = {
}

const $xeAvatar = {
xID,
props,
context,
reactData,

getRefMaps: () => refMaps,
getComputeMaps: () => computeMaps
} as unknown as VxeAvatarConstructor & VxeAvatarPrivateMethods

const dispatchEvent = (type: ValueOf<VxeAvatarEmits>, params: Record<string, any>, evnt: Event | null) => {
emit(type, createEvent(evnt, { $avatar: $xeAvatar }, params))
}

const collapsePaneMethods: AvatarMethods = {
dispatchEvent
}

const collapsePanePrivateMethods: AvatarPrivateMethods = {
}

Object.assign($xeAvatar, collapsePaneMethods, collapsePanePrivateMethods)

const renderVN = () => {
return h('div', {
ref: refElem,
class: 'vxe-avatar'
}, [])
}

$xeAvatar.renderVN = renderVN

return $xeAvatar
},
render () {
return this.renderVN()
}
})
16 changes: 16 additions & 0 deletions packages/badge/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { App } from 'vue'
import { VxeUI } from '@vxe-ui/core'
import VxeBadgeComponent from './src/badge'
import { dynamicApp } from '../dynamics'

export const VxeBadge = Object.assign({}, VxeBadgeComponent, {
install (app: App) {
app.component(VxeBadgeComponent.name as string, VxeBadgeComponent)
}
})

dynamicApp.use(VxeBadge)
VxeUI.component(VxeBadgeComponent)

export const Badge = VxeBadge
export default VxeBadge
67 changes: 67 additions & 0 deletions packages/badge/src/badge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import { defineComponent, ref, h, reactive } from 'vue'
import XEUtils from 'xe-utils'
import { createEvent } from '../../ui'

import type { BadgeReactData, VxeBadgeEmits, BadgeMethods, BadgePrivateMethods, ValueOf, BadgePrivateRef, VxeBadgePrivateComputed, VxeBadgeConstructor, VxeBadgePrivateMethods } from '../../../types'

export default defineComponent({
name: 'VxeBadge',
props: {
},
emits: [
] as VxeBadgeEmits,
setup (props, context) {
const { emit } = context

const xID = XEUtils.uniqueId()

const refElem = ref<HTMLDivElement>()

const reactData = reactive<BadgeReactData>({
})

const refMaps: BadgePrivateRef = {
refElem
}

const computeMaps: VxeBadgePrivateComputed = {
}

const $xeBadge = {
xID,
props,
context,
reactData,

getRefMaps: () => refMaps,
getComputeMaps: () => computeMaps
} as unknown as VxeBadgeConstructor & VxeBadgePrivateMethods

const dispatchEvent = (type: ValueOf<VxeBadgeEmits>, params: Record<string, any>, evnt: Event | null) => {
emit(type, createEvent(evnt, { $badge: $xeBadge }, params))
}

const collapsePaneMethods: BadgeMethods = {
dispatchEvent
}

const collapsePanePrivateMethods: BadgePrivateMethods = {
}

Object.assign($xeBadge, collapsePaneMethods, collapsePanePrivateMethods)

const renderVN = () => {
return h('div', {
ref: refElem,
class: 'vxe-badge'
}, [])
}

$xeBadge.renderVN = renderVN

return $xeBadge
},
render () {
return this.renderVN()
}
})
23 changes: 22 additions & 1 deletion packages/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import zhCN from './language/zh-CN'
import VxeAlert from './alert'
import VxeAnchor from './anchor'
import VxeAnchorLink from './anchor-link'
import VxeAvatar from './avatar'
import VxeBadge from './badge'
import VxeBreadcrumb from './breadcrumb'
import VxeBreadcrumbItem from './breadcrumb-item'
import VxeButton from './button'
Expand All @@ -22,6 +24,7 @@ import VxeCollapsePane from './collapse-pane'
import VxeCountdown from './countdown'
import VxeDatePicker from './date-picker'
import VxeDrawer, { DrawerController } from './drawer'
import VxeEmpty from './empty'
import VxeForm from './form'
import VxeFormDesign from './form-design'
import VxeFormGather from './form-gather'
Expand Down Expand Up @@ -58,8 +61,11 @@ import VxePulldown from './pulldown'
import VxeRadio from './radio'
import VxeRadioButton from './radio-button'
import VxeRadioGroup from './radio-group'
import VxeResult from './result'
import VxeRow from './row'
import VxeSelect from './select'
import VxeSlider from './slider'
import VxeSteps from './steps'
import VxeSwitch from './switch'
import VxeTabPane from './tab-pane'
import VxeTabs from './tabs'
Expand All @@ -72,6 +78,7 @@ import VxeTooltip from './tooltip'
import VxeTree from './tree'
import VxeTreeSelect from './tree-select'
import VxeUpload from './upload'
import VxeWatermark from './watermark'

import { saveLocalFile, readLocalFile } from './upload/src/util'
import { printHtml } from './print/src/util'
Expand All @@ -80,6 +87,8 @@ const components = [
VxeAlert,
VxeAnchor,
VxeAnchorLink,
VxeAvatar,
VxeBadge,
VxeBreadcrumb,
VxeBreadcrumbItem,
VxeButton,
Expand All @@ -96,6 +105,7 @@ const components = [
VxeCountdown,
VxeDatePicker,
VxeDrawer,
VxeEmpty,
VxeForm,
VxeFormDesign,
VxeFormGather,
Expand Down Expand Up @@ -132,8 +142,11 @@ const components = [
VxeRadio,
VxeRadioButton,
VxeRadioGroup,
VxeResult,
VxeRow,
VxeSelect,
VxeSlider,
VxeSteps,
VxeSwitch,
VxeTabPane,
VxeTabs,
Expand All @@ -145,7 +158,8 @@ const components = [
VxeTooltip,
VxeTree,
VxeTreeSelect,
VxeUpload
VxeUpload,
VxeWatermark
]

export function install (app: App, options?: VxeGlobalConfig) {
Expand Down Expand Up @@ -174,6 +188,8 @@ export * from './ui'
export * from './alert'
export * from './anchor'
export * from './anchor-link'
export * from './avatar'
export * from './badge'
export * from './breadcrumb'
export * from './breadcrumb-item'
export * from './button'
Expand All @@ -190,6 +206,7 @@ export * from './collapse-pane'
export * from './countdown'
export * from './date-picker'
export * from './drawer'
export * from './empty'
export * from './form'
export * from './form-design'
export * from './form-gather'
Expand Down Expand Up @@ -226,8 +243,11 @@ export * from './pulldown'
export * from './radio'
export * from './radio-button'
export * from './radio-group'
export * from './result'
export * from './row'
export * from './select'
export * from './slider'
export * from './steps'
export * from './switch'
export * from './tab-pane'
export * from './tabs'
Expand All @@ -240,3 +260,4 @@ export * from './tooltip'
export * from './tree'
export * from './tree-select'
export * from './upload'
export * from './watermark'
Loading

0 comments on commit 29aced5

Please sign in to comment.