1 |
- {"remainingRequest":"E:\\boman-framwork\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\boman-framwork\\ruoyi-ui\\src\\components\\ItemComponent\\index.vue?vue&type=style&index=0&id=b61cb5a6&lang=scss&scoped=true&","dependencies":[{"path":"E:\\boman-framwork\\ruoyi-ui\\src\\components\\ItemComponent\\index.vue","mtime":1620456586982},{"path":"E:\\boman-framwork\\ruoyi-ui\\node_modules\\css-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\boman-framwork\\ruoyi-ui\\node_modules\\vue-loader\\lib\\loaders\\stylePostLoader.js","mtime":499162500000},{"path":"E:\\boman-framwork\\ruoyi-ui\\node_modules\\postcss-loader\\src\\index.js","mtime":499162500000},{"path":"E:\\boman-framwork\\ruoyi-ui\\node_modules\\sass-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\boman-framwork\\ruoyi-ui\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\boman-framwork\\ruoyi-ui\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:CgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoNCi5JdGVtQ29tcG9uZW50Um9vdCB7DQogIHdpZHRoOiAxMDAlOw0KICBoZWlnaHQ6IDEwMCU7DQogIGRpc3BsYXk6IGZsZXg7DQogIGp1c3RpZnktY29udGVudDogY2VudGVyOw0KICBhbGlnbi1pdGVtczogY2VudGVyOw0KICBwYWRkaW5nLXRvcDogOHB4Ow0KDQogIC5pdGVtTGFiZWwgew0KICAgIHdpZHRoOiAxMDBweDsNCiAgICBtYXJnaW4tcmlnaHQ6IDhweDsNCiAgICB0ZXh0LWFsaWduOiByaWdodDsNCiAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpczsNCiAgICB3aGl0ZS1zcGFjZTogbm93cmFwOw0KICAgIGRpc3BsYXk6IGlubGluZS1ibG9jazsNCiAgfQ0KDQogIC5pdGVtQ29tcG9uZW50IHsNCiAgICBmbGV4OiAxOw0KICAgIG92ZXJmbG93OiBoaWRkZW47DQogIH0NCiAgLmxhYmVsLXRpcCB7DQogICAgY29sb3I6IHJlZDsNCiAgICBmb250LXNpemU6IDE2cHg7DQogICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTsNCiAgICBwb3NpdGlvbjogcmVsYXRpdmU7DQogICAgdG9wOiAtMXB4Ow0KICAgIHJpZ2h0OiAzcHg7DQogIH0NCn0NCg=="},{"version":3,"sources":["index.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAynBA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"index.vue","sourceRoot":"src/components/ItemComponent","sourcesContent":["<template>\r\n <div class=\"ItemComponentRoot\" v-if=\"!_items.hidden\">\r\n <span class=\"itemLabel\">\r\n <span v-if=\"_items.required\" class=\"label-tip\">*</span>\r\n {{ _items.title }}:\r\n </span>\r\n <div class=\"itemComponent\">\r\n <Input\r\n v-if=\"_items.type === 'input'\"\r\n v-model=\"_items.value\"\r\n :type=\"_items.props.type\"\r\n :clearable=\"_items.props.clearable\"\r\n :disabled=\"_items.props.disabled\"\r\n :readonly=\"_items.props.readonly\"\r\n :rows=\"_items.props.rows\"\r\n :autosize=\"_items.props.autosize\"\r\n :number=\"_items.props.number\"\r\n :autofocus=\"_items.props.autofocus\"\r\n :placeholder=\"_items.props.placeholder\"\r\n :size=\"_items.props.size\"\r\n :maxlength=\"_items.props.maxlength\"\r\n :icon=\"_items.props.icon\"\r\n :regx=\"_items.props.regx\"\r\n on-click=\"inputClick\"\r\n on-blur=\"inputBlur\"\r\n @on-change=\"inputChange\"\r\n @on-enert=\"inputEnter\"\r\n @on-focus=\"inputFocus\"\r\n @on-keyup=\"inputKeyUp\"\r\n @on-keydown=\"inputKeyDown\"\r\n @on-keypress=\"inputKeyPress\"\r\n @on-regx-check=\"inputRegxCheck\"\r\n />\r\n\r\n <Checkbox\r\n v-if=\"_items.type === 'checkbox'\"\r\n v-model=\"_items.value\"\r\n :disabled=\"_items.props.disabled\"\r\n :size=\"_items.props.size\"\r\n :circle=\"_items.props.circle\"\r\n @on-change=\"checkBoxChange\"\r\n />\r\n\r\n <Select\r\n v-if=\"_items.type === 'select'\"\r\n v-model=\"_items.value\"\r\n :clearable=\"_items.props.clearable\"\r\n :multiple=\"_items.props.multiple\"\r\n :multiple-type=\"_items.props.multipleType\"\r\n :disabled=\"_items.props.disabled\"\r\n :placeholder=\"_items.props.placeholder\"\r\n :not-found-text=\"_items.props['not-found-text']\"\r\n :label-in-value=\"_items.props['label-in-value']\"\r\n :placement=\"_items.props.placement\"\r\n :transfer=\"_items.props.transfer\"\r\n @on-change=\"selectChange\"\r\n @on-clear=\"selectClear\"\r\n @on-open-change=\"selectOpenChange\"\r\n >\r\n <Option\r\n v-for=\"item in _items.options\"\r\n :key=\"item.value\"\r\n :value=\"item.value\"\r\n :disabled=\"item.disabled\"\r\n :label=\"item.label\"\r\n >{{ item.label }}</Option>\r\n </Select>\r\n\r\n <i-switch v-if=\"_items.type === 'Switch'\" v-model=\"_items.value\" @on-change=\"SwitchChange\" />\r\n\r\n <DatePicker\r\n v-if=\"_items.type === 'DatePicker'\"\r\n v-model=\"_items.value\"\r\n :type=\"_items.props.type\"\r\n :transfer=\"_items.props.transfer\"\r\n :format=\"_items.props.format\"\r\n :placement=\"_items.props.placement\"\r\n :placeholder=\"_items.props.placeholder\"\r\n :options=\"_items.props.options\"\r\n :open=\"_items.props.open\"\r\n :confirm=\"_items.props.confirm\"\r\n :size=\"_items.props.size\"\r\n :disabled=\"_items.props.disabled\"\r\n :clearable=\"_items.props.clearable\"\r\n :readonly=\"_items.props.readonly\"\r\n :editable=\"_items.props.editable\"\r\n @on-change=\"($event,event,instance) => datePickerChange(_items.value=$event,event,instance,_items.props.type)\"\r\n @on-clear=\"datePickerClear\"\r\n />\r\n\r\n <DropMultiSelectFilter\r\n v-if=\"_items.type === 'DropDownSelectFilter' && !_items.props.single\"\r\n :data=\"_items.props.data\"\r\n :single=\"_items.props.single\"\r\n :total-row-count=\"_items.props.totalRowCount\"\r\n :page-size=\"_items.props.pageSize\"\r\n :auto-data=\"_items.props.AutoData\"\r\n :disabled=\"_items.props.disabled\"\r\n :hidecolumns=\"_items.props.hidecolumns\"\r\n :data-empty-message=\"_items.props.dataEmptyMessage\"\r\n :default-selected=\"_items.props.defaultSelected\"\r\n :transfer=\"_items.props.transfer\"\r\n :columnsKey=\"_items.props.columnsKey\"\r\n :showColnameKey=\"_items.props.showColnameKey\"\r\n :placeholder=\"_items.props.placeholder\"\r\n @on-fkrp-selected=\"fkrpSelected\"\r\n @on-page-change=\"pageChange\"\r\n @on-input-value-change=\"inputValueChange\"\r\n @on-focus=\"fkrpSelectedInputFocus\"\r\n @on-blur=\"fkrpSelectedInputBlur\"\r\n @on-keyup=\"fkrpSelectedInputKeyup\"\r\n @on-keydown=\"fkrpSelectedInputKeydown\"\r\n @on-popper-show=\"fkrpSelectedPopperShow\"\r\n @on-popper-hide=\"fkrpSelectedPopperHide\"\r\n @on-clear=\"fkrpSelectedClear\"\r\n />\r\n\r\n <DropDownSelectFilter\r\n v-if=\"_items.type === 'DropDownSelectFilter' && _items.props.single\"\r\n :data=\"_items.props.data\"\r\n :single=\"_items.props.single\"\r\n :total-row-count=\"_items.props.totalRowCount\"\r\n :page-size=\"_items.props.pageSize\"\r\n :auto-data=\"_items.props.AutoData\"\r\n :disabled=\"_items.props.disabled\"\r\n :hidecolumns=\"_items.props.hidecolumns\"\r\n :data-empty-message=\"_items.props.dataEmptyMessage\"\r\n :default-selected=\"_items.props.defaultSelected\"\r\n :transfer=\"_items.props.transfer\"\r\n :columnsKey=\"_items.props.columnsKey\"\r\n :showColnameKey=\"_items.props.showColnameKey\"\r\n :placeholder=\"_items.props.placeholder\"\r\n @on-fkrp-selected=\"fkrpSelected\"\r\n @on-page-change=\"pageChange\"\r\n @on-input-value-change=\"inputValueChange\"\r\n @on-focus=\"fkrpSelectedInputFocus\"\r\n @on-blur=\"fkrpSelectedInputBlur\"\r\n @on-keyup=\"fkrpSelectedInputKeyup\"\r\n @on-keydown=\"fkrpSelectedInputKeydown\"\r\n @on-popper-show=\"fkrpSelectedPopperShow\"\r\n @on-popper-hide=\"fkrpSelectedPopperHide\"\r\n @on-clear=\"fkrpSelectedClear\"\r\n />\r\n <div class=\"complex-input\" v-if=\"_items.type === 'selectInput'\">\r\n <Input\r\n v-model=\"_items.value\"\r\n :readonly=\"_items.props.readonly\"\r\n @on-change=\"inputChange\"\r\n @on-enert=\"inputEnter\"\r\n @on-focus=\"inputFocus\"\r\n @on-keyup=\"inputKeyUp\"\r\n @on-keydown=\"inputKeyDown\"\r\n @on-keypress=\"inputKeyPress\"\r\n @on-regx-check=\"inputRegxCheck\"\r\n >\r\n <Select\r\n v-if=\"_items.slot\"\r\n v-model=\"_items.slotValue\"\r\n slot=\"prepend\"\r\n style=\"width: 60px\"\r\n :transfer=\"true\"\r\n @on-change=\"selectChange\"\r\n >\r\n <Option :value=\"0\">指定</Option>\r\n <Option :value=\"1\">不限次数</Option>\r\n </Select>\r\n </Input>\r\n </div>\r\n </div>\r\n </div>\r\n</template>\r\n<script>\r\nimport dataProp from \"../../props/index.js\";\r\nexport default {\r\n name: \"ItemComponent\",\r\n props: {\r\n items: {\r\n type: Object,\r\n default() {\r\n return {};\r\n }\r\n }\r\n },\r\n computed: {\r\n _items() {\r\n // 将设置的props和默认props进行assign\r\n const item = JSON.parse(JSON.stringify(this.items));\r\n // const item = this.items;\r\n item.props = Object.assign(\r\n {},\r\n // dataProp[item.type].props,\r\n this.items.props\r\n );\r\n item.event = Object.assign({}, this.items.event);\r\n if (item.type === \"DatePicker\") {\r\n if (\r\n item.props.type === \"datetimerange\" ||\r\n item.props.type === \"daterange\"\r\n ) {\r\n if (!item.value) {\r\n item.value = [];\r\n }\r\n } else {\r\n item.value = new Date();\r\n }\r\n }\r\n return item;\r\n }\r\n },\r\n methods: {\r\n valueChange(type) {\r\n // 值发生改变时触发 只要是item中的value改变就触发该方法,是为了让父组件数据同步\r\n if(type&&type==='select'){\r\n this.$emit(\"inputChange\", this._items.slotValue, this._items,type);\r\n }else{\r\n this.$emit(\"inputChange\", this._items.value, this._items);\r\n }\r\n\r\n // this.$emit(\"inputChange\", this._items.value, this._items);\r\n },\r\n // Switch\r\n SwitchChange() {\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"change\") &&\r\n typeof this._items.event.change === \"function\"\r\n ) {\r\n this._items.event.change(event);\r\n }\r\n },\r\n\r\n // input event\r\n inputChange(event, $this) {\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"change\") &&\r\n typeof this._items.event.change === \"function\"\r\n ) {\r\n this._items.event.change(event, $this);\r\n }\r\n },\r\n inputEnter(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"enter\") &&\r\n typeof this._items.event.enter === \"function\"\r\n ) {\r\n this._items.event.enter(event, $this);\r\n }\r\n },\r\n inputClick(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"click\") &&\r\n typeof this._items.event.click === \"function\"\r\n ) {\r\n this._items.event.click(event, $this);\r\n }\r\n },\r\n inputFocus(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"focus\") &&\r\n typeof this._items.event.focus === \"function\"\r\n ) {\r\n this._items.event.focus(event, $this);\r\n }\r\n },\r\n inputBlur(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"blur\") &&\r\n typeof this._items.event.blur === \"function\"\r\n ) {\r\n this._items.event.blur(event, $this);\r\n }\r\n },\r\n inputKeyUp(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"keyup\") &&\r\n typeof this._items.event.keyup === \"function\"\r\n ) {\r\n this._items.event.keyup(event, $this);\r\n }\r\n },\r\n inputKeyDown(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"keydown\") &&\r\n typeof this._items.event.keydown === \"function\"\r\n ) {\r\n this._items.event.keydown(event, $this);\r\n }\r\n },\r\n inputKeyPress(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"keypress\") &&\r\n typeof this._items.event.keypress === \"function\"\r\n ) {\r\n this._items.event.keypress(event, $this);\r\n }\r\n },\r\n inputRegxCheck(value, $this, errorValue) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"regxCheck\") &&\r\n typeof this._items.event.regxCheck === \"function\"\r\n ) {\r\n this._items.event.regxCheck(value, $this, errorValue);\r\n }\r\n },\r\n\r\n // checkbox event\r\n checkBoxChange(value, $this) {\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"change\") &&\r\n typeof this._items.event.change === \"function\"\r\n ) {\r\n this._items.event.change(value, $this);\r\n }\r\n },\r\n\r\n // select input\r\n selectChange(value, $this) {\r\n if (this._items.type === \"selectInput\") {\r\n this._items.slotValue = value;\r\n this.valueChange(\"select\");\r\n } else {\r\n this._items.value = value;\r\n this.valueChange();\r\n }\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"change\") &&\r\n typeof this._items.event.change === \"function\"\r\n ) {\r\n this._items.event.change(value, $this);\r\n }\r\n },\r\n selectClear($this) {\r\n this._items.value = null;\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"clear\") &&\r\n typeof this._items.event.clear === \"function\"\r\n ) {\r\n this._items.event.clear($this);\r\n }\r\n },\r\n selectOpenChange(value, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"openChange\") &&\r\n typeof this._items.event.openChange === \"function\"\r\n ) {\r\n this._items.event.openChange(value, $this);\r\n }\r\n },\r\n // datepick event\r\n datePickerChange(value, type, $this) {\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"change\") &&\r\n typeof this._items.event.change === \"function\"\r\n ) {\r\n this._items.event.change(value, $this);\r\n }\r\n },\r\n datePickerClear($this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"clear\") &&\r\n typeof this._items.event.clear === \"function\"\r\n ) {\r\n this._items.event.clear($this);\r\n }\r\n },\r\n\r\n // TimePicker event\r\n timePickerChange(value, timeType, $this) {\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"change\") &&\r\n typeof this._items.event.change === \"function\"\r\n ) {\r\n this._items.event.change(value, $this);\r\n }\r\n },\r\n timePickerClear($this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"clear\") &&\r\n typeof this._items.event.clear === \"function\"\r\n ) {\r\n this._items.event.clear($this);\r\n }\r\n },\r\n\r\n // fkrpSelected event\r\n fkrpSelected(value, $this) {\r\n this._items.value = value;\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"fkrpSelected\"\r\n ) &&\r\n typeof this._items.event.fkrpSelected === \"function\"\r\n ) {\r\n this._items.event.fkrpSelected(value, $this);\r\n }\r\n },\r\n inputValueChange(value, $this) {\r\n this._items.value = value;\r\n // this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"inputValueChange\"\r\n ) &&\r\n typeof this._items.event.inputValueChange === \"function\"\r\n ) {\r\n this._items.event.inputValueChange(value, $this);\r\n }\r\n },\r\n fkrpSelectedClear($this) {\r\n this._items.value = undefined;\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"clear\") &&\r\n typeof this._items.event.clear === \"function\"\r\n ) {\r\n this._items.event.clear($this);\r\n }\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"inputValueChange\"\r\n ) &&\r\n typeof this._items.event.inputValueChange === \"function\"\r\n ) {\r\n this._items.event.inputValueChange(\"\", $this);\r\n }\r\n },\r\n pageChange(value, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"pageChange\") &&\r\n typeof this._items.event.pageChange === \"function\"\r\n ) {\r\n this._items.event.pageChange(value, $this);\r\n }\r\n },\r\n fkrpSelectedInputFocus(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"focus\") &&\r\n typeof this._items.event.focus === \"function\"\r\n ) {\r\n this._items.event.focus(event, $this);\r\n }\r\n },\r\n fkrpSelectedInputBlur(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"blur\") &&\r\n typeof this._items.event.blur === \"function\"\r\n ) {\r\n this._items.event.blur(event, $this);\r\n }\r\n },\r\n fkrpSelectedInputKeyup(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"keyup\") &&\r\n typeof this._items.event.keyup === \"function\"\r\n ) {\r\n this._items.event.keyup(event, $this);\r\n }\r\n },\r\n fkrpSelectedInputKeydown(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"keydown\") &&\r\n typeof this._items.event.keydown === \"function\"\r\n ) {\r\n this._items.event.keydown(event, $this);\r\n }\r\n },\r\n fkrpSelectedPopperShow($this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"on-show\") &&\r\n typeof this._items.event[\"on-show\"] === \"function\"\r\n ) {\r\n this._items.event[\"on-show\"]($this);\r\n }\r\n },\r\n fkrpSelectedPopperHide($this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"on-popper-hide\"\r\n ) &&\r\n typeof this._items.event[\"on-popper-hide\"] === \"function\"\r\n ) {\r\n this._items.event[\"on-popper-hide\"]($this);\r\n }\r\n },\r\n\r\n // AttachFilter event\r\n attachFilterChange(value, $this) {\r\n this._items.value = value;\r\n this.valueChange();\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"popper-value\"\r\n ) &&\r\n typeof this._items.event[\"popper-value\"] === \"function\"\r\n ) {\r\n this._items.event[\"popper-value\"]($this, value, \"change\", this.index);\r\n }\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"inputValueChange\"\r\n ) &&\r\n typeof this._items.event.inputValueChange === \"function\"\r\n ) {\r\n this._items.event.inputValueChange(value, $this);\r\n }\r\n },\r\n attachFilterSelected(row, $this) {\r\n this._items.value = row.label;\r\n this._items.props.selected = row.value;\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"popper-value\"\r\n ) &&\r\n typeof this._items.event[\"popper-value\"] === \"function\"\r\n ) {\r\n this._items.event[\"popper-value\"](\r\n $this,\r\n row.label,\r\n row.value,\r\n this.index\r\n );\r\n }\r\n },\r\n attachFilterInputFocus(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"focus\") &&\r\n typeof this._items.event.focus === \"function\"\r\n ) {\r\n this._items.event.focus(event, $this);\r\n }\r\n },\r\n attachFilterInputBlur(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"blur\") &&\r\n typeof this._items.event.blur === \"function\"\r\n ) {\r\n this._items.event.blur(event, $this);\r\n }\r\n },\r\n attachFilterInputKeyup(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"keyup\") &&\r\n typeof this._items.event.keyup === \"function\"\r\n ) {\r\n this._items.event.keyup(event, $this);\r\n }\r\n },\r\n attachFilterInputKeydown(event, $this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"keydown\") &&\r\n typeof this._items.event.keydown === \"function\"\r\n ) {\r\n this._items.event.keydown(event, $this);\r\n }\r\n },\r\n attachFilterPopclick(event, row, targName, $this) {\r\n if (targName !== \"I\" && event !== 1) {\r\n // 打开弹窗\r\n\r\n $this.showModal = true;\r\n if (event !== 0) {\r\n console.log(row.label);\r\n this.filterDate = JSON.parse(row.label);\r\n }\r\n } else if (\r\n targName === \"I\" &&\r\n Object.prototype.hasOwnProperty.call(this._items.event, \"on-delete\") &&\r\n typeof this._items.event[\"on-delete\"] === \"function\"\r\n ) {\r\n this._items.event[\"on-delete\"]($this, this._items, row.key, this.index);\r\n }\r\n },\r\n attachFilterClear(event, $this) {\r\n this._items.value = \"\";\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"popper-value\"\r\n ) &&\r\n typeof this._items.event[\"popper-value\"] === \"function\"\r\n ) {\r\n this._items.event[\"popper-value\"]($this, \"\", [], this.index);\r\n }\r\n },\r\n attachFilterPopperShow($this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"popper-show\"\r\n ) &&\r\n typeof this._items.event[\"popper-show\"] === \"function\"\r\n ) {\r\n this._items.event[\"popper-show\"]($this, this._items, this.index);\r\n }\r\n },\r\n attachFilterOk($this) {\r\n if (\r\n Object.prototype.hasOwnProperty.call(\r\n this._items.event,\r\n \"popper-value\"\r\n ) &&\r\n typeof this._items.event[\"popper-value\"] === \"function\"\r\n ) {\r\n if ($this._data.IN > 0) {\r\n let value = `已经选中${$this._data.IN}条数据`;\r\n this._items.value = value;\r\n this.valueChange();\r\n this._items.event[\"popper-value\"](\r\n $this,\r\n value,\r\n $this._data.IN,\r\n this.index\r\n );\r\n }\r\n }\r\n }\r\n }\r\n};\r\n</script>\r\n<style lang=\"scss\" scoped>\r\n.ItemComponentRoot {\r\n width: 100%;\r\n height: 100%;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n padding-top: 8px;\r\n\r\n .itemLabel {\r\n width: 100px;\r\n margin-right: 8px;\r\n text-align: right;\r\n text-overflow: ellipsis;\r\n white-space: nowrap;\r\n display: inline-block;\r\n }\r\n\r\n .itemComponent {\r\n flex: 1;\r\n overflow: hidden;\r\n }\r\n .label-tip {\r\n color: red;\r\n font-size: 16px;\r\n vertical-align: middle;\r\n position: relative;\r\n top: -1px;\r\n right: 3px;\r\n }\r\n}\r\n</style>\r\n"]}]}
|