Skip to content

Commit

Permalink
releases 3.1.36
Browse files Browse the repository at this point in the history
  • Loading branch information
xuliangzhan committed Oct 25, 2024
1 parent 4b246aa commit 782c3ad
Show file tree
Hide file tree
Showing 36 changed files with 1,452 additions and 66 deletions.
3 changes: 2 additions & 1 deletion examples/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export default Vue.extend({
{ name: 'BadgeTest', routerLink: { name: 'BadgeTest' } },
{ name: 'AvatarTest', routerLink: { name: 'AvatarTest' } },
{ name: 'SliderTest', routerLink: { name: 'SliderTest' } },
{ name: 'RateTest', routerLink: { name: 'RateTest' } }
{ name: 'RateTest', routerLink: { name: 'RateTest' } },
{ name: 'TableSelect', routerLink: { name: 'TableSelect' } }
]
}
},
Expand Down
4 changes: 2 additions & 2 deletions examples/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import VxeUI from '../packages'
import enUS from '../packages/language/en-US'
import '../styles/all.scss'

// import VxeTable from 'vxe-table'
// import VxeUITable from 'vxe-table'
// import 'vxe-table/lib/style.css'

declare global {
Expand Down Expand Up @@ -40,7 +40,7 @@ VxeUI.setLanguage((localStorage.getItem('VXE_LANGUAGE') as 'zh-CN' | 'en-US') ||
window.axios.defaults.baseURL = 'https://api.vxetable.cn/demo'

Vue.use(VxeUI)
// Vue.use(VxeTable)
// Vue.use(VxeUITable)

Vue.config.productionTip = false

Expand Down
5 changes: 5 additions & 0 deletions examples/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ const routes: Array<RouteConfig> = [
path: '/component/rate',
name: 'RateTest',
component: () => import('../views/rate/RateTest.vue')
},
{
path: '/component/table-select',
name: 'TableSelect',
component: () => import('../views/table-select/TableSelect.vue')
}
]

Expand Down
2 changes: 1 addition & 1 deletion examples/views/icon/IconTest.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default Vue.extend({
data () {
return {
iconList: [
'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', 'slider', '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', 'rich-text', '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', 'slider', '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'
] as VxeIconPropTypes.Name[]
}
}
Expand Down
57 changes: 57 additions & 0 deletions examples/views/table-select/TableSelect.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<template>
<div>
<vxe-table-select v-model="val1" :options="opts1" :columns="columns1"></vxe-table-select>
<vxe-table-select v-model="val2" :options="opts2" :columns="columns2" multiple></vxe-table-select>
</div>
</template>

<script lang="ts">
import Vue from 'vue'
import { VxeTableSelectPropTypes } from '../../../types'
export default Vue.extend({
data () {
const columns1: VxeTableSelectPropTypes.Columns = [
{ field: 'name', title: 'Name' },
{ field: 'role', title: 'Role' },
{ field: 'sex', title: 'Sex' }
]
const opts1 = [
{ name: 'Test1', role: 'Test', sex: 'man', label: 'Test1', value: 1 },
{ name: 'Test2', role: 'Test', sex: 'man', label: 'Test2', value: 2 },
{ name: 'Test3', role: 'Test', sex: 'man', label: 'Test3', value: 3 },
{ name: 'Test4', role: 'Test', sex: 'man', label: 'Test4', value: 4 },
{ name: 'Test5', role: 'Test', sex: 'man', label: 'Test5', value: 5 },
{ name: 'Test6', role: 'Test', sex: 'man', label: 'Test6', value: 6 }
]
const columns2: VxeTableSelectPropTypes.Columns = [
{ field: 'name', title: 'Name' },
{ field: 'role', title: 'Role' },
{ field: 'sex', title: 'Sex' }
]
const opts2 = [
{ name: 'Test1', role: 'Test', sex: 'man', label: 'Test1', value: 1 },
{ name: 'Test2', role: 'Test', sex: 'man', label: 'Test2', value: 2 },
{ name: 'Test3', role: 'Test', sex: 'man', label: 'Test3', value: 3 },
{ name: 'Test4', role: 'Test', sex: 'man', label: 'Test4', value: 4 },
{ name: 'Test5', role: 'Test', sex: 'man', label: 'Test5', value: 5 },
{ name: 'Test6', role: 'Test', sex: 'man', label: 'Test6', value: 6 }
]
return {
val1: '',
columns1,
opts1,
val2: '',
columns2,
opts2
}
},
methods: {
tabToadEvent (params: any) {
console.log(params)
}
}
})
</script>
4 changes: 3 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ const componentList = [
'col',
'collapse',
'collapse-pane',
'color-picker',
'countdown',
'date-picker',
'drawer',
Expand Down Expand Up @@ -98,6 +99,7 @@ const componentList = [
'steps',
'switch',
'tab-pane',
'table-select',
'tabs',
'tag',
'text-ellipsis',
Expand Down Expand Up @@ -314,7 +316,7 @@ gulp.task('build_icon', () => {
.pipe(gulp.dest('lib'))
.pipe(gulp.dest('lib/icon/style'))
.pipe(gulp.dest('es'))
.pipe(gulp.dest('es/icon/style'))
.pipe(gulp.dest('es/icon'))
)
})

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.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vxe-pc-ui",
"version": "3.1.33",
"version": "3.1.36",
"description": "A vue based PC component library",
"scripts": {
"update": "npm install --legacy-peer-deps",
Expand Down Expand Up @@ -62,7 +62,8 @@
"vue-template-compiler": "2.6.14",
"vue": "2.6.14",
"vue-i18n": "^8.15.1",
"vue-router": "^3.5.1"
"vue-router": "^3.5.1",
"vxe-table": "^3.9.16"
},
"vetur": {
"tags": "helper/vetur/tags.json",
Expand Down
16 changes: 16 additions & 0 deletions packages/color-picker/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { VueConstructor } from 'vue'
import { VxeUI } from '@vxe-ui/core'
import VxeColorPickerComponent from './src/color-picker'
import { dynamicApp } from '../dynamics'

export const VxeColorPicker = Object.assign({}, VxeColorPickerComponent, {
install (app: VueConstructor) {
app.component(VxeColorPickerComponent.name as string, VxeColorPickerComponent)
}
})

dynamicApp.use(VxeColorPicker)
VxeUI.component(VxeColorPickerComponent)

export const ColorPicker = VxeColorPicker
export default VxeColorPicker
47 changes: 47 additions & 0 deletions packages/color-picker/src/color-picker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { CreateElement, VNode } from 'vue'
import { defineVxeComponent } from '../../ui/src/comp'
import XEUtils from 'xe-utils'
import { createEvent } from '../../ui'

import type { ColorPickerReactData, VxeColorPickerEmits, ValueOf } from '../../../types'

export default defineVxeComponent({
name: 'VxeColorPicker',
props: {
},
data () {
const xID = XEUtils.uniqueId()
const reactData: ColorPickerReactData = {
}
return {
xID,
reactData
}
},
methods: {
//
// Method
//
dispatchEvent (type: ValueOf<VxeColorPickerEmits>, params: Record<string, any>, evnt: Event | null) {
const $xeColorPicker = this
$xeColorPicker.$emit(type, createEvent(evnt, { $colorPicker: $xeColorPicker }, params))
},

//
// Render
//
renderVN (h: CreateElement): VNode {
const $xeColorPicker = this
const slots = $xeColorPicker.$scopedSlots

const defaultSlot = slots.default
return h('div', {
ref: 'refElem',
class: 'vxe-color-picker'
}, defaultSlot ? defaultSlot({}) : [])
}
},
render (this: any, h) {
return this.renderVN(h)
}
})
6 changes: 6 additions & 0 deletions packages/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import VxeCheckboxGroup from './checkbox-group'
import VxeCol from './col'
import VxeCollapse from './collapse'
import VxeCollapsePane from './collapse-pane'
import VxeColorPicker from './color-picker'
import VxeCountdown from './countdown'
import VxeDatePicker from './date-picker'
import VxeDrawer, { DrawerController } from './drawer'
Expand Down Expand Up @@ -69,6 +70,7 @@ import VxeSlider from './slider'
import VxeSteps from './steps'
import VxeSwitch from './switch'
import VxeTabPane from './tab-pane'
import VxeTableSelect from './table-select'
import VxeTabs from './tabs'
import VxeTag from './tag'
import VxeTextEllipsis from './text-ellipsis'
Expand Down Expand Up @@ -103,6 +105,7 @@ const components = [
VxeCol,
VxeCollapse,
VxeCollapsePane,
VxeColorPicker,
VxeCountdown,
VxeDatePicker,
VxeDrawer,
Expand Down Expand Up @@ -151,6 +154,7 @@ const components = [
VxeSteps,
VxeSwitch,
VxeTabPane,
VxeTableSelect,
VxeTabs,
VxeTag,
VxeTextEllipsis,
Expand Down Expand Up @@ -206,6 +210,7 @@ export * from './checkbox-group'
export * from './col'
export * from './collapse'
export * from './collapse-pane'
export * from './color-picker'
export * from './countdown'
export * from './date-picker'
export * from './drawer'
Expand Down Expand Up @@ -254,6 +259,7 @@ export * from './slider'
export * from './steps'
export * from './switch'
export * from './tab-pane'
export * from './table-select'
export * from './tabs'
export * from './tag'
export * from './text-ellipsis'
Expand Down
13 changes: 13 additions & 0 deletions packages/form/render/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,19 @@ renderer.mixin({
]
}
},
VxeTableSelect: {
renderFormItemContent (h: CreateElement, renderOpts: any, params: any) {
const { data, field } = params
const { options, optionProps } = renderOpts
const itemValue = XEUtils.get(data, field)
return [
h(getDefaultComponent(renderOpts), {
props: getComponentFormItemProps(renderOpts, params, itemValue, { options, optionProps }),
on: getItemOns(renderOpts, params)
})
]
}
},
VxeIconPicker: {
renderFormItemContent: defaultFormItemRender
},
Expand Down
16 changes: 16 additions & 0 deletions packages/table-select/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { VueConstructor } from 'vue'
import { VxeUI } from '@vxe-ui/core'
import VxeTableSelectComponent from './src/table-select'
import { dynamicApp } from '../dynamics'

export const VxeTableSelect = Object.assign({}, VxeTableSelectComponent, {
install (app: VueConstructor) {
app.component(VxeTableSelectComponent.name as string, VxeTableSelectComponent)
}
})

dynamicApp.use(VxeTableSelect)
VxeUI.component(VxeTableSelectComponent)

export const TableSelect = VxeTableSelect
export default VxeTableSelect
Loading

0 comments on commit 782c3ad

Please sign in to comment.