Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
innerken-utils
Advanced tools
import { hillo, IKDataEntity } from 'innerken-utils'
export default {
entity: {
id: {
type: IKDataEntity.Types.Integer,
displayName: 'id',
tableConfig: {
align: 'start',
},
formConfig: {
disableNew: true,
disableEdit: true,
requiredNew: false,
},
},
photo: {
displayName: 'photo',
type: IKDataEntity.Types.Image,
formConfig: {
type: {
name: 'image',
root: () => store.getters.rootUrl + GlobalSettings.servantRoot,
fileStorage: 'file',
},
requiredEdit: false,
md: 12,
},
},
name: {
displayName: 'staffName',
},
password: {
displayName: 'password',
},
permission: {
type: IKDataEntity.Types.Boolean,
displayName: '权限',
formConfig: {
type: {
name: 'switch',
},
},
},
isPartTime: {
type: IKDataEntity.Types.Boolean,
displayName: '兼职',
formConfig: {
type: {
name: 'switch',
},
},
},
},
add: function (item) {
return hillo.postWithUploadFile('Servant.php?op=add', item, {
showLoading: true,
})
},
edit: function (item) {
if (item.file) {
item.imageExt = item.file.name.split('.').lastItem
}
return hillo.postWithUploadFile('Servant.php?op=update', item, {
showLoading: true,
})
},
delete: function (id) {
return hillo.post('Servant.php?op=delete', { id: id })
},
load: async function (filter) {
const _this = this
this.list = (await hillo.get('Servant.php', { lang: GlobalSettings.lang(), ...filter }))
.content.map(function (item) {
return IKDataEntity.parseDataForEntity(item, _this.entity)
})
return this.list
},
list: null,
getList: async function (force = false, ...filter) {
if (!this.list || force) {
await this.load(filter)
}
return this.list
}, // Lazy Load
}
[
"对象字段名": {
"type": IKDataEntity.Types.String // [一个实体类型](#目前支持的DataEntity类型列表)
"displayName": '显示名称'
"tableConfig": {//对table的控制具体可以查看Vuetify的TableHeader
align: 'start'
},
"formConfig": {//对表单的控制
default: '',
cols: 12,
md: 6,
sm: 12,
type: { name: 'text' },
// PossibleValue of types
/*
Text:{ name: 'text' }
Select:
{
name:'select',
selectItems:[],//options
itemText:'',//bind-item-key
itemValue:''//bind-item-key
}
Switch:{name:'switch'}
File:
{
name:'file',
root:'',//root of src images
fileStorage:''//fileStorageItemKey will generate a key auto, default:file
}
* */
disableNew: true,
disableEdit: true,
inNew: true,
inEdit: true,
rule: [],
required: true,
requiredEdit: true,
requiredNew: true
},
form: true,//出现在表单中
header: true//出现在表格中
},
]
FAQs
Utils for innerken GmbH
The npm package innerken-utils receives a total of 4 weekly downloads. As such, innerken-utils popularity was classified as not popular.
We found that innerken-utils demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.