sh-view 2.8.12 → 2.8.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sh-view",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.13",
|
|
4
4
|
"description": "基于vxe-table二次封装,更包含Alert,Badge,Card,CodeEditor,Col,Corner,CountTo,Drawer,Empty,Form,Header,Icon,List,Loading,Modal,Noticebar,Poptip,Progress,PullRefresh,Query,Result,Row,Split,Grid,Table,Tabs,Tag,Toolbar,Tree,Upload,WaterFall,WaterMark等丰富组件库",
|
|
5
5
|
"main": "packages/index.js",
|
|
6
6
|
"typings": "types/index.d.ts",
|
|
@@ -109,7 +109,7 @@ export default defineComponent({
|
|
|
109
109
|
|
|
110
110
|
const pulldownValue = ref(false)
|
|
111
111
|
const inputValue = ref(props.modelValue)
|
|
112
|
-
const rangeValue = ref(props.modelValue
|
|
112
|
+
const rangeValue = ref(Array.isArray(props.modelValue) ? props.modelValue : [])
|
|
113
113
|
|
|
114
114
|
const inputConfig = computed(() => {
|
|
115
115
|
let defaultProps = {}
|
|
@@ -217,7 +217,7 @@ export default defineComponent({
|
|
|
217
217
|
watch(
|
|
218
218
|
() => props.modelValue,
|
|
219
219
|
(value, oldValue) => {
|
|
220
|
-
if (props.range) {
|
|
220
|
+
if (props.range && Array.isArray(value)) {
|
|
221
221
|
rangeValue.value = value
|
|
222
222
|
} else {
|
|
223
223
|
inputValue.value = value
|
|
@@ -43,7 +43,7 @@ let defaultProps = {
|
|
|
43
43
|
$vTextArea: { placeholder: '请输入', rows: 2, transfer: true, resize: 'none', showWordCount: true },
|
|
44
44
|
$vSelect: { placeholder: '请选择', filterable: true, transfer: true, showType: 'text', tagColor: 'default', split: ',', options: [] },
|
|
45
45
|
$vTree: { placeholder: '请选择', transfer: true, split: ',', nodeKey: 'id', labelField: 'label' },
|
|
46
|
-
$vTime: { type: 'date', placeholder: '请选择时间', transfer: true, editable: false, prefixType: 'text', suffixType: 'text' },
|
|
46
|
+
$vTime: { type: 'date', placeholder: '请选择时间', transfer: true, editable: false, prefixType: 'text', suffixType: 'text', separator: '至' },
|
|
47
47
|
$vProgress: { strokeWidth: 20, strokeColor: ['#108ee9', '#87d068'], textInside: true, min: 0, max: 100, digits: 2 },
|
|
48
48
|
$vSwitch: { placeholder: '请选择', openLabel: '是', openValue: '1', closeLabel: '否', closeValue: '0' },
|
|
49
49
|
$vMoney: { type: 'number', placeholder: '请输入', transfer: true, commafy: true, digits: 2, moneyUnit: 1, min: 0, max: 1000000000000 },
|
|
@@ -27,6 +27,7 @@ export default function (props, context, proxy) {
|
|
|
27
27
|
// 初始化数据
|
|
28
28
|
const initData = () => {
|
|
29
29
|
let keyValue = $vUtils.get(props.rdata, props.rkey)
|
|
30
|
+
if (keyValue && $vUtils.isEqual(keyValue, renderValue.value)) return
|
|
30
31
|
formatValueFun(keyValue)
|
|
31
32
|
}
|
|
32
33
|
|
|
@@ -98,10 +99,18 @@ export default function (props, context, proxy) {
|
|
|
98
99
|
renderText.value = footerText
|
|
99
100
|
return
|
|
100
101
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
const { rvalue, rtext } = $vUtils.formatRender(value, props.rkey, props.rdata, props.rname, props.rprops, proxy, editable)
|
|
103
|
+
if (['$vMoney'].includes(props.rname)) {
|
|
104
|
+
renderValue.value = rtext
|
|
105
|
+
} else {
|
|
106
|
+
renderValue.value = rvalue
|
|
107
|
+
}
|
|
108
|
+
if (props.rname === '$vTime' && props.rprops.range && Array.isArray(rtext) && rtext.length > 0) {
|
|
109
|
+
renderText.value = `${rtext[0] || ''}${props.rprops.separator}${rtext[1] || ''}`
|
|
110
|
+
} else {
|
|
111
|
+
renderText.value = rtext
|
|
112
|
+
}
|
|
113
|
+
return { rvalue, rtext }
|
|
105
114
|
}
|
|
106
115
|
const getBillClass = bil => {
|
|
107
116
|
return { basic: bil.fullText === '元', commafy: ['千', '百万', '十亿', '兆'].includes(bil.fullText) }
|